diff --git a/.gitignore b/.gitignore index be070c8..5fea9b6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +**/autostart.sh **/btop.log **/.netrwhist **/__pycache__ diff --git a/_desktop/_scripts/dmenu-audio b/_desktop/_scripts/dmenu-audio index a20be3d..fcb6f73 100755 --- a/_desktop/_scripts/dmenu-audio +++ b/_desktop/_scripts/dmenu-audio @@ -28,7 +28,7 @@ set_input() { set_bt_profile() { bt_sink=$(pactl list cards | awk -F'"' '/device.name.*bluez/ {print $2}') [ -z "${bt_sink}" ] && - { dunstify -u critical "🎧 no headphones connected"; exit; } + { notify-send -t 1000 "ﳌ no headphones connected"; exit; } profile_chosen=$(printf "profile mSBC\\nprofile LDAC\\n$div\\nback\\nexit" | dmenu -c -l 5 -i) case "$profile_chosen" in back) show_current ;; @@ -47,7 +47,7 @@ show_current() { chosen=$(printf "Output: $def_snk\\nInput: $def_src" | dmenu -c -l 2) if [ "$1" = "no_switch" ]; then case "$chosen" in - *) dunstify -u critical "🔊 no device to switch" ;; + *) notify-send -t 1000 -t 1000 "婢 no device to switch" ;; esac else case "$chosen" in diff --git a/_desktop/_scripts/dmenu-display b/_desktop/_scripts/dmenu-display index ca8d5e7..e67c970 100755 --- a/_desktop/_scripts/dmenu-display +++ b/_desktop/_scripts/dmenu-display @@ -40,8 +40,6 @@ onescreen() { postrun() { feh --no-fehbg --bg-scale ~/.local/share/wallpaper.jpg - { killall dunst ; setsid -f dunst ;} >/dev/null 2>&1 # Restart dunst to ensure proper location on screen - #kill -46 $(pidof dwmblocks) } # Get all possible displays @@ -52,7 +50,7 @@ screens=$(echo "$allposs" | awk '/ connected/ {print $1}') # If there's only one screen [ "$(echo "$screens" | wc -l)" -lt 2 ] && - { onescreen "$screens" "native"; postrun; dunstify -u critical "💻 no device to switch"; exit ;} + { onescreen "$screens" "native"; postrun; notify-send -t 1000 ' no device to switch'; exit ;} # Get user choice including both and manual selection: chosen=$(printf -- "%s\\nmulti" "$screens" | dmenu -c -l 5 -i -p "select output") && diff --git a/_desktop/_scripts/sb-volume b/_desktop/_scripts/sb-volume index 4180496..6d7e5be 100755 --- a/_desktop/_scripts/sb-volume +++ b/_desktop/_scripts/sb-volume @@ -1,12 +1,13 @@ #!/bin/bash +icon='\uf028' if [ $1 ]; then case $1 in inc) pactl set-sink-volume @DEFAULT_SINK@ +5%;; dec) pactl set-sink-volume @DEFAULT_SINK@ -5%;; esac volume=$(pactl get-sink-volume @DEFAULT_SINK@ | head -n 1 | awk -F' / *' '{print $2}') - dunstify -h int:value:$volume -r 20 -t 800 "volume: $volume" + notify-send -t 1000 " volume: $volume" else mic=$(pactl get-source-volume @DEFAULT_SOURCE@ | awk -F' / ' '{print $2}' | tr -d '%') [ $(pactl get-source-mute @DEFAULT_SOURCE@ | awk -F': ' '{print $2}') = yes ] || [ "$mic" -eq 0 ] && micmute=" \uf131 " || micmute="" diff --git a/_desktop/qtile/config.py b/_desktop/qtile/config.py index cddc264..1cbace8 100644 --- a/_desktop/qtile/config.py +++ b/_desktop/qtile/config.py @@ -1,3 +1,4 @@ +import os import psutil import subprocess from libqtile import bar, extension, hook, layout, widget @@ -5,6 +6,11 @@ from libqtile.config import Click, Drag, DropDown, Group, Key, Match, ScratchPad from libqtile.dgroups import simple_key_binder from libqtile.lazy import lazy +@hook.subscribe.startup_once +def autostart(): + home = os.path.expanduser('~/.config/qtile/autostart.sh') + subprocess.Popen([home]) + groups = [ Group("1", label="\uf292"), Group("2", label="\uf738", matches=[Match(wm_class=["firefox"])]), @@ -122,6 +128,11 @@ screens = [ record_history=False, ), widget.Spacer(), + widget.Notify( + default_timeout=5, + background="#e8b923", + foreground="#000000", + ), widget.GenPollText( update_interval=1, func=lambda: subprocess.check_output("sb-mail").decode(),