diff --git a/config/dunst.conf b/config/dunst.conf index 63c019a..da4bc4e 100644 --- a/config/dunst.conf +++ b/config/dunst.conf @@ -1,7 +1,7 @@ # https://github.com/catppuccin/dunst/blob/main/src/mocha.conf [global] -frame_color = "#f5c2e7" -separator_color = frame +frame_color = "#89B4FA" +separator_color= frame follow = "mouse" width = 300 @@ -25,43 +25,41 @@ progress_bar_max_width = 300 separator_height = 2 frame_width = 2 corner_radius = 8 -transparency = 1 +transparency = 0 gap_size = 8 line_height = 0 +notification_limit = 0 +idle_threshold = 120 +history_length = 20 +show_age_threshold = 60 markup = "full" format = "%a\n%s\n%b" font = "Atkinson Hyperlegible Pro 11" word_wrap = "yes" +sort = "yes" +shrink = "no" +indicate_hidden = "yes" +sticky_history = "yes" ignore_newline = "no" +show_indicators = "no" +stack_duplicates = true +always_run_script = true +hide_duplicate_count = false ignore_dbusclose = false -mouse_left_click = "do_action, close_current" +mouse_left_click = "do_action" mouse_middle_click = "close_all" mouse_right_click = "close_current" -sort = "update" -shrink = "no" - -notification_limit = 4 -indicate_hidden = "yes" -idle_threshold = 120 -history_length = 20 -show_age_threshold = 60 -sticky_history = "yes" -show_indicators = "yes" -stack_duplicates = true -hide_duplicate_count = false -always_run_script = true - [urgency_low] -background = "#1E1E2E30" +background = "#1E1E2E" foreground = "#CDD6F4" [urgency_normal] -background = "#1E1E2E30" +background = "#1E1E2E" foreground = "#CDD6F4" [urgency_critical] -background = "#1E1E2E30" +background = "#1E1E2E" foreground = "#CDD6F4" frame_color = "#FAB387" diff --git a/config/nwg-drawer.css b/config/nwg-drawer.css index 278521a..fa7cf4b 100644 --- a/config/nwg-drawer.css +++ b/config/nwg-drawer.css @@ -10,16 +10,11 @@ window { /* search entry */ entry { background-color: alpha(@surface0, 0.5); - color: @text; } -button, box, widget, image { +button, image { background: none; - border: none; - color: @text; - text-shadow: 0 1px alpha(@base, 0.75); - box-shadow: none; - outline: none; + border: none } button { @@ -27,6 +22,6 @@ button { border-radius: 1em; } -button:hover, button:active, box:hover, box:active { - background: alpha(@surface0, 0.5); +button:hover { + background-color: alpha(@surface0, 0.5); } \ No newline at end of file diff --git a/config/waybar.css b/config/waybar.css index 5c2363c..3ee3ba2 100644 --- a/config/waybar.css +++ b/config/waybar.css @@ -4,23 +4,16 @@ 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: VictorMono, Iosevka Nerd Font, Noto Sans CJK;*/ - /*font-family: 'Atkinson Hyperlegible', FontAwesome, Noto Sans CJK;*/ - font-family: CozetteVector, monospace, FontAwesome, Noto Sans CJK; + font-family: CozetteVector, FontAwesome, Noto Sans CJK; font-size: 13px; font-style: normal; } -#workspaces, .modules-right box { +box.module, .modules-right box { background-color: @surface0; margin: 0 0.25em; padding: 0.15em 0.25em; @@ -46,7 +39,6 @@ window#waybar { background-color: transparent; color: @text; padding: 0 0.4em; - transition: none; } #workspaces button:nth-child(1) { @@ -66,23 +58,10 @@ window#waybar { 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; @@ -136,22 +115,8 @@ window#waybar.floating #window { color: @red; } -#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 + background: @base; + border: 1px solid @pink; +} diff --git a/hosts/goopnet-interface/default.nix b/hosts/goopnet-interface/default.nix index 82b4f8b..0a51c99 100755 --- a/hosts/goopnet-interface/default.nix +++ b/hosts/goopnet-interface/default.nix @@ -49,12 +49,11 @@ hyprpaper.enable = true; gnome-keyring.enable = true; + polkit-gnome.enable = true; dunst.enable = true; rofi.enable = true; nwg-drawer.enable = true; waybar.enable = true; - batsignal.enable = true; - wob.enable = true; # display manager sddm.enable = true; diff --git a/modules/desktop/batsignal.nix b/modules/desktop/batsignal.nix deleted file mode 100644 index c8020bf..0000000 --- a/modules/desktop/batsignal.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ lib, config, pkgs, ... }: - -with lib; -let - cfg = config.modules.desktop.batsignal; -in { - options.modules.desktop.batsignal = { - enable = mkEnableOption "Enable batsignal, a battery notification service"; - package = mkOption { - type = types.package; - default = pkgs.batsignal; - }; - }; - - config = mkIf cfg.enable { - hm.wayland.windowManager.hyprland.settings.exec-once = [ - # -w 20 -c 10 -d 5 -- set battery levels - # -p -- notify on plug/unplug - # -m 2 -- set interval to 2 seconds - "${lib.getExe cfg.package} -w 20 -c 10 -d 5 -p -m 2" - ]; - }; -} \ No newline at end of file diff --git a/modules/desktop/hyprland.nix b/modules/desktop/hyprland.nix index 009bf72..5b76a13 100644 --- a/modules/desktop/hyprland.nix +++ b/modules/desktop/hyprland.nix @@ -47,9 +47,7 @@ in { systemd.variables = [ "--all" ]; - settings = let - wobSock = config.modules.desktop.wob.sockPath; - in { + settings = { source = []; "$mod" = "SUPER"; @@ -58,31 +56,22 @@ in { "$mod, mouse:272, movewindow" "$mod, mouse:273, resizewindow" ]; - bindel = (if config.modules.desktop.wob.enable then [ # "bind held & locked" - ", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ && wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/[^0-9]//g' > ${wobSock}" - ", XF86AudioLowerVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%- && wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/[^0-9]//g' > ${wobSock}" - ", XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} -c backlight s +5% | sed -n 's/.*(\\([0-9]*\\)%).*/\\1/p' > ${wobSock}" - ", XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} -c backlight s 5%- | sed -n 's/.*(\\([0-9]*\\)%).*/\\1/p' > ${wobSock}" - ] else [ + bindel = [ # "bind held & locked" ", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+" ", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" + ", XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} -c backlight s +5%" ", XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} -c backlight s 5%-" - ]); - bindl = ([ # "bind locked" - ",switch:Lid Switch,exec,${lib.getExe config.modules.desktop.hyprlock.package}" + ]; + bindl = [ # "bind locked" + ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + ", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" ", XF86AudioPlay, exec, ${lib.getExe pkgs.playerctl} play-pause" ", XF86AudioStop, exec, ${lib.getExe pkgs.playerctl} stop" ", XF86AudioPrev, exec, ${lib.getExe pkgs.playerctl} previous" ", XF86AudioNext, exec, ${lib.getExe pkgs.playerctl} next" - - ", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" - ] ++ (if config.modules.desktop.wob.enable then [ - ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && (wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep -q MUTED && echo 0 > ${wobSock}) || wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/[^0-9]//g' > ${wobSock}" - ] else [ - ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" - ])); + ]; bindr = [ # "bind released" "SUPER, Super_L, exec, ${lib.getExe pkgs.nwg-drawer}" ]; @@ -108,13 +97,16 @@ in { ;; esac ''; + grabPasswordScript = pkgs.writeScript "grab-password" '' + ${lib.getExe pkgs.rbw} get $(${lib.getExe pkgs.zenity} --entry --text="Enter the name for your password entry to copy it to your clipboard" --title="Password") | ${lib.getExe pkgs.wl-clipboard-x11} -selection clipboard + ''; in [ "$mod, R, exec, ${lib.getExe pkgs.rofi-wayland} -show run" ", print, exec, ${screenshotScript}" "$mod, T, exec, ${lib.getExe pkgs.wezterm}" "$mod, Q, killactive, " - "$mod, F, togglefloating, " + "$mod, V, togglefloating, " "$mod, P, pseudo, " # dwindle "$mod, J, togglesplit, " # dwindle @@ -136,9 +128,7 @@ in { "$mod, bracketright, workspace, e+1" ", XF86LaunchA, exec, ${screenshotScript}" - ", XF86LaunchB, exec, ${lib.getExe pkgs.rofi-rbw-wayland} -a copy -t password --clear-after 20" - - "ALT, Tab, exec, ${lib.getExe pkgs.rofi-wayland} -show window" + ", XF86LaunchB, exec, ${grabPasswordScript}" ] ++ ( # workspaces # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} @@ -171,11 +161,7 @@ in { monitor=",highrr,auto,auto"; - exec-once = [ - "${lib.getExe pkgs.networkmanagerapplet}" # network applet - "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" # polkit agent - "${lib.getExe pkgs.wl-clip-persist} --clipboard primary" # to fix wl clipboards disappearing - ]; + exec-once = [ "${lib.getExe pkgs.networkmanagerapplet}" ]; env = [ "XCURSOR_THEME,${config.modules.desktop.themes.cursorTheme.name}" @@ -185,8 +171,8 @@ in { general = { gaps_in = 6; gaps_out = 6; - border_size = 1; - no_border_on_floating = false; + border_size = 2; + no_border_on_floating = true; layout = "dwindle"; @@ -228,15 +214,14 @@ in { "workspace 4, class:vesktop" ]; - blurls = [ - "gtk-layer-shell" - ]; - layerrule = [ "animation slide, notifications" "animation slide, waybar" - "blur, notifications" - "blur, wob" + ]; + + blurls = [ + "gtk-layer-shell" # nwg-drawer + #"waybar" ]; decoration = { @@ -268,7 +253,6 @@ in { "border, 1, 2, outExpo" "fade, 1, 3, outCubic" "workspaces, 1, 6, outExpo" - "specialWorkspace, 1, 2, outCubic, fade" ]; }; diff --git a/modules/desktop/polkit-gnome.nix b/modules/desktop/polkit-gnome.nix new file mode 100644 index 0000000..818395d --- /dev/null +++ b/modules/desktop/polkit-gnome.nix @@ -0,0 +1,28 @@ +{ lib, config, pkgs, ... }: + +with lib; +let + cfg = config.modules.desktop.polkit-gnome; +in { + options.modules.desktop.polkit-gnome = { + enable = mkEnableOption "Enable polkit-gnome, a simple polkit agent"; + }; + + config = mkIf cfg.enable { + systemd.user.services.polkit-gnome-authentication-agent-1 = { + description = "polkit-gnome-authentication-agent-1"; + + wantedBy = [ "graphical-session.target" ]; + wants = [ "graphical-session.target" ]; + after = [ "graphical-session.target" ]; + + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + }; +} diff --git a/modules/desktop/waybar.nix b/modules/desktop/waybar.nix index 8430450..0c91d10 100644 --- a/modules/desktop/waybar.nix +++ b/modules/desktop/waybar.nix @@ -55,38 +55,45 @@ in { "memory" "power-profiles-daemon" "battery" - "privacy" ]; }; "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/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 { + "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" = { format = "⏻"; tooltip = true; - tooltip-format = "Power menu"; - on-click = "${powerSelect}"; + tooltip-format = "Power off"; + on-click = "shutdown now"; }; "hyprland/workspaces" = { format = "{icon}"; @@ -201,15 +208,6 @@ 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}"; diff --git a/modules/desktop/wob.nix b/modules/desktop/wob.nix deleted file mode 100644 index 5c0cb30..0000000 --- a/modules/desktop/wob.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ lib, config, pkgs, ... }: - -with lib; -let - cfg = config.modules.desktop.wob; -in { - options.modules.desktop.wob = { - enable = mkEnableOption "Enable wob, a Wayland overlay bar"; - sockPath = mkOption { - description = "Wob sock location"; - type = types.str; - default = "$XDG_RUNTIME_DIR/wob.sock"; - }; - }; - - config = mkIf cfg.enable { - hm.wayland.windowManager.hyprland.settings.exec-once = let - path = cfg.sockPath; - script = pkgs.writeScript "launch-wob" '' - rm -f ${path} && mkfifo ${path} && tail -f ${path} | ${lib.getExe pkgs.wob} - ''; - in [ script ]; - hm.services.wob = { - enable = true; - settings = with config.colorScheme.palette; { - "" = { - timeout = 1000; - - border_offset = 2; - border_size = 2; - bar_padding = 2; - - anchor = "top"; - width = 300; - height = 30; - - margin = 12; - - border_color = "${base04}FF"; - background_color = "${base01}66"; - bar_color = "${base05}FF"; - - overflow_mode = "nowrap"; - output_mode = "focused"; - }; - }; - }; - }; -} \ No newline at end of file