diff --git a/home/packages/wayland/niri/_binds.nix b/home/packages/wayland/niri/_binds.nix index e1e58c0..77946a3 100644 --- a/home/packages/wayland/niri/_binds.nix +++ b/home/packages/wayland/niri/_binds.nix @@ -17,7 +17,7 @@ }; "XF86AudioMute" = { _props.allow-when-locked = true; - spawn._args = ["wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"]; + spawn._args = ["sh" "-c" "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && notify-send -e -h string:x-canonical-private-synchronous:volume -h \"int:value:$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2 * 100}')\" -c osd \"Volume\""]; }; "XF86AudioMicMute" = { _props.allow-when-locked = true; @@ -25,19 +25,19 @@ }; "XF86AudioRaiseVolume" = { _props.allow-when-locked = true; - spawn._args = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%+"]; + spawn._args = ["sh" "-c" "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ && notify-send -e -h string:x-canonical-private-synchronous:volume -h \"int:value:$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2 * 100}')\" -c osd \"Volume\""]; }; "XF86AudioLowerVolume" = { _props.allow-when-locked = true; - spawn._args = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%-"]; + spawn._args = ["sh" "-c" "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && notify-send -e -h string:x-canonical-private-synchronous:volume -h \"int:value:$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2 * 100}')\" -c osd \"Volume\""]; }; "XF86MonBrightnessUp" = { _props.allow-when-locked = true; - spawn._args = ["brightnessctl" "set" "10%+"]; + spawn._args = ["sh" "-c" "brightnessctl set 10%+ && notify-send -e -h string:x-canonical-private-synchronous:brightness -h \"int:value:$(brightnessctl -m | cut -d, -f4 | tr -d '%')\" -c osd \"Brightness\""]; }; "XF86MonBrightnessDown" = { _props.allow-when-locked = true; - spawn._args = ["brightnessctl" "set" "10%-"]; + spawn._args = ["sh" "-c" "brightnessctl set 10%- && notify-send -e -h string:x-canonical-private-synchronous:brightness -h \"int:value:$(brightnessctl -m | cut -d, -f4 | tr -d '%')\" -c osd \"Brightness\""]; }; "Print".spawn._args = ["sh" "-c" "grim -g \"$(slurp)\" - | satty --filename - --output-filename ~/Pictures/Screenshots/satty-$(date +%Y%m%d-%H%M%S).png"]; "Mod+B".spawn._args = ["zen"]; diff --git a/home/packages/wayland/niri/_settings.nix b/home/packages/wayland/niri/_settings.nix index 74a2ace..436f667 100644 --- a/home/packages/wayland/niri/_settings.nix +++ b/home/packages/wayland/niri/_settings.nix @@ -20,7 +20,7 @@ in { spawn-at-startup = [ ["wl-paste" "--watch" "cliphist" "store"] ["wl-paste" "--type" "text" "--watch" "cliphist" "store"] - ["dunst"] + ["mako"] ["ashell"] ["elephant"] ["copyq"] diff --git a/home/services/wayland/dunst.nix b/home/services/wayland/dunst.nix deleted file mode 100644 index 8c54e95..0000000 --- a/home/services/wayland/dunst.nix +++ /dev/null @@ -1,54 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: { - users.users.someone.packages = [pkgs.dunst]; - - xdg.configFile."dunst/dunstrc".text = '' - [global] - width = 300 - height = 100 - offset = 10x10 - origin = top-right - frame_width = 0 - frame_color = "#1f1d2e" - separator_color = "#313244" - font = "Source Code Pro 10" - line_height = 4 - icon_position = left - max_icon_size = 48 - min_icon_size = 24 - show_age_threshold = 60 - word_wrap = yes - ellipsize = middle - ignore_newline = no - stack_duplicates = true - hide_duplicate_count = false - show_indicators = yes - enable_recursive_icon_lookup = true - always_merge_stack_duplicates = false - icon_theme = "Papirus-Dark" - corner_radius = 8 - scale = 1 - monitor = 0 - sort = yes - notification_limit = 0 - - [urgency_low] - background = "#1f1d2e" - foreground = "#cdd6f4" - frame_color = "#89b4fa" - - [urgency_normal] - background = "#1f1d2e" - foreground = "#cdd6f4" - frame_color = "#89b4fa" - - [urgency_critical] - background = "#1f1d2e" - foreground = "#f38ba8" - frame_color = "#f38ba8" - ''; -} diff --git a/home/services/wayland/mako.nix b/home/services/wayland/mako.nix new file mode 100644 index 0000000..f9f88c5 --- /dev/null +++ b/home/services/wayland/mako.nix @@ -0,0 +1,47 @@ +{ + config, + pkgs, + lib, + ... +}: { + users.users.someone.packages = [pkgs.mako]; + + xdg.configFile."mako/config".text = '' + background-color=#282828 + text-color=#FAB387 + border-color=#ebdbb2 + progress-color=#FAB387 + + font=SauceCodePro Nerd Font 10 + width=300 + height=100 + margin=20 + padding=15 + border-size=2 + border-radius=2 + icons=1 + max-icon-size=48 + default-timeout=5000 + group-by=category + + [urgency=low] + border-color=#928374 + + [urgency=normal] + border-color=#b8bb26 + + [urgency=critical] + border-color=#fb4934 + default-timeout=0 + + [category=osd] + anchor=bottom-center + width=200 + height=60 + margin=0,0,100,0 + padding=10 + default-timeout=2000 + text-alignment=center + border-color=#b8bb26 + ''; +} diff --git a/home/terminal/software/tui.nix b/home/terminal/software/tui.nix index ac7c202..c8f22ae 100644 --- a/home/terminal/software/tui.nix +++ b/home/terminal/software/tui.nix @@ -13,6 +13,7 @@ # misc mako + libnotify fontconfig # utils