wip(home): refactor home modules *WILL NOT BUILD*
This commit is contained in:
		
							parent
							
								
									2033810429
								
							
						
					
					
						commit
						6a591ecbf7
					
				
					 115 changed files with 1028 additions and 791 deletions
				
			
		|  | @ -0,0 +1,9 @@ | |||
| { pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   packages = { | ||||
|     hyprvolume = pkgs.callPackage ./hyprvolume.nix {}; | ||||
|     hyprbrightness = pkgs.callPackage ./hyprbrightness.nix {}; | ||||
|   }; | ||||
| in | ||||
|   packages | ||||
|  | @ -0,0 +1,20 @@ | |||
| { pkgs, ... }: | ||||
| 
 | ||||
| pkgs.writeShellApplication { | ||||
|   name = "hyprbrightness"; | ||||
|   runtimeInputs = with pkgs; [brillo libnotify]; | ||||
|   text = '' | ||||
|     if [ "$1" == "up" ]; then | ||||
|       brillo -q -u 30000 -A 5 | ||||
|     elif [ "$1" == "down" ]; then | ||||
|       brillo -q -u 30000 -U 5 | ||||
|     else | ||||
|       echo "Invalid argument" | ||||
|       exit 1 | ||||
|     fi | ||||
| 
 | ||||
|     BRIGHTNESS=$(brillo -G | awk -F'.' '{print$1}') | ||||
| 
 | ||||
|     notify-send --app-name="system-notify" -h string:x-canonical-private-synchronous:sys-notify "  $BRIGHTNESS%" | ||||
|   ''; | ||||
| } | ||||
|  | @ -0,0 +1,19 @@ | |||
| { pkgs, ... }: | ||||
| 
 | ||||
| pkgs.writeShellApplication { | ||||
|   name = "hyprvolume"; | ||||
|   runtimeInputs = with pkgs; [pamixer libnotify]; | ||||
|   text = '' | ||||
|     if [ "$1" == "up" ]; then | ||||
|       pamixer --increase 5 | ||||
|     elif [ "$1" == "down" ]; then | ||||
|       pamixer --decrease 5 | ||||
|     elif [ "$1" == "mute" ]; then | ||||
|       pamixer --toggle-mute | ||||
|     fi | ||||
| 
 | ||||
|     VOLUME=$(pamixer --get-volume-human) | ||||
| 
 | ||||
|     notify-send --app-name="system-notify" -h string:x-canonical-private-synchronous:sys-notify " $VOLUME" | ||||
|   ''; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue