Browse Source

Status bar

main
Yiğit Çolakoğlu 4 years ago
parent
commit
d09a93ff06
8 changed files with 48 additions and 3 deletions
  1. +3
    -1
      scripts/dmenu-bluetooth
  2. +1
    -1
      scripts/kbmap_toggle
  3. +20
    -0
      scripts/status-bar/bluetooth
  4. +4
    -0
      scripts/status-bar/dunst
  5. +5
    -0
      scripts/status-bar/keyboard
  6. +5
    -0
      scripts/status-bar/mail
  7. +5
    -1
      scripts/status-bar/network
  8. +5
    -0
      scripts/status-bar/screensaver

+ 3
- 1
scripts/dmenu-bluetooth View File

@ -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)

+ 1
- 1
scripts/kbmap_toggle View File

@ -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"


+ 20
- 0
scripts/status-bar/bluetooth View File

@ -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

+ 4
- 0
scripts/status-bar/dunst View File

@ -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

+ 5
- 0
scripts/status-bar/keyboard View File

@ -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

+ 5
- 0
scripts/status-bar/mail View File

@ -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

+ 5
- 1
scripts/status-bar/network View File

@ -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

+ 5
- 0
scripts/status-bar/screensaver View File

@ -7,3 +7,8 @@ if [ "$stats" = "off" ]; then
else
echo "^c#a48ead^鈴 ^d^"
fi
case $BLOCK_BUTTON in
1) ~/.scripts/screensaver_toggle -t;;
esac

Loading…
Cancel
Save