From 5bce22f99019f0a28e4522cd84cf0d25e201d3a2 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Thu, 18 Jan 2024 09:52:00 -0600 Subject: [PATCH] using waybar instead --- home/home.nix | 42 +++++++++++++++++++++++++++------------ home/modules/hyprland.nix | 4 ++-- scripts/waybar.sh | 3 +++ 3 files changed, 34 insertions(+), 15 deletions(-) create mode 100755 scripts/waybar.sh diff --git a/home/home.nix b/home/home.nix index 104d35d..4f0b0db 100644 --- a/home/home.nix +++ b/home/home.nix @@ -274,9 +274,9 @@ height = 35; width = 1400; # Choose the order of the modules "custom/wintitle", - modules-left = ["wlr/workspaces" "workspaces" "hyprland/window"]; + modules-left = ["hyprland/workspaces" "hyprland/window"]; modules-center = ["clock"]; - modules-right = ["pulseaudio" "backlight" "temperature" "memory" "cpu" "battery" "tray"]; + modules-right = ["pulseaudio" "backlight" "disk" "memory" "cpu" "battery" "tray"]; margin-top = -5; margin-bottom = 8; margin-left = 6; @@ -287,10 +287,21 @@ workspaces = { format = " {name} "; }; - "wlr/workspaces" = { + "hyprland/workspaces" = { format = "{icon}"; - on-scroll-up = "hyprctl dispatch workspace e+1"; - on-scroll-down = "hyprctl dispatch workspace e-1"; + format-icons = { + "1" = ""; + "2" = ""; + "3" = "󰈙"; + "4" = "󰭹"; + "5" = ""; + "6" = ""; + "7" = "󰕧"; + "8" = "󰭹"; + "9" = ""; + }; + # on-scroll-up = "hyprctl dispatch workspace e+1"; + # on-scroll-down = "hyprctl dispatch workspace e-1"; }; tray = { icon-size = 21; @@ -320,6 +331,9 @@ format = "{icon} {percent}%"; format-icons = ["" ""]; }; + disk = { + format = "󰋊 {percentage_used}% {free}"; + }; battery = { states = { good = 95; @@ -345,14 +359,14 @@ }; pulseaudio = { scroll-step = 1; - format = "{icon} {volume}% {format_source}"; + format = "{icon} {volume}%"; format-bluetooth = "{icon} {volume}% {format_source}"; format-bluetooth-muted = " {icon} {format_source}"; format-muted = "ﱝ muted"; - format-source = " {volume}%"; + format-source = ""; format-source-muted = ""; format-icons = { - headphone = ""; + headphone = ["" "" ""]; hands-free = ""; headset = ""; phone = ""; @@ -419,6 +433,7 @@ window#waybar > box { padding-right: 10px; background: transparent; transition: none; + color: @base0C; } #tags { @@ -430,6 +445,7 @@ window#waybar > box { } #workspaces button { + padding: 0 0.7em; transition: none; color: rgba(217, 216, 216, 0.4); background: transparent; @@ -442,7 +458,7 @@ window#waybar > box { } #workspaces button.visible { - color: rgba(217, 216, 216, 1); + color: @base0C; } #tags button.occupied { @@ -450,7 +466,7 @@ window#waybar > box { } #workspaces button.focused { - color: @base0C; + color: @base09; } #tags button.focused { @@ -468,7 +484,7 @@ window#waybar > box { color: @base08; } -#mode, #battery, #cpu, #memory, #network, #pulseaudio, #idle_inhibitor, #backlight, #custom-storage, #custom-spotify, #custom-weather, #custom-mail { +#mode, #battery, #cpu, #memory, #network, #pulseaudio, #idle_inhibitor, #backlight, #custom-storage, #disk, #custom-weather, #custom-mail { margin: 0px 3px 0px 3px; /* min-width: 25px; */ } @@ -556,7 +572,7 @@ window#waybar > box { background: transparent; } -#temperature { +#disk { padding-left: 5px; padding-right: 5px; border-radius: 20px; @@ -566,7 +582,7 @@ window#waybar > box { } #tray { - padding-left: 5px; + padding-left: 15px; padding-right: 5px; border-radius: 20px; transition: none; diff --git a/home/modules/hyprland.nix b/home/modules/hyprland.nix index e5f57a9..f3a1248 100644 --- a/home/modules/hyprland.nix +++ b/home/modules/hyprland.nix @@ -228,14 +228,14 @@ in binde = , XF86MonBrightnessUp, exec, brightnessctl s +10% binde = , XF86MonBrightnessDown, exec, brightnessctl s 10%- - bind=SUPERSHIFT,g,exec,eww.sh + bind=SUPERSHIFT,g,exec,waybar.sh bind=SUPERALT,n,exec,eww update rightside=true bindm=SUPER,mouse:272,movewindow bindm=SUPER,mouse:273,resizewindow # Blur waybar - # blurls=gtk-layer-shell + blurls=gtk-layer-shell # blurls=notifications exec-once = swww init diff --git a/scripts/waybar.sh b/scripts/waybar.sh new file mode 100755 index 0000000..3e6a133 --- /dev/null +++ b/scripts/waybar.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +kill $(pgrep waybar) && waybar &