Update zsh, bspwm

This commit is contained in:
Smirnov Alexandr 2021-03-18 21:24:43 +02:00
parent 1be1c9c53e
commit c4d54758ef
7 changed files with 31 additions and 36 deletions

View file

@ -5,7 +5,10 @@ kernel=$(cat /proc/sys/kernel/osrelease|cut -d '-' -f1)
# Window manager name # Window manager name
[ ! "$wm" ] && [ "$DISPLAY" ] && command -v xprop >/dev/null && { [ ! "$wm" ] && [ "$DISPLAY" ] && command -v xprop >/dev/null && {
wmname="$(xprop -id $(xprop -root -notype | awk '$1=="_NET_SUPPORTING_WM_CHECK:"{print $5}') -notype -f _NET_WM_NAME 8t | grep "WM_NAME" | cut -f2 -d \")" wmname="$(xprop -id $(xprop -root -notype\
| awk '$1=="_NET_SUPPORTING_WM_CHECK:"{print $5}') -notype -f _NET_WM_NAME 8t\
| grep "WM_NAME"\
| cut -f2 -d \")"
} }
# Shell # Shell
@ -22,7 +25,7 @@ esac
# Colors #### # Colors ####
bold="\e[1m" bold=$(tput bold)
reset="\e[0m" reset="\e[0m"
blue="\e[36m" blue="\e[36m"

View file

@ -34,20 +34,15 @@ bspc config presel_feedback_color "#51AFEF"
bspc config urgent_border_color "#FF6C6B" bspc config urgent_border_color "#FF6C6B"
###== BSPWM Rules ###== BSPWM Rules
bspc rule -a Alacritty desktop='^1' focus=on follow=on
bspc rule -a kitty desktop='^1' focus=on follow=on bspc rule -a kitty desktop='^1' focus=on follow=on
bspc rule -a firefox desktop='^2' focus=on follow=on
bspc rule -a Google-chrome desktop='^2' focus=on follow=on bspc rule -a Google-chrome desktop='^2' focus=on follow=on
bspc rule -a LibreWolf desktop='^2' focus=on follow=on bspc rule -a LibreWolf desktop='^2' focus=on follow=on
bspc rule -a Code desktop='^3' focus=on follow=on bspc rule -a Code desktop='^3' focus=on follow=on
bspc rule -a Emacs desktop='^3' focus=on follow=on state='tiled' bspc rule -a '*:nvim' desktop='^4' focus=on follow=off
bspc rule -a '*:nvim' desktop='^3' focus=on follow=on
bspc rule -a '*:ranger' desktop='^4' focus=on follow=off bspc rule -a '*:ranger' desktop='^4' focus=on follow=off
bspc rule -a Thunar desktop='^4' focus=on follow=off
bspc rule -a Todoist desktop='^5' focus=on follow=off bspc rule -a Todoist desktop='^5' focus=on follow=off
bspc rule -a Joplin desktop='^5' focus=on follow=on bspc rule -a Joplin desktop='^5' focus=on follow=on
bspc rule -a Simplenote desktop='^5' focus=on follow=on bspc rule -a Simplenote desktop='^5' focus=on follow=on
bspc rule -a discord desktop='^6' focus=off follow=off bspc rule -a discord desktop='^6' focus=off follow=off
bspc rule -a telegram-desktop desktop='^6' focus=off follow=on bspc rule -a telegram-desktop desktop='^6' focus=off follow=on
bspc rule -a KeePassXC desktop='^7' focus=on follow=off bspc rule -a KeePassXC desktop='^7' focus=on follow=off
bspc rule -a Spotify desktop='^9' focus=on follow=on

View file

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
killall -q polybar killall -q polybar
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
polybar -c ~/.config/bspwm/polybar/polybar min& #polybar -c ~/.config/bspwm/polybar/polybar min&
#polybar -c ~/.config/bspwm/polybar/polybar bar& polybar -c ~/.config/bspwm/polybar/polybar bar&

View file

@ -3,8 +3,8 @@
[settings] [settings]
enable-ipc = true enable-ipc = true
format-padding = 1 format-padding = 1
screenchange-reload = true ;screenchange-reload = true
pseudo-transparency = true ;pseudo-transparency = true
[colors] [colors]
background = #262A2B background = #262A2B
@ -34,6 +34,7 @@ fixed-center = true
background = ${colors.background} background = ${colors.background}
foreground = ${colors.foreground} foreground = ${colors.foreground}
wm-restack = bspwm wm-restack = bspwm
override-redirect = true
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

View file

@ -3,21 +3,19 @@
## == USER keys ## == USER keys
super + {_,shift} Return super + {_,shift} Return
{kitty, \ {kitty, \
rofi -show drun -theme ntenV2} rofi -show drun -theme ntenV2}
super + shift + {w, f, e, c, s, t, q} super + shift + {w, e, f, c, a, q}
{google-chrome-stable, \ {google-chrome-stable, \
kitty --class ranger -e ranger, \ kitty --class nvim -e nvim, \
kitty --class nvim -e nvim, \ kitty --class ranger -e ranger, \
code, \ code, \
.applications/simplenote.appimage, \ .applications/todoist.appimage, \
.applications/todoist.appimage, \ xkill }
xkill }
super + {_,shift} Print {_,shift,ctrl} Print
{scrot -s, \ {scrot -s, scrot, scrot -u}
scrot }
super + {equal, minus, shift+minus} super + {equal, minus, shift+minus}
amixer sset Master {2%+,2%-,toggle} amixer sset Master {2%+,2%-,toggle}
@ -31,8 +29,8 @@ super + q
bspc node -c bspc node -c
super + control + r super + control + r
bspc wm -r \ bspc wm -r && \
pkill -USR1 -x sxhkd sxhkd -c ~/.config/bspwm/sxhkd
### == BSPWM windows ### == BSPWM windows
## Resize window ## Resize window
@ -40,7 +38,7 @@ super + ctrl + {h,j,k,l}
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0} bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
# Change focus & move focus window # Change focus & move focus window
super + {_,shift + }{h,j,k,l} super + {_,shift + } {h,j,k,l}
bspc node -{f,s} {west,south,north,east} bspc node -{f,s} {west,south,north,east}
# Preselect the direction # Preselect the direction

View file

@ -10,8 +10,7 @@ set termguicolors
colorscheme nten16 colorscheme nten16
" Line numbers " Line numbers
set number set nu rnu
set relativenumber
" Line wrap " Line wrap
set linebreak wrap set linebreak wrap
@ -28,7 +27,7 @@ set autoindent
set ruler laststatus=0 set ruler laststatus=0
" Maximux item in popup " Maximux item in popup
set pumheight=9 set pumheight=8
" Scroll " Scroll
set scrolloff=3 set scrolloff=3
@ -72,6 +71,7 @@ autocmd FileType css,javascript,javascriptreact,yaml setlocal noet sw=2 ts=2
"== Aliases "== Aliases
command! W :w command! W :w
command! Q :q
command! WQ :wq command! WQ :wq
command! Wq :wq command! Wq :wq
command! Wiki :e ~/doc/index.md command! Wiki :e ~/doc/index.md
@ -88,7 +88,6 @@ let g:NERDTreeMinimalUI = 1
"== Mapping "== Mapping
let mapleader=";" let mapleader=";"
inoremap ii <esc>
" NerdTree " NerdTree
nnoremap <leader>e :NERDTreeToggle<CR> nnoremap <leader>e :NERDTreeToggle<CR>
@ -126,10 +125,10 @@ noremap <A-9> :tabn 9<CR>
" Buffer " Buffer
nnoremap <leader>j :bnext<CR> nnoremap <leader>j :bnext<CR>
nnoremap <leader>k :bprev<CR> nnoremap <leader>k :bprev<CR>
nnoremap <leader>c :bdele<CR> nnoremap <leader>h :bdele<CR>
" Work with system clipboard " Working with system clipboard
noremap <leader>c "*yy<CR> noremap <leader>c "+y<CR>
noremap <leader>v "+p<CR> noremap <leader>v "+p<CR>
" Terminal " Terminal

3
zshrc
View file

@ -5,7 +5,7 @@ export EDITOR="nvim"
export OMH="$HOME/.oh-my-zsh" export OMH="$HOME/.oh-my-zsh"
ZSH_THEME="simple" ZSH_THEME="simple"
DISABLE_AUTO_TITLE="true" DISABLE_AUTO_TITLE="true"
plugins=(yarn) plugins=(yarn nvm)
source $OMH/oh-my-zsh.sh source $OMH/oh-my-zsh.sh
### Aliases ### Aliases
@ -18,4 +18,3 @@ alias vi="vim"
alias tmux="tmux -2" alias tmux="tmux -2"
alias :q="exit" alias :q="exit"
alias ...="cd ../.." alias ...="cd ../.."
alias icat="kitty +kitten icat"