From a3d0f85ee5856ff13c67816fa1a7a666f4350abc Mon Sep 17 00:00:00 2001 From: olari Date: Wed, 1 Aug 2018 02:01:42 +0300 Subject: [PATCH] Add dunst config --- .config/dunst/dunstrc | 40 ++++++++++++++++++++++++++++++++++++++++ scripts/audio.sh | 20 ++++++++++++++------ scripts/backlight.sh | 4 ++-- todo | 1 - 4 files changed, 56 insertions(+), 9 deletions(-) create mode 100644 .config/dunst/dunstrc diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc new file mode 100644 index 0000000..4168bc9 --- /dev/null +++ b/.config/dunst/dunstrc @@ -0,0 +1,40 @@ +[global] + geometry = "0x5-50+50" + transparency = 20 + + padding = 4 + horizontal_padding = 4 + frame_width = 2 + frame_color = "#aaaaaa" + alignment = center + font = DejaVu Sans Mono 9 + + sort = no + markup = no + + idle_threshold = no + show_age_threshold = -1 + history_length = 0 + + icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ + + + indicate_hidden = no + stack_duplicates = false + hide_duplicate_count = true + +[urgency_low] + background = "#282A36" + foreground = "#F8F8F2" + timeout = 10 + +[urgency_normal] + background = "#282A36" + foreground = "#F8F8F2" + timeout = 10 + +[urgency_critical] + background = "#282A36" + foreground = "#F8F8F2" + frame_color = "#ff0000" + timeout = 0 diff --git a/scripts/audio.sh b/scripts/audio.sh index 4d73e55..26b39fe 100755 --- a/scripts/audio.sh +++ b/scripts/audio.sh @@ -1,19 +1,27 @@ #!/bin/bash +current_volume=$(pamixer --get-volume) + case $1 in "raise") - pactl set-sink-volume 0 +5% - notify-send $(pamixer --get-volume) + (( current_volume += 5 )) + [[ current_volume -gt 100 ]] && current_volume=100 + + pamixer --set-volume $current_volume + notify-send -t 250 "VOL: $current_volume" pkill -RTMIN+1 i3blocks ;; "lower") - pactl set-sink-volume 0 -5% - notify-send $(pamixer --get-volume) + (( current_volume -= 5 )) + [[ current_volume -lt 0 ]] && current_volume=0 + + pamixer --set-volume $current_volume + notify-send -t 250 "VOL: $current_volume" pkill -RTMIN+1 i3blocks ;; "toggle_mute") - pactl set-sink-mute 0 toggle - notify-send $(pamixer --get-mute) + pamixer --toggle-mute + notify-send -t 300 "MUTE: $(pamixer --get-mute)" ;; esac diff --git a/scripts/backlight.sh b/scripts/backlight.sh index 24106d0..4f66e0b 100755 --- a/scripts/backlight.sh +++ b/scripts/backlight.sh @@ -9,14 +9,14 @@ case $1 in [[ $current_backlight -gt 100 ]] && current_backlight=100 xbacklight -set $current_backlight - notify-send $current_backlight + notify-send -t 250 "BL: $current_backlight" ;; "lower") (( current_backlight -= 5 )) [[ $current_backlight -lt 5 ]] && current_backlight=1 xbacklight -set $current_backlight - notify-send $current_backlight + notify-send -t 250 "BL: $current_backlight" ;; esac diff --git a/todo b/todo index 88aa486..6c430f2 100644 --- a/todo +++ b/todo @@ -3,5 +3,4 @@ rrs client (+ youtube) calcurse mutt ranger config -dunst config laptop features (sleep, lock)