all repos

dotfiles @ 917b691

my dotfiles
18 files changed, 194 insertions(+), 87 deletions(-)
:memo: Add keyboard indecator for qtile, dmne theme for rofi. Update nvim, ranger
Author: Smirnov Olexandr ss2316544@gmail.com
Committed at: 2020-12-11 19:39:37 +0200
Parent: 4f3a929
M README.md

@@ -1,18 +1,21 @@

<h1 align="center">dotfiles</h1> +![](./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 ~~~
A 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
M 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 @@ Plug 'neoclide/coc.nvim', {'branch': 'release'}

" 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 <C-p> :CtrlP<CR>

imap <C-p> :CtrlP<CR> nmap <C-p> :CtrlP<CR> +" Indent guides +let g:indent_guides_enable_on_vim_startup = 1 + " == Maping -imap fd <Esc> +"imap fd <Esc> let mapleader="," " Change window
A config/nvim/screen.png

Not showing binary file.

M config/polybar/scripts/updates-pacman-aur.sh

@@ -12,7 +12,6 @@ updates_aur=0

fi updates=$(("$updates_arch" + "$updates_aur")) - if [ "$updates" -gt 0 ]; then echo " $updates" else
M 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")
M 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 |
M 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 &
M 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

@@ -28,7 +29,6 @@

@hook.subscribe.startup_once def autostart(): os.system("~/.config/qtile/autostart.sh") - keys = [ # Applications

@@ -88,7 +88,6 @@ desc="Move focus window(right)"

), Key([mod, "control"], "h", lazy.layout.grow_left(), - #lazy.layout.grow()), desc="Resize focus window(left)" ), Key([mod, "control"], "j",

@@ -101,7 +100,6 @@ desc="Resize focus window(up)"

), Key([mod, "control"], "l", lazy.layout.grow_right(), - #lazy.layout.shrink() desc="Resize focus window(right)" ),

@@ -135,12 +133,12 @@ ),

# 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 @@ foreground=color[0],

), 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"
A config/qtile/icons/layout-columns.png

Not showing binary file.

D config/qtile/icons/layout-monadtall.png

Not showing binary file.

A config/qtile/kblay.sh

@@ -0,0 +1,6 @@

+#/bin/sh +case "$(xkblayout)" in + "Eng") echo "us" ;; + "Rus") echo "ru" ;; + "Ukr") echo "ua" ;; +esac
A 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
M 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 @@ #################################

# 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 -map ex extract -map ed extract_to_dirs -map ec compress +# "q"/quit keys +map Q quitall +map q quit +map <C-c> abort -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 <C-r> reset + +# Modes +map ~ set viewmode! map <C-l> redraw_window -map <C-c> abort map <esc> change_mode normal -map ~ set viewmode! map i display_file map <A-j> 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 "<any> tag_toggle tag=%any map <Space> 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`<any> paste dest=%any_path map p'<any> 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 <C-n> tab_new map <C-w> tab_close map <TAB> tab_move 1 map <S-TAB> tab_move -1 map <A-Right> tab_move 1 map <A-Left> 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 "<any> tag_toggle tag=%any map uq tab_restore map <a-1> tab_open 1 map <a-2> tab_open 2
M 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
A 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; +}
M 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 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