Clean up home config, add waybar
This commit is contained in:
		
					parent
					
						
							
								f0607557a0
							
						
					
				
			
			
				commit
				
					
						2836fa9c1e
					
				
			
		
					 5 changed files with 351 additions and 157 deletions
				
			
		|  | @ -3,7 +3,6 @@ | |||
| { | ||||
|   inputs, | ||||
|   pkgs, | ||||
|   lib, | ||||
|   ... | ||||
| }: { | ||||
|   # You can import other home-manager modules here | ||||
|  | @ -212,153 +211,13 @@ | |||
| 
 | ||||
|   wayland.windowManager.hyprland = { | ||||
|     enable = true; | ||||
|     settings = { | ||||
|       "env" = "XCURSOR_SIZE,24"; | ||||
| 
 | ||||
|       "$mod" = "SUPER"; | ||||
| 
 | ||||
|       exec-once = [ | ||||
|         "arRPC" | ||||
|         "hyprpaper" | ||||
|         "nm-applet --indicator" | ||||
|         "waybar" | ||||
|         "swaync" | ||||
|         "1password --silent" | ||||
|       ]; | ||||
| 
 | ||||
|       monitor = [ | ||||
|         "DP-1,1600x900,0x0,1" | ||||
|         "HDMI-A-1,1280x1024,1600x0,1" | ||||
|       ]; | ||||
| 
 | ||||
|       input = { | ||||
|         kb_layout = "us"; | ||||
|         follow_mouse = 1; | ||||
|         touchpad.natural_scroll = "no"; | ||||
|         sensitivity = 0; | ||||
|     systemdIntegration = true; | ||||
|     settings = import ./hyprland.nix; | ||||
|   }; | ||||
| 
 | ||||
|       general = { | ||||
|         gaps_in = 5; | ||||
|         gaps_out = 20; | ||||
|         border_size = 2; | ||||
|         "col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg"; | ||||
|         "col.inactive_border" = "rgba(595959aa)"; | ||||
|         layout = "dwindle"; | ||||
|       }; | ||||
| 
 | ||||
|       decoration = { | ||||
|         blur = { | ||||
|           enabled = true; | ||||
|           size = 3; | ||||
|           passes = 1; | ||||
|           new_optimizations = 1; | ||||
|         }; | ||||
|         drop_shadow = "yes"; | ||||
|         shadow_range = 20; | ||||
|         shadow_render_power = 5; | ||||
|         "col.shadow" = "rgba(1a1a1aee)"; | ||||
|       }; | ||||
| 
 | ||||
|       animations = { | ||||
|         enabled = true; | ||||
|         animation = [ | ||||
|           "windows, 1, 7, default" | ||||
|           "windowsOut, 1, 7, default, popin 80%" | ||||
|           "border, 1, 10, default" | ||||
|           "borderangle, 1, 8, default" | ||||
|           "fade, 1, 7, default" | ||||
|           "workspaces, 1, 6, default" | ||||
|         ]; | ||||
|       }; | ||||
| 
 | ||||
|       dwindle = { | ||||
|         pseudotile = true; | ||||
|         preserve_split = "yes"; | ||||
|       }; | ||||
| 
 | ||||
|       master = { | ||||
|         new_is_master = true; | ||||
|       }; | ||||
| 
 | ||||
|       gestures = { | ||||
|         workspace_swipe = false; | ||||
|       }; | ||||
| 
 | ||||
|       "general:resize_on_border" = "true"; | ||||
| 
 | ||||
|       bindm = [ | ||||
|         # mouse binds | ||||
|         "ALT,mouse:272,movewindow" | ||||
|       ]; | ||||
| 
 | ||||
|       binde = [ | ||||
|         # volume controls | ||||
|         ", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%+" | ||||
|         ", XF86AudioLowerVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%-" | ||||
|       ]; | ||||
|        | ||||
|       bind = [ | ||||
|         # mute key | ||||
|         ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" | ||||
| 
 | ||||
|         # general shortcuts | ||||
|         "$mod, Q, exec, kitty" | ||||
|         "$mod, C, killactive, " | ||||
|         "$mod, M, exit, " | ||||
|         "$mod, V, togglefloating, " | ||||
|         "$mod, P, pseudo," | ||||
|         "$mod, J, togglesplit," | ||||
| 
 | ||||
|         "$mod, E, exec, wlogout -p layer-shell" | ||||
|         "SUPERSHIFT,n,exec,swaync-client -t -sw" | ||||
| 
 | ||||
|         # move windows | ||||
|         "$mod SHIFT, H, movewindow, l" | ||||
|         "$mod SHIFT, L, movewindow, r" | ||||
|         "$mod SHIFT, K, movewindow, u" | ||||
|         "$mod SHIFT, J, movewindow, d" | ||||
| 
 | ||||
|         # screenshot | ||||
|         ", Print, exec, grim -l 9 -g \"$(slurp)\" - | wl-copy" | ||||
| 
 | ||||
|         # rofi | ||||
|         "$mod, D, exec, rofi -show drun --show-icons" | ||||
| 
 | ||||
|         # workspace scroll | ||||
|         "$mod, mouse_down, workspace, e+1" | ||||
| 
 | ||||
|         # move active window to workspace | ||||
|         "$mod SHIFT, 1, movetoworkspace, 1" | ||||
|         "$mod SHIFT, 2, movetoworkspace, 2" | ||||
|         "$mod SHIFT, 3, movetoworkspace, 3" | ||||
|         "$mod SHIFT, 4, movetoworkspace, 4" | ||||
|         "$mod SHIFT, 5, movetoworkspace, 5" | ||||
|         "$mod SHIFT, 6, movetoworkspace, 6" | ||||
|         "$mod SHIFT, 7, movetoworkspace, 7" | ||||
|         "$mod SHIFT, 8, movetoworkspace, 8" | ||||
|         "$mod SHIFT, 9, movetoworkspace, 9" | ||||
|         "$mod SHIFT, 0, movetoworkspace, 10" | ||||
| 
 | ||||
|         # switch workspace | ||||
|         "$mod, 1, workspace, 1" | ||||
|         "$mod, 2, workspace, 2" | ||||
|         "$mod, 3, workspace, 3" | ||||
|         "$mod, 4, workspace, 4" | ||||
|         "$mod, 5, workspace, 5" | ||||
|         "$mod, 6, workspace, 6" | ||||
|         "$mod, 7, workspace, 7" | ||||
|         "$mod, 8, workspace, 8" | ||||
|         "$mod, 9, workspace, 9" | ||||
|         "$mod, 0, workspace, 10" | ||||
| 
 | ||||
|         # move window focus | ||||
|         "$mod, left, movefocus, l" | ||||
|         "$mod, right, movefocus, r" | ||||
|         "$mod, up, movefocus, u" | ||||
|         "$mod, down, movefocus, d" | ||||
|       ]; | ||||
|     }; | ||||
|   programs.waybar = { | ||||
|     enable = true; | ||||
|     settings = import ./waybar.nix; | ||||
|   }; | ||||
| 
 | ||||
|   # Nicely reload system units when changing configs | ||||
|  |  | |||
							
								
								
									
										147
									
								
								homes/floppydisk/hyprland.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										147
									
								
								homes/floppydisk/hyprland.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,147 @@ | |||
| { | ||||
|   "env" = "XCURSOR_SIZE,24"; | ||||
| 
 | ||||
|   "$mod" = "SUPER"; | ||||
| 
 | ||||
|   exec-once = [ | ||||
|     "arRPC" | ||||
|     "hyprpaper" | ||||
|     "nm-applet --indicator" | ||||
|     "waybar" | ||||
|     "swaync" | ||||
|     "1password --silent" | ||||
|   ]; | ||||
| 
 | ||||
|   monitor = [ | ||||
|     "DP-1,1600x900,0x0,1" | ||||
|     "HDMI-A-1,1280x1024,1600x0,1" | ||||
|   ]; | ||||
| 
 | ||||
|   input = { | ||||
|     kb_layout = "us"; | ||||
|     follow_mouse = 1; | ||||
|     touchpad.natural_scroll = "no"; | ||||
|     sensitivity = 0; | ||||
|   }; | ||||
| 
 | ||||
|   general = { | ||||
|     gaps_in = 5; | ||||
|     gaps_out = 20; | ||||
|     border_size = 2; | ||||
|     "col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg"; | ||||
|     "col.inactive_border" = "rgba(595959aa)"; | ||||
|     layout = "dwindle"; | ||||
|   }; | ||||
| 
 | ||||
|   decoration = { | ||||
|     blur = { | ||||
|   enabled = true; | ||||
|   size = 3; | ||||
|   passes = 1; | ||||
|   new_optimizations = 1; | ||||
|     }; | ||||
|     drop_shadow = "yes"; | ||||
|     shadow_range = 20; | ||||
|     shadow_render_power = 5; | ||||
|     "col.shadow" = "rgba(1a1a1aee)"; | ||||
|   }; | ||||
| 
 | ||||
|   animations = { | ||||
|     enabled = true; | ||||
|     animation = [ | ||||
|   "windows, 1, 7, default" | ||||
|   "windowsOut, 1, 7, default, popin 80%" | ||||
|   "border, 1, 10, default" | ||||
|   "borderangle, 1, 8, default" | ||||
|   "fade, 1, 7, default" | ||||
|   "workspaces, 1, 6, default" | ||||
|     ]; | ||||
|   }; | ||||
| 
 | ||||
|   dwindle = { | ||||
|     pseudotile = true; | ||||
|     preserve_split = "yes"; | ||||
|   }; | ||||
| 
 | ||||
|   master = { | ||||
|     new_is_master = true; | ||||
|   }; | ||||
| 
 | ||||
|   gestures = { | ||||
|     workspace_swipe = false; | ||||
|   }; | ||||
| 
 | ||||
|   "general:resize_on_border" = "true"; | ||||
| 
 | ||||
|   bindm = [ | ||||
|     # mouse binds | ||||
|     "ALT,mouse:272,movewindow" | ||||
|   ]; | ||||
| 
 | ||||
|   binde = [ | ||||
|     # volume controls | ||||
|     ", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%+" | ||||
|     ", XF86AudioLowerVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%-" | ||||
|   ]; | ||||
| 
 | ||||
|   bind = [ | ||||
|     # mute key | ||||
|     ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" | ||||
| 
 | ||||
|     # general shortcuts | ||||
|     "$mod, Q, exec, kitty" | ||||
|     "$mod, C, killactive, " | ||||
|     "$mod, M, exit, " | ||||
|     "$mod, V, togglefloating, " | ||||
|     "$mod, P, pseudo," | ||||
|     "$mod, J, togglesplit," | ||||
| 
 | ||||
|     "$mod, E, exec, wlogout -p layer-shell" | ||||
|     "SUPERSHIFT,n,exec,swaync-client -t -sw" | ||||
| 
 | ||||
|     # move windows | ||||
|     "$mod SHIFT, H, movewindow, l" | ||||
|     "$mod SHIFT, L, movewindow, r" | ||||
|     "$mod SHIFT, K, movewindow, u" | ||||
|     "$mod SHIFT, J, movewindow, d" | ||||
| 
 | ||||
|     # screenshot | ||||
|     ", Print, exec, grim -l 9 -g \"$(slurp)\" - | wl-copy" | ||||
| 
 | ||||
|     # rofi | ||||
|     "$mod, D, exec, rofi -show drun --show-icons" | ||||
| 
 | ||||
|     # workspace scroll | ||||
|     "$mod, mouse_down, workspace, e+1" | ||||
| 
 | ||||
|     # move active window to workspace | ||||
|     "$mod SHIFT, 1, movetoworkspace, 1" | ||||
|     "$mod SHIFT, 2, movetoworkspace, 2" | ||||
|     "$mod SHIFT, 3, movetoworkspace, 3" | ||||
|     "$mod SHIFT, 4, movetoworkspace, 4" | ||||
|     "$mod SHIFT, 5, movetoworkspace, 5" | ||||
|     "$mod SHIFT, 6, movetoworkspace, 6" | ||||
|     "$mod SHIFT, 7, movetoworkspace, 7" | ||||
|     "$mod SHIFT, 8, movetoworkspace, 8" | ||||
|     "$mod SHIFT, 9, movetoworkspace, 9" | ||||
|     "$mod SHIFT, 0, movetoworkspace, 10" | ||||
| 
 | ||||
|     # switch workspace | ||||
|     "$mod, 1, workspace, 1" | ||||
|     "$mod, 2, workspace, 2" | ||||
|     "$mod, 3, workspace, 3" | ||||
|     "$mod, 4, workspace, 4" | ||||
|     "$mod, 5, workspace, 5" | ||||
|     "$mod, 6, workspace, 6" | ||||
|     "$mod, 7, workspace, 7" | ||||
|     "$mod, 8, workspace, 8" | ||||
|     "$mod, 9, workspace, 9" | ||||
|     "$mod, 0, workspace, 10" | ||||
| 
 | ||||
|     # move window focus | ||||
|     "$mod, left, movefocus, l" | ||||
|     "$mod, right, movefocus, r" | ||||
|     "$mod, up, movefocus, u" | ||||
|     "$mod, down, movefocus, d" | ||||
|   ]; | ||||
| } | ||||
							
								
								
									
										198
									
								
								homes/floppydisk/waybar.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										198
									
								
								homes/floppydisk/waybar.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,198 @@ | |||
| { | ||||
|   mainBar = { | ||||
|     layer = "top"; | ||||
|     position = "top"; | ||||
|     height = 27; | ||||
|     margin = "7"; | ||||
|     fixed-center = true; | ||||
|     modules-left = [ | ||||
|       "wlr/workspaces" | ||||
|       "custom/sep" | ||||
|       "tray" | ||||
|       "custom/updates" | ||||
|     ]; | ||||
|     modules-center = [ | ||||
|       "clock" | ||||
|       "sep" | ||||
|       "custom/notification" | ||||
|     ]; | ||||
|     modules-right = [ | ||||
|       "battery" | ||||
|       "custom/sep_r" | ||||
|       "cpu" | ||||
|       "custom/sep_r" | ||||
|       "disk" | ||||
|       "custom/sep_r" | ||||
|       "memory" | ||||
|       "custom/sep_r" | ||||
|       "pulseaudio" | ||||
|       "custom/sep_r" | ||||
|       "network" | ||||
|       "custom/sep_r" | ||||
|       "custom/launcher" | ||||
|     ]; | ||||
| 
 | ||||
|     "custon/sep_r" = { | ||||
|       format = " "; | ||||
|     }; | ||||
| 
 | ||||
|     "custom/sep" = { | ||||
|       format = " "; | ||||
|     }; | ||||
| 
 | ||||
|     "custom/sep_l" = { | ||||
|       format = " "; | ||||
|     }; | ||||
| 
 | ||||
|     "custom/notification" = { | ||||
|       tooltip = true; | ||||
|       format = "{icon}"; | ||||
|       format-icons = { | ||||
|         "notification" = "<span foreground='white'><sup></sup></span>"; | ||||
|         "none" = " "; | ||||
|         "dnd-notification" = "<span foreground='white'><sup></sup></span>"; | ||||
|         "dnd-none" = " "; | ||||
|       }; | ||||
|       return-type = "json"; | ||||
|       exec-if = "which swaync-client"; | ||||
|       exec = "swaync-client -swb"; | ||||
|       on-click = "swaync-client -t -sw"; | ||||
|       on-click-middle = "swaync-client -d -sw"; | ||||
|       on-click-right = "swaync-client -C"; | ||||
|       escape = true; | ||||
|     }; | ||||
| 
 | ||||
|     "wlr/workspaces" = { | ||||
|       disable-scroll = false; | ||||
|       all-outputs = true; | ||||
|       format = "{icon}"; | ||||
|       active-only = true; | ||||
|       format-icons = { | ||||
|         "1" = "I"; | ||||
|         "2" = "II"; | ||||
|         "3" = "III"; | ||||
|         "4" = "IV"; | ||||
|         "5" = "V"; | ||||
|         "6" = "VI"; | ||||
|         "7" = "VII"; | ||||
|         "8" = "VIII"; | ||||
|         "9" = "IX"; | ||||
|         "10" = "X"; | ||||
|         "11" = "XI"; | ||||
|         "12" = "XII"; | ||||
|       }; | ||||
|     }; | ||||
| 
 | ||||
|     "hyprland/language" = { | ||||
|       format = "{}"; | ||||
|       format-tr = "TR"; | ||||
|     }; | ||||
| 
 | ||||
|     "hyprland/window" = { | ||||
|       format = "{}"; | ||||
|       seperate-outputs = true; | ||||
|     }; | ||||
| 
 | ||||
|     "keyboard-state" = { | ||||
|       interval = 1; | ||||
|       numlock = false; | ||||
|       capslock = false; | ||||
|       format = "{icon}"; | ||||
|       format-icons = { | ||||
|         "locked" = " "; | ||||
|         "unlocked" = ""; | ||||
|       }; | ||||
|     }; | ||||
| 
 | ||||
|     "idle_inhibitor" = { | ||||
|       format = "{icon}"; | ||||
|       format-icons = { | ||||
|         "activated" = ""; | ||||
|         "deactivated" = ""; | ||||
|       }; | ||||
|     }; | ||||
| 
 | ||||
|     "tray" = { | ||||
|       icon-size = 16; | ||||
|       spacing = 6; | ||||
|     }; | ||||
| 
 | ||||
|     "clock" = { | ||||
|       timezone = "Europe/London"; | ||||
|       format = "{: %H:%M}"; | ||||
|       format-alt = "{: %H:%M   %d/%m/%Y}"; | ||||
|       tooltip-format = "{: %H:%M   %d/%m/%Y}"; | ||||
|       today-format = "<span color='#aaaaaa'><b><u>{}</u></b></span>"; | ||||
|       calendar-weeks-pos = "right"; | ||||
|       format-calendar = "<span color='#aaaaaa'><b><u>{}</u></b></span>"; | ||||
|       format-calendar-weeks = "<span color='#aaaaaa'><b><u>{}</u></b></span>"; | ||||
|       format-calendar-weekdays = "<span color='#ffffff'><b>{}</b></span>"; | ||||
|       interval = 10; | ||||
|       on-click-middle = "kalendar"; | ||||
|     }; | ||||
| 
 | ||||
|     "cpu" = { | ||||
|       format = " {usage}%"; | ||||
|       tooltip = false; | ||||
|     }; | ||||
| 
 | ||||
|     "memory" = { | ||||
|       format = " {}"; | ||||
|     }; | ||||
| 
 | ||||
|     "battery" = { | ||||
|       states = { | ||||
|         "good" = 80; | ||||
|         "warning" = 30; | ||||
|         "critical" = 5; | ||||
|       }; | ||||
|       format = "{icon}{capacity}%  "; | ||||
|       format-charging = " {capacity}%  "; | ||||
|       format-plugged = " {capacity}%  "; | ||||
|       format-alt = "{icon}{time}"; | ||||
|       format-icoms = ["  " "  " "  " "  " "  "]; | ||||
|     }; | ||||
| 
 | ||||
|     "network" = { | ||||
|       format-wifi = "  Connected"; | ||||
|       format-ethernet = "  Connected"; | ||||
|       format-disconnected = "  Disconnected"; | ||||
|       tooltip-format-wifi = "{essid} | Signal Strenght: {signalStrength}% | Down Speed: {bandwidthDownBits}, Up Speed: {bandwidthUpBits}"; | ||||
|       tooltip-format = "{ifname} via {gwaddr} "; | ||||
|       tooltip-format-ethernet = "{ipaddr}  "; | ||||
|       format-linked = "{ifname} (No IP) "; | ||||
|       format-alt = "{ifname}: {ipaddr}/{cidr}"; | ||||
|     }; | ||||
| 
 | ||||
|     "pulseaudio" = { | ||||
|       on-click = "pavucontrol"; | ||||
|       format = "{icon}{volume}%  {format_source}"; | ||||
|       format-bluetooth = "{icon}{volume}%  {format_source}"; | ||||
|       format-bluetooth-muted = "{icon}  {format_source}"; | ||||
|       format-muted = " {format_source}"; | ||||
|       format-source = " {volume}%"; | ||||
|       format-source-muted = " "; | ||||
|       format-icons = { | ||||
|         "headphone" = ""; | ||||
|         "hands-free" = ""; | ||||
|         "headset" = ""; | ||||
|         "phone" = ""; | ||||
|         "portable" = ""; | ||||
|         "car" = ""; | ||||
|         "default" = [" " " " " "]; | ||||
|       }; | ||||
|     }; | ||||
| 
 | ||||
|     "disk" = { | ||||
|       interval = 90; | ||||
|       format = " {free} (/)"; | ||||
|       tooltip-format = "{used} / {total} ({percentage_used}%)"; | ||||
|       path = "/"; | ||||
|     }; | ||||
| 
 | ||||
|     "custom/power" = { | ||||
|       format = " "; | ||||
|       on-click = "wlogout"; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -169,11 +169,6 @@ | |||
|     sway | ||||
|     swayidle | ||||
|     helvum | ||||
|     ( | ||||
|       waybar.overrideAttrs (oldAttrs: { | ||||
|         mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; | ||||
|       }) | ||||
|     ) | ||||
|   ]; | ||||
| 
 | ||||
|   environment.sessionVariables = { | ||||
|  |  | |||
|  | @ -153,11 +153,6 @@ | |||
|     sway | ||||
|     swayidle | ||||
|     helvum | ||||
|     ( | ||||
|       waybar.overrideAttrs (oldAttrs: { | ||||
|         mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; | ||||
|       }) | ||||
|     ) | ||||
|   ]; | ||||
| 
 | ||||
|   environment.sessionVariables = { | ||||
|  |  | |||
		Reference in a new issue
	
	 Frankie B
				Frankie B