make dunst new
This commit is contained in:
parent
3fe1aca53c
commit
5f480ed5fa
@ -6,65 +6,71 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
colors = import ../themes/colors.nix; # Import colors theme
|
colors = import ../themes/colors.nix; # Import colors theme
|
||||||
|
|
||||||
|
dunst-volume-notification = pkgs.writeShellScriptBin "volume-notify" ''
|
||||||
|
if [ "$(pulsemixer --get-mute)" = "0" ]; then dunstify -u low -r 1 "墳 $(pulsemixer --get-volume | awk '{print $1}')%"
|
||||||
|
else dunstify -u low -r 1 "婢 Muted"; fi
|
||||||
|
'';
|
||||||
|
dunst-brightness-notification = pkgs.writeShellScriptBin "brightness-notify" ''
|
||||||
|
dunstify -u low -r 1 " $(light -G)%"
|
||||||
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home.packages = [ pkgs.libnotify ]; # Dependency
|
cmds.notifications.volume = "volume-notify";
|
||||||
|
cmds.notifications.brightness = "brightness-notify";
|
||||||
|
|
||||||
|
home.packages = [
|
||||||
|
dunst-volume-notification
|
||||||
|
dunst-brightness-notification
|
||||||
|
pkgs.libnotify
|
||||||
|
];
|
||||||
|
|
||||||
services.dunst = {
|
services.dunst = {
|
||||||
enable = true;
|
enable = true;
|
||||||
iconTheme = { # Icons
|
settings = {
|
||||||
name = "Papirus Dark";
|
|
||||||
package = pkgs.papirus-icon-theme;
|
|
||||||
size = "16x16";
|
|
||||||
};
|
|
||||||
settings = with colors.scheme.doom; { # Settings
|
|
||||||
global = {
|
global = {
|
||||||
monitor = 0;
|
monitor = 0;
|
||||||
# geometry [{width}x{height}][+/-{x}+/-{y}]
|
follow = "keyboard";
|
||||||
# geometry = "600x50-50+65";
|
indicate_hidden = "yes";
|
||||||
width = 300;
|
shrink = true;
|
||||||
height = 200;
|
transparency = 0;
|
||||||
origin = "top-right";
|
origin = "top-center";
|
||||||
offset = "50x50";
|
offset = "0x20";
|
||||||
shrink = "yes";
|
seperator_height = 0;
|
||||||
transparency = 10;
|
padding = 12;
|
||||||
padding = 16;
|
horizontal_padding = 20;
|
||||||
horizontal_padding = 16;
|
frame_width = 4;
|
||||||
frame_width = 3;
|
seperator_color = "auto";
|
||||||
frame_color = "#${bg}";
|
font = "${config.theme.font}";
|
||||||
separator_color = "frame";
|
|
||||||
font = "FiraCode Nerd Font 10";
|
|
||||||
line_height = 4;
|
|
||||||
idle_threshold = 120;
|
|
||||||
markup = "full";
|
markup = "full";
|
||||||
format = ''<b>%s</b>\n%b'';
|
format = "<span foreground='#b3cfa7'><b>%s</b>%p</span>\n%b";
|
||||||
alignment = "left";
|
alignment = "center";
|
||||||
vertical_alignment = "center";
|
show_age_threshold = 60;
|
||||||
icon_position = "left";
|
|
||||||
word_wrap = "yes";
|
word_wrap = "yes";
|
||||||
|
ellipsize = "middle";
|
||||||
ignore_newline = "no";
|
ignore_newline = "no";
|
||||||
show_indicators = "yes";
|
|
||||||
sort = true;
|
|
||||||
stack_duplicates = true;
|
stack_duplicates = true;
|
||||||
# startup_notification = false;
|
|
||||||
hide_duplicate_count = true;
|
hide_duplicate_count = true;
|
||||||
|
show_indicators = "yes";
|
||||||
|
icon_position = "off";
|
||||||
|
sticky_history = "yes";
|
||||||
|
history_length = 20;
|
||||||
|
always_run_script = true;
|
||||||
|
browser = "/usr/bin/xdg-open";
|
||||||
|
corner_radius = 12;
|
||||||
|
force_xinerama = false;
|
||||||
|
mouse_left_click = "close_current";
|
||||||
|
mouse_middle_click = "do_action";
|
||||||
|
mouse_right_click = "close_all";
|
||||||
|
progress_bar_min_width = "200";
|
||||||
|
enable_recursive_icon_lookup = true;
|
||||||
};
|
};
|
||||||
urgency_low = { # Colors
|
|
||||||
background = "#${bg}";
|
urgency_low.timeout = 4;
|
||||||
foreground = "#${text}";
|
urgency_normal.timeout = 8;
|
||||||
timeout = 4;
|
urgency_critical.timeout = 0;
|
||||||
};
|
|
||||||
urgency_normal = {
|
|
||||||
background = "#${bg}";
|
|
||||||
foreground = "#${text}";
|
|
||||||
timeout = 4;
|
|
||||||
};
|
|
||||||
urgency_critical = {
|
|
||||||
background = "#${bg}";
|
|
||||||
foreground = "#${text}";
|
|
||||||
frame_color = "#${red}";
|
|
||||||
timeout = 10;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
xdg.dataFile."dbus-1/services/org.knopwob.dunst.service".source = "${pkgs.dunst}/share/dbus-1/services/org.knopwob.dunst.service";
|
xdg.dataFile."dbus-1/services/org.knopwob.dunst.service".source = "${pkgs.dunst}/share/dbus-1/services/org.knopwob.dunst.service";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user