diff options
| author | Shubham Saini <pryr@pryr.xyz> | 2022-11-21 03:08:10 +0000 |
|---|---|---|
| committer | Shubham Saini <pryr@pryr.xyz> | 2022-11-21 03:08:10 +0000 |
| commit | bce233a4370cd8a1d5f50dc36aa47b220df89c16 (patch) | |
| tree | 3e04c364a2eca72f5f690784770c5f3413226bb5 | |
| parent | ef89f8f0b05e4285d2439fb5fdd00820f9cedb68 (diff) | |
bt script: added connect
| -rwxr-xr-x | bspwm/.config/bspwm/bspwmrc | 2 | ||||
| -rwxr-xr-x | polybar/.config/polybar/bt.sh | 13 | ||||
| -rwxr-xr-x | polybar/.config/polybar/config | 3 | ||||
| -rwxr-xr-x | sxhkd/.config/sxhkd/sxhkdrc | 2 |
4 files changed, 17 insertions, 3 deletions
diff --git a/bspwm/.config/bspwm/bspwmrc b/bspwm/.config/bspwm/bspwmrc index 932a65e..8750fd6 100755 --- a/bspwm/.config/bspwm/bspwmrc +++ b/bspwm/.config/bspwm/bspwmrc | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | 2 | ||
| 3 | # bspwm | 3 | # bspwm |
| 4 | bspc monitor -d 1 2 3 4 5 6 | 4 | bspc monitor eDP -d 1 2 3 4 5 6 |
| 5 | bspc config border_width 0 | 5 | bspc config border_width 0 |
| 6 | bspc config window_gap 8 | 6 | bspc config window_gap 8 |
| 7 | bspc config split_ratio 0.50 | 7 | bspc config split_ratio 0.50 |
diff --git a/polybar/.config/polybar/bt.sh b/polybar/.config/polybar/bt.sh index 177932b..3f3b6ec 100755 --- a/polybar/.config/polybar/bt.sh +++ b/polybar/.config/polybar/bt.sh | |||
| @@ -3,7 +3,6 @@ | |||
| 3 | bluetooth_print() { | 3 | bluetooth_print() { |
| 4 | bluetoothctl | while read -r; do | 4 | bluetoothctl | while read -r; do |
| 5 | if [ "$(systemctl is-active "bluetooth.service")" = "active" ]; then | 5 | if [ "$(systemctl is-active "bluetooth.service")" = "active" ]; then |
| 6 | # printf 'on' | ||
| 7 | 6 | ||
| 8 | devices_paired=$(bluetoothctl devices | grep Device | cut -d ' ' -f 2) | 7 | devices_paired=$(bluetoothctl devices | grep Device | cut -d ' ' -f 2) |
| 9 | counter=0 | 8 | counter=0 |
| @@ -54,10 +53,22 @@ bluetooth_toggle() { | |||
| 54 | fi | 53 | fi |
| 55 | } | 54 | } |
| 56 | 55 | ||
| 56 | bluetooth_connect() { | ||
| 57 | if bluetoothctl show | grep -q "Powered: yes"; then | ||
| 58 | devices_paired=$(bluetoothctl devices | grep Device | cut -d ' ' -f 2) | ||
| 59 | echo "$devices_paired" | while read -r line; do | ||
| 60 | bluetoothctl connect "$line" >> /dev/null | ||
| 61 | done | ||
| 62 | fi | ||
| 63 | } | ||
| 64 | |||
| 57 | case "$1" in | 65 | case "$1" in |
| 58 | --toggle) | 66 | --toggle) |
| 59 | bluetooth_toggle | 67 | bluetooth_toggle |
| 60 | ;; | 68 | ;; |
| 69 | --connect) | ||
| 70 | bluetooth_connect | ||
| 71 | ;; | ||
| 61 | *) | 72 | *) |
| 62 | bluetooth_print | 73 | bluetooth_print |
| 63 | ;; | 74 | ;; |
diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config index 425e225..72e4c65 100755 --- a/polybar/.config/polybar/config +++ b/polybar/.config/polybar/config | |||
| @@ -187,7 +187,8 @@ bar-progress-empty = ─ | |||
| 187 | type = custom/script | 187 | type = custom/script |
| 188 | exec = ~/.config/polybar/bt.sh | 188 | exec = ~/.config/polybar/bt.sh |
| 189 | tail = true | 189 | tail = true |
| 190 | click-left = ~/.config/polybar/bt.sh --toggle & | 190 | click-left = ~/.config/polybar/bt.sh --connect & |
| 191 | click-right = ~/.config/polybar/bt.sh --toggle & | ||
| 191 | format = tooth <label> | 192 | format = tooth <label> |
| 192 | label = %output% | 193 | label = %output% |
| 193 | label-foreground = #EEFFFF | 194 | label-foreground = #EEFFFF |
diff --git a/sxhkd/.config/sxhkd/sxhkdrc b/sxhkd/.config/sxhkd/sxhkdrc index ed672af..89b07c2 100755 --- a/sxhkd/.config/sxhkd/sxhkdrc +++ b/sxhkd/.config/sxhkd/sxhkdrc | |||
| @@ -28,6 +28,8 @@ super + shift + p | |||
| 28 | passmenu -i -fn "Input Mono:style=medium:size=9" -nb "#171a1f" -nf "#f3f4f5" -sb "#c6c8d1" -sf "#171a1f" | 28 | passmenu -i -fn "Input Mono:style=medium:size=9" -nb "#171a1f" -nf "#f3f4f5" -sb "#c6c8d1" -sf "#171a1f" |
| 29 | super + Escape | 29 | super + Escape |
| 30 | pkill -USR1 -x sxhkd | 30 | pkill -USR1 -x sxhkd |
| 31 | super + p | ||
| 32 | cmus-remote -u | ||
| 31 | control + alt + m | 33 | control + alt + m |
| 32 | bspc node -g hidden=on | 34 | bspc node -g hidden=on |
| 33 | super + shift + m | 35 | super + shift + m |
