mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 08:41:34 +02:00
Add alt+f4 to sxhkd, update polybar scripts
This commit is contained in:
parent
351fd863ac
commit
946566abc6
8 changed files with 27 additions and 22 deletions
|
|
@ -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
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ 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 windowname
|
modules-left = bspwm windowname
|
||||||
modules-center = time date weather
|
modules-center = time date weather
|
||||||
modules-right = keyboard pulseaudio archupd wifi-signal
|
modules-right = keyboard pulseaudio archupd wifi-signal
|
||||||
tray-position = right
|
tray-position = right
|
||||||
tray-padding = 0
|
tray-padding = 0
|
||||||
|
|
||||||
|
|
@ -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]
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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")
|
||||||
|
|
|
||||||
|
|
@ -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]*'
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,14 @@
|
||||||
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/todoist.appimage, \
|
.applications/simplenote.appimage, \
|
||||||
xkill }
|
.applications/todoist.appimage, \
|
||||||
|
xkill }
|
||||||
|
|
||||||
{_,shift,ctrl} Print
|
{_,shift,ctrl} Print
|
||||||
{scrot -s, scrot, scrot -u}
|
{scrot -s, scrot, scrot -u}
|
||||||
|
|
@ -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 \
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue