Change Dunst Config & Fix Launch Script

- Change dunstrc text alignment to center
- Add appname to dunst notifications
- Change dunst separator color to auto
- Fix launch_dunst.sh to be executable and get values before running dunst
- Add updated polybar module icon
- Add executable permissions to launch_dunst.sh
This commit is contained in:
Sravan Balaji
2021-02-27 12:14:44 -05:00
parent c72b861b30
commit 8b4f6321d2
3 changed files with 40 additions and 20 deletions

View File

@@ -72,7 +72,7 @@
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = frame
separator_color = auto
# Sort messages by urgency.
sort = yes
@@ -126,11 +126,11 @@
# %n progress value if set without any extra characters
# %% Literal %
# Markup is allowed
format = "<b>%s</b> %p\n%b"
format = "<b>%s</b> | <i>%a</i> %p\n%b"
# Alignment of message text.
# Possible values are "left", "center" and "right".
alignment = left
alignment = center
# Vertical alignment of message text and icon.
# Possible values are "top", "center" and "bottom".

52
.config/dunst/launch_dunst.sh Normal file → Executable file
View File

@@ -1,18 +1,38 @@
#!/bin/bash
/usr/bin/dunst -config ~/.config/dunst/dunstrc \
-geometry "0x0-$(xgetres dunst.geometry-x)+$(xgetres dunst.geometry-y)" \
-separator_height "$(xgetres dunst.sep-height)" \
-padding "$(xgetres dunst.padding)" \
-horizontal_padding "$(xgetres dunst.horiz-padding)" \
-max_icon_size "$(xgetres dunst.max-icon-size)" \
-frame_width "$(xgetres dunst.frame-width)" \
-lb "$(xgetres dunst.low-background)" \
-lf "$(xgetres dunst.low-foreground)" \
-lfr "$(xgetres dunst.low-frame)" \
-nb "$(xgetres dunst.normal-background)" \
-nf "$(xgetres dunst.normal-foreground)" \
-nfr "$(xgetres dunst.normal-frame)" \
-cb "$(xgetres dunst.critical-background)" \
-cf "$(xgetres dunst.critical-foreground)" \
-cfr "$(xgetres dunst.critical-frame)"
# Get values from Xresources
config=~/.config/dunst/dunstrc
geometry_x=$(xgetres dunst.geometry-x)
geometry_y=$(xgetres dunst.geometry-y)
separator_height=$(xgetres dunst.sep-height)
padding=$(xgetres dunst.padding)
horizontal_padding=$(xgetres dunst.horiz-padding)
max_icon_size=$(xgetres dunst.max-icon-size)
frame_width=$(xgetres dunst.frame-width)
lb=$(xgetres dunst.low-background)
lf=$(xgetres dunst.low-foreground)
lfr=$(xgetres dunst.low-frame)
nb=$(xgetres dunst.normal-background)
nf=$(xgetres dunst.normal-foreground)
nfr=$(xgetres dunst.normal-frame)
cb=$(xgetres dunst.critical-background)
cf=$(xgetres dunst.critical-foreground)
cfr=$(xgetres dunst.critical-frame)
# Kill and running dunst instances and start
killall dunst;/usr/bin/dunst -config $config \
-geometry "0x0-$geometry_x+$geometry_y" \
-separator_height "$separator_height" \
-padding "$padding" \
-horizontal_padding "$horizontal_padding" \
-max_icon_size "$max_icon_size" \
-frame_width "$frame_width" \
-lb "$lb" \
-lf "$lf" \
-lfr "$lfr" \
-nb "$nb" \
-nf "$nf" \
-nfr "$nfr" \
-cb "$cb" \
-cf "$cf" \
-cfr "$cfr"