From 94fd4f1bc3dba4e53ca57c769999dc72f7932936 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sat, 8 May 2021 17:58:10 +0200 Subject: Added transient notification for backlight-ctl --- config/qutebrowser/config.py | 2 +- config/xmonad/xmonad.hs | 2 +- config/zsh/aliases.zsh | 2 ++ local/bin/backlight-ctl | 6 ++++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/config/qutebrowser/config.py b/config/qutebrowser/config.py index a6112ac..21ae11b 100644 --- a/config/qutebrowser/config.py +++ b/config/qutebrowser/config.py @@ -76,7 +76,7 @@ c.colors.webpage.darkmode.enabled = True # Convert light themed sites to dark t # c.content.proxy = 'socks://localhost:9050/' # tor c.content.autoplay = False -c.content.notifications = False +c.content.notifications.enabled = False # c.content.cookies.accept = 'no-3rdparty' c.content.headers.user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/{webkit_version} (KHTML, like Gecko) {qt_key}/{qt_version}" diff --git a/config/xmonad/xmonad.hs b/config/xmonad/xmonad.hs index 2d3a979..c25af11 100644 --- a/config/xmonad/xmonad.hs +++ b/config/xmonad/xmonad.hs @@ -61,7 +61,7 @@ keys' = [ ("", spawn "pulseaudio-ctl down") , ("M-i", spawn "st -e zsh -c 'source ~/.config/zsh/.zshrc && rc'") , ("M-m", spawn "st -e mocp -C /home/cacharle/.config/moc/config") , ("M-S-d", spawn "notify-send -i x-office-calendar \"$(date +\"%H:%M %A %d/%m/%Y %B\")\"") - , ("M-S-b", spawn "notify-send \"battery: $(cat /sys/class/power_supply/BAT0/capacity)\"") + , ("M-S-b", spawn "notify-send --hint=int:transient:1 --hint=int:value:\"$(cat /sys/class/power_supply/BAT0/capacity)\" \"Battery\"") , ("M-q", spawn "notify-send 'Restarting xmonad'" >> spawn restartCmd) , ("M-S-q", confirm "Are you sure you want to shutdown?" $ io (exitWith ExitSuccess)) ] diff --git a/config/zsh/aliases.zsh b/config/zsh/aliases.zsh index 2878007..da86921 100644 --- a/config/zsh/aliases.zsh +++ b/config/zsh/aliases.zsh @@ -148,3 +148,5 @@ rc() { } vf() { f="$(fzf || exit 1)" && "$EDITOR" "$f" ; } + +alias zathura='zathura --fork' diff --git a/local/bin/backlight-ctl b/local/bin/backlight-ctl index 2963d83..1e7f94c 100755 --- a/local/bin/backlight-ctl +++ b/local/bin/backlight-ctl @@ -15,9 +15,11 @@ else fi case "$1" in - "up") "$cmd" "$up_opt" 5 ;; + "up") "$cmd" "$up_opt" 5 ;; "down") "$cmd" "$down_opt" 5 ;; *) exit 1 ;; esac -notify-send "backlight $("$cmd" | cut -d '.' -f 1)" +value="$("$cmd" | cut -d '.' -f 1)" + +notify-send --hint=int:transient:1 --hint=int:value:"$value" "Backlight" -- cgit