diff --git a/scripts/dmenu-bluetooth b/scripts/dmenu-bluetooth index 5b796dbb..c338d313 100755 --- a/scripts/dmenu-bluetooth +++ b/scripts/dmenu-bluetooth @@ -242,7 +242,7 @@ show_menu() { discoverable=$(discoverable_on) divider="---------" - # Options passed to dmenu + # Options passed to dmenu options="$devices\n$divider\n$power\n$scan\n$pairable\n$discoverable" else power="Power: off" @@ -288,3 +288,5 @@ case "$1" in show_menu ;; esac + +kill -60 $(pidof dwmblocks) diff --git a/scripts/kbmap_toggle b/scripts/kbmap_toggle index 2ce06e09..d310db25 100755 --- a/scripts/kbmap_toggle +++ b/scripts/kbmap_toggle @@ -3,7 +3,7 @@ layout=$(xkb-switch -p) if [ "$layout" = "tr" ]; then - xkb-switch -s "us(altgr-intl)" + xkb-switch -s "us" notify-send "Keyboard layout switched to us" else xkb-switch -s "tr" diff --git a/scripts/status-bar/bluetooth b/scripts/status-bar/bluetooth new file mode 100755 index 00000000..7659b045 --- /dev/null +++ b/scripts/status-bar/bluetooth @@ -0,0 +1,20 @@ +#!/bin/bash + +power=$(bluetoothctl show | grep "Powered: yes" | wc -w) + +if [ "$power" -eq 0 ]; then + echo "^c#81a1c1^^d^" # Add color +else + device="$(echo info | bluetoothctl | grep 'Name')" + + if [ ! "$device" = "" ]; then + echo "^c#81a1c1^^d^ $(echo "$device" | head -n 1 | xargs | cut -c 7-)" + else + echo "^c#81a1c1^^d^" + fi + +fi + +case $BLOCK_BUTTON in + 1) ~/.scripts/dmenu-bluetooth;; +esac diff --git a/scripts/status-bar/dunst b/scripts/status-bar/dunst index c7509f7d..e28a3cf2 100755 --- a/scripts/status-bar/dunst +++ b/scripts/status-bar/dunst @@ -7,3 +7,7 @@ if [ "$stats" = "off" ]; then else echo "^c#88c0d0^ ^d^" fi + +case $BLOCK_BUTTON in + 1) ~/.scripts/dunst_toggle.sh -t;; +esac diff --git a/scripts/status-bar/keyboard b/scripts/status-bar/keyboard index f0b73b67..6040fa20 100755 --- a/scripts/status-bar/keyboard +++ b/scripts/status-bar/keyboard @@ -3,3 +3,8 @@ layout=$(xkb-switch -p | cut -d "(" -f1) echo -n "^c#a3be8c^ ^d^$layout" + + +case $BLOCK_BUTTON in + 1) ~/.scripts/kbmap_toggle;; +esac diff --git a/scripts/status-bar/mail b/scripts/status-bar/mail index 32639e82..ef009285 100755 --- a/scripts/status-bar/mail +++ b/scripts/status-bar/mail @@ -4,3 +4,8 @@ mcount=$(cat ~/.cache/mcount) msync=$(cat ~/.cache/msync) echo -n "^c#a3be8c^ ^d^ $msync ^c#81a1c1^ ^d^ $mcount" + +case $BLOCK_BUTTON in + 1) setsid -f st -c center -n center -e neomutt;; + 1) ~/.scripts/mailsync;; +esac diff --git a/scripts/status-bar/network b/scripts/status-bar/network index 9a9e06b7..fc0d53f4 100755 --- a/scripts/status-bar/network +++ b/scripts/status-bar/network @@ -5,7 +5,7 @@ source ~/.config.env is_eth_used=$(cat /sys/class/net/${ETH_IT}/carrier) is_wlan_used=$(cat /sys/class/net/${WLAN_IT}/carrier) -echo -n "^c#88c0d0^" +echo -n "^c#88c0d0^" if [ "$is_eth_used" -eq 1 ]; then # wired network is carrying icon=" ^d^ " #uF6FF @@ -16,3 +16,7 @@ if [ "$is_eth_used" -eq 1 ]; then # wired network is carrying fi echo -n $icon + +case $BLOCK_BUTTON in + 1) ~/.scripts/networkmanager_dmenu;; +esac diff --git a/scripts/status-bar/screensaver b/scripts/status-bar/screensaver index c3009c2e..7a01bcd1 100755 --- a/scripts/status-bar/screensaver +++ b/scripts/status-bar/screensaver @@ -7,3 +7,8 @@ if [ "$stats" = "off" ]; then else echo "^c#a48ead^鈴 ^d^" fi + + +case $BLOCK_BUTTON in + 1) ~/.scripts/screensaver_toggle -t;; +esac