all repos

dotfiles @ c7da10d0769ef7ed07f426894c86d4aa8be26d2b

i use rach linux btw
22 files changed, 256 insertions(+), 282 deletions(-)
Update alacritty, kitty, bspwm, i3wm, vim,tmux configs & sctipts
Author: Smirnov Olexandr ss2316544@gmail.com
Committed at: 2021-01-24 23:08:44 +0200
Parent: 246dc34
M config/alacritty.yml
···
        36
        36
         

      
        37
        37
         scrolling.history: 1000

      
        38
        38
         debug.render_timer: false

      
        39
        
        -draw_bold_text_with_bright_colors: false

      
        
        39
        +#draw_bold_text_with_bright_colors: false

      
        
        40
        +draw_bold_text_with_bright_colors: true

      
        40
        41
         background_opacity: 0.75

      
        41
        
        -dynamic_title: true

      
        
        42
        +dynamic_title: false

      
        42
        43
         

      
        43
        44
         colors:

      
        44
        45
           primary:

      
M config/bspwm/bspwmrc
···
        2
        2
         # Smirnov-O <ss2316544@gmail.com>

      
        3
        3
         # BSPWM config file

      
        4
        4
         

      
        5
        
        -## == Functions

      
        
        5
        +## == Function

      
        6
        6
         Run() {

      
        7
        
        - if ! pgrep $1; then $@& fi

      
        
        7
        + if ! pgrep $1

      
        
        8
        + then $@& fi

      
        8
        9
         }

      
        9
        10
         

      
        10
        11
         ## == Autostart

      ···
        12
        13
         Run sxhkd -c .config/bspwm/sxhkd &

      
        13
        14
         ~/.config/bspwm/bar.sh &

      
        14
        15
         Run nitrogen --restore &

      
        
        16
        +~/.script/autolock &

      
        15
        17
         Run lxsession &

      
        16
        18
         Run picom &

      
        17
        19
         

      
        18
        20
         ## == BSPWM

      
        
        21
        +

      
        
        22
        +# Workspaces

      
        19
        23
         bspc monitor -d 1 2 3 4 5 6 7 8 9

      
        20
        24
         

      
        21
        
        -bspc config border_width  2

      
        22
        
        -bspc config window_gap    8

      
        23
        
        -

      
        24
        
        -bspc config split_ratio          0.52

      
        25
        
        -bspc config borderless_monocle   true

      
        26
        
        -bspc config gapless_monocle      true

      
        27
        
        -bspc config click_to_focus       true

      
        28
        
        -bspc config single_monocle       false

      
        29
        
        -bspc config borderless_monocle   true

      
        
        25
        +# General

      
        
        26
        +bspc config border_width           2

      
        
        27
        +bspc config window_gap             8

      
        
        28
        +bspc config split_ratio            0.50

      
        
        29
        +bspc config borderless_monocle     true

      
        
        30
        +bspc config gapless_monocle        true

      
        
        31
        +bspc config single_monocle         true

      
        
        32
        +bspc config focus_follows_pointer  true

      
        
        33
        +bspc config borderless_monocle     true

      
        30
        34
         

      
        31
        35
         # Colors

      
        32
        36
         bspc config normal_border_color   "#262A2B"

      ···
        36
        40
         bspc config urgent_border_color   "#FF6C6B"

      
        37
        41
         

      
        38
        42
         # Rules

      
        39
        
        -bspc rule -a Alacritty        desktop='^1' focus=on follow=on

      
        40
        
        -bspc rule -a firefox          desktop='^2' focus=on

      
        41
        
        -bspc rule -a VSCodium         desktop='^3' focus=on follow=on

      
        42
        
        -bspc rule -a '*:nvim'         desktop='^3' focus=on follow=on

      
        43
        
        -bspc rule -a '*:ranger'       desktop='^4' focus=on follow=on

      
        44
        
        -bspc rule -a Thunar           desktop='^4' focus=on follow=on

      
        45
        
        -bspc rule -a Joplin           desktop='^5' focus=on

      
        
        43
        +bspc rule -a Alacritty        desktop='^1' focus=on   follow=on

      
        
        44
        +bspc rule -a kitty            desktop='^1' focus=on   follow=on

      
        
        45
        +bspc rule -a firefox          desktop='^2' focus=off

      
        
        46
        +bspc rule -a VSCodium         desktop='^3' focus=on   follow=on

      
        
        47
        +bspc rule -a '*:nvim'         desktop='^3' focus=on   follow=on

      
        
        48
        +bspc rule -a '*:ranger'       desktop='^4' focus=on   follow=on

      
        
        49
        +bspc rule -a Thunar           desktop='^4' focus=on   follow=on

      
        
        50
        +bspc rule -a Joplin           desktop='^5' focus=off

      
        46
        51
         bspc rule -a discord          descord='^6' focus=on

      
        47
        
        -bspc rule -a TelegramDesktop  descord='^6' focus=on

      
        
        52
        +bspc rule -a TelegramDesktop  descord='^6' focus=off

      
        48
        53
         bspc rule -a Spotify          descord='^9' focus=on

      
        49
        54
         bspc rule -a google-tasks-desktop state=floating

      
M config/bspwm/polybar
···
        1
        1
         [settings]

      
        2
        2
         enable-ipc = true

      
        
        3
        +format-padding = 1

      
        3
        4
         screenchange-reload = true

      
        4
        5
         pseudo-transparency = true

      
        5
        6
         

      ···
        16
        17
         background = ${colors.background}

      
        17
        18
         foreground = ${colors.foreground}

      
        18
        19
         wm-restack = bspwm

      
        19
        
        -module-margin-left = 1

      
        20
        
        -module-margin-right = 1

      
        21
        20
         font-0 = Iosevka Nerd Font:style=Medium:size=8;3

      
        22
        21
         font-1 = FontAwesome5Free:style=Solid:size=7.5;2.5

      
        23
        
        -modules-left = windowname

      
        
        22
        +modules-left = powermenu windowname

      
        24
        23
         modules-center = bspwm

      
        25
        24
         modules-right = pulseaudio archupd wifi-signal weather memory cpu keyboard time date

      
        26
        25
         tray-position = right

      
        
        26
        +tray-padding = 0

      
        27
        27
         

      
        28
        28
         [module/bspwm]

      
        29
        29
         type = internal/bspwm

      
M config/bspwm/sxhkd
···
        1
        1
         # Smirnov-O <ss2316544@gmail.com>

      
        2
        2
         # BSPWM/SXKBD config file

      
        3
        3
         

      
        4
        
        -## == USER keys

      
        
        4
        +## == USER Applications

      
        5
        5
         super + Return

      
        6
        
        -	alacritty

      
        
        6
        +	kitty

      
        
        7
        +

      
        7
        8
         super + shift + w

      
        8
        9
             firefox

      
        9
        10
         

      
        10
        11
         super + shift + f

      
        11
        
        -    alacritty --class="ranger" -e ranger

      
        
        12
        +    kitty --class=ranger -e ranger

      
        12
        13
         

      
        13
        14
         super + shift + e

      
        14
        
        -    alacritty --class="nvim" -e nvim

      
        
        15
        +    kitty --class=nvim -e nvim

      
        15
        16
         

      
        16
        17
         super + shift + c

      
        17
        18
             vscodium

      ···
        22
        23
         super + shift + q

      
        23
        24
             xkill

      
        24
        25
         

      
        
        26
        +

      
        
        27
        +## == USER volume

      
        
        28
        +super + minus

      
        
        29
        +    amixer sset Master 2%-

      
        
        30
        +

      
        
        31
        +super + equal

      
        
        32
        +    amixer sset Master 2%+

      
        
        33
        +

      
        
        34
        +super + shift + minus

      
        
        35
        +    amixer sset Master toggle

      
        
        36
        +

      
        
        37
        +

      
        25
        38
         ## == USER Menus

      
        26
        39
         super + shift + Return

      
        27
        40
         	rofi -location 2 -show drun

      ···
        30
        43
             ~/.script/dmenu/dmenu-power.sh

      
        31
        44
         

      
        32
        45
         super + ctrl + i

      
        33
        
        -    passmenu -h 24 -p Passwords

      
        
        46
        +    ~/.script/dmenu/dmenu-pass.sh

      
        34
        47
         

      
        35
        48
         super + ctrl + u

      
        36
        49
             ~/.script/dmenu/dmenu-config-edit.sh

      ···
        44
        57
         	bspc wm -r && pkill -USR1 -x sxhkd

      
        45
        58
         

      
        46
        59
         ## == BSPWM windows

      
        
        60
        +

      
        47
        61
         ## Resize window

      
        48
        62
         super + ctrl + {h,j,k,l}

      
        49
        63
         	bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}

      
        50
        
        -

      
        51
        
        -# Resize floating window

      
        52
        
        -#super + shift + {h,j,k,l}

      
        53
        
        -#	bspc node -v {-20 0,0 20,0 -20,20 0}

      
        54
        64
         

      
        55
        65
         # Change focus & move focus window

      
        56
        66
         super + {_,shift + }{h,j,k,l}

      
M config/i3/bar.sh
···
        1
        1
         #!/bin/bash

      
        2
        2
         killall -q polybar

      
        3
        3
         while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done

      
        4
        
        -polybar i3bar &

      
        
        4
        +polybar bar &

      
M config/i3/config
···
        54
        54
         bindsym $mod+Control+e layout toggle split

      
        55
        55
         

      
        56
        56
         # Splits

      
        57
        
        -#bindsym $mod+b split h

      
        58
        
        -#bindsym $mod+v split v

      
        
        57
        +bindsym $mod+b split h

      
        
        58
        +bindsym $mod+v split v

      
        59
        59
         

      
        60
        60
         # Scratchpad

      
        61
        61
         bindsym $mod+Shift+grave move scratchpad

      ···
        64
        64
         ############## User key ###########

      
        65
        65
         

      
        66
        66
         # Menus

      
        67
        
        -bindsym $mod+Shift+apostrophe exec "rofi -location 6 -show run"

      
        68
        
        -bindsym $mod+Shift+Return exec "rofi -location 6 -show drun"

      
        69
        
        -bindsym $mod+Escape exec ~/.script/dmenu/dmenu-power.sh -b -h 24

      
        70
        
        -bindsym $mod+Control+u exec ~/.script/dmenu/dmenu-config-edit.sh -b -h 24

      
        71
        
        -bindsym $mod+Control+i exec passmenu -b -h 24 -p Passwords

      
        
        67
        +bindsym $mod+Shift+Return exec rofi -show drun

      
        
        68
        +bindsym $mod+Escape exec ~/.script/dmenu/dmenu-power.sh

      
        
        69
        +bindsym $mod+Control+u exec ~/.script/dmenu/dmenu-config-edit.sh

      
        
        70
        +bindsym $mod+Control+i exec ~/.script/dmenu/dmenu-pass.sh 

      
        72
        71
         

      
        73
        72
         # Apps

      
        74
        73
         bindsym $mod+Return exec $terminal

      ···
        77
        76
         bindsym $mod+Shift+e exec $codeeditor

      
        78
        77
         bindsym $mod+Shift+c exec $guicode

      
        79
        78
         bindsym $mod+Shift+d exec $documentationreader

      
        80
        
        -

      
        81
        
        -# Toogle polybar

      
        82
        
        -bindsym $mod+b exec ~/.script/polybar-toggle

      
        83
        79
         

      
        84
        80
         # Sceenshot

      
        85
        81
         bindsym --release Print exec scrot -s /home/${USER}/$(date +%Y-%m-%d-%H-%M-%S).png

      
M config/kitty/kitty.conf
···
        1
        
        -# MOD

      
        2
        
        -clear_all_shortcuts yes

      
        3
        
        -

      
        4
        1
         # Font

      
        5
        2
         font_family         Jetbrains Mono

      
        6
        3
         bold_font           auto

      ···
        65
        62
         enabled_layouts *

      
        66
        63
         

      
        67
        64
         # Keyboard Shortcuts

      
        
        65
        +clear_all_shortcuts yes

      
        68
        66
         map ctrl+shift+c        copy_to_clipboard

      
        69
        67
         map ctrl+shift+v        paste_from_clipboard

      
        70
        68
         map shift+insert        paste_from_selection

      ···
        87
        85
         # Theming

      
        88
        86
         foreground #dfdfdf

      
        89
        87
         background_opacity 0.85

      
        90
        
        -#background_opacity 1

      
        
        88
        +dynamic_background_opacity yes

      
        91
        89
         background_image none

      
        92
        90
         background_image_layout tiled

      
        93
        91
         background_image_linear no

      
        94
        
        -dynamic_background_opacity no

      
        95
        92
         background_tint 0.0

      
        96
        93
         dim_opacity 0.75

      
        97
        94
         selection_foreground #edebd7

      
        98
        95
         selection_background #073642

      
        99
        
        -background #262a3b

      
        100
        
        -#background #262a2b

      
        
        96
        +background #262a2b

      
        101
        97
         foreground #ffffff

      
        102
        98
         cursorColor #d2dae2

      
        103
        99
         selection_background #262a3b

      
M config/nvim/init.vim
···
        1
        1
         call plug#begin('~/.vim/plugged')

      
        2
        2
           Plug 'Smirnov-O/nten16.vim'   " Color scheme

      
        3
        3
           Plug 'itchyny/lightline.vim'  " Status line

      
        
        4
        +  Plug 'maximbaz/lightline-ale' " ALE in status line

      
        4
        5
           Plug 'airblade/vim-gitgutter' " Git indicator

      
        5
        
        -  Plug 'ap/vim-css-color'       " CSS color preview

      
        
        6
        +  Plug 'ap/vim-css-color'       " HEX/CSS color preview

      
        6
        7
           Plug 'mhinz/vim-startify'     " Start page

      
        
        8
        +  Plug 'scrooloose/nerdtree'    " File manager

      
        7
        9
           Plug 'dense-analysis/ale'     " Linter

      
        8
        10
           Plug 'kassio/neoterm'         " Terminal wrapper

      
        9
        
        -  Plug 'aurieh/discord.nvim'    " Discord rich

      
        10
        
        -  Plug 'editorconfig/editorconfig-vim' " EditorConfig support

      
        
        11
        +  Plug 'metakirby5/codi.vim'    " Live REPL

      
        
        12
        +  Plug 'editorconfig/editorconfig-vim'  " EditorConfig support

      
        
        13
        +  Plug 'christoomey/vim-tmux-navigator' " Jump from vim to tmux and back

      
        
        14
        +  Plug 'Xuyuanp/nerdtree-git-plugin'    " NERDTree git status

      
        11
        15
         

      
        12
        16
           " Completion & snippets

      
        13
        
        -  Plug 'ervandew/supertab'

      
        
        17
        +  "Plug 'ervandew/supertab'

      
        14
        18
           Plug 'jiangmiao/auto-pairs'

      
        15
        19
           Plug 'SirVer/ultisnips'

      
        
        20
        +  Plug 'mattn/emmet-vim', {'for': ['html', 'javascript']}

      
        16
        21
         

      
        17
        
        -  " Programing

      
        18
        
        -  Plug 'metakirby5/codi.vim'

      
        19
        
        -  Plug 'plasticboy/vim-markdown',  {'for': 'markdown'}

      
        
        22
        +  " Language support 

      
        
        23
        +  Plug 'othree/yajs.vim',          {'for': 'javascript'}

      
        
        24
        +  Plug 'maxmellon/vim-jsx-pretty', {'for': 'javascript'}

      
        
        25
        +

      
        20
        26
           Plug 'vim-python/python-syntax', {'for': 'python'}

      
        
        27
        +

      
        
        28
        +  Plug 'cakebaker/scss-syntax.vim', {'for': ['scss', 'sass']}

      
        
        29
        +

      
        
        30
        +  Plug 'plasticboy/vim-markdown',      {'for': 'markdown'}

      
        21
        31
           Plug 'PotatoesMaster/i3-vim-syntax', {'for': 'i3'}

      
        22
        
        -  Plug 'kovetskiy/sxhkd-vim'

      
        
        32
        +  Plug 'kovetskiy/sxhkd-vim',          {'for': 'sxhkd'}

      
        23
        33
         call plug#end()

      
        24
        34
         

      
        25
        35
         

      ···
        72
        82
         set smartindent

      
        73
        83
         

      
        74
        84
         " Spell

      
        75
        
        -set spell

      
        76
        
        -set spelllang=en_us

      
        
        85
        +"set spell spelllang=en_us

      
        77
        86
         

      
        78
        87
         " Disable sound

      
        79
        88
         set visualbell t_vb=

      ···
        93
        102
         " Markdown

      
        94
        103
         let g:vim_markdown_folding_disabled = 1

      
        95
        104
         let g:vim_markdown_frontmatter = 1

      
        96
        
        -let g:markdown_fenced_languages = ['go', 'python', 'bash', 'sh=bash']

      
        
        105
        +let g:markdown_fenced_languages = ['javascript', 'js=javascript', 'python', 'py=python', 'bash', 'sh=bash']

      
        97
        106
         

      
        98
        107
         

      
        99
        108
         " == Plugins configuration

      ···
        101
        110
         \ 'colorscheme': 'nten16',

      
        102
        111
         \ 'active': {

      
        103
        112
         \    'left':  [ [ 'mode', 'paste' ],

      
        104
        
        -\               [ 'readonly', 'modified' ] ],

      
        
        113
        +\               [ 'readonly', 'modified' ],

      
        
        114
        +\               [ 'linter_errors', 'linter_warnings', 'linter_infos' ] ],

      
        105
        115
         \    'right': [ [ 'lineinfo' ],

      
        106
        116
         \               [ 'percent' ],

      
        107
        117
         \               [ 'filename', 'filetype' ] ]

      
        108
        
        -\ }, }

      
        
        118
        +\ },

      
        
        119
        +\ 'component_expand': {

      
        
        120
        +\   'linter_checking': 'lightline#ale#checking',

      
        
        121
        +\   'linter_infos': 'lightline#ale#infos',

      
        
        122
        +\   'linter_warnings': 'lightline#ale#warnings',

      
        
        123
        +\   'linter_errors': 'lightline#ale#errors',

      
        
        124
        +\   'linter_ok': 'lightline#ale#ok'

      
        
        125
        +\ },}

      
        
        126
        +

      
        
        127
        +" Emmet

      
        
        128
        +let g:user_emmet_expandabbr_key='<tab>'

      
        
        129
        +let g:user_emmet_mode='inv'

      
        109
        130
         

      
        110
        131
         " UltiSnipts

      
        111
        132
         let g:UltiSnipsExpandTrigger = "<tab>"

      ···
        157
        178
         noremap <A-9> :tabn 9<CR>

      
        158
        179
         

      
        159
        180
         " Buffer(s)

      
        160
        
        -noremap <leader>p :bnext<CR>

      
        161
        
        -noremap <leader>o :bprev<CR>

      
        
        181
        +noremap <leader>b :bnext<CR>

      
        
        182
        +noremap <leader>p :bprev<CR>

      
M config/nvim/snips/sh.snippets
···
        1
        
        -snippet !sh "SH Shebang"

      
        
        1
        +snippet ! "SH Shebang"

      
        2
        2
         #!/bin/sh

      
        3
        3
         ${1}

      
        4
        4
         endsnippet

      
        5
        5
         

      
        6
        
        -snippet !bash "BASH Shebang"

      
        
        6
        +snippet #! "BASH Shebang"

      
        7
        7
         #!/bin/bash

      
        8
        8
         ${1}

      
        9
        9
         endsnippet

      ···
        27
        27
         endsnippet

      
        28
        28
         

      
        29
        29
         snippet case "Case"

      
        30
        
        -case "${1:$variable}" in

      
        31
        
        -	"${2}") ${3} ;;

      
        
        30
        +case "${1}" in

      
        
        31
        +	${2}

      
        32
        32
         esac

      
        33
        33
         endsnippet

      
        34
        34
         

      
M config/polybar/config
···
        13
        13
         monitor = ${env:MONITOR_MIDDLE}

      
        14
        14
         width = 100%

      
        15
        15
         height = 24

      
        16
        
        -bottom = true

      
        17
        16
         fixed-center = true

      
        18
        17
         wm-restack = i3

      
        19
        18
         background = ${colors.background}

      ···
        22
        21
         module-margin-right = 1

      
        23
        22
         font-0 = Iosevka Nerd Font:style=Medium:size=8;3

      
        24
        23
         font-1 = FontAwesome5Free:style=Solid:size=7.5;2.5

      
        25
        
        -font-2 = Weather Icons:size=7;2

      
        26
        24
         modules-left =  i3 pacman-up window-name

      
        27
        
        -modules-right = pulseaudio backlight wifi-signal keyboard time date

      
        
        25
        +modules-right = pulseaudio weather wifi-signal keyboard time date

      
        28
        26
         tray-position = right

      
        29
        27
         

      
        30
        
        -[module/bspwm]

      
        31
        
        -type = internal/bspwm

      
        32
        
        -pin-workspaces = true

      
        33
        
        -inline-mode = false

      
        34
        
        -enable-click = false

      
        35
        
        -enable-scroll = false

      
        36
        
        -reverse-scroll = false

      
        37
        
        -fuzzy-match = true

      
        
        28
        +[module/i3]

      
        
        29
        +type = internal/i3

      
        
        30
        +format = <label-state><label-mode>

      
        
        31
        +card = intel_backlight

      
        
        32
        +index-sort = false

      
        
        33
        +wrapping-scroll = false

      
        
        34
        +label-mode-padding = 1

      
        
        35
        +label-mode-background = ${colors.alert}

      
        
        36
        +

      
        
        37
        +label-focused = %icon%

      
        
        38
        +label-focused-background =  ${colors.secondary}

      
        
        39
        +label-focused-foreground = ${colors.foreground}

      
        
        40
        +label-focused-padding = 1

      
        
        41
        +label-focused-underline = ${colors.alert}

      
        
        42
        +

      
        
        43
        +label-unfocused = %icon%

      
        
        44
        +label-unfocused-foreground = ${colors.foreground}

      
        
        45
        +label-unfocused-padding = 1

      
        
        46
        +

      
        
        47
        +label-urgent = %icon%

      
        
        48
        +label-urgent-background = ${colors.alert}

      
        
        49
        +label-urgent-foreground = ${colors.foreground}

      
        
        50
        +label-urgent-padding = 1

      
        
        51
        +label-urgent-underline = ${colors.alert}

      
        
        52
        +

      
        
        53
        +label-visible = %icon%

      
        
        54
        +label-visible-background = ${colors.background}

      
        
        55
        +label-visible-foreground = ${colors.foreground}

      
        
        56
        +label-visible-padding = 1

      
        
        57
        +label-visible-underline = ${colors.background}

      
        
        58
        +

      
        
        59
        +ws-icon-0 = "1;1 "

      
        
        60
        +ws-icon-1 = "2;2 "

      
        
        61
        +ws-icon-2 = "3;3 "

      
        
        62
        +ws-icon-3 = "4;4 "

      
        
        63
        +ws-icon-4 = "5;5 "

      
        
        64
        +ws-icon-5 = "6;6 "

      
        
        65
        +ws-icon-6 = "7;7 "

      
        
        66
        +ws-icon-7 = "8;8 "

      
        
        67
        +ws-icon-8 = "9;9 "

      
        38
        68
         

      
        39
        69
         [module/wifi-signal]

      
        40
        70
         type = custom/script

      ···
        72
        102
         blacklist-0 = num lock

      
        73
        103
         blacklist-1 = scroll lock

      
        74
        104
         blacklist-2= caps lock

      
        75
        
        -

      
        76
        
        -[module/menu]

      
        77
        
        -type = custom/menu

      
        78
        
        -format = <label-toggle> <menu>

      
        79
        
        -format-padding = 1

      
        80
        
        -format-spacing = 2

      
        81
        
        -label-open = 

      
        82
        
        -label-close = 

      
        83
        
        -menu-0-0 =  

      
        84
        
        -menu-0-0-exec = thunar

      
        85
        
        -menu-0-1 = 

      
        86
        
        -menu-0-1-exec = firefox

      
        87
        
        -menu-0-2 = 

      
        88
        
        -menu-0-2-exec = alacritty

      
        89
        
        -menu-0-3 = 

      
        90
        
        -menu-0-3-exec = emacs

      
        91
        105
         

      
        92
        106
         [module/date]

      
        93
        107
         type = internal/date

      
M config/polybar/scripts/weather.py
···
        1
        
        -#!/usr/bin/env python3

      
        2
        
        -# -*- encoding: utf-8 -*-

      
        3
        
        -import requests

      
        4
        
        -import os

      
        
        1
        +"""For working this script set in ~/.profile 2 variable:

      
        
        2
        +"OWM_POLYBAR": API key

      
        
        3
        +"OWM_CITY": Your city

      
        
        4
        +"""

      
        
        5
        +import requests, os

      
        5
        6
         

      
        6
        7
         

      
        7
        8
         API_KEY = os.getenv("OWM_POLYBAR")

      ···
        10
        11
         try:

      
        11
        12
             JSON = requests.get(f"http://api.openweathermap.org/data/2.5/weather?q={CITY}&lang=EN&&units=metric&appid={API_KEY}").json()

      
        12
        13
             print("", int(JSON["main"]["temp"]), "°С")

      
        13
        
        -except:

      
        
        14
        +except Exception:

      
        14
        15
             print(" err °С")

      
M config/qtile/config.py
···
        1
        1
         from libqtile import bar, layout, widget, hook

      
        2
        2
         from libqtile.config import Click, Drag, Group, Key, Screen

      
        3
        3
         from libqtile.lazy import lazy

      
        4
        
        -from typing import List

      
        5
        
        -import kblayout, os

      
        
        4
        +import kblayout

      
        
        5
        +import os

      
        6
        6
         

      
        7
        7
         

      
        8
        8
         mod = "mod4"

      
        9
        9
         alt = "mod1"

      
        10
        10
         

      
        11
        
        -terminal    = "alacritty"

      
        12
        
        -browser     = "firefox"

      
        
        11
        +terminal = "alacritty"

      
        
        12
        +browser = "firefox"

      
        13
        13
         filemanager = f"{terminal} -e ranger"

      
        14
        
        -editor      = "alacritty -e nvim"

      
        
        14
        +editor = "alacritty -e nvim"

      
        15
        15
         

      
        16
        16
         color = [

      
        17
        17
             "#FFFFFF",  # 0. Text color

      ···
        34
        34
         keys = [

      
        35
        35
             # Applications

      
        36
        36
             Key([mod], "Return",

      
        37
        
        -        lazy.spawn(terminal), 

      
        38
        
        -        desc="Launch terminal"

      
        39
        
        -    ),

      
        
        37
        +        lazy.spawn(terminal),

      
        
        38
        +        desc="Launch terminal"),

      
        40
        39
             Key([mod, "shift"], "w",

      
        41
        40
                 lazy.spawn(browser),

      
        42
        
        -        desc="Launch browser"

      
        43
        
        -    ),

      
        
        41
        +        desc="Launch browser"),

      
        44
        42
             Key([mod, "shift"], "f",

      
        45
        43
                 lazy.spawn(filemanager),

      
        46
        
        -        desc="Launch filemanager"

      
        47
        
        -    ),

      
        
        44
        +        desc="Launch filemanager"),

      
        48
        45
             Key([mod, "shift"], "e",

      
        49
        46
                 lazy.spawn(editor),

      
        50
        
        -        desc="Launch code editor"

      
        51
        
        -    ),

      
        52
        
        -    # Window control 

      
        53
        
        -    Key([mod], "q", 

      
        
        47
        +        desc="Launch code editor"),

      
        
        48
        +

      
        
        49
        +    # Window control

      
        
        50
        +    Key([mod], "q",

      
        54
        51
                 lazy.window.kill(),

      
        55
        
        -        desc="Kill focused window"

      
        56
        
        -    ),

      
        
        52
        +        desc="Kill focused window"),

      
        57
        53
             Key([mod, "shift"], "Tab",

      
        58
        54
                 lazy.window.toggle_floating(),

      
        59
        
        -        desc="Toggle floating mode"

      
        60
        
        -    ),

      
        61
        
        -    Key([mod], "h", 

      
        62
        
        -        lazy.layout.left(), 

      
        63
        
        -        desc="Change focus window(left)"

      
        64
        
        -    ),

      
        
        55
        +        desc="Toggle floating mode"),

      
        
        56
        +    Key([mod], "h",

      
        
        57
        +        lazy.layout.left(),

      
        
        58
        +        desc="Change focus window(left)"),

      
        65
        59
             Key([mod], "j",

      
        66
        
        -        lazy.layout.down(), 

      
        67
        
        -        desc="Change focus window(down)"

      
        68
        
        -    ),

      
        69
        
        -    Key([mod], "k", 

      
        
        60
        +        lazy.layout.down(),

      
        
        61
        +        desc="Change focus window(down)"),

      
        
        62
        +    Key([mod], "k",

      
        70
        63
                 lazy.layout.up(),

      
        71
        
        -        desc="Change focus window(up)"

      
        72
        
        -    ),

      
        
        64
        +        desc="Change focus window(up)"),

      
        73
        65
             Key([mod], "l",

      
        74
        66
                 lazy.layout.right(),

      
        75
        
        -        desc="Change focus window(right)"

      
        76
        
        -    ),

      
        
        67
        +        desc="Change focus window(right)"),

      
        77
        68
             Key([mod, "shift"], "h",

      
        78
        69
                 lazy.layout.shuffle_left(),

      
        79
        
        -        desc="Move focus window(left)"

      
        80
        
        -    ),

      
        
        70
        +        desc="Move focus window(left)"),

      
        81
        71
             Key([mod, "shift"], "j",

      
        82
        72
                 lazy.layout.shuffle_down(),

      
        83
        
        -        desc="Move focus window(down)"

      
        84
        
        -    ),

      
        
        73
        +        desc="Move focus window(down)"),

      
        85
        74
             Key([mod, "shift"], "k",

      
        86
        75
                 lazy.layout.shuffle_up(),

      
        87
        
        -        desc="Move focus window(up)"

      
        88
        
        -    ),

      
        
        76
        +        desc="Move focus window(up)"),

      
        89
        77
             Key([mod, "shift"], "l",

      
        90
        78
                 lazy.layout.shuffle_right(),

      
        91
        
        -        desc="Move focus window(right)"

      
        92
        
        -    ),

      
        
        79
        +        desc="Move focus window(right)"),

      
        93
        80
             Key([mod, "control"], "h",

      
        94
        81
                 lazy.layout.grow_left(),

      
        95
        
        -        desc="Resize focus window(left)"

      
        96
        
        -    ),

      
        
        82
        +        desc="Resize focus window(left)"),

      
        97
        83
             Key([mod, "control"], "j",

      
        98
        84
                 lazy.layout.grow_down(),

      
        99
        
        -        desc="Resize focus window(down)"

      
        100
        
        -    ),

      
        
        85
        +        desc="Resize focus window(down)"),

      
        101
        86
             Key([mod, "control"], "k",

      
        102
        87
                 lazy.layout.grow_up(),

      
        103
        
        -        desc="Resize focus window(up)"

      
        104
        
        -    ),

      
        
        88
        +        desc="Resize focus window(up)"),

      
        105
        89
             Key([mod, "control"], "l",

      
        106
        90
                 lazy.layout.grow_right(),

      
        107
        
        -        desc="Resize focus window(right)"

      
        108
        
        -    ),

      
        
        91
        +        desc="Resize focus window(right)"),

      
        109
        92
         

      
        110
        93
             # Layout

      
        111
        94
             Key([mod], "Tab",

      
        112
        95
                 lazy.next_layout(),

      
        113
        
        -        desc="Toggle between layouts"

      
        114
        
        -    ),

      
        
        96
        +        desc="Toggle between layouts"),

      
        115
        97
             Key([mod], "space",

      
        116
        98
                 lazy.layout.next(),

      
        117
        
        -        desc="Switch window focus to other pane(s) of stack"

      
        118
        
        -    ),

      
        
        99
        +        desc="Switch window focus to other pane(s) of stack"),

      
        119
        100
             Key([mod, "shift"], "space",

      
        120
        101
                 lazy.layout.rotate(),

      
        121
        
        -        desc="Swap panes of split stack"

      
        122
        
        -    ),

      
        
        102
        +        desc="Swap panes of split stack"),

      
        123
        103
         

      
        124
        104
             # Volume

      
        125
        105
             Key([mod], "equal",

      
        126
        106
                 lazy.spawn("amixer sset Master 2%+"),

      
        127
        
        -        desc="Plus 2% volume"

      
        128
        
        -    ),

      
        
        107
        +        desc="Plus 2% volume"),

      
        129
        108
             Key([mod], "minus",

      
        130
        109
                 lazy.spawn("amixer sset Master 2%-"),

      
        131
        
        -        desc="Minus 2% volume"

      
        132
        
        -    ),

      
        
        110
        +        desc="Minus 2% volume"),

      
        133
        111
             Key([mod, "shift"], "minus",

      
        134
        112
                 lazy.spawn("amixer sset Master toggle"),

      
        135
        
        -        desc="Mute volume"

      
        136
        
        -    ),

      
        
        113
        +        desc="Mute volume"),

      
        137
        114
         

      
        138
        
        -    # Menus(dmenu or/and rofi) 

      
        
        115
        +    # Menus(dmenu or/and rofi)

      
        139
        116
             Key([mod, "shift"], "Return",

      
        140
        
        -        lazy.spawn("rofi -location 2 -show drun"),

      
        141
        
        -        desc="(Rofi) Program launcher"

      
        142
        
        -    ),

      
        143
        
        -    Key([mod, "shift"], "apostrophe",

      
        144
        
        -        lazy.spawn("rofi -location 2 -show run"),

      
        145
        
        -        desc="(Rofi) Program launcher"

      
        146
        
        -    ),

      
        147
        
        -    Key([mod],"Escape",

      
        
        117
        +        lazy.spawn("rofi -show drun"),

      
        
        118
        +        desc="(Rofi) Program launcher"),

      
        
        119
        +    Key([mod], "Escape",

      
        148
        120
                 lazy.spawn("./.script/dmenu/dmenu-power.sh"),

      
        149
        
        -        desc="Power menu"

      
        150
        
        -    ),

      
        
        121
        +        desc="Power menu"),

      
        151
        122
             Key([mod, "control"], "i",

      
        152
        
        -        lazy.spawn("passmenu -h 24 -p Password"),

      
        153
        
        -        desc="Dmenu password menu"

      
        154
        
        -    ),

      
        
        123
        +        lazy.spawn("./.script/dmenu/dmenu-pass.sh"),

      
        
        124
        +        desc="Dmenu(rofi) password menu"),

      
        155
        125
             Key([mod, "control"], "u",

      
        156
        126
                 lazy.spawn("./.script/dmenu/dmenu-config-edit.sh"),

      
        157
        
        -        desc="Config editor"

      
        158
        
        -    ),

      
        159
        
        -    Key([mod, "control"], "o",

      
        160
        
        -        lazy.spawn("./.script/dmenu/dmenu-sysmon.sh"),

      
        161
        
        -        desc="Choice system monitor"

      
        162
        
        -    ),

      
        
        127
        +        desc="Config editor"),

      
        163
        128
         

      
        164
        129
             # Screenhot

      
        165
        130
             Key([], "Print",

      
        166
        131
                 lazy.spawn("scrot -s ./$(date +%Y-%m-%d-%H-%M-%S).png"),

      
        167
        
        -        desc="Create screenhot(scrot -s)"

      
        168
        
        -    ),

      
        
        132
        +        desc="Create screenhot(scrot -s)"),

      
        169
        133
             Key(["shift"], "Print",

      
        170
        
        -        lazy.spawn(f"scrot ./$(date +%Y-%m-%d-%H-%M-%S).png"),

      
        171
        
        -        desc="Create screenhot full screen(scrot)"

      
        172
        
        -    ),

      
        
        134
        +        lazy.spawn("scrot ./$(date +%Y-%m-%d-%H-%M-%S).png"),

      
        
        135
        +        desc="Create screenhot full screen(scrot)"),

      
        173
        136
         

      
        174
        137
             # Qtile

      
        175
        138
             Key([mod, "control"], "r",

      
        176
        139
                 lazy.restart(),

      
        177
        
        -        desc="Restart qtile"

      
        178
        
        -    ),

      
        
        140
        +        desc="Restart qtile"),

      
        179
        141
             Key([mod], "r",

      
        180
        142
                 lazy.spawncmd(),

      
        181
        
        -        desc="Spawn a command using a prompt widget"

      
        182
        
        -    ),

      
        
        143
        +        desc="Spawn a command using a prompt widget"),

      
        183
        144
             Key([mod, "shift"], "q",

      
        184
        145
                 lazy.spawn("xkill"),

      
        185
        
        -        desc="Xkill"

      
        186
        
        -    ),

      
        
        146
        +        desc="Xkill"),

      
        187
        147
             Key([mod, "shift"], "z",

      
        188
        148
                 lazy.spawn("betterlockscreen --off 300 -t \"Computer is locked\" -l"),

      
        189
        
        -        desc="Lock screen"

      
        190
        
        -    )

      
        
        149
        +        desc="Lock screen")

      
        191
        150
         ]

      
        192
        151
         

      
        193
        152
         # Workspaces name, keys

      ···
        199
        158
                        ("chat", {"layout": "columns"}),

      
        200
        159
                        ("pass", {"layout": "columns"}),

      
        201
        160
                        ("mus",  {"layout": "max"}),

      
        202
        
        -               ("flo",  {"layout": "columns"})

      
        203
        
        -]

      
        
        161
        +               ("flo",  {"layout": "columns"})]

      
        204
        162
         groups = [Group(name, **kwargs) for name, kwargs in group_names]

      
        205
        163
         for i, (name, kwargs) in enumerate(group_names, 1):

      
        206
        164
             keys.append(Key([mod], str(i), lazy.group[name].toscreen()))

      ···
        225
        183
             # layout.MonadWide(),

      
        226
        184
             # layout.RatioTile(),

      
        227
        185
             # layout.Tile(**layout_theme),

      
        228
        
        -    # layout.TreeTab(), 

      
        
        186
        +    # layout.TreeTab(),

      
        229
        187
             # layout.VerticalTile(),

      
        230
        188
             # layout.Zoomy(),

      
        231
        189
         ]

      ···
        277
        235
             widget.Clock(

      
        278
        236
                 format=" %d.%m.%Y",

      
        279
        237
                 foreground=color[4]

      
        280
        
        -    )], 24 # Panel size 

      
        
        238
        +    )], 24  # Panel size

      
        281
        239
         ))]

      
        282
        240
         

      
        283
        241
         # Drag floating layouts

      ···
        308
        266
                 {"wmclass": "maketag"},

      
        309
        267
                 {"wname":   "branchdialog"},

      
        310
        268
                 {"wname":   "pinentry"},

      
        311
        
        -        {"wmclass": "ssh-askpass"}

      
        312
        
        -])

      
        
        269
        +        {"wmclass": "ssh-askpass"}])

      
        313
        270
         auto_fullscreen = True

      
        314
        271
         focus_on_window_activation = "smart"

      
        315
        272
         wmname = "LG3D"

      
M config/rofi/themes/nten-dmenu.rasi
···
        7
        7
             selected-foreground:        #ffffff;

      
        8
        8
         }

      
        9
        9
         #window {

      
        
        10
        +    location: north;

      
        10
        11
             width: 100%;

      
        11
        12
             height: 24px;

      
        12
        13
             padding: 0px;

      ···
        25
        26
         #listview {

      
        26
        27
             layout: horizontal;

      
        27
        28
             spacing: 0px;

      
        28
        
        -    fixed-height: false;

      
        29
        
        -    dynamic: true;

      
        30
        29
             lines: 100;

      
        31
        30
         }

      
        32
        31
         #entry {

      
A rcrc
···
        
        1
        +EXCLUDES="README.md screen.png"

      
        
        2
        +UNDOTTED="bin"

      
M script/dmenu/dmenu-config-edit.sh
···
        2
        2
         declare options=("exit

      
        3
        3
         i3

      
        4
        4
         qtile

      
        5
        
        -berry

      
        6
        
        -openbox

      
        7
        
        -dwm

      
        
        5
        +bspwm

      
        8
        6
         alacritty

      
        9
        7
         kitty

      
        10
        8
         picom

      
        11
        9
         ranger

      
        12
        10
         qutebrowser

      
        13
        
        -emacs

      
        14
        11
         nvim

      
        15
        12
         tmux

      
        16
        13
         dunst

      ···
        18
        15
         redshift

      
        19
        16
         rofi")

      
        20
        17
         

      
        21
        
        -choice=$(echo -e "${options[@]}"|dmenu -p "Config edit" $@)

      
        
        18
        +menucmd="rofi -location 2 -dmenu"

      
        
        19
        +choice=$(echo -e "${options[@]}"|${menucmd} -p "Config edit" $@)

      
        22
        20
         case "$choice" in

      
        23
        21
             exit) exit 0 ;;

      
        24
        22
             i3)

      
        25
        
        -        case "$(echo -e "config\npolybar"|dmenu -p "I3wm" $@)" in

      
        
        23
        +        case "$(echo -e "config\npolybar"|${menucmd} -p "I3wm" $@)" in

      
        26
        24
         	        config)  choice="$HOME/.config/i3/config"      ;;

      
        27
        25
                     polybar) choice="$HOME/.config/polybar/config" ;;

      
        28
        26
                 esac

      
        29
        27
             ;;

      
        30
        28
             qtile)

      
        31
        
        -        case "$(echo -e "config\nautostart"|dmenu -p "Qtile" $@)" in

      
        
        29
        +        case "$(echo -e "config\nautostart"|${menucmd} -p "Qtile" $@)" in

      
        32
        30
                     config)    choice="$HOME/.config/qtile/config.py"    ;;

      
        33
        31
                     autostart) choice="$HOME/.config/qtile/autostart.sh" ;;

      
        34
        32
                 esac

      
        35
        33
             ;;

      
        36
        
        -    berry)

      
        37
        
        -        case "$(echo -e "config\npolybar\nsxhkd"|dmenu -p "Berry" $@)" in

      
        38
        
        -            config)  choice="$HOME/.config/berry/autostart"       ;;

      
        39
        
        -            polybar) choice="$HOME/.config/berry/polybar/polybar" ;;

      
        40
        
        -            sxhkd)   choice="$HOME/.config/berry/sxhkdrc"         ;;

      
        41
        
        -        esac

      
        42
        
        -    ;;

      
        43
        
        -    openbox)

      
        44
        
        -        case "$(echo -e "config\nautostart\nmenu\ntint2"|dmenu -p "OpenBox" $@)" in

      
        45
        
        -            config)    choice="$HOME/.config/openbox/rc.xml"    ;;

      
        46
        
        -            autostart) choice="$HOME/.config/openbox/autostart" ;;

      
        47
        
        -            menu)      choice="$HOME/.config/openbox/menu.xml"  ;;

      
        48
        
        -            tint2)     choice="$HOME/.config/tint2/tint2rc"     ;;

      
        49
        
        -        esac

      
        50
        
        -    ;;

      
        51
        
        -    dwm)

      
        52
        
        -        case "$(echo -e "config\nautostart\nbar"|dmenu -p "DWM" $@)" in

      
        53
        
        -            config)    choice="$HOME/.config/dwm/config.def.h " ;;

      
        54
        
        -            autostart) choice="$HOME/.config/dwm/autostart.sh"  ;;

      
        55
        
        -            bar)       choice="$HOME/.script/dwmbar.sh"         ;;

      
        
        34
        +    bspwm)

      
        
        35
        +        case "$(echo -e "config\nsxhkd\npolybar"|${menucmd} -p "Bspwm" $@)" in

      
        
        36
        +            config)   choice="$HOME/.config/bspwm/config"  ;;

      
        
        37
        +            sxhkd)    choice="$HOME/.config/bspwm/sxhkd"   ;;

      
        
        38
        +            polybar)  choice="$HOME/.config/bspwm/polybar" ;;

      
        56
        39
                 esac

      
        57
        40
             ;;

      
        58
        
        -    alacritty) choice="$hoME/.config/alacritty.yml"    ;;

      
        
        41
        +    alacritty) choice="$HOME/.config/alacritty.yml"    ;;

      
        59
        42
             kitty)     choice="$HOME/.config/kitty/kitty.conf" ;;

      
        60
        43
         	picom)     choice="$HOME/.config/picom.conf"       ;;

      
        61
        44
             ranger)    choice="$HOME/.config/ranger/rc.conf"   ;;

      
        62
        45
             qutebrowser)

      
        63
        
        -        case "$(echo -e "config\nquickmarks"|dmenu -p "Qutebrowser" $@)" in

      
        
        46
        +        case "$(echo -e "config\nquickmarks"|${menucmd} -p "Qutebrowser" $@)" in

      
        64
        47
                     config)     choice="$HOME/.config/qutebrowser/config.py"  ;;

      
        65
        48
                     quickmarks) choice="$HOME/.config/qutebrowser/quickmarks" ;;

      
        66
        49
                 esac

      
        67
        50
             ;;

      
        68
        
        -    emacs)

      
        69
        
        -        case "$(echo -e "config\ncustom\ninit\npackages"|dmenu -p "Doom emacs" $@)" in

      
        70
        
        -            config)   choice="$HOME/.doom.d/config.el"   ;;

      
        71
        
        -            init)     choice="$HOME/.doom.d/init.el"     ;;

      
        72
        
        -            custom)   choice="$HOME/.doom.d/custom.el"   ;;

      
        73
        
        -            packages) choice="$HOME/.doom.d/packages.el" ;;

      
        74
        
        -        esac

      
        75
        
        -    ;;

      
        76
        51
             nvim)     choice="$HOME/.config/nvim/init.vim"        ;;

      
        77
        52
             tmux)     choice="$HOME/.tmux.conf"                   ;;

      
        78
        53
             dunst)    choice="$HOME/.config/dunst/dunstrc"        ;;

      ···
        80
        55
             castero)  choice="$HOME/.config/castero/castero.conf" ;;

      
        81
        56
             redshift) choice="$HOME/.config/redshift.conf"        ;;

      
        82
        57
             rofi)

      
        83
        
        -        case "$(echo -e "config\nnten-dmenu"|dmenu -p "Rofi" $@)" in

      
        
        58
        +        case "$(echo -e "config\nnten-dmenu"|${menucmd} -p "Rofi" $@)" in

      
        84
        59
                     config)     choice="$HOME/.config/rofi/config"                 ;;

      
        85
        60
                     nten-dmenu) choice="$HOME/.config/rofi/themes/nten-dmenu.rasi" ;;

      
        86
        61
                 esac

      
        87
        62
             ;;

      
        88
        63
         esac

      
        89
        64
         alacritty -e nvim "$choice"

      
        90
        
        -# emacsclient -c -a emacs "$choice"

      
A script/dmenu/dmenu-pass.sh
···
        
        1
        +#!/bin/sh

      
        
        2
        +shopt -s nullglob globstar

      
        
        3
        +

      
        
        4
        +menucmd="rofi -location 2 -dmenu"

      
        
        5
        +prefix=${PASSWORD_STORE_DIR-~/.password-store}

      
        
        6
        +password_files=( "$prefix"/**/*.gpg )

      
        
        7
        +password_files=( "${password_files[@]#"$prefix"/}" )

      
        
        8
        +password_files=( "${password_files[@]%.gpg}" )

      
        
        9
        +password=$(printf '%s\n' "${password_files[@]}"|${menucmd} -p  "Passwords" "$@")

      
        
        10
        +[[ -n $password ]] || exit

      
        
        11
        +

      
        
        12
        +if [[ $typeit -eq 0 ]]; then

      
        
        13
        +	pass show -c "$password" 2>/dev/null

      
        
        14
        +else

      
        
        15
        +	pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } |

      
        
        16
        +		xdotool type --clearmodifiers --file -

      
        
        17
        +fi

      
M script/dmenu/dmenu-power.sh
···
        4
        4
         Logout

      
        5
        5
         Reboot")

      
        6
        6
         

      
        7
        
        -choice=$(echo -e "${options[@]}"|dmenu -p "Power" $@)

      
        
        7
        +menucmd="rofi -location 2 -dmenu"

      
        
        8
        +choice=$(echo -e "${options[@]}"|${menucmd} -p "Power" $@)

      
        8
        9
         case "$choice" in

      
        9
        10
             "ShutDown")

      
        10
        
        -        case "$(echo -e "Yes\nNo"|dmenu -p "ShutDown" $@)" in

      
        
        11
        +        case "$(echo -e "Yes\nNo"|${menucmd} -p "ShutDown" $@)" in

      
        11
        12
                     "Yes") exec systemctl poweroff ;;

      
        12
        13
                     "No")  exec exit 0             ;;

      
        13
        14
                 esac

      
        14
        15
             ;;

      
        15
        16
             "Lock") exec betterlockscreen --off 300 -t "Computer is lockerd" -l ;;

      
        16
        17
             "Logout")

      
        17
        
        -        case "$(echo -e "Yes\nNo"|dmenu -p "ShutDown" $@)" in

      
        
        18
        +        case "$(echo -e "Yes\nNo"|${menucmd} -p "ShutDown" $@)" in

      
        18
        19
                     "Yes") exec loginctl terminate-session $XDG_SESSION_ID ;;

      
        19
        20
                     "No")  exec exit 0                                     ;;

      
        20
        21
                 esac

      
        21
        22
             ;;

      
        22
        23
             "Reboot")

      
        23
        
        -        case "$(echo -e "Yes\nNo"|dmenu -p "Reboot" $@)" in

      
        
        24
        +        case "$(echo -e "Yes\nNo"|${menucmd} -p "Reboot" $@)" in

      
        24
        25
                     "Yes") exec systemctl reboot ;;

      
        25
        26
                     "No")  exec exit 0           ;;

      
        26
        27
                 esac

      
D script/dwmbar.sh
···
        1
        
        -#!/bin/sh

      
        2
        
        -getDate() {

      
        3
        
        -    local date="$(date +%d.%m.%Y)"

      
        4
        
        -    echo " ${date}"

      
        5
        
        -}

      
        6
        
        -getTime() {

      
        7
        
        -    local time="$(date +%H:%M)"

      
        8
        
        -    echo " ${time}"

      
        9
        
        -}

      
        10
        
        -getVolume() {

      
        11
        
        -    local volume="$(amixer get Master | tail -n1 | sed -r 's/.*\[(.*)%\].*/\1/')"

      
        12
        
        -    echo " ${volume}"

      
        13
        
        -}

      
        14
        
        -getKeyLayout() {

      
        15
        
        -    case "$(xkblayout)" in

      
        16
        
        -        "Eng") echo " us" ;;

      
        17
        
        -        "Rus") echo " ru" ;;

      
        18
        
        -        "Ukr") echo " ua" ;;

      
        19
        
        -    esac

      
        20
        
        -}

      
        21
        
        -

      
        22
        
        -while true; do

      
        23
        
        -    xsetroot -name " $(getVolume) | $(getKeyLayout) | $(getTime) | $(getDate)"

      
        24
        
        -    sleep 0

      
        25
        
        -done

      
D script/polybar-toggle
···
        1
        
        -#!/bin/sh

      
        2
        
        -if [ $(pgrep polybar) ]

      
        3
        
        -then

      
        4
        
        -    polybar i3bar >/dev/null

      
        5
        
        -    # ~/.config/i3/bar.sh

      
        6
        
        -else

      
        7
        
        -    killall -q polybar

      
        8
        
        -    pkill polybar

      
        9
        
        -fi

      
A script/random-wallpaper.sh
···
        
        1
        +#!/bin/sh

      
        
        2
        +WALLPATH="~/Pictures/wallp"

      
        
        3
        +

      
        
        4
        +while true; do

      
        
        5
        +    feh --randomize --bg-scale $WALLPATH

      
        
        6
        +    sleep 900

      
        
        7
        +done

      
M script/snap-remove-old-pkg.sh
···
        1
        1
         #!/bin/sh

      
        2
        2
         LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' |

      
        3
        
        -while read snapname revision

      
        4
        
        -do

      
        
        3
        +while read snapname revision; do

      
        5
        4
             sudo snap remove "$snapname" --revision="$revision"

      
        6
        5
         done

      
M tmux.conf
···
        35
        35
         set -g pane-border-style fg=colour240

      
        36
        36
         set -g pane-active-border-style fg=colour39

      
        37
        37
         set-window-option -g window-status-current-style fg=colour39

      
        
        38
        +

      
        
        39
        +# VIM tmux navigation

      
        
        40
        +is_vim="ps -o state= -o comm= -t '#{pane_tty}' \

      
        
        41
        +    | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"

      
        
        42
        +bind-key -n C-h if-shell "$is_vim" "send-keys C-h"  "select-pane -L"

      
        
        43
        +bind-key -n C-j if-shell "$is_vim" "send-keys C-j"  "select-pane -D"

      
        
        44
        +bind-key -n C-k if-shell "$is_vim" "send-keys C-k"  "select-pane -U"

      
        
        45
        +bind-key -n C-l if-shell "$is_vim" "send-keys C-l"  "select-pane -R"