diff --git a/README.md b/README.md index 35351ad..055f04d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

dotfiles

-![](./config/qtile/screen.png) ------------------------------- +![](config/bspwm/screen.png) +---------------------------- #### System configuration - `OS` Arch diff --git a/config/bspwm/README.md b/config/bspwm/README.md new file mode 100644 index 0000000..13056ba --- /dev/null +++ b/config/bspwm/README.md @@ -0,0 +1,10 @@ +# BSPWM + +[](screen.png) +-------------- + +### Install +```bash +sudo pacman -S bspwm sxhkd +yay -S polybar +``` diff --git a/config/bspwm/bspwmrc b/config/bspwm/bspwmrc index b866327..4d31599 100755 --- a/config/bspwm/bspwmrc +++ b/config/bspwm/bspwmrc @@ -49,7 +49,7 @@ bspc rule -a Thunar desktop='^4' focus=on follow=off bspc rule -a Joplin 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 telegram-desktop desktop='^6' focus=off follow=off +bspc rule -a telegram-desktop desktop='^6' focus=off follow=on bspc rule -a KeePassXC desktop='^7' focus=on follow=off bspc rule -a Spotify desktop='^9' focus=on follow=on bspc rule -a google-tasks-desktop state=floating diff --git a/config/bspwm/screen.png b/config/bspwm/screen.png new file mode 100644 index 0000000..c31ca30 Binary files /dev/null and b/config/bspwm/screen.png differ diff --git a/config/bspwm/sxhkd b/config/bspwm/sxhkd index b2ceed1..c000989 100644 --- a/config/bspwm/sxhkd +++ b/config/bspwm/sxhkd @@ -6,16 +6,15 @@ super + {_,shift} Return {kitty, \ rofi -show drun -theme ntenV2} -super + shift + {w,f,e,c,v,q} - {google-chrome-stable, \ - alacritty --class=ranger -e ranger, \ - alacritty --class=nvim -e nvim, \ - code, \ - veracrypt, \ - xkill } - -super + shift + z - betterlockscreen --off 180 -t "Computer is locked" -l +super + shift + {w,f,e,c,v,s,z,q} + {google-chrome-stable, \ + kitty --class ranger -e ranger, \ + kitty --class nvim -e nvim, \ + code, \ + veracrypt, \ + .applications/simplenote.appimage, \ + betterlockscreen --off 180 -t "Computer is locked" -l, \ + xkill } super + {equal, minus, shift+minus} amixer sset Master {2%+,2%-,toggle} diff --git a/config/i3/config b/config/i3/config index 9f9e23d..0c0d628 100644 --- a/config/i3/config +++ b/config/i3/config @@ -16,22 +16,17 @@ new_float pixel hide_edge_borders smart ############ Variables ########### -set $terminal alacritty +set $terminal kitty set $browser google-chrome-stable -set $filemanager alacritty --title=ranger -e ranger -set $codeeditor alacritty --title=nvim -e nvim +set $filemanager kitty --class ranger -e ranger +set $codeeditor kitty --class nvim -e nvim set $guicode code ############ Autostart ############ exec_always --no-startup-id exec setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" -exec_always --no-startup-id exec picom --experimental-backends -b +exec --no-startup-id exec picom -b exec --no-startup-id exec nitrogen --restore exec --no-startup-id exec lxsession -#exec --no-startup-id exec $HOME/.script/autolock -#exec --no-startup-id exec org.telegram.desktop -#exec --no-startup-id exec discord -#exec --no-startup-id exec redshift-gtk -#exec_always --no-startup-id exec $HOME/.config/i3/bar.sh ############## WM keys ############ @@ -62,7 +57,7 @@ bindsym $mod+grave scratchpad show, floating disable ############## User key ########### # Menus -bindsym $mod+Shift+Return exec rofi -show drun +bindsym $mod+Shift+Return exec rofi -show drun -theme ntenV2 bindsym $mod+Escape exec ~/.script/dmenu/dmenu-power.sh bindsym $mod+Control+u exec ~/.script/dmenu/dmenu-config-edit.sh bindsym $mod+Control+i exec ~/.script/dmenu/dmenu-pass.sh @@ -73,31 +68,32 @@ bindsym $mod+Shift+w exec $browser bindsym $mod+Shift+f exec $filemanager bindsym $mod+Shift+e exec $codeeditor bindsym $mod+Shift+c exec $guicode +bindsym $mod+Shift+v exec veracrypt +bindsym $mod+Shift+s exec ~/.applications/simplenote.appimage # Sceenshot bindsym --release Print exec scrot -s /home/${USER}/$(date +%Y-%m-%d-%H-%M-%S).png -bindsym --release Shift+Print exec scrot /home/${USER}/$(date +%Y-%m-%d-%H-%M-%S).png +bindsym Shift+Print exec scrot /home/${USER}/$(date +%Y-%m-%d-%H-%M-%S).png # Lockscreen bindsym $mod+Shift+z exec betterlockscreen --off 180 -t "Computer is lockerd" -l # Volume -bindsym $mod+plus exec "amixer sset Master 2%+" -bindsym $mod+minus exec "amixer sset Master 2%-" -bindsym $mod+Shift+minus exec "amixer sset Master toggle" +bindsym $mod+plus exec amixer sset Master 2%+ +bindsym $mod+minus exec amixer sset Master 2%- +bindsym $mod+Shift+minus exec amixer sset Master toggle ######### Window preferens ######## assign [class="(?i)alacritty|kitty"] $ws1 -assign [class="(?i)firefox|google-chorome-stable"] $ws2 -assign [class="(?i)code|vscodium|subl"] $ws3 -assign [title="nvim"] $ws3 -assign [class="(?!)thunar"] $ws4 -assign [title="ranger"] $ws4 -assign [title="Joplin"] $ws5 -assign [class="(?i)telegram|discord"] $ws6 +assign [class="(?i)google-chrome-stable|firefox"] $ws2 +assign [class="Code|nvim"] $ws3 +assign [class="Thunar|ranger"] $ws4 +assign [class="Joplin|Simplenote"] $ws5 +assign [class="TelegramDesktop|discord"] $ws6 +for_window [class="TelegramDesktop|discord"] layout tabbed +assign [class="KeePassXC"] $ws7 assign [class="Spotify"] $ws9 for_window [title="Google Tasks"] floating enable -for_window [class="(?i)telegram|discord"] layout tabbed focus_on_window_activation focus ########## Change focus ########### @@ -163,8 +159,8 @@ bindsym $mod+Shift+9 move container to workspace $ws9 ############### Bar ############### bar { - #status_command i3status -c ~/.config/i3/i3status - status_command i3blocks -c ~/.config/i3/i3blocks + # status_command i3status -c ~/.config/i3/i3status + status_command i3status-rs ~/.config/i3/i3status-rs.toml font pango:JetBrains Mono 10 position top colors { diff --git a/config/i3/i3blocks b/config/i3/i3blocks deleted file mode 100644 index d5be0b4..0000000 --- a/config/i3/i3blocks +++ /dev/null @@ -1,31 +0,0 @@ -separator=true -separator_block_width=15 - -[keyboard] -command=$HOME/.script/kblayout -label= -interval=repeat - -[volume] -command=$HOME/.script/volume -interval=repeat -label= -signal=10 - -[weather] -command=python $HOME/.config/polybar/scripts/weather.py -interval=10 - -[wiki-signal] -command=$HOME/.config/polybar/scripts/wifi-signal.sh -label= -interval=5 - -[updates-arch] -command=$HOME/.config/polybar/scripts/updates-pacman-aur.sh -interval=60 - -[time] -command=date +%H:%M -label= -interval=60 diff --git a/config/i3/i3status b/config/i3/i3status new file mode 100644 index 0000000..dc8c7f8 --- /dev/null +++ b/config/i3/i3status @@ -0,0 +1,40 @@ +# vim: ft=conf +general { + colors = false + interval = 1 + output_format = "i3bar" +} + +order += "volume master" +order += "wireless _first_" +#order += "battery all" +order += "tztime local" + +volume master { + format = " %volume" + format_muted = " %volume" + device = "default" + mixer = "Master" + mixer_idx = 2 +} + +wireless _first_ { + format_up = "%quality" + format_down = "W: down" +} + +battery all { + format = "%status %percentage" + last_full_capacity = true + format_down = "No battery" + status_chr = "" + status_bat = "" + status_unk = "? UNK" + status_full = "" + path = "/sys/class/power_supply/BAT%d/uevent" + low_threshold = 10 +} + +tztime local { + format = " %d %b  %H:%M" +} diff --git a/config/i3/i3status-rs.toml b/config/i3/i3status-rs.toml index 86ed10a..af7b501 100644 --- a/config/i3/i3status-rs.toml +++ b/config/i3/i3status-rs.toml @@ -1,39 +1,21 @@ theme = "native" -icons = "awesome5" +#icons = "awesome5" -### CPU load -[[block]] -block = "cpu" -interval = 5 - -### Blacklight -[[block]] -block = "backlight" -device = "intel_backlight" - -### Volume -[[block]] -block = "sound" -step_width = 2 - -### WiFi signal -#[[block]] -#block = "custom" -#command = "cat /proc/net/wireless | grep \"wlp3s0\" | awk '{print $4}' | grep -o '[0-9]*'" -#interval = 10 - -### Keyboard layout [[block]] block = "custom" +command = "~/.script/kblayout" interval = 0 -command = """ -case "$(xkblayout)" in - Eng) echo "us" ;; - Ukr) echo "ua" ;; -esac""" -### Date && time +[[block]] +block = "sound" + +[[block]] +block = "net" +device = "wlp3s0" +format = "{signal_strength}" +interval = 4 + [[block]] block = "time" interval = 60 -format = "%H:%M" \ No newline at end of file +format = "%R" diff --git a/config/nvim/init.vim b/config/nvim/init.vim index d08276a..5591542 100644 --- a/config/nvim/init.vim +++ b/config/nvim/init.vim @@ -3,7 +3,6 @@ call plug#begin('~/.vim/plugged') Plug 'itchyny/lightline.vim' Plug 'jiangmiao/auto-pairs' Plug 'maxboisvert/vim-simple-complete' - Plug 'preservim/nerdcommenter' Plug 'sheerun/vim-polyglot' call plug#end() @@ -102,16 +101,13 @@ let g:lightline = { \ [ 'filename', 'filetype' ] ] } \ } -let g:NERDCreateDefaultMappings = 1 -let g:NERDSpaceDelims = 1 -let g:NERDCompactSexyComs = 1 - "== Mapping let mapleader="'" " Alternative keys noremap :w noremap :tabnew +noremap :tabnew noremap ww :Wiki noremap e :Ve diff --git a/script/volume b/script/volume deleted file mode 100755 index 8a938cf..0000000 --- a/script/volume +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash -if [[ -z "$MIXER" ]] ; then - MIXER="default" - if command -v pulseaudio >/dev/null 2>&1 && pulseaudio --check ; then - if amixer -D pulse info >/dev/null 2>&1 ; then - MIXER="pulse" - fi - fi - [ -n "$(lsmod | grep jack)" ] && MIXER="jackplug" - MIXER="${2:-$MIXER}" -fi - -if [[ -z "$SCONTROL" ]] ; then - SCONTROL="${BLOCK_INSTANCE:-$(amixer -D $MIXER scontrols | - sed -n "s/Simple mixer control '\([^']*\)',0/\1/p" | - head -n1 - )}" -fi - -if [[ -z "$STEP" ]] ; then - STEP="${1:-5%}" -fi - -NATURAL_MAPPING=${NATURAL_MAPPING:-0} -if [[ "$NATURAL_MAPPING" != "0" ]] ; then - AMIXER_PARAMS="-M" -fi - -capability() { - amixer $AMIXER_PARAMS -D $MIXER get $SCONTROL | - sed -n "s/ Capabilities:.*cvolume.*/Capture/p" -} - -volume() { - amixer $AMIXER_PARAMS -D $MIXER get $SCONTROL $(capability) -} - -format() { - perl_filter='if (/.*\[(\d+%)\] (\[(-?\d+.\d+dB)\] )?\[(on|off)\]/)' - perl_filter+='{CORE::say $4 eq "off" ? "M" : "' - perl_filter+=$([[ $STEP = *dB ]] && echo '$3' || echo '$1') - perl_filter+='"; exit}' - output=$(perl -ne "$perl_filter") - echo "$LABEL$output" -} - -case $BLOCK_BUTTON in - 3) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) toggle ;; - 4) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) ${STEP}+ unmute ;; - 5) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) ${STEP}- unmute ;; -esac - -volume | format diff --git a/vscode/settings.json b/vscode/settings.json index 1da983f..6e0c132 100644 --- a/vscode/settings.json +++ b/vscode/settings.json @@ -116,5 +116,7 @@ "git.autofetch": true, "editor.formatOnPaste": true, "editor.minimap.enabled": false, + "tabnine.experimentalAutoImports": true, + "git.confirmSync": false, } diff --git a/zshrc b/zshrc index f22a892..6eda9df 100644 --- a/zshrc +++ b/zshrc @@ -24,18 +24,20 @@ export VISUAL="nvim" ### Functions bgcolor() { convert -size 1x1 xc:"#$1" /tmp/bgc.png - feh --bg-tile /tmp/bgc.png} + feh --bg-tile /tmp/bgc.png +} backup() { - cp $1 $1.bak} + cp $1 $1.bak +} ### Aliases alias cls="clear" alias mkdir="mkdir -p" alias cp="cp -r" alias du="du -sh" -alias df="df -h" alias vim="nvim" alias vi="vim" +alias d="docker" alias wiki="vi +Wiki" alias tmux="tmux -2" alias :q="exit"