Update alacritty, kitty, bspwm, i3wm, vim,tmux configs & sctipts

This commit is contained in:
Smirnov Olexandr 2021-01-24 23:08:44 +02:00
parent 246dc34d13
commit c7da10d076
22 changed files with 256 additions and 282 deletions

View file

@ -36,9 +36,10 @@ cursor:
scrolling.history: 1000 scrolling.history: 1000
debug.render_timer: false debug.render_timer: false
draw_bold_text_with_bright_colors: false #draw_bold_text_with_bright_colors: false
draw_bold_text_with_bright_colors: true
background_opacity: 0.75 background_opacity: 0.75
dynamic_title: true dynamic_title: false
colors: colors:
primary: primary:

View file

@ -2,9 +2,10 @@
# Smirnov-O <ss2316544@gmail.com> # Smirnov-O <ss2316544@gmail.com>
# BSPWM config file # BSPWM config file
## == Functions ## == Function
Run() { Run() {
if ! pgrep $1; then $@& fi if ! pgrep $1
then $@& fi
} }
## == Autostart ## == Autostart
@ -12,20 +13,23 @@ setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" &
Run sxhkd -c .config/bspwm/sxhkd & Run sxhkd -c .config/bspwm/sxhkd &
~/.config/bspwm/bar.sh & ~/.config/bspwm/bar.sh &
Run nitrogen --restore & Run nitrogen --restore &
~/.script/autolock &
Run lxsession & Run lxsession &
Run picom & Run picom &
## == BSPWM ## == BSPWM
# Workspaces
bspc monitor -d 1 2 3 4 5 6 7 8 9 bspc monitor -d 1 2 3 4 5 6 7 8 9
# General
bspc config border_width 2 bspc config border_width 2
bspc config window_gap 8 bspc config window_gap 8
bspc config split_ratio 0.50
bspc config split_ratio 0.52
bspc config borderless_monocle true bspc config borderless_monocle true
bspc config gapless_monocle true bspc config gapless_monocle true
bspc config click_to_focus true bspc config single_monocle true
bspc config single_monocle false bspc config focus_follows_pointer true
bspc config borderless_monocle true bspc config borderless_monocle true
# Colors # Colors
@ -37,13 +41,14 @@ bspc config urgent_border_color "#FF6C6B"
# Rules # Rules
bspc rule -a Alacritty desktop='^1' focus=on follow=on bspc rule -a Alacritty desktop='^1' focus=on follow=on
bspc rule -a firefox desktop='^2' focus=on bspc rule -a kitty desktop='^1' focus=on follow=on
bspc rule -a firefox desktop='^2' focus=off
bspc rule -a VSCodium desktop='^3' focus=on follow=on bspc rule -a VSCodium desktop='^3' focus=on follow=on
bspc rule -a '*:nvim' desktop='^3' focus=on follow=on bspc rule -a '*:nvim' desktop='^3' focus=on follow=on
bspc rule -a '*:ranger' desktop='^4' focus=on follow=on bspc rule -a '*:ranger' desktop='^4' focus=on follow=on
bspc rule -a Thunar desktop='^4' focus=on follow=on bspc rule -a Thunar desktop='^4' focus=on follow=on
bspc rule -a Joplin desktop='^5' focus=on bspc rule -a Joplin desktop='^5' focus=off
bspc rule -a discord descord='^6' focus=on bspc rule -a discord descord='^6' focus=on
bspc rule -a TelegramDesktop descord='^6' focus=on bspc rule -a TelegramDesktop descord='^6' focus=off
bspc rule -a Spotify descord='^9' focus=on bspc rule -a Spotify descord='^9' focus=on
bspc rule -a google-tasks-desktop state=floating bspc rule -a google-tasks-desktop state=floating

View file

@ -1,5 +1,6 @@
[settings] [settings]
enable-ipc = true enable-ipc = true
format-padding = 1
screenchange-reload = true screenchange-reload = true
pseudo-transparency = true pseudo-transparency = true
@ -16,14 +17,13 @@ fixed-center = true
background = ${colors.background} background = ${colors.background}
foreground = ${colors.foreground} foreground = ${colors.foreground}
wm-restack = bspwm wm-restack = bspwm
module-margin-left = 1
module-margin-right = 1
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 = windowname modules-left = powermenu windowname
modules-center = bspwm modules-center = bspwm
modules-right = pulseaudio archupd wifi-signal weather memory cpu keyboard time date modules-right = pulseaudio archupd wifi-signal weather memory cpu keyboard time date
tray-position = right tray-position = right
tray-padding = 0
[module/bspwm] [module/bspwm]
type = internal/bspwm type = internal/bspwm

View file

@ -1,17 +1,18 @@
# Smirnov-O <ss2316544@gmail.com> # Smirnov-O <ss2316544@gmail.com>
# BSPWM/SXKBD config file # BSPWM/SXKBD config file
## == USER keys ## == USER Applications
super + Return super + Return
alacritty kitty
super + shift + w super + shift + w
firefox firefox
super + shift + f super + shift + f
alacritty --class="ranger" -e ranger kitty --class=ranger -e ranger
super + shift + e super + shift + e
alacritty --class="nvim" -e nvim kitty --class=nvim -e nvim
super + shift + c super + shift + c
vscodium vscodium
@ -22,6 +23,18 @@ super + shift + d
super + shift + q super + shift + q
xkill xkill
## == USER volume
super + minus
amixer sset Master 2%-
super + equal
amixer sset Master 2%+
super + shift + minus
amixer sset Master toggle
## == USER Menus ## == USER Menus
super + shift + Return super + shift + Return
rofi -location 2 -show drun rofi -location 2 -show drun
@ -30,7 +43,7 @@ super + Escape
~/.script/dmenu/dmenu-power.sh ~/.script/dmenu/dmenu-power.sh
super + ctrl + i super + ctrl + i
passmenu -h 24 -p Passwords ~/.script/dmenu/dmenu-pass.sh
super + ctrl + u super + ctrl + u
~/.script/dmenu/dmenu-config-edit.sh ~/.script/dmenu/dmenu-config-edit.sh
@ -44,14 +57,11 @@ super + control + r
bspc wm -r && pkill -USR1 -x sxhkd bspc wm -r && pkill -USR1 -x sxhkd
## == BSPWM windows ## == BSPWM windows
## Resize window ## Resize window
super + ctrl + {h,j,k,l} 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}
# Resize floating window
#super + shift + {h,j,k,l}
# bspc node -v {-20 0,0 20,0 -20,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}

View file

@ -1,4 +1,4 @@
#!/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 i3bar & polybar bar &

View file

@ -54,8 +54,8 @@ bindsym $mod+Control+w layout tabbed
bindsym $mod+Control+e layout toggle split bindsym $mod+Control+e layout toggle split
# Splits # Splits
#bindsym $mod+b split h bindsym $mod+b split h
#bindsym $mod+v split v bindsym $mod+v split v
# Scratchpad # Scratchpad
bindsym $mod+Shift+grave move scratchpad bindsym $mod+Shift+grave move scratchpad
@ -64,11 +64,10 @@ bindsym $mod+grave scratchpad show, floating disable
############## User key ########### ############## User key ###########
# Menus # Menus
bindsym $mod+Shift+apostrophe exec "rofi -location 6 -show run" bindsym $mod+Shift+Return exec rofi -show drun
bindsym $mod+Shift+Return exec "rofi -location 6 -show drun" bindsym $mod+Escape exec ~/.script/dmenu/dmenu-power.sh
bindsym $mod+Escape exec ~/.script/dmenu/dmenu-power.sh -b -h 24 bindsym $mod+Control+u exec ~/.script/dmenu/dmenu-config-edit.sh
bindsym $mod+Control+u exec ~/.script/dmenu/dmenu-config-edit.sh -b -h 24 bindsym $mod+Control+i exec ~/.script/dmenu/dmenu-pass.sh
bindsym $mod+Control+i exec passmenu -b -h 24 -p Passwords
# Apps # Apps
bindsym $mod+Return exec $terminal bindsym $mod+Return exec $terminal
@ -78,9 +77,6 @@ bindsym $mod+Shift+e exec $codeeditor
bindsym $mod+Shift+c exec $guicode bindsym $mod+Shift+c exec $guicode
bindsym $mod+Shift+d exec $documentationreader bindsym $mod+Shift+d exec $documentationreader
# Toogle polybar
bindsym $mod+b exec ~/.script/polybar-toggle
# Sceenshot # Sceenshot
bindsym --release Print exec scrot -s /home/${USER}/$(date +%Y-%m-%d-%H-%M-%S).png 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 --release Shift+Print exec scrot /home/${USER}/$(date +%Y-%m-%d-%H-%M-%S).png

View file

@ -1,6 +1,3 @@
# MOD
clear_all_shortcuts yes
# Font # Font
font_family Jetbrains Mono font_family Jetbrains Mono
bold_font auto bold_font auto
@ -65,6 +62,7 @@ initial_window_height 480
enabled_layouts * enabled_layouts *
# Keyboard Shortcuts # Keyboard Shortcuts
clear_all_shortcuts yes
map ctrl+shift+c copy_to_clipboard map ctrl+shift+c copy_to_clipboard
map ctrl+shift+v paste_from_clipboard map ctrl+shift+v paste_from_clipboard
map shift+insert paste_from_selection map shift+insert paste_from_selection
@ -87,17 +85,15 @@ map alt+ctrl+backspace change_font_size all 0
# Theming # Theming
foreground #dfdfdf foreground #dfdfdf
background_opacity 0.85 background_opacity 0.85
#background_opacity 1 dynamic_background_opacity yes
background_image none background_image none
background_image_layout tiled background_image_layout tiled
background_image_linear no background_image_linear no
dynamic_background_opacity no
background_tint 0.0 background_tint 0.0
dim_opacity 0.75 dim_opacity 0.75
selection_foreground #edebd7 selection_foreground #edebd7
selection_background #073642 selection_background #073642
background #262a3b background #262a2b
#background #262a2b
foreground #ffffff foreground #ffffff
cursorColor #d2dae2 cursorColor #d2dae2
selection_background #262a3b selection_background #262a3b

View file

@ -1,25 +1,35 @@
call plug#begin('~/.vim/plugged') call plug#begin('~/.vim/plugged')
Plug 'Smirnov-O/nten16.vim' " Color scheme Plug 'Smirnov-O/nten16.vim' " Color scheme
Plug 'itchyny/lightline.vim' " Status line Plug 'itchyny/lightline.vim' " Status line
Plug 'maximbaz/lightline-ale' " ALE in status line
Plug 'airblade/vim-gitgutter' " Git indicator Plug 'airblade/vim-gitgutter' " Git indicator
Plug 'ap/vim-css-color' " CSS color preview Plug 'ap/vim-css-color' " HEX/CSS color preview
Plug 'mhinz/vim-startify' " Start page Plug 'mhinz/vim-startify' " Start page
Plug 'scrooloose/nerdtree' " File manager
Plug 'dense-analysis/ale' " Linter Plug 'dense-analysis/ale' " Linter
Plug 'kassio/neoterm' " Terminal wrapper Plug 'kassio/neoterm' " Terminal wrapper
Plug 'aurieh/discord.nvim' " Discord rich Plug 'metakirby5/codi.vim' " Live REPL
Plug 'editorconfig/editorconfig-vim' " EditorConfig support Plug 'editorconfig/editorconfig-vim' " EditorConfig support
Plug 'christoomey/vim-tmux-navigator' " Jump from vim to tmux and back
Plug 'Xuyuanp/nerdtree-git-plugin' " NERDTree git status
" Completion & snippets " Completion & snippets
Plug 'ervandew/supertab' "Plug 'ervandew/supertab'
Plug 'jiangmiao/auto-pairs' Plug 'jiangmiao/auto-pairs'
Plug 'SirVer/ultisnips' Plug 'SirVer/ultisnips'
Plug 'mattn/emmet-vim', {'for': ['html', 'javascript']}
" Language support
Plug 'othree/yajs.vim', {'for': 'javascript'}
Plug 'maxmellon/vim-jsx-pretty', {'for': 'javascript'}
" Programing
Plug 'metakirby5/codi.vim'
Plug 'plasticboy/vim-markdown', {'for': 'markdown'}
Plug 'vim-python/python-syntax', {'for': 'python'} Plug 'vim-python/python-syntax', {'for': 'python'}
Plug 'cakebaker/scss-syntax.vim', {'for': ['scss', 'sass']}
Plug 'plasticboy/vim-markdown', {'for': 'markdown'}
Plug 'PotatoesMaster/i3-vim-syntax', {'for': 'i3'} Plug 'PotatoesMaster/i3-vim-syntax', {'for': 'i3'}
Plug 'kovetskiy/sxhkd-vim' Plug 'kovetskiy/sxhkd-vim', {'for': 'sxhkd'}
call plug#end() call plug#end()
@ -72,8 +82,7 @@ set hidden
set smartindent set smartindent
" Spell " Spell
set spell "set spell spelllang=en_us
set spelllang=en_us
" Disable sound " Disable sound
set visualbell t_vb= set visualbell t_vb=
@ -93,7 +102,7 @@ let g:python_highlight_class_vars = 1
" Markdown " Markdown
let g:vim_markdown_folding_disabled = 1 let g:vim_markdown_folding_disabled = 1
let g:vim_markdown_frontmatter = 1 let g:vim_markdown_frontmatter = 1
let g:markdown_fenced_languages = ['go', 'python', 'bash', 'sh=bash'] let g:markdown_fenced_languages = ['javascript', 'js=javascript', 'python', 'py=python', 'bash', 'sh=bash']
" == Plugins configuration " == Plugins configuration
@ -101,12 +110,24 @@ let g:lightline = {
\ 'colorscheme': 'nten16', \ 'colorscheme': 'nten16',
\ 'active': { \ 'active': {
\ 'left': [ [ 'mode', 'paste' ], \ 'left': [ [ 'mode', 'paste' ],
\ [ 'readonly', 'modified' ] ], \ [ 'readonly', 'modified' ],
\ [ 'linter_errors', 'linter_warnings', 'linter_infos' ] ],
\ 'right': [ [ 'lineinfo' ], \ 'right': [ [ 'lineinfo' ],
\ [ 'percent' ], \ [ 'percent' ],
\ [ 'filename', 'filetype' ] ] \ [ 'filename', 'filetype' ] ]
\ },
\ 'component_expand': {
\ 'linter_checking': 'lightline#ale#checking',
\ 'linter_infos': 'lightline#ale#infos',
\ 'linter_warnings': 'lightline#ale#warnings',
\ 'linter_errors': 'lightline#ale#errors',
\ 'linter_ok': 'lightline#ale#ok'
\ },} \ },}
" Emmet
let g:user_emmet_expandabbr_key='<tab>'
let g:user_emmet_mode='inv'
" UltiSnipts " UltiSnipts
let g:UltiSnipsExpandTrigger = "<tab>" let g:UltiSnipsExpandTrigger = "<tab>"
let g:UltiSnipsEditSplit = "vertical" let g:UltiSnipsEditSplit = "vertical"
@ -157,5 +178,5 @@ noremap <A-8> :tabn 8<CR>
noremap <A-9> :tabn 9<CR> noremap <A-9> :tabn 9<CR>
" Buffer(s) " Buffer(s)
noremap <leader>p :bnext<CR> noremap <leader>b :bnext<CR>
noremap <leader>o :bprev<CR> noremap <leader>p :bprev<CR>

View file

@ -1,9 +1,9 @@
snippet !sh "SH Shebang" snippet ! "SH Shebang"
#!/bin/sh #!/bin/sh
${1} ${1}
endsnippet endsnippet
snippet !bash "BASH Shebang" snippet #! "BASH Shebang"
#!/bin/bash #!/bin/bash
${1} ${1}
endsnippet endsnippet
@ -27,8 +27,8 @@ done
endsnippet endsnippet
snippet case "Case" snippet case "Case"
case "${1:$variable}" in case "${1}" in
"${2}") ${3} ;; ${2}
esac esac
endsnippet endsnippet

View file

@ -13,7 +13,6 @@ alert = #FF6C6B
monitor = ${env:MONITOR_MIDDLE} monitor = ${env:MONITOR_MIDDLE}
width = 100% width = 100%
height = 24 height = 24
bottom = true
fixed-center = true fixed-center = true
wm-restack = i3 wm-restack = i3
background = ${colors.background} background = ${colors.background}
@ -22,19 +21,50 @@ module-margin-left = 1
module-margin-right = 1 module-margin-right = 1
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
font-2 = Weather Icons:size=7;2
modules-left = i3 pacman-up window-name modules-left = i3 pacman-up window-name
modules-right = pulseaudio backlight wifi-signal keyboard time date modules-right = pulseaudio weather wifi-signal keyboard time date
tray-position = right tray-position = right
[module/bspwm] [module/i3]
type = internal/bspwm type = internal/i3
pin-workspaces = true format = <label-state><label-mode>
inline-mode = false card = intel_backlight
enable-click = false index-sort = false
enable-scroll = false wrapping-scroll = false
reverse-scroll = false label-mode-padding = 1
fuzzy-match = true label-mode-background = ${colors.alert}
label-focused = %icon%
label-focused-background = ${colors.secondary}
label-focused-foreground = ${colors.foreground}
label-focused-padding = 1
label-focused-underline = ${colors.alert}
label-unfocused = %icon%
label-unfocused-foreground = ${colors.foreground}
label-unfocused-padding = 1
label-urgent = %icon%
label-urgent-background = ${colors.alert}
label-urgent-foreground = ${colors.foreground}
label-urgent-padding = 1
label-urgent-underline = ${colors.alert}
label-visible = %icon%
label-visible-background = ${colors.background}
label-visible-foreground = ${colors.foreground}
label-visible-padding = 1
label-visible-underline = ${colors.background}
ws-icon-0 = "1;1 "
ws-icon-1 = "2;2 "
ws-icon-2 = "3;3 "
ws-icon-3 = "4;4 "
ws-icon-4 = "5;5 "
ws-icon-5 = "6;6 "
ws-icon-6 = "7;7 "
ws-icon-7 = "8;8 "
ws-icon-8 = "9;9 "
[module/wifi-signal] [module/wifi-signal]
type = custom/script type = custom/script
@ -73,22 +103,6 @@ blacklist-0 = num lock
blacklist-1 = scroll lock blacklist-1 = scroll lock
blacklist-2= caps lock blacklist-2= caps lock
[module/menu]
type = custom/menu
format = <label-toggle> <menu>
format-padding = 1
format-spacing = 2
label-open = 
label-close = 
menu-0-0 = 
menu-0-0-exec = thunar
menu-0-1 = 
menu-0-1-exec = firefox
menu-0-2 = 
menu-0-2-exec = alacritty
menu-0-3 = 
menu-0-3-exec = emacs
[module/date] [module/date]
type = internal/date type = internal/date
interval = 600 interval = 600

View file

@ -1,7 +1,8 @@
#!/usr/bin/env python3 """For working this script set in ~/.profile 2 variable:
# -*- encoding: utf-8 -*- "OWM_POLYBAR": API key
import requests "OWM_CITY": Your city
import os """
import requests, os
API_KEY = os.getenv("OWM_POLYBAR") API_KEY = os.getenv("OWM_POLYBAR")
@ -10,5 +11,5 @@ CITY = os.getenv("OWM_CITY")
try: try:
JSON = requests.get(f"http://api.openweathermap.org/data/2.5/weather?q={CITY}&lang=EN&&units=metric&appid={API_KEY}").json() JSON = requests.get(f"http://api.openweathermap.org/data/2.5/weather?q={CITY}&lang=EN&&units=metric&appid={API_KEY}").json()
print("", int(JSON["main"]["temp"]), "°С") print("", int(JSON["main"]["temp"]), "°С")
except: except Exception:
print(" err °С") print(" err °С")

View file

@ -1,8 +1,8 @@
from libqtile import bar, layout, widget, hook from libqtile import bar, layout, widget, hook
from libqtile.config import Click, Drag, Group, Key, Screen from libqtile.config import Click, Drag, Group, Key, Screen
from libqtile.lazy import lazy from libqtile.lazy import lazy
from typing import List import kblayout
import kblayout, os import os
mod = "mod4" mod = "mod4"
@ -35,159 +35,118 @@ keys = [
# Applications # Applications
Key([mod], "Return", Key([mod], "Return",
lazy.spawn(terminal), lazy.spawn(terminal),
desc="Launch terminal" desc="Launch terminal"),
),
Key([mod, "shift"], "w", Key([mod, "shift"], "w",
lazy.spawn(browser), lazy.spawn(browser),
desc="Launch browser" desc="Launch browser"),
),
Key([mod, "shift"], "f", Key([mod, "shift"], "f",
lazy.spawn(filemanager), lazy.spawn(filemanager),
desc="Launch filemanager" desc="Launch filemanager"),
),
Key([mod, "shift"], "e", Key([mod, "shift"], "e",
lazy.spawn(editor), lazy.spawn(editor),
desc="Launch code editor" desc="Launch code editor"),
),
# Window control # Window control
Key([mod], "q", Key([mod], "q",
lazy.window.kill(), lazy.window.kill(),
desc="Kill focused window" desc="Kill focused window"),
),
Key([mod, "shift"], "Tab", Key([mod, "shift"], "Tab",
lazy.window.toggle_floating(), lazy.window.toggle_floating(),
desc="Toggle floating mode" desc="Toggle floating mode"),
),
Key([mod], "h", Key([mod], "h",
lazy.layout.left(), lazy.layout.left(),
desc="Change focus window(left)" desc="Change focus window(left)"),
),
Key([mod], "j", Key([mod], "j",
lazy.layout.down(), lazy.layout.down(),
desc="Change focus window(down)" desc="Change focus window(down)"),
),
Key([mod], "k", Key([mod], "k",
lazy.layout.up(), lazy.layout.up(),
desc="Change focus window(up)" desc="Change focus window(up)"),
),
Key([mod], "l", Key([mod], "l",
lazy.layout.right(), lazy.layout.right(),
desc="Change focus window(right)" desc="Change focus window(right)"),
),
Key([mod, "shift"], "h", Key([mod, "shift"], "h",
lazy.layout.shuffle_left(), lazy.layout.shuffle_left(),
desc="Move focus window(left)" desc="Move focus window(left)"),
),
Key([mod, "shift"], "j", Key([mod, "shift"], "j",
lazy.layout.shuffle_down(), lazy.layout.shuffle_down(),
desc="Move focus window(down)" desc="Move focus window(down)"),
),
Key([mod, "shift"], "k", Key([mod, "shift"], "k",
lazy.layout.shuffle_up(), lazy.layout.shuffle_up(),
desc="Move focus window(up)" desc="Move focus window(up)"),
),
Key([mod, "shift"], "l", Key([mod, "shift"], "l",
lazy.layout.shuffle_right(), lazy.layout.shuffle_right(),
desc="Move focus window(right)" desc="Move focus window(right)"),
),
Key([mod, "control"], "h", Key([mod, "control"], "h",
lazy.layout.grow_left(), lazy.layout.grow_left(),
desc="Resize focus window(left)" desc="Resize focus window(left)"),
),
Key([mod, "control"], "j", Key([mod, "control"], "j",
lazy.layout.grow_down(), lazy.layout.grow_down(),
desc="Resize focus window(down)" desc="Resize focus window(down)"),
),
Key([mod, "control"], "k", Key([mod, "control"], "k",
lazy.layout.grow_up(), lazy.layout.grow_up(),
desc="Resize focus window(up)" desc="Resize focus window(up)"),
),
Key([mod, "control"], "l", Key([mod, "control"], "l",
lazy.layout.grow_right(), lazy.layout.grow_right(),
desc="Resize focus window(right)" desc="Resize focus window(right)"),
),
# Layout # Layout
Key([mod], "Tab", Key([mod], "Tab",
lazy.next_layout(), lazy.next_layout(),
desc="Toggle between layouts" desc="Toggle between layouts"),
),
Key([mod], "space", Key([mod], "space",
lazy.layout.next(), lazy.layout.next(),
desc="Switch window focus to other pane(s) of stack" desc="Switch window focus to other pane(s) of stack"),
),
Key([mod, "shift"], "space", Key([mod, "shift"], "space",
lazy.layout.rotate(), lazy.layout.rotate(),
desc="Swap panes of split stack" desc="Swap panes of split stack"),
),
# Volume # Volume
Key([mod], "equal", Key([mod], "equal",
lazy.spawn("amixer sset Master 2%+"), lazy.spawn("amixer sset Master 2%+"),
desc="Plus 2% volume" desc="Plus 2% volume"),
),
Key([mod], "minus", Key([mod], "minus",
lazy.spawn("amixer sset Master 2%-"), lazy.spawn("amixer sset Master 2%-"),
desc="Minus 2% volume" desc="Minus 2% volume"),
),
Key([mod, "shift"], "minus", Key([mod, "shift"], "minus",
lazy.spawn("amixer sset Master toggle"), lazy.spawn("amixer sset Master toggle"),
desc="Mute volume" desc="Mute volume"),
),
# Menus(dmenu or/and rofi) # Menus(dmenu or/and rofi)
Key([mod, "shift"], "Return", Key([mod, "shift"], "Return",
lazy.spawn("rofi -location 2 -show drun"), lazy.spawn("rofi -show drun"),
desc="(Rofi) Program launcher" desc="(Rofi) Program launcher"),
),
Key([mod, "shift"], "apostrophe",
lazy.spawn("rofi -location 2 -show run"),
desc="(Rofi) Program launcher"
),
Key([mod], "Escape", Key([mod], "Escape",
lazy.spawn("./.script/dmenu/dmenu-power.sh"), lazy.spawn("./.script/dmenu/dmenu-power.sh"),
desc="Power menu" desc="Power menu"),
),
Key([mod, "control"], "i", Key([mod, "control"], "i",
lazy.spawn("passmenu -h 24 -p Password"), lazy.spawn("./.script/dmenu/dmenu-pass.sh"),
desc="Dmenu password menu" desc="Dmenu(rofi) password menu"),
),
Key([mod, "control"], "u", Key([mod, "control"], "u",
lazy.spawn("./.script/dmenu/dmenu-config-edit.sh"), lazy.spawn("./.script/dmenu/dmenu-config-edit.sh"),
desc="Config editor" desc="Config editor"),
),
Key([mod, "control"], "o",
lazy.spawn("./.script/dmenu/dmenu-sysmon.sh"),
desc="Choice system monitor"
),
# Screenhot # Screenhot
Key([], "Print", Key([], "Print",
lazy.spawn("scrot -s ./$(date +%Y-%m-%d-%H-%M-%S).png"), lazy.spawn("scrot -s ./$(date +%Y-%m-%d-%H-%M-%S).png"),
desc="Create screenhot(scrot -s)" desc="Create screenhot(scrot -s)"),
),
Key(["shift"], "Print", Key(["shift"], "Print",
lazy.spawn(f"scrot ./$(date +%Y-%m-%d-%H-%M-%S).png"), lazy.spawn("scrot ./$(date +%Y-%m-%d-%H-%M-%S).png"),
desc="Create screenhot full screen(scrot)" desc="Create screenhot full screen(scrot)"),
),
# Qtile # Qtile
Key([mod, "control"], "r", Key([mod, "control"], "r",
lazy.restart(), lazy.restart(),
desc="Restart qtile" desc="Restart qtile"),
),
Key([mod], "r", Key([mod], "r",
lazy.spawncmd(), lazy.spawncmd(),
desc="Spawn a command using a prompt widget" desc="Spawn a command using a prompt widget"),
),
Key([mod, "shift"], "q", Key([mod, "shift"], "q",
lazy.spawn("xkill"), lazy.spawn("xkill"),
desc="Xkill" desc="Xkill"),
),
Key([mod, "shift"], "z", Key([mod, "shift"], "z",
lazy.spawn("betterlockscreen --off 300 -t \"Computer is locked\" -l"), lazy.spawn("betterlockscreen --off 300 -t \"Computer is locked\" -l"),
desc="Lock screen" desc="Lock screen")
)
] ]
# Workspaces name, keys # Workspaces name, keys
@ -199,8 +158,7 @@ group_names = [("term", {"layout": "columns"}),
("chat", {"layout": "columns"}), ("chat", {"layout": "columns"}),
("pass", {"layout": "columns"}), ("pass", {"layout": "columns"}),
("mus", {"layout": "max"}), ("mus", {"layout": "max"}),
("flo", {"layout": "columns"}) ("flo", {"layout": "columns"})]
]
groups = [Group(name, **kwargs) for name, kwargs in group_names] groups = [Group(name, **kwargs) for name, kwargs in group_names]
for i, (name, kwargs) in enumerate(group_names, 1): for i, (name, kwargs) in enumerate(group_names, 1):
keys.append(Key([mod], str(i), lazy.group[name].toscreen())) keys.append(Key([mod], str(i), lazy.group[name].toscreen()))
@ -308,8 +266,7 @@ floating_layout = layout.Floating(
{"wmclass": "maketag"}, {"wmclass": "maketag"},
{"wname": "branchdialog"}, {"wname": "branchdialog"},
{"wname": "pinentry"}, {"wname": "pinentry"},
{"wmclass": "ssh-askpass"} {"wmclass": "ssh-askpass"}])
])
auto_fullscreen = True auto_fullscreen = True
focus_on_window_activation = "smart" focus_on_window_activation = "smart"
wmname = "LG3D" wmname = "LG3D"

View file

@ -7,6 +7,7 @@
selected-foreground: #ffffff; selected-foreground: #ffffff;
} }
#window { #window {
location: north;
width: 100%; width: 100%;
height: 24px; height: 24px;
padding: 0px; padding: 0px;
@ -25,8 +26,6 @@
#listview { #listview {
layout: horizontal; layout: horizontal;
spacing: 0px; spacing: 0px;
fixed-height: false;
dynamic: true;
lines: 100; lines: 100;
} }
#entry { #entry {

2
rcrc Normal file
View file

@ -0,0 +1,2 @@
EXCLUDES="README.md screen.png"
UNDOTTED="bin"

View file

@ -2,15 +2,12 @@
declare options=("exit declare options=("exit
i3 i3
qtile qtile
berry bspwm
openbox
dwm
alacritty alacritty
kitty kitty
picom picom
ranger ranger
qutebrowser qutebrowser
emacs
nvim nvim
tmux tmux
dunst dunst
@ -18,61 +15,39 @@ castero
redshift redshift
rofi") rofi")
choice=$(echo -e "${options[@]}"|dmenu -p "Config edit" $@) menucmd="rofi -location 2 -dmenu"
choice=$(echo -e "${options[@]}"|${menucmd} -p "Config edit" $@)
case "$choice" in case "$choice" in
exit) exit 0 ;; exit) exit 0 ;;
i3) i3)
case "$(echo -e "config\npolybar"|dmenu -p "I3wm" $@)" in case "$(echo -e "config\npolybar"|${menucmd} -p "I3wm" $@)" in
config) choice="$HOME/.config/i3/config" ;; config) choice="$HOME/.config/i3/config" ;;
polybar) choice="$HOME/.config/polybar/config" ;; polybar) choice="$HOME/.config/polybar/config" ;;
esac esac
;; ;;
qtile) qtile)
case "$(echo -e "config\nautostart"|dmenu -p "Qtile" $@)" in case "$(echo -e "config\nautostart"|${menucmd} -p "Qtile" $@)" in
config) choice="$HOME/.config/qtile/config.py" ;; config) choice="$HOME/.config/qtile/config.py" ;;
autostart) choice="$HOME/.config/qtile/autostart.sh" ;; autostart) choice="$HOME/.config/qtile/autostart.sh" ;;
esac esac
;; ;;
berry) bspwm)
case "$(echo -e "config\npolybar\nsxhkd"|dmenu -p "Berry" $@)" in case "$(echo -e "config\nsxhkd\npolybar"|${menucmd} -p "Bspwm" $@)" in
config) choice="$HOME/.config/berry/autostart" ;; config) choice="$HOME/.config/bspwm/config" ;;
polybar) choice="$HOME/.config/berry/polybar/polybar" ;; sxhkd) choice="$HOME/.config/bspwm/sxhkd" ;;
sxhkd) choice="$HOME/.config/berry/sxhkdrc" ;; polybar) choice="$HOME/.config/bspwm/polybar" ;;
esac esac
;; ;;
openbox) alacritty) choice="$HOME/.config/alacritty.yml" ;;
case "$(echo -e "config\nautostart\nmenu\ntint2"|dmenu -p "OpenBox" $@)" in
config) choice="$HOME/.config/openbox/rc.xml" ;;
autostart) choice="$HOME/.config/openbox/autostart" ;;
menu) choice="$HOME/.config/openbox/menu.xml" ;;
tint2) choice="$HOME/.config/tint2/tint2rc" ;;
esac
;;
dwm)
case "$(echo -e "config\nautostart\nbar"|dmenu -p "DWM" $@)" in
config) choice="$HOME/.config/dwm/config.def.h " ;;
autostart) choice="$HOME/.config/dwm/autostart.sh" ;;
bar) choice="$HOME/.script/dwmbar.sh" ;;
esac
;;
alacritty) choice="$hoME/.config/alacritty.yml" ;;
kitty) choice="$HOME/.config/kitty/kitty.conf" ;; kitty) choice="$HOME/.config/kitty/kitty.conf" ;;
picom) choice="$HOME/.config/picom.conf" ;; picom) choice="$HOME/.config/picom.conf" ;;
ranger) choice="$HOME/.config/ranger/rc.conf" ;; ranger) choice="$HOME/.config/ranger/rc.conf" ;;
qutebrowser) qutebrowser)
case "$(echo -e "config\nquickmarks"|dmenu -p "Qutebrowser" $@)" in case "$(echo -e "config\nquickmarks"|${menucmd} -p "Qutebrowser" $@)" in
config) choice="$HOME/.config/qutebrowser/config.py" ;; config) choice="$HOME/.config/qutebrowser/config.py" ;;
quickmarks) choice="$HOME/.config/qutebrowser/quickmarks" ;; quickmarks) choice="$HOME/.config/qutebrowser/quickmarks" ;;
esac esac
;; ;;
emacs)
case "$(echo -e "config\ncustom\ninit\npackages"|dmenu -p "Doom emacs" $@)" in
config) choice="$HOME/.doom.d/config.el" ;;
init) choice="$HOME/.doom.d/init.el" ;;
custom) choice="$HOME/.doom.d/custom.el" ;;
packages) choice="$HOME/.doom.d/packages.el" ;;
esac
;;
nvim) choice="$HOME/.config/nvim/init.vim" ;; nvim) choice="$HOME/.config/nvim/init.vim" ;;
tmux) choice="$HOME/.tmux.conf" ;; tmux) choice="$HOME/.tmux.conf" ;;
dunst) choice="$HOME/.config/dunst/dunstrc" ;; dunst) choice="$HOME/.config/dunst/dunstrc" ;;
@ -80,11 +55,10 @@ case "$choice" in
castero) choice="$HOME/.config/castero/castero.conf" ;; castero) choice="$HOME/.config/castero/castero.conf" ;;
redshift) choice="$HOME/.config/redshift.conf" ;; redshift) choice="$HOME/.config/redshift.conf" ;;
rofi) rofi)
case "$(echo -e "config\nnten-dmenu"|dmenu -p "Rofi" $@)" in case "$(echo -e "config\nnten-dmenu"|${menucmd} -p "Rofi" $@)" in
config) choice="$HOME/.config/rofi/config" ;; config) choice="$HOME/.config/rofi/config" ;;
nten-dmenu) choice="$HOME/.config/rofi/themes/nten-dmenu.rasi" ;; nten-dmenu) choice="$HOME/.config/rofi/themes/nten-dmenu.rasi" ;;
esac esac
;; ;;
esac esac
alacritty -e nvim "$choice" alacritty -e nvim "$choice"
# emacsclient -c -a emacs "$choice"

17
script/dmenu/dmenu-pass.sh Executable file
View file

@ -0,0 +1,17 @@
#!/bin/sh
shopt -s nullglob globstar
menucmd="rofi -location 2 -dmenu"
prefix=${PASSWORD_STORE_DIR-~/.password-store}
password_files=( "$prefix"/**/*.gpg )
password_files=( "${password_files[@]#"$prefix"/}" )
password_files=( "${password_files[@]%.gpg}" )
password=$(printf '%s\n' "${password_files[@]}"|${menucmd} -p "Passwords" "$@")
[[ -n $password ]] || exit
if [[ $typeit -eq 0 ]]; then
pass show -c "$password" 2>/dev/null
else
pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } |
xdotool type --clearmodifiers --file -
fi

View file

@ -4,23 +4,24 @@ Lock
Logout Logout
Reboot") Reboot")
choice=$(echo -e "${options[@]}"|dmenu -p "Power" $@) menucmd="rofi -location 2 -dmenu"
choice=$(echo -e "${options[@]}"|${menucmd} -p "Power" $@)
case "$choice" in case "$choice" in
"ShutDown") "ShutDown")
case "$(echo -e "Yes\nNo"|dmenu -p "ShutDown" $@)" in case "$(echo -e "Yes\nNo"|${menucmd} -p "ShutDown" $@)" in
"Yes") exec systemctl poweroff ;; "Yes") exec systemctl poweroff ;;
"No") exec exit 0 ;; "No") exec exit 0 ;;
esac esac
;; ;;
"Lock") exec betterlockscreen --off 300 -t "Computer is lockerd" -l ;; "Lock") exec betterlockscreen --off 300 -t "Computer is lockerd" -l ;;
"Logout") "Logout")
case "$(echo -e "Yes\nNo"|dmenu -p "ShutDown" $@)" in case "$(echo -e "Yes\nNo"|${menucmd} -p "ShutDown" $@)" in
"Yes") exec loginctl terminate-session $XDG_SESSION_ID ;; "Yes") exec loginctl terminate-session $XDG_SESSION_ID ;;
"No") exec exit 0 ;; "No") exec exit 0 ;;
esac esac
;; ;;
"Reboot") "Reboot")
case "$(echo -e "Yes\nNo"|dmenu -p "Reboot" $@)" in case "$(echo -e "Yes\nNo"|${menucmd} -p "Reboot" $@)" in
"Yes") exec systemctl reboot ;; "Yes") exec systemctl reboot ;;
"No") exec exit 0 ;; "No") exec exit 0 ;;
esac esac

View file

@ -1,25 +0,0 @@
#!/bin/sh
getDate() {
local date="$(date +%d.%m.%Y)"
echo "${date}"
}
getTime() {
local time="$(date +%H:%M)"
echo "${time}"
}
getVolume() {
local volume="$(amixer get Master | tail -n1 | sed -r 's/.*\[(.*)%\].*/\1/')"
echo "${volume}"
}
getKeyLayout() {
case "$(xkblayout)" in
"Eng") echo " us" ;;
"Rus") echo " ru" ;;
"Ukr") echo " ua" ;;
esac
}
while true; do
xsetroot -name " $(getVolume) | $(getKeyLayout) | $(getTime) | $(getDate)"
sleep 0
done

View file

@ -1,9 +0,0 @@
#!/bin/sh
if [ $(pgrep polybar) ]
then
polybar i3bar >/dev/null
# ~/.config/i3/bar.sh
else
killall -q polybar
pkill polybar
fi

View file

@ -0,0 +1,7 @@
#!/bin/sh
WALLPATH="~/Pictures/wallp"
while true; do
feh --randomize --bg-scale $WALLPATH
sleep 900
done

View file

@ -1,6 +1,5 @@
#!/bin/sh #!/bin/sh
LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' | LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' |
while read snapname revision while read snapname revision; do
do
sudo snap remove "$snapname" --revision="$revision" sudo snap remove "$snapname" --revision="$revision"
done done

View file

@ -35,3 +35,11 @@ set -g status-style fg=colour110
set -g pane-border-style fg=colour240 set -g pane-border-style fg=colour240
set -g pane-active-border-style fg=colour39 set -g pane-active-border-style fg=colour39
set-window-option -g window-status-current-style fg=colour39 set-window-option -g window-status-current-style fg=colour39
# VIM tmux navigation
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"