Browse Source

Revamp sound notifications

nixos
Maxime Wack 4 years ago
parent
commit
af4c61ef7e
2 changed files with 31 additions and 11 deletions
  1. +12
    -6
      .config/dunst/dunstrc
  2. +19
    -5
      .config/sxhkd/sxhkdrc

+ 12
- 6
.config/dunst/dunstrc View File

@@ -1,5 +1,5 @@
[global]
font = FontAwesome 24
font = FontAwesome 18

# Allow a small subset of html markup:
# <b>bold</b>
@@ -21,7 +21,7 @@
# %I iconname (without its path)
# %p progress value if set ([ 0%] to [100%]) or nothing
# Markup is allowed
format = "<b>%s</b>\n%b"
format = "%a\n<b>%s</b>\n%b"

# Sort messages by urgency.
sort = no
@@ -31,7 +31,7 @@

# Alignment of message text.
# Possible values are "left", "center" and "right".
alignment = center
alignment = right

# The frequency with wich text that is longer than the notification
# window allows bounces back and forth.
@@ -64,11 +64,13 @@
# the top and down respectevly.
# The width can be negative. In this case the actual width is the
# screen width minus the width defined in within the geometry option.
geometry = "400x1+760+420"
# geometry = "400x3+760+420"
geometry = "420x5-10+24"
corner_radius = 10

# Shrink window if it's smaller than the width. Will be ignored if
# width is 0.
shrink = no
shrink = yes

# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing windowmanager is
@@ -120,7 +122,7 @@
padding = 8

# Horizontal padding.
horizontal_padding = 8
horizontal_padding = 20

# Define a color for the separator.
# possible values are:
@@ -209,6 +211,10 @@
# NOTE: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.

[Sound]
appname = "volume"
format = "<b>%s</b>"

#[espeak]
# summary = "*"
# script = dunst_espeak.sh


+ 19
- 5
.config/sxhkd/sxhkdrc View File

@@ -232,24 +232,38 @@ XF86MonBrightnessDown
xbacklight -5

XF86AudioRaiseVolume
pactl set-sink-mute 0 false;\
pactl set-sink-volume 0 +4%;\
if [ "$HOST" = "hegp" ]; then; \
dunstify -r 1234 "`echo -e "\uf028"` `volume -f '%i' -d hw:1`"; \
dunstify -r 1234 -a volume "`volume -f '%i' -d hw:1` `echo -e "\uf028"`"; \
else; \
dunstify -r 1234 "`echo -e "\uf028"` `volume -f '%i'`"; \
dunstify -r 1234 -a volume "`volume -f '%i'` `echo -e "\uf028"`"; \
fi

XF86AudioLowerVolume
pactl set-sink-mute 0 false;\
pactl set-sink-volume 0 -4%;\
if [ "$HOST" = "hegp" ]; then; \
dunstify -r 1234 "`echo -e "\uf027"` `volume -f '%i' -d hw:1`"; \
dunstify -r 1234 -a volume "`volume -f '%i' -d hw:1` `echo -e "\uf027"`"; \
else; \
dunstify -r 1234 "`echo -e "\uf027"` `volume -f '%i'`"; \
dunstify -r 1234 -a volume "`volume -f '%i'` `echo -e "\uf027"`"; \
fi

XF86AudioMute
pactl set-sink-mute 0 toggle;\
dunstify -r 1234 "`echo -e "\uf026"` `volume -f '%s' -d hw:1`"
if [ "$HOST" = "hegp" ]; then; \
if [ "`volume -f '%s -d hw:1'`" = "on" ]; then; \
dunstify -r 1234 -a volume "`echo -e "\uf028"`"; \
else; \
dunstify -r 1234 -a volume "`echo -e "\uf6a9"`"; \
fi; \
else; \
if [ "`volume -f '%s'`" = "on" ]; then; \
dunstify -r 1234 -a volume "`echo -e "\uf028"`"; \
else; \
dunstify -r 1234 -a volume "`echo -e "\uf6a9"`"; \
fi; \
fi

XF86AudioPlay
mpc toggle;\


Loading…
Cancel
Save