all repos

dotfiles @ 246dc34d130d2b6d656dcaa382c5bb47b531b91c

i use rach linux btw
28 files changed, 303 insertions(+), 727 deletions(-)
Add BSPWM config, clean dont't use configs
Author: Smirnov Olexandr ss2316544@gmail.com
Committed at: 2021-01-22 11:27:54 +0200
Parent: ed62788
M README.md
···
        21
        21
         yay -S rcm

      
        22
        22
         ~~~

      
        23
        23
         

      
        
        24
        +Install deps:

      
        
        25
        +~~~bash

      
        
        26
        +sudo pacman -S neovim tmux git i3wm bspwm sxhkd qtile alacritty picom dunst ranger firefox ttf-font-awesome ttf-jetbrains-mono rofi zsh zathura redshift

      
        
        27
        +yay -S polybar

      
        
        28
        +pip install -U castero

      
        
        29
        +~~~

      
        
        30
        +

      
        
        31
        +

      
        24
        32
         And install configs:

      
        25
        33
         ~~~bash

      
        26
        34
         git clone https://github.com/Smirnov-O/dotfiles .dotfiles

      
        27
        35
         rcup

      
        28
        36
         mv ~/.bin ~/bin

      
        29
        
        -~~~

      
        
        37
        +~~~
      
D bin/README.md
···
        1
        
        -Scripts:

      
        2
        
        -- `arch_upd`: Update packages(pacman, aur). Only arch.

      
        3
        
        -- `extract`: Extract archive.

      
        4
        
        -- `giti`: Gitignore manager(For help exec: __giti help__).

      
        5
        
        -- `kbhl`: Enable/disable keyboard highlight scrlock.

      
        6
        
        -- `local-ip`: Get local IP addres.

      
        7
        
        -- `public-ip`: Get public IP addres.

      
A config/bspwm/bar.sh
···
        
        1
        +#!/bin/bash

      
        
        2
        +killall -q polybar

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

      
        
        4
        +polybar -c ~/.config/bspwm/polybar bar&

      
A config/bspwm/bspwmrc
···
        
        1
        +#!/bin/sh

      
        
        2
        +# Smirnov-O <ss2316544@gmail.com>

      
        
        3
        +# BSPWM config file

      
        
        4
        +

      
        
        5
        +## == Functions

      
        
        6
        +Run() {

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

      
        
        8
        +}

      
        
        9
        +

      
        
        10
        +## == Autostart

      
        
        11
        +setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" &

      
        
        12
        +Run sxhkd -c .config/bspwm/sxhkd &

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

      
        
        14
        +Run nitrogen --restore &

      
        
        15
        +Run lxsession &

      
        
        16
        +Run picom &

      
        
        17
        +

      
        
        18
        +## == BSPWM

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

      
        
        20
        +

      
        
        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

      
        
        30
        +

      
        
        31
        +# Colors

      
        
        32
        +bspc config normal_border_color   "#262A2B"

      
        
        33
        +bspc config active_border_color   "#1F2324"

      
        
        34
        +bspc config focused_border_color  "#008DCD"

      
        
        35
        +bspc config presel_feedback_color "#51AFEF"

      
        
        36
        +bspc config urgent_border_color   "#FF6C6B"

      
        
        37
        +

      
        
        38
        +# 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

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

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

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

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

      
A config/bspwm/polybar
···
        
        1
        +[settings]

      
        
        2
        +enable-ipc = true

      
        
        3
        +screenchange-reload = true

      
        
        4
        +pseudo-transparency = true

      
        
        5
        +

      
        
        6
        +[colors]

      
        
        7
        +background = #262A2B

      
        
        8
        +foreground = #DFDFDF

      
        
        9
        +secondary = #008DCD

      
        
        10
        +alert = #FF6C6B

      
        
        11
        +

      
        
        12
        +[bar/bar]

      
        
        13
        +width = 100%

      
        
        14
        +height = 24

      
        
        15
        +fixed-center = true

      
        
        16
        +background = ${colors.background}

      
        
        17
        +foreground = ${colors.foreground}

      
        
        18
        +wm-restack = bspwm

      
        
        19
        +module-margin-left = 1

      
        
        20
        +module-margin-right = 1

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

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

      
        
        23
        +modules-left = windowname

      
        
        24
        +modules-center = bspwm

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

      
        
        26
        +tray-position = right

      
        
        27
        +

      
        
        28
        +[module/bspwm]

      
        
        29
        +type = internal/bspwm

      
        
        30
        +pin-workspaces = true

      
        
        31
        +enable-click = true

      
        
        32
        +fuzzy-match = true

      
        
        33
        +enable-scroll = true

      
        
        34
        +label-focused = 

      
        
        35
        +label-focused-foreground = ${colors.secondary}

      
        
        36
        +label-focused-padding = 2

      
        
        37
        +label-occupied = 

      
        
        38
        +label-occupied-foreground = ${colors.foreground}

      
        
        39
        +label-occupied-padding = 2

      
        
        40
        +label-urgent = 

      
        
        41
        +label-urgent-foreground = ${colors.alert}

      
        
        42
        +label-urgent-padding = 2

      
        
        43
        +label-empty = 

      
        
        44
        +label-empty-foreground = #58676C74

      
        
        45
        +label-empty-padding = 2

      
        
        46
        +

      
        
        47
        +[module/pulseaudio]

      
        
        48
        +type = internal/pulseaudio

      
        
        49
        +interval = 2

      
        
        50
        +format-volume = <ramp-volume> <label-volume> 

      
        
        51
        +label-volume = %percentage%%

      
        
        52
        +label-volume-foreground = ${root.foreground}

      
        
        53
        +label-muted = 

      
        
        54
        +ramp-volume-0 = 

      
        
        55
        +

      
        
        56
        +[module/weather]

      
        
        57
        +type = custom/script

      
        
        58
        +exec = python3 ~/.config/polybar/scripts/weather.py

      
        
        59
        +interval = 60

      
        
        60
        +

      
        
        61
        +[module/archupd]

      
        
        62
        +type = custom/script

      
        
        63
        +exec = ~/.config/polybar/scripts/updates-pacman-aur.sh

      
        
        64
        +interval = 60

      
        
        65
        +

      
        
        66
        +[module/keyboard]

      
        
        67
        +type = internal/xkeyboard

      
        
        68
        +format-prefix = ""

      
        
        69
        +label-layout =  %layout%

      
        
        70
        +blacklist-0 = num lock

      
        
        71
        +blacklist-1 = scroll lock

      
        
        72
        +blacklist-2= caps lock

      
        
        73
        +

      
        
        74
        +[module/cpu]

      
        
        75
        +type = internal/cpu

      
        
        76
        +format-prefix = " "

      
        
        77
        +interval = 2

      
        
        78
        +

      
        
        79
        +[module/memory]

      
        
        80
        +type = internal/memory

      
        
        81
        +interval = 2

      
        
        82
        +label = %percentage_used%%

      
        
        83
        +format-prefix = " "

      
        
        84
        +

      
        
        85
        +[module/windowname]

      
        
        86
        +type = internal/xwindow

      
        
        87
        +label = %title%

      
        
        88
        +label-maxlen = 90

      
        
        89
        +

      
        
        90
        +[module/date]

      
        
        91
        +type = internal/date

      
        
        92
        +interval = 600

      
        
        93
        +date = %d.%m.%Y

      
        
        94
        +label =  %date%

      
        
        95
        +

      
        
        96
        +[module/time]

      
        
        97
        +type = internal/date

      
        
        98
        +time = %H:%M

      
        
        99
        +label =  %time%

      
A config/bspwm/screen.png

Not showing binary file.

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

      
        
        2
        +# BSPWM/SXKBD config file

      
        
        3
        +

      
        
        4
        +## == USER keys

      
        
        5
        +super + Return

      
        
        6
        +	alacritty

      
        
        7
        +super + shift + w

      
        
        8
        +    firefox

      
        
        9
        +

      
        
        10
        +super + shift + f

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

      
        
        12
        +

      
        
        13
        +super + shift + e

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

      
        
        15
        +

      
        
        16
        +super + shift + c

      
        
        17
        +    vscodium

      
        
        18
        +

      
        
        19
        +super + shift + d

      
        
        20
        +    org.zealdocs.Zeal

      
        
        21
        +

      
        
        22
        +super + shift + q

      
        
        23
        +    xkill

      
        
        24
        +

      
        
        25
        +## == USER Menus

      
        
        26
        +super + shift + Return

      
        
        27
        +	rofi -location 2 -show drun

      
        
        28
        +

      
        
        29
        +super + Escape

      
        
        30
        +    ~/.script/dmenu/dmenu-power.sh

      
        
        31
        +

      
        
        32
        +super + ctrl + i

      
        
        33
        +    passmenu -h 24 -p Passwords

      
        
        34
        +

      
        
        35
        +super + ctrl + u

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

      
        
        37
        +

      
        
        38
        +

      
        
        39
        +## == BSPWM keys

      
        
        40
        +super + q

      
        
        41
        +	bspc node -{c,k}

      
        
        42
        +

      
        
        43
        +super + control + r

      
        
        44
        +	bspc wm -r && pkill -USR1 -x sxhkd

      
        
        45
        +

      
        
        46
        +## == BSPWM windows

      
        
        47
        +## Resize window

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

      
        
        49
        +	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
        +

      
        
        55
        +# Change focus & move focus window

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

      
        
        57
        +	bspc node -{f,s} {west,south,north,east}

      
        
        58
        +

      
        
        59
        +# Change focus window

      
        
        60
        +super + {_,shift + }c

      
        
        61
        +	bspc node -f {next,prev}.local.!hidden.window

      
        
        62
        +

      
        
        63
        +# Preselect the direction

      
        
        64
        +super + alt + {h,j,k,l}

      
        
        65
        +	bspc node -p {west,south,north,east}

      
        
        66
        +

      
        
        67
        +# Preselect the ratio

      
        
        68
        +super + alt + {1-9}

      
        
        69
        +	bspc node -o 0.{1-9}

      
        
        70
        +

      
        
        71
        +# Cancel the preselection

      
        
        72
        +super + ctrl + space

      
        
        73
        +	bspc node -p cancel

      
        
        74
        +

      
        
        75
        +## == BSPWM workspace

      
        
        76
        +## Next/Prev workspace

      
        
        77
        +super + bracket{left,right}

      
        
        78
        +	bspc desktop -f {prev,next}.local

      
        
        79
        +

      
        
        80
        +# Change WP & send window to WP

      
        
        81
        +super + {_,shift + }{1-9}

      
        
        82
        +	bspc {desktop -f,node -d} focused:'^{1-9}'

      
        
        83
        +

      
        
        84
        +## == BSPWM windwo layouts

      
        
        85
        +# Set window layouts for specific window

      
        
        86
        +super + {t,shift + t,s,f}

      
        
        87
        +	bspc node -t {tiled,pseudo_tiled,floating,fullscreen}

      
        
        88
        +

      
        
        89
        +# Change windows layout

      
        
        90
        +super + ctrl + {m,x,y,z}

      
        
        91
        +	bspc node -g {marked,locked,sticky,private}

      
D config/dwm/README.md
···
        1
        
        -# DWM

      
        2
        
        -

      
        3
        
        -![Screenhot](screen.png)

      
        4
        
        -------------------------

      
        5
        
        -

      
        6
        
        -

      
        7
        
        -### Install

      
        8
        
        -~~~bash

      
        9
        
        -git clone https://git.suckless.org/dwm ~/.config/dwm

      
        10
        
        -sudo cp ~/.config/dwm/dwm.desktop /usr/share/xsessions

      
        11
        
        -cd ~/.config/dwm

      
        12
        
        -sudo make clean install

      
        13
        
        -~~~~

      
D config/dwm/autostart.sh
···
        1
        
        -#!/bin/sh

      
        2
        
        -xautolock -time 5 -locker "betterlockscreen --off 300 -t \"Computer is lockerd\" -l" &

      
        3
        
        -setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" &

      
        4
        
        -nitrogen --restore &

      
        5
        
        -lxsession &

      
        6
        
        -picom -b &

      
D config/dwm/config.def.h
···
        1
        
        -static const unsigned int borderpx  = 1;  // border pixel of windows

      
        2
        
        -static const unsigned int snap      = 32; // snap pixel

      
        3
        
        -static const int showbar            = 1;  // 0 means no bar

      
        4
        
        -static const int topbar             = 1;  // 0 means bottom bar

      
        5
        
        -static const char *fonts[]          = { "monospace:size=10" };

      
        6
        
        -static const char col_gray1[]       = "#262A2B";

      
        7
        
        -static const char col_gray2[]       = "#262A2B";

      
        8
        
        -static const char col_gray3[]       = "#CED4DA";

      
        9
        
        -static const char col_gray4[]       = "#FFFFFF";

      
        10
        
        -static const char col_cyan[]        = "#008DCD";

      
        11
        
        -static const char *colors[][3]      = {

      
        12
        
        -	[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },

      
        13
        
        -	[SchemeSel]  = { col_gray4, col_cyan,  col_cyan  },

      
        14
        
        -};

      
        15
        
        -

      
        16
        
        -// Workspaces names

      
        17
        
        -//static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };

      
        18
        
        -static const char *tags[] = { "", "", "", "", "", "", "", "", "" };

      
        19
        
        -

      
        20
        
        -// Rules

      
        21
        
        -static const Rule rules[] = {

      
        22
        
        -    { "Gimp",    NULL, NULL, 0,     1, -1 },

      
        23
        
        -	{ "Firefox", NULL, NULL, 1 << 8,0, -1 },

      
        24
        
        -};

      
        25
        
        -

      
        26
        
        -// Autostart

      
        27
        
        -static const char *const autostart[] = {

      
        28
        
        -	"./.config/dwm/autostart.sh", NULL,

      
        29
        
        -	"./.script/dwmbar.sh", NULL,

      
        30
        
        -	NULL

      
        31
        
        -};

      
        32
        
        -

      
        33
        
        -// Layout

      
        34
        
        -static const float mfact     = 0.55; // factor of master area size [0.05..0.95]

      
        35
        
        -static const int nmaster     = 1;    // number of clients in master area

      
        36
        
        -static const int resizehints = 1;    // 1 means respect size hints in tiled resizals

      
        37
        
        -static const Layout layouts[] = {

      
        38
        
        -	{ "[]=",      tile },

      
        39
        
        -	{ "><>",      NULL },

      
        40
        
        -	{ "[M]",      monocle },

      
        41
        
        -};

      
        42
        
        -

      
        43
        
        -// Key definitions

      
        44
        
        -#define MODKEY Mod4Mask

      
        45
        
        -#define TAGKEYS(KEY,TAG) \

      
        46
        
        -	{ MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \

      
        47
        
        -	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \

      
        48
        
        -	{ MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \

      
        49
        
        -	{ MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },

      
        50
        
        -#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }

      
        51
        
        -

      
        52
        
        -// Commands

      
        53
        
        -static char dmenumon[2] = "0";

      
        54
        
        -static const char *dmenucmd[] = { "dmenu_run", NULL };

      
        55
        
        -static const char *launchercmd[] = { "rofi", "-location", "2", "-show", "drun", NULL };

      
        56
        
        -static const char *passmenucmd[] = { "passmenu", "-h", "24", "-p", "Passwords", NULL };

      
        57
        
        -static const char *dmenuconfig[] = { "./.script/dmenu/dmenu-config-edit.sh", NULL };

      
        58
        
        -static const char *dmenupower[] = { "./.script/dmenu/dmenu-power.sh", NULL };

      
        59
        
        -static const char *browsercmd[] = { "firefox", NULL };

      
        60
        
        -static const char *filemanager[] = { "thunar", NULL };

      
        61
        
        -static const char *codeeditor[] = { "alacritty", "-e", "nvim", NULL };

      
        62
        
        -static const char *termcmd[] = { "alacritty", NULL };

      
        63
        
        -

      
        64
        
        -// Keyboards binds

      
        65
        
        -static Key keys[] = {

      
        66
        
        -    // User keys

      
        67
        
        -    { MODKEY,           XK_b,      togglebar,  {0} },             // Toggle status bar

      
        68
        
        -    { MODKEY,           XK_q,      killclient, {0} },             // Kill window

      
        69
        
        -    { MODKEY,           XK_Return, spawn, {.v = termcmd }     },  // Terminal

      
        70
        
        -    { MODKEY|ShiftMask, XK_w,      spawn, {.v = browsercmd }  },  // Browser

      
        71
        
        -    { MODKEY|ShiftMask, XK_f,      spawn, {.v = filemanager } },  // File manager

      
        72
        
        -    { MODKEY|ShiftMask, XK_e,      spawn, {.v = codeeditor  } },  // File manager

      
        73
        
        -

      
        74
        
        -    // Menus

      
        75
        
        -    { MODKEY|ShiftMask,   XK_Return, spawn, {.v = launchercmd } }, // Program menu

      
        76
        
        -    { MODKEY|ControlMask, XK_i,      spawn, {.v = passmenucmd } }, // Password menu

      
        77
        
        -    { MODKEY|ControlMask, XK_u,      spawn, {.v = dmenuconfig } }, // Configuration menu

      
        78
        
        -    { MODKEY,             XK_Escape, spawn, {.v = dmenupower  } }, // Power menu

      
        79
        
        -    

      
        80
        
        -    // Volume

      
        81
        
        -    { MODKEY,           XK_minus, spawn, SHCMD("amixer sset 'Master' 2%-")    },

      
        82
        
        -    { MODKEY,           XK_equal, spawn, SHCMD("amixer sset 'Master' 2%+")    },

      
        83
        
        -    { MODKEY|ShiftMask, XK_minus, spawn, SHCMD("amixer sset 'Master' toggle") },

      
        84
        
        -

      
        85
        
        -    // DWM keys

      
        86
        
        -    { MODKEY,           XK_Tab, setlayout,      {0} }, // Change layout

      
        87
        
        -    { MODKEY|ShiftMask, XK_Tab, togglefloating, {0} }, // Set floating layout

      
        88
        
        -

      
        89
        
        -    { MODKEY, XK_j,      focusstack, {.i = +1 } },

      
        90
        
        -    { MODKEY, XK_k,      focusstack, {.i = -1 } },

      
        91
        
        -    { MODKEY, XK_i,      incnmaster, {.i = +1 } },

      
        92
        
        -    { MODKEY, XK_d,      incnmaster, {.i = -1 } },

      
        93
        
        -    { MODKEY, XK_h,      setmfact,   {.f = -0.05} },

      
        94
        
        -    { MODKEY, XK_l,      setmfact,   {.f = +0.05} },

      
        95
        
        -    { MODKEY, XK_Return, zoom,       {0} },

      
        96
        
        -

      
        97
        
        -    // Workspaces

      
        98
        
        -    TAGKEYS(            XK_1,       0)

      
        99
        
        -    TAGKEYS(            XK_2,       1)

      
        100
        
        -    TAGKEYS(            XK_3,       2)

      
        101
        
        -    TAGKEYS(            XK_4,       3)

      
        102
        
        -    TAGKEYS(            XK_5,       4)

      
        103
        
        -    TAGKEYS(            XK_6,       5)

      
        104
        
        -    TAGKEYS(            XK_7,       6)

      
        105
        
        -    TAGKEYS(            XK_8,       7)

      
        106
        
        -    TAGKEYS(            XK_9,       8)

      
        107
        
        -    { MODKEY,           XK_0, view, {.ui = ~0 } },

      
        108
        
        -    { MODKEY|ShiftMask, XK_0, tag,  {.ui = ~0 } },

      
        109
        
        -};

      
        110
        
        -

      
        111
        
        -// Mouse binds

      
        112
        
        -static Button buttons[] = {

      
        113
        
        -    // click                event mask      button          function        argument

      
        114
        
        -    { ClkLtSymbol,          0,              Button1,        setlayout,      {0} },

      
        115
        
        -    { ClkLtSymbol,          0,              Button3,        setlayout,      {.v = &layouts[2]} },

      
        116
        
        -    { ClkWinTitle,          0,              Button2,        zoom,           {0} },

      
        117
        
        -    { ClkStatusText,        0,              Button2,        spawn,          {.v = termcmd } },

      
        118
        
        -    { ClkClientWin,         MODKEY,         Button1,        movemouse,      {0} },

      
        119
        
        -    { ClkClientWin,         MODKEY,         Button2,        togglefloating, {0} },

      
        120
        
        -    { ClkClientWin,         MODKEY,         Button3,        resizemouse,    {0} },

      
        121
        
        -    { ClkTagBar,            0,              Button1,        view,           {0} },

      
        122
        
        -    { ClkTagBar,            0,              Button3,        toggleview,     {0} },

      
        123
        
        -    { ClkTagBar,            MODKEY,         Button1,        tag,            {0} },

      
        124
        
        -    { ClkTagBar,            MODKEY,         Button3,        toggletag,      {0} },

      
        125
        
        -};

      
D config/dwm/cool-autostart.diff
···
        1
        
        -diff --git a/config.def.h b/config.def.h

      
        2
        
        -index 1c0b587..ed056a4 100644

      
        3
        
        ---- a/config.def.h

      
        4
        
        -+++ b/config.def.h

      
        5
        
        -@@ -18,6 +18,11 @@ static const char *colors[][3]      = {

      
        6
        
        - 	[SchemeSel]  = { col_gray4, col_cyan,  col_cyan  },

      
        7
        
        - };

      
        8
        
        - 

      
        9
        
        -+static const char *const autostart[] = {

      
        10
        
        -+	"st", NULL,

      
        11
        
        -+	NULL /* terminate */

      
        12
        
        -+};

      
        13
        
        -+

      
        14
        
        - /* tagging */

      
        15
        
        - static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };

      
        16
        
        - 

      
        17
        
        -diff --git a/dwm.c b/dwm.c

      
        18
        
        -index 9fd0286..1facd56 100644

      
        19
        
        ---- a/dwm.c

      
        20
        
        -+++ b/dwm.c

      
        21
        
        -@@ -234,6 +234,7 @@ static int xerror(Display *dpy, XErrorEvent *ee);

      
        22
        
        - static int xerrordummy(Display *dpy, XErrorEvent *ee);

      
        23
        
        - static int xerrorstart(Display *dpy, XErrorEvent *ee);

      
        24
        
        - static void zoom(const Arg *arg);

      
        25
        
        -+static void autostart_exec(void);

      
        26
        
        - 

      
        27
        
        - /* variables */

      
        28
        
        - static const char broken[] = "broken";

      
        29
        
        -@@ -275,6 +276,34 @@ static Window root, wmcheckwin;

      
        30
        
        - /* compile-time check if all tags fit into an unsigned int bit array. */

      
        31
        
        - struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };

      
        32
        
        - 

      
        33
        
        -+/* dwm will keep pid's of processes from autostart array and kill them at quit */

      
        34
        
        -+static pid_t *autostart_pids;

      
        35
        
        -+static size_t autostart_len;

      
        36
        
        -+

      
        37
        
        -+/* execute command from autostart array */

      
        38
        
        -+static void

      
        39
        
        -+autostart_exec() {

      
        40
        
        -+	const char *const *p;

      
        41
        
        -+	size_t i = 0;

      
        42
        
        -+

      
        43
        
        -+	/* count entries */

      
        44
        
        -+	for (p = autostart; *p; autostart_len++, p++)

      
        45
        
        -+		while (*++p);

      
        46
        
        -+

      
        47
        
        -+	autostart_pids = malloc(autostart_len * sizeof(pid_t));

      
        48
        
        -+	for (p = autostart; *p; i++, p++) {

      
        49
        
        -+		if ((autostart_pids[i] = fork()) == 0) {

      
        50
        
        -+			setsid();

      
        51
        
        -+			execvp(*p, (char *const *)p);

      
        52
        
        -+			fprintf(stderr, "dwm: execvp %s\n", *p);

      
        53
        
        -+			perror(" failed");

      
        54
        
        -+			_exit(EXIT_FAILURE);

      
        55
        
        -+		}

      
        56
        
        -+		/* skip arguments */

      
        57
        
        -+		while (*++p);

      
        58
        
        -+	}

      
        59
        
        -+}

      
        60
        
        -+

      
        61
        
        - /* function implementations */

      
        62
        
        - void

      
        63
        
        - applyrules(Client *c)

      
        64
        
        -@@ -1249,6 +1278,16 @@ propertynotify(XEvent *e)

      
        65
        
        - void

      
        66
        
        - quit(const Arg *arg)

      
        67
        
        - {

      
        68
        
        -+	size_t i;

      
        69
        
        -+

      
        70
        
        -+	/* kill child processes */

      
        71
        
        -+	for (i = 0; i < autostart_len; i++) {

      
        72
        
        -+		if (0 < autostart_pids[i]) {

      
        73
        
        -+			kill(autostart_pids[i], SIGTERM);

      
        74
        
        -+			waitpid(autostart_pids[i], NULL, 0);

      
        75
        
        -+		}

      
        76
        
        -+	}

      
        77
        
        -+

      
        78
        
        - 	running = 0;

      
        79
        
        - }

      
        80
        
        - 

      
        81
        
        -@@ -1632,9 +1671,25 @@ showhide(Client *c)

      
        82
        
        - void

      
        83
        
        - sigchld(int unused)

      
        84
        
        - {

      
        85
        
        -+	pid_t pid;

      
        86
        
        -+

      
        87
        
        - 	if (signal(SIGCHLD, sigchld) == SIG_ERR)

      
        88
        
        - 		die("can't install SIGCHLD handler:");

      
        89
        
        --	while (0 < waitpid(-1, NULL, WNOHANG));

      
        90
        
        -+	while (0 < (pid = waitpid(-1, NULL, WNOHANG))) {

      
        91
        
        -+		pid_t *p, *lim;

      
        92
        
        -+

      
        93
        
        -+		if (!(p = autostart_pids))

      
        94
        
        -+			continue;

      
        95
        
        -+		lim = &p[autostart_len];

      
        96
        
        -+

      
        97
        
        -+		for (; p < lim; p++) {

      
        98
        
        -+			if (*p == pid) {

      
        99
        
        -+				*p = -1;

      
        100
        
        -+				break;

      
        101
        
        -+			}

      
        102
        
        -+		}

      
        103
        
        -+

      
        104
        
        -+	}

      
        105
        
        - }

      
        106
        
        - 

      
        107
        
        - void

      
        108
        
        -@@ -2139,6 +2194,7 @@ main(int argc, char *argv[])

      
        109
        
        - 	if (!(dpy = XOpenDisplay(NULL)))

      
        110
        
        - 		die("dwm: cannot open display");

      
        111
        
        - 	checkotherwm();

      
        112
        
        -+	autostart_exec();

      
        113
        
        - 	setup();

      
        114
        
        - #ifdef __OpenBSD__

      
        115
        
        - 	if (pledge("stdio rpath proc exec", NULL) == -1)

      
        116
        
        -

      
D config/dwm/dwm.desktop
···
        1
        
        -[Desktop Entry]

      
        2
        
        -Encoding=UTF-8

      
        3
        
        -Name=Dwm

      
        4
        
        -Comment=Dynamic window manager

      
        5
        
        -Exec=dwm

      
        6
        
        -Icon=dwm

      
        7
        
        -Type=XSession

      
D config/dwm/screen.png

Not showing binary file.

M config/i3/config
···
        18
        18
         ############ Variables ###########

      
        19
        19
         set $terminal alacritty

      
        20
        20
         set $browser firefox 

      
        21
        
        -set $filemanager thunar

      
        
        21
        +set $filemanager alacritty -e ranger

      
        22
        22
         set $codeeditor alacritty -e nvim

      
        23
        23
         set $guicode vscodium

      
        
        24
        +set $documentationreader org.zealdocs.Zeal 

      
        24
        25
         

      
        25
        26
         ############ Autostart ############

      
        26
        27
         exec --no-startup-id exec setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps"

      
        27
        
        -exec --no-startup-id exec picom --experimental-backends -b

      
        
        28
        +exec_always --no-startup-id exec picom --experimental-backends -b

      
        28
        29
         exec_always --no-startup-id exec $HOME/.config/i3/bar.sh

      
        29
        30
         exec --no-startup-id exec nitrogen --restore

      
        30
        31
         exec --no-startup-id exec lxsession

      ···
        75
        76
         bindsym $mod+Shift+f exec $filemanager

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

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

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

      
        78
        80
         

      
        79
        81
         # Toogle polybar

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

      ···
        93
        95
         

      
        94
        96
         ######### Window preferens ########

      
        95
        97
         assign [class="(?i)telegram|discord"] $ws6

      
        
        98
        +for_window [title="Google Tasks"] floating enable

      
        96
        99
         for_window [class="(?i)telegram|discord"] layout tabbed

      
        97
        100
         focus_on_window_activation focus

      
        98
        101
         

      
M config/nvim/init.vim
···
        2
        2
           Plug 'Smirnov-O/nten16.vim'   " Color scheme

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

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

      
        5
        
        -  Plug 'preservim/nerdtree'     " File viewer

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

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

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

      
        
        8
        +  Plug 'kassio/neoterm'         " Terminal wrapper

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

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

      
        10
        11
         

      
        11
        12
           " Completion & snippets

      ···
        17
        18
           Plug 'metakirby5/codi.vim'

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

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

      
        20
        
        -  Plug 'fatih/vim-go', {'for': 'go'}

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

      
        
        22
        +  Plug 'kovetskiy/sxhkd-vim'

      
        22
        23
         call plug#end()

      
        
        24
        +

      
        23
        25
         

      
        24
        26
         " Theme

      
        25
        27
         set termguicolors

      ···
        92
        94
         let g:vim_markdown_folding_disabled = 1

      
        93
        95
         let g:vim_markdown_frontmatter = 1

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

      
        95
        
        -

      
        96
        
        -" Go

      
        97
        
        -let g:go_template_autocreate = 0

      
        98
        
        -let g:go_highlight_structs = 1 

      
        99
        
        -let g:go_highlight_methods = 1

      
        100
        
        -let g:go_highlight_functions = 1

      
        101
        
        -let g:go_highlight_operators = 1

      
        102
        
        -let g:go_highlight_build_constraints = 1

      
        103
        
        -let g:go_snippet_engine = ""

      
        104
        
        -let g:go_fmt_command = "goimports"

      
        105
        
        -let g:go_auto_type_info = 1

      
        106
        97
         

      
        107
        98
         

      
        108
        99
         " == Plugins configuration

      
M config/nvim/snips/go.snippets
···
        9
        9
         )

      
        10
        10
         endsnippet

      
        11
        11
         

      
        
        12
        +snippet fn "Function"

      
        
        13
        +func ${1:main}(${2:arg} ${3:type}) ${4:type} (

      
        
        14
        +	${5}

      
        
        15
        +)

      
        
        16
        +endsnippet

      
        
        17
        +

      
        12
        18
         snippet for "For loop"

      
        13
        19
         for ${1:i\:\=1}; ${2:i\<\=10}; ${3:\i\+\+} {

      
        14
        20
         	${4}

      
M config/picom.conf
···
        13
        13
         ];

      
        14
        14
         

      
        15
        15
         ############ Fading ###########

      
        16
        
        -fading = false;

      
        17
        
        -fade-in-step = 0.03;

      
        18
        
        -fade-out-step = 0.03;

      
        
        16
        +fading = true;

      
        
        17
        +fading-openclose = true;

      
        
        18
        +fade-in-step = 1;

      
        
        19
        +fade-out-step = 1;

      
        
        20
        +fade-delta = 0;

      
        19
        21
         

      
        20
        22
         ##### Transparency/Opacity ####

      
        21
        23
         inactive-opacity = 1;

      
        22
        
        -frame-opacity = 0.7;

      
        
        24
        +active-opacity = 1;

      
        
        25
        +frame-opacity = 0.8;

      
        23
        26
         inactive-opacity-override = false;

      
        24
        27
         focus-exclude = []; 

      
        25
        28
         opacity-exclude = [ "class_g = 'openbox'" ];

      ···
        27
        30
         no-fading-openclose = true

      
        28
        31
         

      
        29
        32
         ##### Background-Blurring #####

      
        
        33
        +blur = false;

      
        30
        34
         #blur-method = "dual_kawase";

      
        31
        35
         #blur-strength = 5;

      
        32
        36
         #blur-kern = "3x3box";

      ···
        36
        40
         ####### General Settings ######

      
        37
        41
         backend = "glx";

      
        38
        42
         vsync = true;

      
        
        43
        +xrender-sync-fence = true;

      
        39
        44
         mark-wmwin-focused = true;

      
        40
        45
         mark-ovredir-focused = true;

      
        41
        46
         glx-no-stencil = true

      ···
        49
        54
         log-level = "warn";

      
        50
        55
         wintypes: {

      
        51
        56
           tooltip       = { fade = true; shadow = false; opacity = 1; focus = true; full-shadow = false; };

      
        52
        
        -  menu          = { fade = true; shadow = false; opacity = 1; };

      
        53
        
        -  popup_menu    = { fade = true; shadow = false; };

      
        54
        
        -  dropdown_menu = { fade = true; shadow = false; };

      
        55
        
        -  utility       = { fade = true; shadow = false; };

      
        56
        
        -  dialog        = { fade = true; shadow = false; };

      
        57
        
        -  notify        = { fade = true; shadow = true; };

      
        58
        
        -  unknown       = { fade = true; shadow = false; };

      
        
        57
        +  menu          = { fade = true; shadow = false; opacity = false; };

      
        
        58
        +  popup_menu    = { fade = true; shadow = false; opacity = false; };

      
        
        59
        +  dropdown_menu = { fade = true; shadow = false; opacity = false; };

      
        
        60
        +  utility       = { fade = true; shadow = false; opacity = false; };

      
        
        61
        +  dialog        = { fade = true; shadow = false; opacity = false; };

      
        
        62
        +  notify        = { fade = true; shadow = true;  opacity = false; };

      
        
        63
        +  unknown       = { fade = true; shadow = false; opacity = false; };

      
        59
        64
         };

      
M config/polybar/config
···
        9
        9
         secondary = #008DCD

      
        10
        10
         alert = #FF6C6B

      
        11
        11
         

      
        12
        
        -[bar/i3bar]

      
        
        12
        +[bar/bar]

      
        13
        13
         monitor = ${env:MONITOR_MIDDLE}

      
        14
        14
         width = 100%

      
        15
        15
         height = 24

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

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

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

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

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

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

      
        28
        28
         tray-position = right

      
        29
        29
         

      
        30
        
        -[module/i3]

      
        31
        
        -type = internal/i3

      
        32
        
        -format = <label-state><label-mode>

      
        33
        
        -index-sort = false

      
        34
        
        -wrapping-scroll = false

      
        35
        
        -label-mode-padding = 1

      
        36
        
        -label-mode-background = ${colors.alert}

      
        37
        
        -

      
        38
        
        -label-focused = %icon%

      
        39
        
        -label-focused-background =  ${colors.secondary}

      
        40
        
        -label-focused-foreground = ${colors.foreground}

      
        41
        
        -label-focused-padding = 1

      
        42
        
        -label-focused-underline = ${colors.alert}

      
        43
        
        -

      
        44
        
        -label-unfocused = %icon%

      
        45
        
        -label-unfocused-foreground = ${colors.foreground}

      
        46
        
        -label-unfocused-padding = 1

      
        47
        
        -

      
        48
        
        -label-urgent = %icon%

      
        49
        
        -label-urgent-background = ${colors.alert}

      
        50
        
        -label-urgent-foreground = ${colors.foreground}

      
        51
        
        -label-urgent-padding = 1

      
        52
        
        -label-urgent-underline = ${colors.alert}

      
        53
        
        -

      
        54
        
        -label-visible = %icon%

      
        55
        
        -label-visible-background = ${colors.background}

      
        56
        
        -label-visible-foreground = ${colors.foreground}

      
        57
        
        -label-visible-padding = 1

      
        58
        
        -label-visible-underline = ${colors.background}

      
        59
        
        -

      
        60
        
        -ws-icon-0 = "1;1 "

      
        61
        
        -ws-icon-1 = "2;2 "

      
        62
        
        -ws-icon-2 = "3;3 "

      
        63
        
        -ws-icon-3 = "4;4 "

      
        64
        
        -ws-icon-4 = "5;5 "

      
        65
        
        -ws-icon-5 = "6;6 "

      
        66
        
        -ws-icon-6 = "7;7 "

      
        67
        
        -ws-icon-7 = "8;8 "

      
        68
        
        -ws-icon-8 = "9;9 "

      
        69
        
        -

      
        70
        
        -[module/backlight]

      
        71
        
        -type = internal/xbacklight

      
        72
        
        -format = <ramp> <label>

      
        73
        
        -label = %percentage%%

      
        74
        
        -ramp-0 = 

      
        75
        
        -

      
        76
        
        -[module/wifi-name]

      
        77
        
        -type = internal/network

      
        78
        
        -interface = wlp3s0

      
        79
        
        -format-connected = <ramp-signal> <label-connected>

      
        80
        
        -label-connected = %essid%

      
        81
        
        -format-disconnected =

      
        82
        
        -ramp-signal-0 = 

      
        83
        
        -interval = 3

      
        
        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

      
        84
        38
         

      
        85
        39
         [module/wifi-signal]

      
        86
        40
         type = custom/script

      
M config/polybar/scripts/weather.py
···
        5
        5
         

      
        6
        6
         

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

      
        8
        
        -CITY = "Horodnytsya,UA"

      
        9
        
        -

      
        
        8
        +CITY = os.getenv("OWM_CITY")

      
        10
        9
         

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

      
        12
        
        -except Exception as a: print("No connection ")

      
        13
        10
         try:

      
        14
        
        -    if JSON['weather'][0]['main'] == "Clear":          print("", int(JSON["main"]["temp"]),"°С")

      
        15
        
        -    elif JSON['weather'][0]['main'] == "Thunderstorm": print("", int(JSON["main"]["temp"]),"°С")

      
        16
        
        -    elif JSON['weather'][0]['main'] == "Drizzle":      print("", int(JSON["main"]["temp"]),"°С")

      
        17
        
        -    elif JSON['weather'][0]['main'] == "Rain": print("", int(JSON["main"]["temp"]),"°С")

      
        18
        
        -    elif JSON['weather'][0]['main'] == "Snow": print("", int(JSON["main"]["temp"]),"°С")

      
        19
        
        -    elif JSON['weather'][0]['main'] == "Mist": print("", int(JSON["main"]["temp"]),"°С")

      
        20
        
        -    elif JSON['weather'][0]['main'] == "Smoke": print("", int(JSON["main"]["temp"]),"°С")

      
        21
        
        -    elif JSON['weather'][0]['main'] == "Haze": print("", int(JSON["main"]["temp"]),"°С")

      
        22
        
        -    elif JSON['weather'][0]['main'] == "Dust": print("", int(JSON["main"]["temp"]),"°С")

      
        23
        
        -    elif JSON['weather'][0]['main'] == "Fog": print("", int(JSON["main"]["temp"]),"°С")

      
        24
        
        -    elif JSON['weather'][0]['main'] == "Sand": print("", int(JSON["main"]["temp"]),"°С")

      
        25
        
        -    elif JSON['weather'][0]['main'] == "Ash": print("", int(JSON["main"]["temp"]),"°С")

      
        26
        
        -    elif JSON['weather'][0]['main'] == "Squall": print("", int(JSON["main"]["temp"]),"°С")

      
        27
        
        -    elif JSON['weather'][0]['main'] == "Tornado": print("", int(JSON["main"]["temp"]),"°С")

      
        28
        
        -    elif JSON['weather'][0]['main'] == "Clouds": print("", int(JSON["main"]["temp"]),"°С")

      
        29
        
        -except Exception as e: print(int(JSON["main"]["temp"]),"°С")

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

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

      
        
        13
        +except:

      
        
        14
        +    print(" err °С")

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

      
        8
        8
         }

      
        9
        9
         #window {

      
        10
        
        -    /* location: north; */

      
        11
        10
             width: 100%;

      
        12
        11
             height: 24px;

      
        13
        12
             padding: 0px;

      ···
        26
        25
         #listview {

      
        27
        26
             layout: horizontal;

      
        28
        27
             spacing: 0px;

      
        
        28
        +    fixed-height: false;

      
        
        29
        +    dynamic: true;

      
        29
        30
             lines: 100;

      
        30
        31
         }

      
        31
        32
         #entry {

      
D config/vifm/colors/nten16.vifm
···
        1
        
        -highlight clear

      
        2
        
        -

      
        3
        
        -highlight Win cterm=none ctermfg=default ctermbg=default

      
        4
        
        -highlight Directory cterm=bold ctermfg=blue ctermbg=default

      
        5
        
        -highlight Link cterm=bold ctermfg=cyan ctermbg=default

      
        6
        
        -highlight BrokenLink cterm=bold ctermfg=red ctermbg=default

      
        7
        
        -highlight Socket cterm=bold ctermfg=magenta ctermbg=default

      
        8
        
        -highlight Device cterm=bold ctermfg=red ctermbg=default

      
        9
        
        -highlight Fifo cterm=bold ctermfg=cyan ctermbg=default

      
        10
        
        -highlight Executable cterm=bold ctermfg=green ctermbg=default

      
        11
        
        -highlight Selected cterm=bold ctermfg=magenta ctermbg=default

      
        12
        
        -highlight CurrLine cterm=bold,reverse ctermfg=4 ctermbg=black

      
        13
        
        -highlight TopLine cterm=none ctermfg=white ctermbg=32

      
        14
        
        -highlight TopLineSel cterm=bold ctermfg=white ctermbg=default

      
        15
        
        -highlight StatusLine cterm=bold ctermfg=white ctermbg=default

      
        16
        
        -highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black

      
        17
        
        -highlight CmdLine cterm=none ctermfg=white ctermbg=default

      
        18
        
        -highlight ErrorMsg cterm=none ctermfg=red ctermbg=default

      
        19
        
        -highlight Border cterm=none ctermfg=default ctermbg=default

      
        20
        
        -highlight JobLine cterm=bold,reverse ctermfg=black ctermbg=white

      
        21
        
        -highlight SuggestBox cterm=bold ctermfg=default ctermbg=default

      
        22
        
        -highlight CmpMismatch cterm=bold ctermfg=white ctermbg=red

      
        23
        
        -highlight AuxWin cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default

      
        24
        
        -highlight TabLine cterm=none ctermfg=white ctermbg=default

      
        25
        
        -highlight TabLineSel cterm=bold,reverse ctermfg=default ctermbg=default

      
D config/vifm/vifmrc
···
        1
        
        -colorscheme nten16

      
        2
        
        -set vicmd=nvim

      
        3
        
        -set syscalls

      
        4
        
        -view

      
        5
        
        -set history=100

      
        6
        
        -set nofollowlinks

      
        7
        
        -set sortnumbers

      
        8
        
        -set undolevels=100

      
        9
        
        -set norunexec

      
        10
        
        -set timefmt=%m/%d\ %H:%M

      
        11
        
        -set wildmenu

      
        12
        
        -set wildstyle=popup

      
        13
        
        -set suggestoptions=normal,visual,view,otherpane,keys,marks,registers

      
        14
        
        -set ignorecase

      
        15
        
        -set smartcase

      
        16
        
        -set nohlsearch

      
        17
        
        -set incsearch

      
        18
        
        -set scrolloff=4

      
        19
        
        -set trashdir=$HOME/.local/share/Trash/files

      
        20
        
        -set vifminfo=dhistory,chistory,state,shistory,phistory,fhistory,dirstack,registers,bookmarks,bmarks

      
        21
        
        -

      
        22
        
        -" === commands

      
        23
        
        -command! zip zip -r %f.zip %f

      
        24
        
        -command! targz tar -czvf %f.tar.gz %f

      
        25
        
        -set rulerformat=

      
        26
        
        -

      
        27
        
        -" === Key maps

      
        28
        
        -nmap q ZQ

      
        29
        
        -nnoremap gg ggj

      
        30
        
        -nnoremap ! :shell<cr>

      
        31
        
        -nnoremap w :view<cr>

      
        32
        
        -nnoremap S :sort<cr>

      
        33
        
        -nnoremap se :!$HOME/bin/extract %f &<cr>

      
        34
        
        -nnoremap sa :!zip -r %f.zip %f

      
        35
        
        -nnoremap ss :!tar -czvf %f.tar.gz @f

      
        36
        
        -

      
        37
        
        -" === files

      
        38
        
        -filetype *.csv,*.xlsx libreoffice %c %i

      
        39
        
        -fileviewer *.csv sed "s/,,,,/,,-,,/g;s/,,/ /g" %c | column -t | sed "s/ - /  /g" | cut -c -%pw

      
        40
        
        -

      
        41
        
        -fileviewer *.html w3m -dump %c

      
        42
        
        -filextype *.html,*.htm qutebrowser %f 2>/dev/null &

      
        43
        
        -

      
        44
        
        -filetype <text/*> nvim

      
        45
        
        -fileviewer <text/*> env -uCOLORTERM bat --color always --wrap never --pager never %c -p

      
        46
        
        -

      
        47
        
        -filextype *.pdf zathura %c %i &

      
        48
        
        -fileviewer *.pdf

      
        49
        
        -        \ vifmimg pdfpreview %px %py %pw %ph %c

      
        50
        
        -        \ %pc

      
        51
        
        -        \ vifmimg clear

      
        52
        
        -        " \ pdftotext -nopgbrk %c -

      
        53
        
        -

      
        54
        
        -filetype <audio/*> mocp %c %i &

      
        55
        
        -filetype <video/*> mpv %c %i &

      
        56
        
        -

      
        57
        
        -filextype <image/*> sxiv %c %i &

      
        58
        
        -fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.xpm

      
        59
        
        -        \ ~/.config/vifm/vifmimg draw %px %py %pw %ph %c

      
        60
        
        -        \ %pc

      
        61
        
        -        \ ~/.config/vifm/vifmimg clear

      
        62
        
        -

      
        63
        
        -filextype *.py nvim %c %i &

      
        64
        
        -

      
        65
        
        -fileviewer *.zip,*.jar zip -sf %c

      
        66
        
        -fileviewer *.tgz,*.tar.gz tar -tzf %c

      
        67
        
        -fileviewer *.tar tar -tf %c

      
        68
        
        -fileviewer *.rar unrar v %c

      
        69
        
        -fileviewer *.7z 7z l %c

      
        70
        
        -

      
        71
        
        -fileviewer */ ls --color --group-directories-first

      
        72
        
        -fileviewer .*/ ls --color --group-directories-first

      
        73
        
        -

      
        74
        
        -filetype * xdg-open %c

      
        75
        
        -fileviewer * file -b %c

      
        76
        
        -

      
        77
        
        -" go keys 

      
        78
        
        -nnoremap gh :cd ~<cr>

      
        79
        
        -nnoremap gc :cd ~/Code<cr>

      
        80
        
        -nnoremap gd :cd ~/Documents<cr>

      
        81
        
        -nnoremap gb :cd ~/Documents/Books<cr>

      
        82
        
        -nnoremap gm :cd ~/.dotfiles<cr>

      
        83
        
        -nnoremap gn :cd ~/bin<cr>

      
        84
        
        -nnoremap gz :cd ~/.script<cr>

      
        85
        
        -

      
        86
        
        -" === file icons 

      
        87
        
        -set classify='  :dir:/,  :exe:,  :reg:,  :link:'

      
        88
        
        -set classify+='  ::../::,  ::*.sh::,  ::*.[hc]pp::,  ::*.[hc]::,  ::/^copying|license$/::,  ::.git/,,*.git/::,  ::*.epub,,*.fb2,,*.djvu::,  ::*.pdf::,  ::*.htm,,*.html,,**.[sx]html,,*.xml::'

      
        89
        
        -set classify+='  ::*.7z,,*.ace,,*.arj,,*.bz2,,*.cpio,,*.deb,,*.dz,,*.gz,,*.jar,,*.lzh,,*.lzma,,*.rar,,*.rpm,,*.rz,,*.tar,,*.taz,,*.tb2,,*.tbz,,*.tbz2,,*.tgz,,*.tlz,,*.trz,,*.txz,,*.tz,,*.tz2,,*.xz,,*.z,,*.zip,,*.zoo::'

      
        90
        
        -set classify+='  ::*.bmp,,*.gif,,*.jpeg,,*.jpg,,*.ico,,*.png,,*.ppm,,*.svg,,*.svgz,,*.tga,,*.tif,,*.tiff,,*.xbm,,*.xcf,,*.xpm,,*.xspf,,*.xwd::'

      
        91
        
        -set classify+='  ::*.aac,,*.anx,,*.asf,,*.au,,*.axa,,*.flac,,*.m2a,,*.m4a,,*.mid,,*.midi,,*.mp3,,*.mpc,,*.oga,,*.ogg,,*.ogx,,*.ra,,*.ram,,*.rm,,*.spx,,*.wav,,*.wma,,*.ac3::'

      
        92
        
        -set classify+='  ::*.avi,,*.ts,,*.axv,,*.divx,,*.m2v,,*.m4p,,*.m4v,,.mka,,*.mkv,,*.mov,,*.mp4,,*.flv,,*.mp4v,,*.mpeg,,*.mpg,,*.nuv,,*.ogv,,*.pbm,,*.pgm,,*.qt,,*.vob,,*.wmv,,*.xvid::'

      
        93
        
        -set classify+='  ::*.doc,,*.docx::,  ::*.xls,,*.xls[mx]::,  ::*.pptx,,*.ppt::'

      
D doom.d/README.md
···
        1
        
        -# Doom emacs

      
        2
        
        -

      
        3
        
        -### Install

      
        4
        
        -~~~bash

      
        5
        
        -sudo pacman -S emacs ripgrep fd

      
        6
        
        -git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d

      
        7
        
        -~/.emacs.d/bin/doom install

      
        8
        
        -~~~

      
D doom.d/config.el
···
        1
        
        -(setq user-full-name "Smirnov Alexandr"

      
        2
        
        -      user-mail-address "ss2316544@gmail.com")

      
        3
        
        -

      
        4
        
        -(setq doom-theme 'doom-one)

      
        5
        
        -(setq org-directory "~/org/")

      
        6
        
        -(setq display-line-numbers-type t)

      
        7
        
        -

      
        8
        
        -

      
        9
        
        -(defun gk-markdown-preview-buffer ()

      
        10
        
        -  (interactive)

      
        11
        
        -  (let* ((buf-this (buffer-name (current-buffer)))

      
        12
        
        -         (buf-html (get-buffer-create

      
        13
        
        -                    (format "*gk-md-html (%s)*" buf-this))))

      
        14
        
        -    (markdown-other-window (buffer-name buf-html))

      
        15
        
        -    (shr-render-buffer buf-html)

      
        16
        
        -    (eww-mode)

      
        17
        
        -    (kill-buffer buf-html)))

      
D doom.d/custom.el
···
        1
        
        -(custom-set-variables

      
        2
        
        - '(package-selected-packages '(racket-mode markdown-mode zoutline)))

      
        3
        
        -(custom-set-faces)

      
        4
        
        -

      
        5
        
        -(use-package markdown-mode

      
        6
        
        -  :commands (markdown-mode gfm-mode)

      
        7
        
        -

      
        8
        
        -  :mode

      
        9
        
        -  ("README.*\\.md\\'" . gfm-mode)

      
        10
        
        -  ("\\.md\\'" . markdown-mode)

      
        11
        
        -  ("\\.markdown\\'" . markdown-mode)

      
        12
        
        -

      
        13
        
        -  :hook

      
        14
        
        -  (markdown-mode . variable-pitch-mode)

      
        15
        
        -  (markdown-mode . yas-minor-mode)

      
        16
        
        -  (markdown-mode . smartparens-mode)

      
        17
        
        -

      
        18
        
        -  :custom

      
        19
        
        -  (markdown-command "pandoc")

      
        20
        
        -  (markdown-header-scaling t)

      
        21
        
        -

      
        22
        
        -  :config

      
        23
        
        -  (unbind-key "DEL" gfm-mode-map))

      
D doom.d/init.el
···
        1
        
        -(doom! :input

      
        2
        
        -       ;;chinese

      
        3
        
        -       ;;japanese

      
        4
        
        -       ;;layout            ; auie,ctsrnm is the superior home row

      
        5
        
        -

      
        6
        
        -       :completion

      
        7
        
        -       company             ; the ultimate code completion backend

      
        8
        
        -       ;;helm              ; the *other* search engine for love and life

      
        9
        
        -       ;;ido               ; the other *other* search engine...

      
        10
        
        -       ivy                 ; a search engine for love and life

      
        11
        
        -

      
        12
        
        -       :ui

      
        13
        
        -       ;;deft              ; notational velocity for Emacs

      
        14
        
        -       doom                ; what makes DOOM look the way it does

      
        15
        
        -       doom-dashboard      ; a nifty splash screen for Emacs

      
        16
        
        -       doom-quit           ; DOOM quit-message prompts when you quit Emacs

      
        17
        
        -       (emoji +unicode)    ; 🙂

      
        18
        
        -       ;;fill-column       ; a `fill-column' indicator

      
        19
        
        -       hl-todo             ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW

      
        20
        
        -       ;;hydra

      
        21
        
        -       ;;indent-guides     ; highlighted indent columns

      
        22
        
        -       ;;ligatures         ; ligatures and symbols to make your code pretty again

      
        23
        
        -       ;;minimap           ; show a map of the code on the side

      
        24
        
        -       modeline            ; snazzy, Atom-inspired modeline, plus API

      
        25
        
        -       ;;nav-flash         ; blink cursor line after big motions

      
        26
        
        -       neotree           ; a project drawer, like NERDTree for vim

      
        27
        
        -       ophints             ; highlight the region an operation acts on

      
        28
        
        -       (popup +defaults)   ; tame sudden yet inevitable temporary windows

      
        29
        
        -       tabs                ; a tab bar for Emacs

      
        30
        
        -       ;;treemacs          ; a project drawer, like neotree but cooler

      
        31
        
        -       unicode             ; extended unicode support for various languages

      
        32
        
        -       ;;vc-gutter         ; vcs diff in the fringe

      
        33
        
        -       ;;vi-tilde-fringe   ; fringe tildes to mark beyond EOB

      
        34
        
        -       ;;window-select     ; visually switch windows

      
        35
        
        -       ;;workspaces        ; tab emulation, persistence & separate workspaces

      
        36
        
        -       ;;zen               ; distraction-free coding or writing

      
        37
        
        -

      
        38
        
        -       :editor

      
        39
        
        -       (evil +everywhere)  ; come to the dark side, we have cookies

      
        40
        
        -       ;;file-templates    ; auto-snippets for empty files

      
        41
        
        -       fold                ; (nigh) universal code folding

      
        42
        
        -       ;;(format +onsave)  ; automated prettiness

      
        43
        
        -       ;;god               ; run Emacs commands without modifier keys

      
        44
        
        -       ;;lispy             ; vim for lisp, for people who don't like vim

      
        45
        
        -       ;;multiple-cursors  ; editing in many places at once

      
        46
        
        -       ;;objed             ; text object editing for the innocent

      
        47
        
        -       ;;parinfer          ; turn lisp into python, sort of

      
        48
        
        -       ;;rotate-text       ; cycle region at point between text candidates

      
        49
        
        -       ;;snippets          ; my elves. They type so I don't have to

      
        50
        
        -       ;;word-wrap         ; soft wrapping with language-aware indent

      
        51
        
        -

      
        52
        
        -       :emacs

      
        53
        
        -       dired             ; making dired pretty [functional]

      
        54
        
        -       ;;electric        ; smarter, keyword-based electric-indent

      
        55
        
        -       ;;ibuffer         ; interactive buffer management

      
        56
        
        -       undo              ; persistent, smarter undo for your inevitable mistakes

      
        57
        
        -       vc                ; version-control and Emacs, sitting in a tree

      
        58
        
        -

      
        59
        
        -       :term

      
        60
        
        -       eshell            ; the elisp shell that works everywhere

      
        61
        
        -       ;;shell             ; simple shell REPL for Emacs

      
        62
        
        -       ;;term              ; basic terminal emulator for Emacs

      
        63
        
        -       ;;vterm             ; the best terminal emulation in Emacs

      
        64
        
        -

      
        65
        
        -       :checkers

      
        66
        
        -       syntax              ; tasing you for every semicolon you forget

      
        67
        
        -       spell               ; tasing you for misspelling mispelling

      
        68
        
        -       ;;grammar           ; tasing grammar mistake every you make

      
        69
        
        -

      
        70
        
        -       :tools

      
        71
        
        -       ;;ansible

      
        72
        
        -       ;;debugger          ; FIXME stepping through code, to help you add bugs

      
        73
        
        -       ;;direnv

      
        74
        
        -       ;;docker

      
        75
        
        -       ;;editorconfig      ; let someone else argue about tabs vs spaces

      
        76
        
        -       ;;ein               ; tame Jupyter notebooks with emacs

      
        77
        
        -       (eval +overlay)     ; run code, run (also, repls)

      
        78
        
        -       ;;gist              ; interacting with github gists

      
        79
        
        -       lookup              ; navigate your code and its documentation

      
        80
        
        -       lsp

      
        81
        
        -       magit               ; a git porcelain for Emacs

      
        82
        
        -       ;;make              ; run make tasks from Emacs

      
        83
        
        -       ;;pass              ; password manager for nerds

      
        84
        
        -       ;;pdf               ; pdf enhancements

      
        85
        
        -       ;;prodigy           ; FIXME managing external services & code builders

      
        86
        
        -       ;;rgb               ; creating color strings

      
        87
        
        -       ;;taskrunner        ; taskrunner for all your projects

      
        88
        
        -       ;;terraform         ; infrastructure as code

      
        89
        
        -       ;;tmux              ; an API for interacting with tmux

      
        90
        
        -       ;;upload            ; map local to remote projects via ssh/ftp

      
        91
        
        -

      
        92
        
        -       :os

      
        93
        
        -       (:if IS-MAC macos)  ; improve compatibility with macOS

      
        94
        
        -       ;;tty               ; improve the terminal Emacs experience

      
        95
        
        -

      
        96
        
        -       :lang

      
        97
        
        -       ;;agda              ; types of types of types of types...

      
        98
        
        -       ;;cc                ; C/C++/Obj-C madness

      
        99
        
        -       ;;clojure           ; java with a lisp

      
        100
        
        -       ;;common-lisp       ; if you've seen one lisp, you've seen them all

      
        101
        
        -       ;;coq               ; proofs-as-programs

      
        102
        
        -       ;;crystal           ; ruby at the speed of c

      
        103
        
        -       ;;csharp            ; unity, .NET, and mono shenanigans

      
        104
        
        -       ;;data              ; config/data formats

      
        105
        
        -       ;;(dart +flutter)   ; paint ui and not much else

      
        106
        
        -       ;;elixir            ; erlang done right

      
        107
        
        -       ;;elm               ; care for a cup of TEA?

      
        108
        
        -       emacs-lisp          ; drown in parentheses

      
        109
        
        -       ;;erlang            ; an elegant language for a more civilized age

      
        110
        
        -       ;;ess               ; emacs speaks statistics

      
        111
        
        -       ;;faust             ; dsp, but you get to keep your soul

      
        112
        
        -       ;;fsharp            ; ML stands for Microsoft's Language

      
        113
        
        -       ;;fstar             ; (dependent) types and (monadic) effects and Z3

      
        114
        
        -       ;;gdscript          ; the language you waited for

      
        115
        
        -       (go +lsp)           ; the hipster dialect

      
        116
        
        -       ;;(haskell +dante)  ; a language that's lazier than I am

      
        117
        
        -       ;;hy                ; readability of scheme w/ speed of python

      
        118
        
        -       ;;idris             ; a language you can depend on

      
        119
        
        -       json                ; At least it ain't XML

      
        120
        
        -       ;;(java +meghanada) ; the poster child for carpal tunnel syndrome

      
        121
        
        -       ;;javascript        ; all(hope(abandon(ye(who(enter(here))))))

      
        122
        
        -       ;;julia             ; a better, faster MATLAB

      
        123
        
        -       ;;kotlin            ; a better, slicker Java(Script)

      
        124
        
        -       ;;latex             ; writing papers in Emacs has never been so fun

      
        125
        
        -       ;;lean

      
        126
        
        -       ;;factor

      
        127
        
        -       ;;ledger            ; an accounting system in Emacs

      
        128
        
        -       ;;lua               ; one-based indices? one-based indices

      
        129
        
        -       markdown            ; writing docs for people to ignore

      
        130
        
        -       ;;nim               ; python + lisp at the speed of c

      
        131
        
        -       ;;nix               ; I hereby declare "nix geht mehr!"

      
        132
        
        -       ;;ocaml             ; an objective camel

      
        133
        
        -       org                 ; organize your plain life in plain text

      
        134
        
        -       ;;php               ; perl's insecure younger brother

      
        135
        
        -       ;;plantuml          ; diagrams for confusing people more

      
        136
        
        -       ;;purescript        ; javascript, but functional

      
        137
        
        -       python              ; beautiful is better than ugly

      
        138
        
        -       ;;qt                ; the 'cutest' gui framework ever

      
        139
        
        -       ;;racket            ; a DSL for DSLs

      
        140
        
        -       ;;raku              ; the artist formerly known as perl6

      
        141
        
        -       ;;rest              ; Emacs as a REST client

      
        142
        
        -       ;;rst               ; ReST in peace

      
        143
        
        -       ;;(ruby +rails)     ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}

      
        144
        
        -       ;;rust              ; Fe2O3.unwrap().unwrap().unwrap().unwrap()

      
        145
        
        -       ;;scala             ; java, but good

      
        146
        
        -       ;;scheme              ; a fully conniving family of lisps

      
        147
        
        -       sh                  ; she sells {ba,z,fi}sh shells on the C xor

      
        148
        
        -       ;;sml

      
        149
        
        -       ;;solidity          ; do you need a blockchain? No.

      
        150
        
        -       ;;swift             ; who asked for emoji variables?

      
        151
        
        -       ;;terra             ; Earth and Moon in alignment for performance.

      
        152
        
        -       ;;web               ; the tubes

      
        153
        
        -       ;;yaml              ; JSON, but readable

      
        154
        
        -

      
        155
        
        -       :email

      
        156
        
        -       ;;(mu4e +gmail)

      
        157
        
        -       ;;notmuch

      
        158
        
        -       ;;(wanderlust +gmail)

      
        159
        
        -

      
        160
        
        -       :app

      
        161
        
        -       ;;calendar

      
        162
        
        -       ;;irc               ; how neckbeards socialize

      
        163
        
        -       ;;(rss +org)        ; emacs as an RSS reader

      
        164
        
        -       ;;twitter           ; twitter client https://twitter.com/vnought

      
        165
        
        -

      
        166
        
        -       :config

      
        167
        
        -       ;;literate

      
        168
        
        -       (default +bindings +smartparens))

      
D doom.d/packages.el
···
        1
        
        -(package! async)

      
        2
        
        -(package! go-autocomplete)

      
        3
        
        -(package! markdown-mode)

      
M zshrc
···
        16
        16
         export UPDATE_ZSH_DAYS=7        # Change how often to auto-update.

      
        17
        17
         export LANG=en_US.UTF-8         # Set locale

      
        18
        18
         

      
        19
        
        -plugins=(pip python golang pass sudo heroku vi-mode git encode64)

      
        
        19
        +plugins=(pip python golang pass sudo git encode64)

      
        20
        20
         source $ZSH/oh-my-zsh.sh

      
        21
        21
         

      
        22
        22
         

      
        23
        
        -### Vim mode ###

      
        24
        
        -VI_MODE_RESET_PROMPT_ON_MODE_CHANGE=true

      
        25
        
        -VI_MODE_SET_CURSOR=true

      
        26
        
        -MODE_INDICATOR="%F{cyan}+%f"

      
        27
        
        -

      
        28
        23
         ### Variables ###

      
        29
        24
         export EDITOR="nvim"

      
        30
        25
         export VISUAL="nvim"

      
        31
        26
         export GOPATH="$HOME/go"

      
        
        27
        +

      
        32
        28
         

      
        33
        29
         ### Function ###

      
        34
        30
         function bgcolor {

      ···
        41
        37
               set bt=nofile ls=0 noru nonu nornu |\

      
        42
        38
               Codi $syntax" "$@"

      
        43
        39
         }

      
        
        40
        +

      
        44
        41
         

      
        45
        42
         ### Aliases ###

      
        46
        43
         alias cls="clear"

      ···
        73
        70
         alias .4="cd ../../../.."

      
        74
        71
         alias .5="cd ../../../../.."

      
        75
        72
         alias .6="cd ../../../../../.."

      
        76
        
        -

      
        77
        
        -# Doom emacs

      
        78
        
        -alias doomsync="$HOME/.emacs.d/bin/doom sync"

      
        79
        
        -alias doomupgrade="$HOME/.emacs.d/bin/doom upgrade"

      
        80
        
        -alias doomdoctor="$HOME/.emacs.d/bin/doom doctor"

      
        81
        
        -alias doom="$HOME/.emacs.d/bin/doom"