Add alt+f4 to sxhkd, update polybar scripts

This commit is contained in:
Smirnov Alexandr 2021-03-25 11:08:58 +02:00
parent 351fd863ac
commit 946566abc6
8 changed files with 27 additions and 22 deletions

View file

@ -5,6 +5,6 @@
### Install ### Install
```bash ```bash
sudo pacman -S bspwm sxhkd sudo pacman -S bspwm sxhkd kitty
yay -S polybar yay -S polybar
``` ```

View file

@ -1,13 +1,13 @@
#!/bin/sh #!/bin/sh
###== Functions ###== Functions
A() { A() { # AutoStart
if ! pgrep $1 if ! pgrep $1
then $@& fi then $@& fi
} }
C() { C() { # BSPWM config
bspc config $@ bspc config $@
} }
R() { R() { # BSPWM rule
bspc rule -a $@ bspc rule -a $@
} }
@ -41,7 +41,6 @@ C urgent_border_color "#FF6C6B"
###== BSPWM Rules ###== BSPWM Rules
R kitty desktop='^1' focus=on follow=on R kitty desktop='^1' focus=on follow=on
R Google-chrome desktop='^2' focus=on follow=on R Google-chrome desktop='^2' focus=on follow=on
R LibreWolf desktop='^2' focus=on follow=on
R Code desktop='^3' focus=on follow=on R Code desktop='^3' focus=on follow=on
R '*:nvim' desktop='^3' focus=on follow=off R '*:nvim' desktop='^3' focus=on follow=off
R Todoist desktop='^4' focus=on follow=off R Todoist desktop='^4' focus=on follow=off

View file

@ -37,7 +37,7 @@ wm-restack = bspwm
font-0 = Iosevka Nerd Font:style=Medium:size=8;3 font-0 = Iosevka Nerd Font:style=Medium:size=8;3
font-1 = FontAwesome5Free:style=Solid:size=7.5;2.5 font-1 = FontAwesome5Free:style=Solid:size=7.5;2.5
modules-left = bspwm modules-left = bspwm
modules-right = keyboard pulseaudio time wifi-signal modules-right = keyboard pulseaudio archupd time wifi-signal
tray-position = right tray-position = right
[module/bspwm] [module/bspwm]

View file

@ -1,13 +1,9 @@
#!/bin/sh #!/usr/bin/env bash
if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then
updates_arch=0 updates_arch=0
fi fi
if ! updates_aur=$(yay -Qum 2> /dev/null | wc -l); then if ! updates_aur=$(yay -Qum 2> /dev/null | wc -l); then
# if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then
# if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then
# if ! updates_aur=$(pikaur -Qua 2> /dev/null | wc -l); then
# if ! updates_aur=$(rua upgrade --printonly 2> /dev/null | wc -l); then
updates_aur=0 updates_aur=0
fi fi

View file

@ -1,8 +1,11 @@
import requests, os import requests, os
API_KEY = os.getenv("OWM_POLYBAR") API_KEY = os.getenv("OWM_POLYBAR")
CITY = os.getenv("OWM_CITY") CITY = os.getenv("OWM_CITY")
try: try:
JSON = requests.get(f"http://api.openweathermap.org/data/2.5/weather?q={CITY}&lang=EN&&units=metric&appid={API_KEY}").json() JSON = requests.get(
f"http://api.openweathermap.org/data/2.5/weather?q={CITY}&lang=EN&&units=metric&appid={API_KEY}"
).json()
print("", int(JSON["main"]["temp"]), "°С") print("", int(JSON["main"]["temp"]), "°С")
except Exception as e: except Exception as e:
print(" err") print(" err")

View file

@ -1,2 +1,5 @@
#!/bin/sh #!/bin/sh
cat /proc/net/wireless | grep "wlp3s0" | awk '{print $4}' | grep -o '[0-9]*' cat /proc/net/wireless \
| grep "wlp3s0" \
| awk '{print $4}' \
| grep -o '[0-9]*'

View file

@ -5,11 +5,12 @@
super + {_,shift} Return super + {_,shift} Return
{kitty, rofi -show drun -theme ntenV2} {kitty, rofi -show drun -theme ntenV2}
super + shift + {w, e, f, c, t, q} super + shift + {w, e, f, c, s, t, q}
{google-chrome-stable, \ {google-chrome-stable, \
kitty --class nvim -e nvim, \ kitty --class nvim -e nvim, \
kitty --class ranger -e ranger, \ kitty --class ranger -e ranger, \
code, \ code, \
.applications/simplenote.appimage, \
.applications/todoist.appimage, \ .applications/todoist.appimage, \
xkill } xkill }
@ -27,6 +28,9 @@ super + {Escape, ctrl+i}
super + q super + q
bspc node -c bspc node -c
alt + F4
bspc node -c
super + control + r super + control + r
bspc wm -r \ bspc wm -r \
&& pkill sxhkd \ && pkill sxhkd \

View file

@ -68,7 +68,7 @@ set visualbell t_vb=
"== Settings for specific files "== Settings for specific files
autocmd FileType python,json setlocal ex sw=4 ts=4 autocmd FileType python,json setlocal ex sw=4 ts=4
autocmd FileType go setlocal noex sw=4 ts=4 autocmd FileType go setlocal noex sw=4 ts=4
autocmd FileType javascript,javascriptreact setlocal noet sw=2 ts=2 autocmd FileType javascript,javascriptreact setlocal et sw=2 ts=2
autocmd FileType css,yaml setlocal ex sw=4 ts=4 autocmd FileType css,yaml setlocal ex sw=4 ts=4
"== Aliases "== Aliases