13 files changed,
99 insertions(+),
156 deletions(-)
Author:
Smirnov Olexandr
ss2316544@gmail.com
Committed at:
2021-02-24 15:56:14 +0200
Parent:
5374db6
M
config/bspwm/bspwmrc
··· 49 49 bspc rule -a Joplin desktop='^5' focus=on follow=on 50 50 bspc rule -a Simplenote desktop='^5' focus=on follow=on 51 51 bspc rule -a discord desktop='^6' focus=off follow=off 52 -bspc rule -a telegram-desktop desktop='^6' focus=off follow=off 52 +bspc rule -a telegram-desktop desktop='^6' focus=off follow=on 53 53 bspc rule -a KeePassXC desktop='^7' focus=on follow=off 54 54 bspc rule -a Spotify desktop='^9' focus=on follow=on 55 55 bspc rule -a google-tasks-desktop state=floating
M
config/bspwm/sxhkd
··· 6 6 {kitty, \ 7 7 rofi -show drun -theme ntenV2} 8 8 9 -super + shift + {w,f,e,c,v,q} 10 - {google-chrome-stable, \ 11 - alacritty --class=ranger -e ranger, \ 12 - alacritty --class=nvim -e nvim, \ 13 - code, \ 14 - veracrypt, \ 15 - xkill } 16 - 17 -super + shift + z 18 - betterlockscreen --off 180 -t "Computer is locked" -l 9 +super + shift + {w,f,e,c,v,s,z,q} 10 + {google-chrome-stable, \ 11 + kitty --class ranger -e ranger, \ 12 + kitty --class nvim -e nvim, \ 13 + code, \ 14 + veracrypt, \ 15 + .applications/simplenote.appimage, \ 16 + betterlockscreen --off 180 -t "Computer is locked" -l, \ 17 + xkill } 19 18 20 19 super + {equal, minus, shift+minus} 21 20 amixer sset Master {2%+,2%-,toggle}
M
config/i3/config
··· 16 16 hide_edge_borders smart 17 17 18 18 ############ Variables ########### 19 -set $terminal alacritty 19 +set $terminal kitty 20 20 set $browser google-chrome-stable 21 -set $filemanager alacritty --title=ranger -e ranger 22 -set $codeeditor alacritty --title=nvim -e nvim 21 +set $filemanager kitty --class ranger -e ranger 22 +set $codeeditor kitty --class nvim -e nvim 23 23 set $guicode code 24 24 25 25 ############ Autostart ############ 26 26 exec_always --no-startup-id exec setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" 27 -exec_always --no-startup-id exec picom --experimental-backends -b 27 +exec --no-startup-id exec picom -b 28 28 exec --no-startup-id exec nitrogen --restore 29 29 exec --no-startup-id exec lxsession 30 -#exec --no-startup-id exec $HOME/.script/autolock 31 -#exec --no-startup-id exec org.telegram.desktop 32 -#exec --no-startup-id exec discord 33 -#exec --no-startup-id exec redshift-gtk 34 -#exec_always --no-startup-id exec $HOME/.config/i3/bar.sh 35 30 36 31 ############## WM keys ############ 37 32 ··· 62 57 ############## User key ########### 63 58 64 59 # Menus 65 -bindsym $mod+Shift+Return exec rofi -show drun 60 +bindsym $mod+Shift+Return exec rofi -show drun -theme ntenV2 66 61 bindsym $mod+Escape exec ~/.script/dmenu/dmenu-power.sh 67 62 bindsym $mod+Control+u exec ~/.script/dmenu/dmenu-config-edit.sh 68 63 bindsym $mod+Control+i exec ~/.script/dmenu/dmenu-pass.sh ··· 73 68 bindsym $mod+Shift+f exec $filemanager 74 69 bindsym $mod+Shift+e exec $codeeditor 75 70 bindsym $mod+Shift+c exec $guicode 71 +bindsym $mod+Shift+v exec veracrypt 72 +bindsym $mod+Shift+s exec ~/.applications/simplenote.appimage 76 73 77 74 # Sceenshot 78 75 bindsym --release Print exec scrot -s /home/${USER}/$(date +%Y-%m-%d-%H-%M-%S).png 79 -bindsym --release Shift+Print exec scrot /home/${USER}/$(date +%Y-%m-%d-%H-%M-%S).png 76 +bindsym Shift+Print exec scrot /home/${USER}/$(date +%Y-%m-%d-%H-%M-%S).png 80 77 81 78 # Lockscreen 82 79 bindsym $mod+Shift+z exec betterlockscreen --off 180 -t "Computer is lockerd" -l 83 80 84 81 # Volume 85 -bindsym $mod+plus exec "amixer sset Master 2%+" 86 -bindsym $mod+minus exec "amixer sset Master 2%-" 87 -bindsym $mod+Shift+minus exec "amixer sset Master toggle" 82 +bindsym $mod+plus exec amixer sset Master 2%+ 83 +bindsym $mod+minus exec amixer sset Master 2%- 84 +bindsym $mod+Shift+minus exec amixer sset Master toggle 88 85 89 86 ######### Window preferens ######## 90 87 assign [class="(?i)alacritty|kitty"] $ws1 91 -assign [class="(?i)firefox|google-chorome-stable"] $ws2 92 -assign [class="(?i)code|vscodium|subl"] $ws3 93 -assign [title="nvim"] $ws3 94 -assign [class="(?!)thunar"] $ws4 95 -assign [title="ranger"] $ws4 96 -assign [title="Joplin"] $ws5 97 -assign [class="(?i)telegram|discord"] $ws6 88 +assign [class="(?i)google-chrome-stable|firefox"] $ws2 89 +assign [class="Code|nvim"] $ws3 90 +assign [class="Thunar|ranger"] $ws4 91 +assign [class="Joplin|Simplenote"] $ws5 92 +assign [class="TelegramDesktop|discord"] $ws6 93 +for_window [class="TelegramDesktop|discord"] layout tabbed 94 +assign [class="KeePassXC"] $ws7 98 95 assign [class="Spotify"] $ws9 99 96 for_window [title="Google Tasks"] floating enable 100 -for_window [class="(?i)telegram|discord"] layout tabbed 101 97 focus_on_window_activation focus 102 98 103 99 ########## Change focus ########### ··· 163 159 164 160 ############### Bar ############### 165 161 bar { 166 - #status_command i3status -c ~/.config/i3/i3status 167 - status_command i3blocks -c ~/.config/i3/i3blocks 162 + # status_command i3status -c ~/.config/i3/i3status 163 + status_command i3status-rs ~/.config/i3/i3status-rs.toml 168 164 font pango:JetBrains Mono 10 169 165 position top 170 166 colors {
D
config/i3/i3blocks
··· 1 -separator=true 2 -separator_block_width=15 3 - 4 -[keyboard] 5 -command=$HOME/.script/kblayout 6 -label= 7 -interval=repeat 8 - 9 -[volume] 10 -command=$HOME/.script/volume 11 -interval=repeat 12 -label= 13 -signal=10 14 - 15 -[weather] 16 -command=python $HOME/.config/polybar/scripts/weather.py 17 -interval=10 18 - 19 -[wiki-signal] 20 -command=$HOME/.config/polybar/scripts/wifi-signal.sh 21 -label= 22 -interval=5 23 - 24 -[updates-arch] 25 -command=$HOME/.config/polybar/scripts/updates-pacman-aur.sh 26 -interval=60 27 - 28 -[time] 29 -command=date +%H:%M 30 -label= 31 -interval=60
A
config/i3/i3status
··· 1 +# vim: ft=conf 2 +general { 3 + colors = false 4 + interval = 1 5 + output_format = "i3bar" 6 +} 7 + 8 +order += "volume master" 9 +order += "wireless _first_" 10 +#order += "battery all" 11 +order += "tztime local" 12 + 13 +volume master { 14 + format = " %volume" 15 + format_muted = " %volume" 16 + device = "default" 17 + mixer = "Master" 18 + mixer_idx = 2 19 +} 20 + 21 +wireless _first_ { 22 + format_up = "%quality" 23 + format_down = "W: down" 24 +} 25 + 26 +battery all { 27 + format = "%status %percentage" 28 + last_full_capacity = true 29 + format_down = "No battery" 30 + status_chr = "" 31 + status_bat = "" 32 + status_unk = "? UNK" 33 + status_full = "" 34 + path = "/sys/class/power_supply/BAT%d/uevent" 35 + low_threshold = 10 36 +} 37 + 38 +tztime local { 39 + format = " %d %b %H:%M" 40 +}
M
config/i3/i3status-rs.toml
··· 1 1 theme = "native" 2 -icons = "awesome5" 2 +#icons = "awesome5" 3 3 4 -### CPU load 5 4 [[block]] 6 -block = "cpu" 7 -interval = 5 8 - 9 -### Blacklight 10 -[[block]] 11 -block = "backlight" 12 -device = "intel_backlight" 5 +block = "custom" 6 +command = "~/.script/kblayout" 7 +interval = 0 13 8 14 -### Volume 15 9 [[block]] 16 10 block = "sound" 17 -step_width = 2 18 11 19 -### WiFi signal 20 -#[[block]] 21 -#block = "custom" 22 -#command = "cat /proc/net/wireless | grep \"wlp3s0\" | awk '{print $4}' | grep -o '[0-9]*'" 23 -#interval = 10 24 - 25 -### Keyboard layout 26 12 [[block]] 27 -block = "custom" 28 -interval = 0 29 -command = """ 30 -case "$(xkblayout)" in 31 - Eng) echo "us" ;; 32 - Ukr) echo "ua" ;; 33 -esac""" 13 +block = "net" 14 +device = "wlp3s0" 15 +format = "{signal_strength}" 16 +interval = 4 34 17 35 -### Date && time 36 18 [[block]] 37 19 block = "time" 38 20 interval = 60 39 -format = "%H:%M" 21 +format = "%R"
M
config/nvim/init.vim
··· 3 3 Plug 'itchyny/lightline.vim' 4 4 Plug 'jiangmiao/auto-pairs' 5 5 Plug 'maxboisvert/vim-simple-complete' 6 - Plug 'preservim/nerdcommenter' 7 6 Plug 'sheerun/vim-polyglot' 8 7 call plug#end() 9 8 ··· 102 101 \ [ 'filename', 'filetype' ] ] } 103 102 \ } 104 103 105 -let g:NERDCreateDefaultMappings = 1 106 -let g:NERDSpaceDelims = 1 107 -let g:NERDCompactSexyComs = 1 108 - 109 104 "== Mapping 110 105 let mapleader="'" 111 106 112 107 " Alternative keys 113 108 noremap <C-s> :w<CR> 114 109 noremap <C-n> :tabnew<CR> 110 +noremap <C-t> :tabnew<CR> 115 111 noremap <leader>ww :Wiki<CR> 116 112 noremap <leader>e :Ve<CR> 117 113
D
script/volume
··· 1 -#!/usr/bin/env bash 2 -if [[ -z "$MIXER" ]] ; then 3 - MIXER="default" 4 - if command -v pulseaudio >/dev/null 2>&1 && pulseaudio --check ; then 5 - if amixer -D pulse info >/dev/null 2>&1 ; then 6 - MIXER="pulse" 7 - fi 8 - fi 9 - [ -n "$(lsmod | grep jack)" ] && MIXER="jackplug" 10 - MIXER="${2:-$MIXER}" 11 -fi 12 - 13 -if [[ -z "$SCONTROL" ]] ; then 14 - SCONTROL="${BLOCK_INSTANCE:-$(amixer -D $MIXER scontrols | 15 - sed -n "s/Simple mixer control '\([^']*\)',0/\1/p" | 16 - head -n1 17 - )}" 18 -fi 19 - 20 -if [[ -z "$STEP" ]] ; then 21 - STEP="${1:-5%}" 22 -fi 23 - 24 -NATURAL_MAPPING=${NATURAL_MAPPING:-0} 25 -if [[ "$NATURAL_MAPPING" != "0" ]] ; then 26 - AMIXER_PARAMS="-M" 27 -fi 28 - 29 -capability() { 30 - amixer $AMIXER_PARAMS -D $MIXER get $SCONTROL | 31 - sed -n "s/ Capabilities:.*cvolume.*/Capture/p" 32 -} 33 - 34 -volume() { 35 - amixer $AMIXER_PARAMS -D $MIXER get $SCONTROL $(capability) 36 -} 37 - 38 -format() { 39 - perl_filter='if (/.*\[(\d+%)\] (\[(-?\d+.\d+dB)\] )?\[(on|off)\]/)' 40 - perl_filter+='{CORE::say $4 eq "off" ? "M" : "' 41 - perl_filter+=$([[ $STEP = *dB ]] && echo '$3' || echo '$1') 42 - perl_filter+='"; exit}' 43 - output=$(perl -ne "$perl_filter") 44 - echo "$LABEL$output" 45 -} 46 - 47 -case $BLOCK_BUTTON in 48 - 3) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) toggle ;; 49 - 4) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) ${STEP}+ unmute ;; 50 - 5) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) ${STEP}- unmute ;; 51 -esac 52 - 53 -volume | format
M
zshrc
··· 24 24 ### Functions 25 25 bgcolor() { 26 26 convert -size 1x1 xc:"#$1" /tmp/bgc.png 27 - feh --bg-tile /tmp/bgc.png} 27 + feh --bg-tile /tmp/bgc.png 28 +} 28 29 backup() { 29 - cp $1 $1.bak} 30 + cp $1 $1.bak 31 +} 30 32 31 33 ### Aliases 32 34 alias cls="clear" 33 35 alias mkdir="mkdir -p" 34 36 alias cp="cp -r" 35 37 alias du="du -sh" 36 -alias df="df -h" 37 38 alias vim="nvim" 38 39 alias vi="vim" 40 +alias d="docker" 39 41 alias wiki="vi +Wiki" 40 42 alias tmux="tmux -2" 41 43 alias :q="exit"