From 07805d44aa3c3f35866164242baaaad3fa20a745 Mon Sep 17 00:00:00 2001 From: Smirnov Olexandr Date: Wed, 11 Nov 2020 22:48:06 +0200 Subject: [PATCH] :art: Update config --- README.md | 8 +- bashrc | 18 +- config/bspwm/bspwmrc | 40 --- config/fish/config.fish | 22 ++ config/fish/functions/fish_prompt.fish | 1 + config/i3/config | 96 ++++---- config/nvim/init.vim | 47 +++- config/picom.conf | 8 +- config/polybar/config | 58 ++--- config/qtile/autostart.sh | 5 + config/qtile/config.py | 167 +++++++++++++ config/qutebrowser/autoconfig.yml | 88 ------- config/qutebrowser/config.py | 101 ++++++-- config/ranger/plugins/devicons.py | 323 +++++++++++++++++++++++++ config/sxhkd/sxhkdrc | 53 ---- scripts/change-shell.sh | 12 +- scripts/confert-mp4-to-mp3.sh | 2 - scripts/dmenu/dmenu-config-edit.sh | 52 ++-- scripts/dmenu/dmenu-power.sh | 47 ++++ scripts/dmenu/dmenu-sysmon.sh | 17 ++ scripts/gitpush.sh | 5 - scripts/manjaro-fetch.sh | 0 scripts/sceenshot.sh | 9 - scripts/snap-remove-old-pkg.sh | 3 +- scripts/targz-current_folder.sh | 3 - scripts/targz-folder.sh | 3 - scripts/walpapper-changer.sh | 0 zshrc | 72 +++--- 28 files changed, 845 insertions(+), 415 deletions(-) delete mode 100755 config/bspwm/bspwmrc create mode 100644 config/fish/config.fish create mode 120000 config/fish/functions/fish_prompt.fish create mode 100755 config/qtile/autostart.sh create mode 100644 config/qtile/config.py delete mode 100644 config/qutebrowser/autoconfig.yml create mode 100644 config/ranger/plugins/devicons.py delete mode 100644 config/sxhkd/sxhkdrc mode change 100644 => 100755 scripts/change-shell.sh delete mode 100644 scripts/confert-mp4-to-mp3.sh create mode 100755 scripts/dmenu/dmenu-power.sh create mode 100755 scripts/dmenu/dmenu-sysmon.sh delete mode 100644 scripts/gitpush.sh mode change 100644 => 100755 scripts/manjaro-fetch.sh delete mode 100644 scripts/sceenshot.sh mode change 100644 => 100755 scripts/snap-remove-old-pkg.sh delete mode 100644 scripts/targz-current_folder.sh delete mode 100644 scripts/targz-folder.sh mode change 100644 => 100755 scripts/walpapper-changer.sh diff --git a/README.md b/README.md index 8a6578b..e284923 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,12 @@ __walpappers: [Dropbox](https://www.dropbox.com/s/yx7tsplowtyih7f/walpapper.zip? **Preparing for installation** ~~~bash -curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh) && chsh -s $(which zsh) +curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh git clone https://github.com/Smirnov-O/zsh-simple-colors ~/.oh-my-zsh/custom/themes +curl -L https://get.oh-my.fish | fish sudo pacman -S i3-wm bspwm polybar dunst rofi picom feh nitrogen redshift task \ -kitty ranger htop bash zsh git vim neofetch scrot clipboard yay bash zsh \ +kitty ranger htop bash zsh git vim neofetch scrot clipboard yay bash zsh python-tldextract \ ttf-font-awesome ttf-jetbrains-mono ttf-hack yay -S ttf-weather-icons ~~~ @@ -16,7 +17,7 @@ yay -S ttf-weather-icons ### Packages | Name | Description | | ------------------------------------------------------------------------ | ----------------- | -| `i3-wm`, `bspwm` | Window Manager | +| `i3-wm`, `qtile` | Window Manager | | `polybar` | Panel | | `dunst` | Notify manager | | `rofi` | Program loncher | @@ -34,4 +35,3 @@ yay -S ttf-weather-icons | `arc-gtk-theme` | GTK theme | | `papirus-icon-theme` | Icon theme | | `scrot` | Screenshot tool | -| `clipmenu` | Clipboard manager | diff --git a/bashrc b/bashrc index 26482fe..0869ff2 100644 --- a/bashrc +++ b/bashrc @@ -1,9 +1,21 @@ [[ $- != *i* ]] && return PS1='\e[36m\w\e[39m ' -source ~/.profile +export EDITOR='nvim' +export VISUAL='emacsclient -c -a emacs' +export TERM='kitty' -alias ls='ls --color=auto' alias cls='clear' +alias ls='ls --color=auto' +alias :q="exit" + alias ..='cd ..' -alias py='python3' +alias ...='cd ../..' +alias .3='cd ../../..' +alias .4='cd ../../../..' +alias .5='cd ../../../../..' +alias .6='cd ../../../../../..' + +alias tofish="chsh -s /bin/fish && echo 'Now log out.'" +alias tozsh="chsh -s /bin/zsh && echo 'Now log out.'" +alias tobash="chsh -s /bin/bash && echo 'Now log out.'" diff --git a/config/bspwm/bspwmrc b/config/bspwm/bspwmrc deleted file mode 100755 index 9232f4f..0000000 --- a/config/bspwm/bspwmrc +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/sh - -###### Auto start ##### -setxkbmap "us,ru,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" & -sxhkd & -nmcli radio wifi on; nmcli device wifi connect Pechenka password 24032006 name net & -picom -b & -polybar test & -feh --randomize --bg-scale ~/Изображения/Walpapper/* & -# redshift-gtk & - - -###### BSPWM ##### -bspc monitor -d I II III IV V VI VII VIII IX X - -#bspc config border_radius 8 -bspc config border_width 2 -bspc config window_gap 10 -bspc config top_padding 20 -bspc config bottom_padding 0 -bspc config left_padding 0 -bspc config right_padding 0 -bspc config single_monocle false -bspc config click_to_focus true -bspc config split_ratio 0.50 -bspc config borderless_monocle true -bspc config gapless_monocle true -bspc config focus_by_distance true -bspc config focus_follows_pointer true -bspc config history_aware_focus true -bspc config remove_disabled_monitors true -bspc config merge_overlapping_monitors true -bspc config pointer_modifier mod4 -bspc config pointer_action1 move -bspc config pointer_action2 resize_side -bspc config pointer_action3 resize_corner - -####### Rules ###### -bspc rule -a Thunar desktop='^4' -bspc rule -a Qutebrowser desktop='^2' diff --git a/config/fish/config.fish b/config/fish/config.fish new file mode 100644 index 0000000..9aceb20 --- /dev/null +++ b/config/fish/config.fish @@ -0,0 +1,22 @@ +#source ~/.env +set PATH $PATH ~/.local/bin +set fish_greeting + +### VARIABLES ### +export EDITOR="nvim" +export VISUAL="emacsclient -c -a emacs" +export TERM="kitty" + +### ALIASES ### +alias cls='clear' +alias :q='exit' + +alias ..='cd ..' +alias ...='cd ../..' +alias .3='cd ../../..' +alias .4='cd ../../../..' +alias .5='cd ../../../../..' + +alias tobash="chsh -s /bin/bash && echo 'Now log out.'" +alias tozsh="chsh -s /bin/zsh && echo 'Now log out.'" +alias tofish="chsh -s /bin/fish && echo 'Now log out.'" diff --git a/config/fish/functions/fish_prompt.fish b/config/fish/functions/fish_prompt.fish new file mode 120000 index 0000000..556e6e5 --- /dev/null +++ b/config/fish/functions/fish_prompt.fish @@ -0,0 +1 @@ +/home/sasha/.config//omf/themes/scyanm/fish_prompt.fish \ No newline at end of file diff --git a/config/i3/config b/config/i3/config index cae15ea..193efd2 100644 --- a/config/i3/config +++ b/config/i3/config @@ -17,9 +17,9 @@ hide_edge_borders smart ############ Autostart ############ exec --no-startup-id exec picom -b -exec --no-startup-id exec nmcli radio wifi on; nmcli device wifi connect password name net +exec --no-startup-id exec nmcli radio wifi on; nmcli device wifi connect Pechenka password 24032006 name net exec --no-startup-id exec redshift-gtk -exec --no-startup-id exec nitrogen +exec --no-startup-id exec nitrogen --restore exec --no-startup-id exec setxkbmap "us,ru,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" exec --no-startup-id exec org.telegram.desktop #exec --no-startup-id exec discord @@ -27,60 +27,51 @@ exec_always --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-ag exec_always --no-startup-id $HOME/.config/polybar/launch.sh ############ Key bindings ######### - -# Open terminal +# Kill focus window +bindsym $mod+q kill +# Restart i3wm +bindsym $mod+Shift+r restart +# Terminal bindsym $mod+Return exec kitty -bindsym $mod+ctrl+Return exec kitty -T=Terminal-floating +# Focus the parent container +bindsym $mod+a focus parent +# Floating window +bindsym $mod+Shift+space floating toggle +# Fullscreen mode +bindsym $mod+F11 fullscreen toggle + +# Load program +bindsym $mod+F2 exec qutebrowser + + + +# Program/Exit/Window switch/Clipboard +bindsym $mod+r exec "i3-dmenu-desktop --dmenu='dmenu -h 24 -p Run'" +bindsym $mod+space exec "rofi -show drun -show cobi -show-icons" +bindsym $mod+Shift+Return exec "dmenu_run -h 24 -p Run" + +bindsym $mod+Escape exec "~/.script/dmenu/dmenu-power.sh" +bindsym $mod+Control+u exec ~/.script/dmenu/dmenu-config-edit.sh +bindsym $mod+Control+i exec passmenu -h 24 -p Passwords -# Window switcher bindsym $mod+Tab exec "rofi -show window -show-icons" bindsym $alt+Tab exec "rofi -show window -show-icons" -# Kill focus window -bindsym $mod+q kill - -# Program/Exit louncher -bindsym $mod+space exec "rofi -show drun -show cobi -show-icons" -bindsym $mod+Escape exec "rofi -show power-menu -width 30 -lines 6 -modi power-menu:~/.config/rofi/rofi-power-menu" - -bindsym $mod+$alt+u exec ~/.script/dmenu/dmenu-config-edit.sh -bindsym $mod+$alt+i exec "rofi-keepassxc -d ~/Документы/text.kdbx" - -# Restart i3wm -bindsym $mod+Shift+r restart +bindsym $mod+c exec "CM_LAUNCHER=rofi clipmenu" # Sceenshot bindsym --release Print exec "scrot -s /home/${USER}/$(date +%Y-%m-%d-%H-%M-%S).png" bindsym --release Shift+Print exec "scrot /home/${USER}/$(date +%Y-%m-%d-%H-%M-%S).png" -# Clipboard menu -bindsym $mod+c exec "CM_LAUNCHER=rofi clipmenu" - # Volume bindsym $mod+plus exec "pactl set-sink-volume alsa_output.pci-0000_00_1b.0.analog-stereo +5%" bindsym $mod+minus exec "pactl set-sink-volume alsa_output.pci-0000_00_1b.0.analog-stereo -5%" bindsym $mod+Shift+minus exec "pactl set-sink-mute alsa_output.pci-0000_00_1b.0.analog-stereo toggle" -# Load program -bindsym $mod+F1 exec kitty -T=Ranger_FM ranger -bindsym $mod+F2 exec qutebrowser -bindsym $mod+F3 exec subl -bindsym $mod+F4 exec notable - -# Floating window -bindsym $mod+Shift+space floating toggle - -# Fullscreen mode -bindsym $mod+f fullscreen toggle -bindsym $mod+F11 fullscreen toggle - # Splits -bindsym $mod+h split h +bindsym $mod+b split h bindsym $mod+v split v -# Focus the parent container -bindsym $mod+a focus parent - # Change container layout(stacked, tabbed, toggle split) bindsym $mod+s layout stacking bindsym $mod+w layout tabbed @@ -91,7 +82,7 @@ bindsym $mod+Shift+grave move scratchpad bindsym $mod+grave scratchpad show, floating disable ######### Window preferens ######## -#assign [class="(?i)kitty"] $ws1 +assign [class="Kitty"] $ws1 #assign [class="(?i)chromium|firefox|qutebrowser"] $ws2 #assign [class="(?i)subl|code|emacs"] $ws3 #assign [class="(?i)thunar"] $ws4 @@ -99,7 +90,7 @@ bindsym $mod+grave scratchpad show, floating disable assign [class="(?i)telegram|discord|viber"] $ws6 assign [title="KeePassXC"] $ws7 #for_window [title="Ranger_FM"] move to workspace $ws4 -#for_window [class="Spotify"] move to workspace $ws10 +#for_window [class="Spotify"] move to workspace $ws9 for_window [class="(?i)mousepad"] floating enable for_window [title="Terminal-floating"] floating enable for_window [class="(?i)lxappearance|qt5ct"] floating enable @@ -109,27 +100,27 @@ for_window [urgent="lastet"] focus #focus_on_window_activation focus ############## Gaps ############### -gaps inner 4 +#gaps inner 4 #smart_gaps on ##### Change containet focus ###### -bindsym $mod+j focus left +bindsym $mod+h focus left bindsym $mod+Left focus left -bindsym $mod+k focus down +bindsym $mod+j focus down bindsym $mod+Down focus down -bindsym $mod+l focus up +bindsym $mod+k focus up bindsym $mod+Up focus up -bindsym $mod+semicolon focus right +bindsym $mod+l focus right bindsym $mod+Right focus right ##### Move focused container ###### -bindsym $mod+Shift+j move left +bindsym $mod+Shift+h move left bindsym $mod+Shift+Left move left -bindsym $mod+Shift+k move down +bindsym $mod+Shift+j move down bindsym $mod+Shift+Down move down -bindsym $mod+Shift+l move up +bindsym $mod+Shift+k move up bindsym $mod+Shift+Up move up -bindsym $mod+Shift+colon move right +bindsym $mod+Shift+l move right bindsym $mod+Shift+Right move right ############ Workspaces ########### @@ -142,7 +133,6 @@ set $ws6 "6" set $ws7 "7" set $ws8 "8" set $ws9 "9" -set $ws10 "10" bindsym $mod+1 workspace $ws1 bindsym $mod+2 workspace $ws2 @@ -153,7 +143,6 @@ bindsym $mod+6 workspace $ws6 bindsym $mod+7 workspace $ws7 bindsym $mod+8 workspace $ws8 bindsym $mod+9 workspace $ws9 -bindsym $mod+0 workspace $ws10 bindsym $mod+Shift+1 move container to workspace $ws1 bindsym $mod+Shift+2 move container to workspace $ws2 @@ -164,11 +153,10 @@ bindsym $mod+Shift+6 move container to workspace $ws6 bindsym $mod+Shift+7 move container to workspace $ws7 bindsym $mod+Shift+8 move container to workspace $ws8 bindsym $mod+Shift+9 move container to workspace $ws9 -bindsym $mod+Shift+0 move container to workspace $ws10 ########### Resize mode ########### -bindsym $mod+$alt+r mode "resize" -bindsym $mod+$alt+g mode "gaps" +bindsym $mod+Control+r mode "resize" +bindsym $mod+Control+g mode "gaps" mode "resize" { bindsym j resize shrink width 10 px or 10 ppt diff --git a/config/nvim/init.vim b/config/nvim/init.vim index 0803ea6..0bbecc8 100644 --- a/config/nvim/init.vim +++ b/config/nvim/init.vim @@ -2,7 +2,9 @@ call plug#begin('~/.vim/plugged') Plug 'overcache/NeoSolarized' Plug 'ryanoasis/vim-devicons' Plug 'itchyny/lightline.vim' - + Plug 'iamcco/markdown-preview.nvim' + Plug 'dhruvasagar/vim-table-mode' + " File manger & seacher Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } Plug 'kien/ctrlp.vim', { 'on': 'CtrlP' } @@ -10,12 +12,15 @@ call plug#begin('~/.vim/plugged') " Completion Plug 'jiangmiao/auto-pairs' Plug 'neoclide/coc.nvim', {'branch': 'release'} + Plug 'easymotion/vim-easymotion' " Language support Plug 'pangloss/vim-javascript', { 'for': 'javascript' } Plug 'PotatoesMaster/i3-vim-syntax' Plug 'vim-python/python-syntax', { 'for': 'python' } - Plug 'mattn/emmet-vim', { 'for': 'html' } + Plug 'mattn/emmet-vim', { 'on': 'Emmet' } + Plug 'cakebaker/scss-syntax.vim', { 'for': 'scss' } + Plug 'dag/vim-fish', { 'for': 'fish' } Plug 'ap/vim-css-color' call plug#end() @@ -64,7 +69,12 @@ set termguicolors set background=dark colorscheme NeoSolarized -"""" Plugins """" + +" ======================= +" == Plugins configure == +" ======================= + +"""""""" Lightline """""""" let g:lightline = { \ 'colorscheme': 'selenized_dark', \ 'active': { @@ -74,26 +84,48 @@ let g:lightline = { \ [ 'percent' ], \ [ 'filename', 'fileencoding', 'filetype' ] ] \ }, } +""""""""""""""""""""""""""" +""""""""" Nerdtree """""""" +map :NERDTreeToggle let g:NERDTreeWinPos="right" +let NERDTreeIgnore = ['__pycache__', '\.pyc$', '\.o$', '\.so$', '\.a$', '\.swp', '*\.swp', '\.swo', '\.swn', '\.swh', '\.swm', '\.swl', '\.swk', '\.sw*$', '[a-zA-Z]*egg[a-zA-Z]*', '.DS_Store'] let NERDTreeMinimalUI = 1 let NERDTreeShowLineNumbers=0 +""""""""""""""""""""""""""" +"""""""""""" Coc """""""""" inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\" +""""""""""""""""""""""""""" -"""" Maping """" +"""""""" Easymotion """"""" +let g:EasyMotion_do_mapping = 0 +let g:EasyMotion_smartcase = 1 +nmap f (easymotion-s) +map w (easymotion-bd-w) +nmap F (easymotion-overwin-line) +nmap s (easymotion-overwin-f2) +""""""""""""""""""""""""""" + +"""" MarkDown Previw """""" +let g:mkdp_path_to_chrome = "/usr/bin/qutebrowser" +""""""""""""""""""""""""""" + +" ============ +" == Maping == +" ============ let mapleader="," + +" Change window map j map k map h map l -map :NERDTreeToggle - +" Tab's noremap :tabnext noremap :tabprev - noremap :tabnew noremap :tabnew noremap :tabclose @@ -106,6 +138,5 @@ noremap 6 :tabn 6 noremap 7 :tabn 7 noremap 8 :tabn 8 noremap 9 :tabn 9 - noremap n :bnext noremap p :bprev diff --git a/config/picom.conf b/config/picom.conf index 1ded9d6..b40890a 100644 --- a/config/picom.conf +++ b/config/picom.conf @@ -6,7 +6,11 @@ shadow = true; shadow-radius = 11; shadow-offset-x = -7; shadow-offset-y = -7; -shadow-exclude = []; +shadow-exclude = [ + "class_g = 'Firefox' && argb", + "name = 'Notification'", + "class_g = 'Polybar'" +]; ############ Fading ########### @@ -22,7 +26,7 @@ frame-opacity = 0.7; inactive-opacity-override = false; #inactive-opacity-override = true; focus-exclude = []; - +#no-fading-openclose = true ##### Background-Blurring ##### blur-kern = "3x3box"; diff --git a/config/polybar/config b/config/polybar/config index 794c7d9..cda97de 100644 --- a/config/polybar/config +++ b/config/polybar/config @@ -3,38 +3,39 @@ pseudo-transparency = true [colors] ; Solarized ======== -;background = #002B36 -;foreground = #dfdfdf -;secondary = #073642 -;alert = #268bd2 +background = #002B36 +foreground = #dfdfdf +secondary = #073642 +alert = #268bd2 -; Nord ============ -background = #2E3440 -foreground = #ECEFF4 -secondary = #434C5E -alert = #88C0D0 +; Nord ============= +;background = #2E3440 +;foreground = #ECEFF4 +;secondary = #434C5E +;alert = #88C0D0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [bar/i3bar] width = 100% -height = 20 +height = 24 fixed-center = true +wm-restack = i3 ;override-redirect = true background = ${colors.background} foreground = ${colors.foreground} -line-size = 2 +line-size = 3 line-color = #000000 -padding-left = 2 -padding-right = 2 +#padding-left = 2 +#padding-right = 2 -radius = 6.0 -border-left-size = 0.2% -border-top-size = 0.2% -border-right-size = 0.2% +#radius = 6.0 +#border-left-size = 0.2% +#border-top-size = 0.2% +#border-right-size = 0.2% module-margin-left = 1 module-margin-right = 1 @@ -43,25 +44,22 @@ font-0 = Iosevka Nerd Font:style=Medium:size=8;3 font-1 = FontAwesome5Free:style=Solid:size=7.5;2.5 font-2 = Weather Icons:size=7;2 -modules-left = i3 weather title +modules-left = i3 weather modules-right = keyboard pulseaudio backlight wifi-signal time -tray-position = center +tray-position = right ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [settings] screenchange-reload = true -[global/wm] -wm-restack = i3 - [module/i3] type = internal/i3 format = -index-sort = true +index-sort = false wrapping-scroll = false label-mode-padding = 1 label-mode-foreground = #000 -label-mode-background = ${colors.secondary} +label-mode-background = ${colors.alert} label-focused = %icon% label-focused-background = ${colors.secondary} @@ -92,10 +90,8 @@ 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 -ws-icon-9 = "10;10 " -;label-separator = | +ws-icon-7 = "8;8 " +ws-icon-8 = "9;9 " ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; INCLUDE MODULES @@ -112,7 +108,7 @@ type = internal/network interface = wlp3s0 format-connected = label-connected = %essid% -format-disconnected =  No sing +format-disconnected =  No sig ramp-signal-0 =  interval = 3.0 @@ -176,7 +172,6 @@ interval = 1 format =