From 37e342f4e27803f7d2f8162aaed5fd3dc4608442 Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Sat, 4 Nov 2023 21:55:30 +0800 Subject: [PATCH] home,dunst: dunstrc -> home-manager options --- .../common/dotfiles/config/dunst/dunstrc | 57 ------------------- .../home-manager/nixos/dotfiles.nix | 4 -- .../guanranwang/home-manager/nixos/dunst.nix | 26 +++++++++ users/guanranwang/home-manager/nixos/home.nix | 1 - .../home-manager/nixos/presets/desktop.nix | 1 + 5 files changed, 27 insertions(+), 62 deletions(-) delete mode 100755 users/guanranwang/home-manager/common/dotfiles/config/dunst/dunstrc create mode 100644 users/guanranwang/home-manager/nixos/dunst.nix diff --git a/users/guanranwang/home-manager/common/dotfiles/config/dunst/dunstrc b/users/guanranwang/home-manager/common/dotfiles/config/dunst/dunstrc deleted file mode 100755 index 7643da0..0000000 --- a/users/guanranwang/home-manager/common/dotfiles/config/dunst/dunstrc +++ /dev/null @@ -1,57 +0,0 @@ -# -# Dunst config -# ~/.config/dunst/dunstrc -# modified from https://github.com/end-4/dots-hyprland/blob/main/.config/dunst/dunstrc -# - -[global] -follow = mouse -geometry = "280x50-20+90" -indicate_hidden = no -separator_height = 2 -separator_color = yes -padding = 12 -horizontal_padding = 12 -frame_width = 2 -font = Monospace 10 -line_height = 4 -markup = full -format = "%s\n%b" -alignment = left -show_age_threshold = 60 -word_wrap = yes -ignore_newline = no -stack_duplicates = yes -hide_duplicate_count = no -icon_position = left -icon_path = /home/guanranwang/.local/share/icons/dunst -show_indicators = no -icon_position = left -max_icon_size = 48 -sticky_history = yes -history_length = 20 -title = Dunst -class = Dunst -corner_radius = 10 -offset = 8x8 - -# Tokyonight -[global] -frame_color = "#c0caf5" -separator_color = frame - -[urgency_low] -timeout = 4 -background = "#1a1b26" -foreground = "#c0caf5" - -[urgency_normal] -timeout = 8 -background = "#1a1b26" -foreground = "#c0caf5" - -[urgency_critical] -timeout = 0 -background = "#1a1b26" -foreground = "#c0caf5" -frame_color = "#FAB387" diff --git a/users/guanranwang/home-manager/nixos/dotfiles.nix b/users/guanranwang/home-manager/nixos/dotfiles.nix index 8824019..ac8babe 100644 --- a/users/guanranwang/home-manager/nixos/dotfiles.nix +++ b/users/guanranwang/home-manager/nixos/dotfiles.nix @@ -29,10 +29,6 @@ in { source = "${configPath}/rofi"; recursive = true; }; - "dunst" = { - source = "${configPath}/dunst"; - recursive = true; - }; "makepkgs.conf" = { source = "${configPath}/makepkgs.conf"; diff --git a/users/guanranwang/home-manager/nixos/dunst.nix b/users/guanranwang/home-manager/nixos/dunst.nix new file mode 100644 index 0000000..d775215 --- /dev/null +++ b/users/guanranwang/home-manager/nixos/dunst.nix @@ -0,0 +1,26 @@ +{...}: { + services.dunst = { + enable = true; + settings = { + global = { + padding = 10; + horizontal_padding = 10; + frame_width = 2; + font = "Monospace 10"; + icon_path = "/home/guanranwang/.local/share/icons/dunst"; + corner_radius = 10; + + max_icon_size = 128; # weird bug, default value (128) not working + }; + + # Tokyonight + global = { + frame_color = "#c0caf5"; + background = "#1a1b26"; + foreground = "#c0caf5"; + }; + + urgency_critical.frame_color = "#fab387"; + }; + }; +} diff --git a/users/guanranwang/home-manager/nixos/home.nix b/users/guanranwang/home-manager/nixos/home.nix index 0e33608..6e9eb5d 100644 --- a/users/guanranwang/home-manager/nixos/home.nix +++ b/users/guanranwang/home-manager/nixos/home.nix @@ -12,7 +12,6 @@ # x11 + wayland rofi-wayland rofi-power-menu - dunst pamixer brightnessctl playerctl diff --git a/users/guanranwang/home-manager/nixos/presets/desktop.nix b/users/guanranwang/home-manager/nixos/presets/desktop.nix index 829a98b..7bd258f 100644 --- a/users/guanranwang/home-manager/nixos/presets/desktop.nix +++ b/users/guanranwang/home-manager/nixos/presets/desktop.nix @@ -4,6 +4,7 @@ ../home.nix ../dotfiles.nix + ../dunst.nix ../fonts.nix ../i18n.nix ../sway.nix