diff --git a/config/waybar.css b/config/waybar.css index 3ee3ba2..5c2363c 100644 --- a/config/waybar.css +++ b/config/waybar.css @@ -4,16 +4,23 @@ min-height: 0; } +button, button:hover { + box-shadow: none; /* undo default styles */ +} + window#waybar { color: @text; + /*background: alpha(@base, 0.6);*/ background: @base; border-radius: 1em; - font-family: CozetteVector, FontAwesome, Noto Sans CJK; + /*font-family: VictorMono, Iosevka Nerd Font, Noto Sans CJK;*/ + /*font-family: 'Atkinson Hyperlegible', FontAwesome, Noto Sans CJK;*/ + font-family: CozetteVector, monospace, FontAwesome, Noto Sans CJK; font-size: 13px; font-style: normal; } -box.module, .modules-right box { +#workspaces, .modules-right box { background-color: @surface0; margin: 0 0.25em; padding: 0.15em 0.25em; @@ -39,6 +46,7 @@ box.module, .modules-right box { background-color: transparent; color: @text; padding: 0 0.4em; + transition: none; } #workspaces button:nth-child(1) { @@ -58,10 +66,23 @@ box.module, .modules-right box { background: @surface1; } +#workspaces button.focused { + box-shadow: none; +} + #workspaces button.active { background: @pink; color: @surface0; } +#workspaces button:hover { + background: rgba(255, 255, 255, 0.1); + color: @text; + box-shadow: none; +} +#workspaces button.active:hover { + background: @pink; + color: @surface0; +} #workspaces button.urgent { background: @red; @@ -115,8 +136,22 @@ window#waybar.floating #window { color: @red; } -tooltip { - color: @text; - background: @base; - border: 1px solid @pink; +#privacy { + margin: 0 0.25em; + padding: 0; } +#privacy-item { + padding: 0 1px; + color: @text; +} + +tooltip { + background: @base; + border: 1px solid @surface2; +} +tooltip * { + padding: 0px; + margin: 0px; + color: @text; + font-family: CozetteVector, monospace; +} \ No newline at end of file diff --git a/modules/desktop/waybar.nix b/modules/desktop/waybar.nix index 0c91d10..b00523c 100644 --- a/modules/desktop/waybar.nix +++ b/modules/desktop/waybar.nix @@ -59,41 +59,33 @@ in { }; "group/power" = { orientation = "inherit"; - drawer = { - transition-duration = 200; - children-class = "not-power"; - transition-left-to-right = false; - }; modules = [ "custom/power" - "custom/lock" - "custom/reboot" - "custom/quit" ]; }; - "custom/quit" = { - format = ""; - tooltip = true; - tooltip-format = "Exit Hyprland"; - on-click = "${config.modules.desktop.hyprland.package}/bin/hyprctl dispatch exit"; - }; - "custom/lock" = { - format = ""; - tooltip = true; - tooltip-format = "Lock the system"; - on-click = "${lib.getExe config.modules.desktop.hyprlock.package}"; - }; - "custom/reboot" = { - format = "↻"; - tooltip = true; - tooltip-format = "Reboot"; - on-click = "reboot"; - }; - "custom/power" = { + "custom/power" = let + powerSelect = pkgs.writeScript "power-menu" '' + cmd=$(echo 'shutdown|reboot|lock|exit Hyprland' | ${lib.getExe pkgs.rofi-wayland} -dmenu -sep '|' -i -p 'what to do ?' -theme-str 'window { height: 132px; }') + case "$cmd" in + shutdown) + shutdown now + ;; + reboot) + reboot + ;; + lock) + ${lib.getExe config.modules.desktop.hyprlock.package} + ;; + "exit Hyprland") + ${config.modules.desktop.hyprland.package}/bin/hyprctl dispatch exit + ;; + esac + ''; + in { format = "⏻"; tooltip = true; - tooltip-format = "Power off"; - on-click = "shutdown now"; + tooltip-format = "Power menu"; + on-click = "${powerSelect}"; }; "hyprland/workspaces" = { format = "{icon}"; @@ -208,6 +200,15 @@ in { tooltip-format = "{timeTo} ({power}W)"; format-charging = " {capacity}%"; }; + privacy = { + icon-spacing = 0; + icon-size = 12; + transition-duration = 250; + modules = [ + { type = "screenshare"; } + { type = "audio-in"; } + ]; + }; clock = { format = "{:%H:%M}"; format-alt = "{:%a %b %d %R}";