diff --git a/README.md b/README.md index 14d03b9..09948f9 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,21 @@

dotfiles

+![](./config/qtile/screen.png) +------------------------------ + #### System configuration -- `OS` Manjaro -- `WM` Openbox, berry, i3-gaps, qtile, spectrwm -- `Shell` zsh, fish +- `OS` Arch +- `WM` Qtile +- `Terminal` Kitty +- `Shell` zsh - `Editor` nvim -- `Browser` firefox, qutebowser, chromium +- `Browser` firefox - `Font` Jatbrains Mono - `Icon font` FontAwesome5 - `Launcher` dmenu, rofi - #### Install configs -Since i use **rcm** set it +Since i use **[rcm](https://github.com/thoughtbot/rcm)** set it ~~~bash yay -S rcm ~~~ diff --git a/config/nvim/README.md b/config/nvim/README.md new file mode 100644 index 0000000..815b910 --- /dev/null +++ b/config/nvim/README.md @@ -0,0 +1,26 @@ +# nvim + +![](screen.png) +--------------- + +To manage plugins, I use [vim plug](https://github.com/junegunn/vim-plug). I use the following plugins: +- `nten16.vim`: Colorschemes +- `lightline`: Status bar +- `vim-indent-guides`: Visually displaying indent levels +- `vim-easymotion`: Fast navigation +- `nerdtree`: File manager +- `vim-devicons`: Icons for nerdtree +- `ctrlp.vim`: File saecher +- `auto-pairs`: Close brackets, parens, quotes +- `coc.nvim`: Instant completion +- `emmet-vim`: Emmet :D +- `vim-javascript`: Syntax support for JS +- `i3-vim-syntax`: Syntax support for i3 +- `sxhkd-vim`: Syntax support for sxhkd +- `vim-scheme`: Syntax support for scheme +- `scss-syntax.vim`: Syntax support for scss +- `vim-fist`: Syntax support for fish +- `vim-css-color`: Color name highlighter +- `vim-markdown`: Syntax support for fish +- `markdown-preview.nvim`: Preview markdown in real-time +- `vim-table-mode`: Automatic markdown table creator & formatter diff --git a/config/nvim/init.vim b/config/nvim/init.vim index 439fba3..b1fc78e 100644 --- a/config/nvim/init.vim +++ b/config/nvim/init.vim @@ -1,8 +1,8 @@ call plug#begin('~/.vim/plugged') - Plug 'overcache/NeoSolarized' - Plug 'ericbn/vim-solarized' Plug 'ryanoasis/vim-devicons' Plug 'itchyny/lightline.vim' + Plug 'nathanaelkane/vim-indent-guides' + Plug 'Smirnov-O/nten16.vim' Plug 'iamcco/markdown-preview.nvim' Plug 'dhruvasagar/vim-table-mode' Plug 'easymotion/vim-easymotion' @@ -17,10 +17,10 @@ call plug#begin('~/.vim/plugged') " Language support Plug 'pangloss/vim-javascript', { 'for': 'javascript' } - Plug 'pearofducks/ansible-vim', { 'for': 'ansible' } Plug 'PotatoesMaster/i3-vim-syntax', { 'for': 'i3' } Plug 'kovetskiy/sxhkd-vim', { 'for': 'sxhkd' } Plug 'mattn/emmet-vim', { 'on': 'Emmet' } + Plug 'Olical/vim-scheme', { 'for': 'scheme' } Plug 'cakebaker/scss-syntax.vim', { 'for': 'scss' } Plug 'dag/vim-fish', { 'for': 'fish' } Plug 'plasticboy/vim-markdown', { 'for': 'markdown' } @@ -70,14 +70,14 @@ set visualbell t_vb= set termguicolors set background=dark -colorscheme NeoSolarized +colorscheme nten16 " == Plugins configure " Lightline set noshowmode let g:lightline = { -\ 'colorscheme': 'selenized_dark', +\ 'colorscheme': 'nten16', \ 'active': { \ 'left': [ [ 'mode', 'paste' ], \ [ 'readonly', 'modified' ] ], @@ -113,8 +113,11 @@ map :CtrlP imap :CtrlP nmap :CtrlP +" Indent guides +let g:indent_guides_enable_on_vim_startup = 1 + " == Maping -imap fd +"imap fd let mapleader="," " Change window diff --git a/config/nvim/screen.png b/config/nvim/screen.png new file mode 100644 index 0000000..656b60c Binary files /dev/null and b/config/nvim/screen.png differ diff --git a/config/polybar/scripts/updates-pacman-aur.sh b/config/polybar/scripts/updates-pacman-aur.sh index cde0a24..fa05565 100755 --- a/config/polybar/scripts/updates-pacman-aur.sh +++ b/config/polybar/scripts/updates-pacman-aur.sh @@ -12,7 +12,6 @@ if ! updates_aur=$(yay -Qum 2> /dev/null | wc -l); then fi updates=$(("$updates_arch" + "$updates_aur")) - if [ "$updates" -gt 0 ]; then echo " $updates" else diff --git a/config/polybar/scripts/weather.py b/config/polybar/scripts/weather.py index eefe3c5..6e511cd 100755 --- a/config/polybar/scripts/weather.py +++ b/config/polybar/scripts/weather.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # -*- encoding: utf-8 -*- -import requests, os +import requests +import os API_KEY = os.getenv("OWM_POLYBAR") diff --git a/config/qtile/README.md b/config/qtile/README.md index 5eccf12..6e22c9b 100644 --- a/config/qtile/README.md +++ b/config/qtile/README.md @@ -1,13 +1,13 @@ # Qtile config -![Screenhot](screen.png) ------------------------- +![](screen.png) +--------------- ### Install ----------- ~~~shell sudo pacman -S qtile -yay -S kbdd-git +yay -S xkblayout ~~~ ### Autostart @@ -17,12 +17,11 @@ setxkbmap "us,ru,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 nitrogen --restore picom -b -kbdd ~~~~ ### Keybindings | Hotkey | Action | -| -------------- | --------------- | +| --- | --- | | MOD + RETURN | Open termianl | | MOD + SHIFT + RETURN | Open program launcher(rofi) | | MOD + r | Open qtile spawn menu | diff --git a/config/qtile/autostart.sh b/config/qtile/autostart.sh index e195208..5d8260a 100755 --- a/config/qtile/autostart.sh +++ b/config/qtile/autostart.sh @@ -3,4 +3,3 @@ setxkbmap "us,ru,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & nitrogen --restore & picom -b & -kbdd & diff --git a/config/qtile/config.py b/config/qtile/config.py index 6b5cdb8..d8d42b4 100644 --- a/config/qtile/config.py +++ b/config/qtile/config.py @@ -2,6 +2,7 @@ from libqtile import bar, layout, widget, hook from libqtile.config import Click, Drag, Group, Key, Screen from libqtile.lazy import lazy from typing import List +import kblayout import os @@ -29,7 +30,6 @@ color = [ @hook.subscribe.startup_once def autostart(): os.system("~/.config/qtile/autostart.sh") - keys = [ # Applications Key([mod], "Return", @@ -88,7 +88,6 @@ keys = [ ), Key([mod, "control"], "h", lazy.layout.grow_left(), - #lazy.layout.grow()), desc="Resize focus window(left)" ), Key([mod, "control"], "j", @@ -101,7 +100,6 @@ keys = [ ), Key([mod, "control"], "l", lazy.layout.grow_right(), - #lazy.layout.shrink() desc="Resize focus window(right)" ), @@ -135,12 +133,12 @@ keys = [ # Menus(dmenu or/and rofi) Key([mod, "shift"], "Return", - lazy.spawn("j4-dmenu-desktop --dmenu=\"dmenu -h 24 -p Run\""), - desc="(j4-dmenu) Program launcher" + lazy.spawn("rofi -show drun"), + desc="(Rofi) Program launcher" ), Key([mod, "shift"], "apostrophe", - lazy.spawn("dmenu_run -h 24 -p Run"), - desc="(Dmenu) Program launcher" + lazy.spawn("rofi -show run"), + desc="(Rofi) Program launcher" ), Key([mod],"Escape", lazy.spawn(f"/home/{user}/.script/dmenu/dmenu-power.sh"), @@ -243,11 +241,10 @@ screens = [Screen(top=bar.Bar([ ), widget.Prompt(foreground=color[0]), widget.WindowName(foreground=color[0]), - widget.KeyboardKbdd( + kblayout.KBLayout( foreground=color[5], - configured_keyboards=["us", "ru", "ua"], update_interval=0, - fmt=" {}", + fmt=" {}" ), widget.CurrentLayout( foreground=color[8] @@ -285,21 +282,23 @@ main = None follow_mouse_focus = True bring_front_click = False cursor_warp = False -floating_layout = layout.Floating(float_rules=[ - {"wmclass": "confirm"}, - {"wmclass": "dialog"}, - {"wmclass": "download"}, - {"wmclass": "error"}, - {"wmclass": "file_progress"}, - {"wmclass": "notification"}, - {"wmclass": "splash"}, - {"wmclass": "toolbar"}, - {"wmclass": "confirmreset"}, - {"wmclass": "makebranch"}, - {"wmclass": "maketag"}, - {"wname": "branchdialog"}, - {"wname": "pinentry"}, - {"wmclass": "ssh-askpass"}, +floating_layout = layout.Floating( + **layout_theme, + float_rules=[ + {"wmclass": "confirm"}, + {"wmclass": "dialog"}, + {"wmclass": "download"}, + {"wmclass": "error"}, + {"wmclass": "file_progress"}, + {"wmclass": "notification"}, + {"wmclass": "splash"}, + {"wmclass": "toolbar"}, + {"wmclass": "confirmreset"}, + {"wmclass": "makebranch"}, + {"wmclass": "maketag"}, + {"wname": "branchdialog"}, + {"wname": "pinentry"}, + {"wmclass": "ssh-askpass"}, ]) auto_fullscreen = True focus_on_window_activation = "smart" diff --git a/config/qtile/icons/layout-columns.png b/config/qtile/icons/layout-columns.png new file mode 100644 index 0000000..74ccd08 Binary files /dev/null and b/config/qtile/icons/layout-columns.png differ diff --git a/config/qtile/icons/layout-monadtall.png b/config/qtile/icons/layout-monadtall.png deleted file mode 100644 index cf84fb8..0000000 Binary files a/config/qtile/icons/layout-monadtall.png and /dev/null differ diff --git a/config/qtile/kblay.sh b/config/qtile/kblay.sh new file mode 100755 index 0000000..0fb76dc --- /dev/null +++ b/config/qtile/kblay.sh @@ -0,0 +1,6 @@ +#/bin/sh +case "$(xkblayout)" in + "Eng") echo "us" ;; + "Rus") echo "ru" ;; + "Ukr") echo "ua" ;; +esac diff --git a/config/qtile/kblayout.py b/config/qtile/kblayout.py new file mode 100644 index 0000000..d732be2 --- /dev/null +++ b/config/qtile/kblayout.py @@ -0,0 +1,23 @@ +from libqtile.widget import base +import os + + +class KBLayout(base.InLoopPollText): + """Widget for displaying the current keyboard layout + It requires setxkbmap and xkblayout""" + orientations = base.ORIENTATION_HORIZONTAL + defaults = [ + ("background", "#000000", "Backbround color"), + ("foreground", "#ffffff", "Foreground color"), + ] + + def __init__(self, **config): + base.InLoopPollText.__init__(self, **config) + + def get_keyboard(self): + kb = os.popen("xkblayout").read().rstrip("\n") + return kb + + def poll(self): + kb = os.popen(".config/qtile/kblay.sh").read().rstrip('\n').encode('utf-8').decode('utf-8') + return kb diff --git a/config/ranger/rc.conf b/config/ranger/rc.conf index 8d9f1f7..7d0cded 100644 --- a/config/ranger/rc.conf +++ b/config/ranger/rc.conf @@ -24,9 +24,8 @@ set vcs_msg_length 30 ### Preview set preview_images true -set preview_images_method ueberzug -set w3m_delay 0.02 -set w3m_offset 0 +set preview_images_method kitty +#set preview_images_method ueberzug set unicode_ellipsis false set bidi_support false @@ -89,26 +88,33 @@ set nested_ranger_warning true # Command Aliases in the Console ################################# +map E edit +map F set freeze_files! + # "a" key map a rename_append -map a map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%")) +map as shell zip -rf 'file.zip' %s +map ad shell tar -czvf file.tar.gz %s +map az extract +map ax extract_to_dirs +map ac compress +# "q"/quit keys +map Q quitall +map q quit +map abort - -map ex extract -map ed extract_to_dirs -map ec compress - -alias e edit +# quit alias +alias q quit alias q quit alias q! quit! alias qa quitall alias qa! quitall! -alias qall quitall -alias qall! quitall! alias setl setlocal +alias e edit +# scout alias alias filter scout -prts alias find scout -aets alias mark scout -mr @@ -117,17 +123,14 @@ alias search scout -rs alias search_inc scout -rts alias travel scout -aefklst -map Q quitall -map q quit -copymap q ZZ ZQ - +# Restart/reload fm map R reload_cwd -map F set freeze_files! map reset -map redraw_window -map abort -map change_mode normal + +# Modes map ~ set viewmode! +map redraw_window +map change_mode normal map i display_file map scroll_preview 1 @@ -158,9 +161,6 @@ map Ms linemode sizemtime map MH linemode sizehumanreadablemtime map Mt linemode metatitle -map t tag_toggle -map ut tag_remove -map " tag_toggle tag=%any map mark_files toggle=True map v mark_files all=True toggle=True map uv mark_files all=True val=False @@ -201,15 +201,23 @@ map } traverse map { traverse_backwards map ) jump_non +# Go keys map gh cd ~ -map gr cd / -map gd cd ~/code +map gd cd ~/Code +map gd cd ~/Documents +map gb cd ~/Documents/Books +map dl cd ~/.dotfiles -map E edit -map cw console rename%space -map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7) + +# File keys +map dD shell mv %s /home/${USER}/.local/share/Trash/files/ +map dd cut +map ud uncut +map da cut mode=add +map dr cut mode=remove +map dt cut mode=toggle map pp paste map po paste overwrite=True map pP paste append=True @@ -222,15 +230,6 @@ map pd console paste dest= map p` paste dest=%any_path map p' paste dest=%any_path -#map dD console delete -map dD shell mv %s /home/${USER}/.local/share/Trash/files/ -map dT console trash - -map dd cut -map ud uncut -map da cut mode=add -map dr cut mode=remove -map dt cut mode=toggle map yy copy map uy uncut @@ -247,6 +246,7 @@ map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier) map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier) map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier) +# Search keys map / console search%space map n search_next map N search_next forward=False @@ -257,16 +257,18 @@ map cc search_next order=ctime map cm search_next order=mtime map ca search_next order=atime +# Tab keys map tab_new map tab_close map tab_move 1 map tab_move -1 map tab_move 1 map tab_move -1 -map gt tab_move 1 -map gT tab_move -1 -map gn tab_new -map gc tab_close +map tn tab_new +map tc tab_close +map tt tag_toggle +map ut tag_remove +map " tag_toggle tag=%any map uq tab_restore map tab_open 1 map tab_open 2 diff --git a/config/rofi/config b/config/rofi/config index d0cd329..8e2bb63 100644 --- a/config/rofi/config +++ b/config/rofi/config @@ -1,4 +1,7 @@ -rofi.theme: solarized +rofi.theme: nten-dmenu rofi.font: Jetbarains Mono 12 rofi.auto-select: false rofi.hide-scrollbar: true +rofi.drun-display-format: {name} +rofi.display-drun: Run +rofi.display-run: Run diff --git a/config/rofi/themes/nten-dmenu.rasi b/config/rofi/themes/nten-dmenu.rasi new file mode 100644 index 0000000..b224b42 --- /dev/null +++ b/config/rofi/themes/nten-dmenu.rasi @@ -0,0 +1,40 @@ +* { + background-color: #262A2B; + text-color: #93A1A1; + font: "Hack 9"; + prompt-padding: 4px; + selected-background: #008DCD; + selected-foreground: #ffffff; +} +#window { + location: north; + width: 100%; + height: 24px; + padding: 0px; + children: [ horibox ]; +} +#horibox { + orientation: horizontal; + children: [ prompt, entry, listview ]; +} +#prompt { + padding: @prompt-padding; + background-color: @selected-background; + text-color: @selected-foreground; + font: @font; +} +#listview { + layout: horizontal; + spacing: 0px; + lines: 100; +} +#entry { + padding: 4px 4px; + expand: false; + width: 170px; +} +#element { padding: 4px 8px; } +#element selected { + background-color: @selected-background; + text-color: @selected-foreground; +} diff --git a/config/rofi/solarized.rasi b/config/rofi/themes/solarized.rasi similarity index 100% rename from config/rofi/solarized.rasi rename to config/rofi/themes/solarized.rasi diff --git a/zshrc b/zshrc index f0d0cfc..65c1c83 100644 --- a/zshrc +++ b/zshrc @@ -1,4 +1,5 @@ -export ZSH="/home/sasha/.oh-my-zsh" +export ZSH="$HOME/.oh-my-zsh" +export PATH="$HOME/bin:$PATH" source ~/.env source ~/.profile @@ -41,3 +42,6 @@ alias .6="cd ../../../../../.." alias tozsh="chsh -s /bin/zsh && echo 'Now log out.'" alias tofish="chsh -s /bin/fish && echo 'Now log out.'" alias tobash="chsh -s /bin/bash && echo 'Now log out.'" + +### Pfetch ### +pfetch