@@ -21,9 +21,17 @@ ~~~bash
yay -S rcm ~~~ +Install deps: +~~~bash +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 +yay -S polybar +pip install -U castero +~~~ + + And install configs: ~~~bash git clone https://github.com/Smirnov-O/dotfiles .dotfiles rcup mv ~/.bin ~/bin -~~~ +~~~
@@ -1,7 +0,0 @@
-Scripts: -- `arch_upd`: Update packages(pacman, aur). Only arch. -- `extract`: Extract archive. -- `giti`: Gitignore manager(For help exec: __giti help__). -- `kbhl`: Enable/disable keyboard highlight scrlock. -- `local-ip`: Get local IP addres. -- `public-ip`: Get public IP addres.
@@ -0,0 +1,4 @@
+#!/bin/bash +killall -q polybar +while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done +polybar -c ~/.config/bspwm/polybar bar&
@@ -0,0 +1,49 @@
+#!/bin/sh +# Smirnov-O <ss2316544@gmail.com> +# BSPWM config file + +## == Functions +Run() { + if ! pgrep $1; then $@& fi +} + +## == Autostart +setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" & +Run sxhkd -c .config/bspwm/sxhkd & +~/.config/bspwm/bar.sh & +Run nitrogen --restore & +Run lxsession & +Run picom & + +## == BSPWM +bspc monitor -d 1 2 3 4 5 6 7 8 9 + +bspc config border_width 2 +bspc config window_gap 8 + +bspc config split_ratio 0.52 +bspc config borderless_monocle true +bspc config gapless_monocle true +bspc config click_to_focus true +bspc config single_monocle false +bspc config borderless_monocle true + +# Colors +bspc config normal_border_color "#262A2B" +bspc config active_border_color "#1F2324" +bspc config focused_border_color "#008DCD" +bspc config presel_feedback_color "#51AFEF" +bspc config urgent_border_color "#FF6C6B" + +# Rules +bspc rule -a Alacritty desktop='^1' focus=on follow=on +bspc rule -a firefox desktop='^2' focus=on +bspc rule -a VSCodium desktop='^3' focus=on follow=on +bspc rule -a '*:nvim' desktop='^3' focus=on follow=on +bspc rule -a '*:ranger' desktop='^4' focus=on follow=on +bspc rule -a Thunar desktop='^4' focus=on follow=on +bspc rule -a Joplin desktop='^5' focus=on +bspc rule -a discord descord='^6' focus=on +bspc rule -a TelegramDesktop descord='^6' focus=on +bspc rule -a Spotify descord='^9' focus=on +bspc rule -a google-tasks-desktop state=floating
@@ -0,0 +1,99 @@
+[settings] +enable-ipc = true +screenchange-reload = true +pseudo-transparency = true + +[colors] +background = #262A2B +foreground = #DFDFDF +secondary = #008DCD +alert = #FF6C6B + +[bar/bar] +width = 100% +height = 24 +fixed-center = true +background = ${colors.background} +foreground = ${colors.foreground} +wm-restack = bspwm +module-margin-left = 1 +module-margin-right = 1 +font-0 = Iosevka Nerd Font:style=Medium:size=8;3 +font-1 = FontAwesome5Free:style=Solid:size=7.5;2.5 +modules-left = windowname +modules-center = bspwm +modules-right = pulseaudio archupd wifi-signal weather memory cpu keyboard time date +tray-position = right + +[module/bspwm] +type = internal/bspwm +pin-workspaces = true +enable-click = true +fuzzy-match = true +enable-scroll = true +label-focused = +label-focused-foreground = ${colors.secondary} +label-focused-padding = 2 +label-occupied = +label-occupied-foreground = ${colors.foreground} +label-occupied-padding = 2 +label-urgent = +label-urgent-foreground = ${colors.alert} +label-urgent-padding = 2 +label-empty = +label-empty-foreground = #58676C74 +label-empty-padding = 2 + +[module/pulseaudio] +type = internal/pulseaudio +interval = 2 +format-volume = <ramp-volume> <label-volume> +label-volume = %percentage%% +label-volume-foreground = ${root.foreground} +label-muted = +ramp-volume-0 = + +[module/weather] +type = custom/script +exec = python3 ~/.config/polybar/scripts/weather.py +interval = 60 + +[module/archupd] +type = custom/script +exec = ~/.config/polybar/scripts/updates-pacman-aur.sh +interval = 60 + +[module/keyboard] +type = internal/xkeyboard +format-prefix = "" +label-layout = %layout% +blacklist-0 = num lock +blacklist-1 = scroll lock +blacklist-2= caps lock + +[module/cpu] +type = internal/cpu +format-prefix = " " +interval = 2 + +[module/memory] +type = internal/memory +interval = 2 +label = %percentage_used%% +format-prefix = " " + +[module/windowname] +type = internal/xwindow +label = %title% +label-maxlen = 90 + +[module/date] +type = internal/date +interval = 600 +date = %d.%m.%Y +label = %date% + +[module/time] +type = internal/date +time = %H:%M +label = %time%
@@ -0,0 +1,91 @@
+# Smirnov-O <ss2316544@gmail.com> +# BSPWM/SXKBD config file + +## == USER keys +super + Return + alacritty +super + shift + w + firefox + +super + shift + f + alacritty --class="ranger" -e ranger + +super + shift + e + alacritty --class="nvim" -e nvim + +super + shift + c + vscodium + +super + shift + d + org.zealdocs.Zeal + +super + shift + q + xkill + +## == USER Menus +super + shift + Return + rofi -location 2 -show drun + +super + Escape + ~/.script/dmenu/dmenu-power.sh + +super + ctrl + i + passmenu -h 24 -p Passwords + +super + ctrl + u + ~/.script/dmenu/dmenu-config-edit.sh + + +## == BSPWM keys +super + q + bspc node -{c,k} + +super + control + r + bspc wm -r && pkill -USR1 -x sxhkd + +## == BSPWM windows +## Resize window +super + ctrl + {h,j,k,l} + bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0} + +# Resize floating window +#super + shift + {h,j,k,l} +# bspc node -v {-20 0,0 20,0 -20,20 0} + +# Change focus & move focus window +super + {_,shift + }{h,j,k,l} + bspc node -{f,s} {west,south,north,east} + +# Change focus window +super + {_,shift + }c + bspc node -f {next,prev}.local.!hidden.window + +# Preselect the direction +super + alt + {h,j,k,l} + bspc node -p {west,south,north,east} + +# Preselect the ratio +super + alt + {1-9} + bspc node -o 0.{1-9} + +# Cancel the preselection +super + ctrl + space + bspc node -p cancel + +## == BSPWM workspace +## Next/Prev workspace +super + bracket{left,right} + bspc desktop -f {prev,next}.local + +# Change WP & send window to WP +super + {_,shift + }{1-9} + bspc {desktop -f,node -d} focused:'^{1-9}' + +## == BSPWM windwo layouts +# Set window layouts for specific window +super + {t,shift + t,s,f} + bspc node -t {tiled,pseudo_tiled,floating,fullscreen} + +# Change windows layout +super + ctrl + {m,x,y,z} + bspc node -g {marked,locked,sticky,private}
@@ -1,13 +0,0 @@
-# DWM - - ------------------------- - - -### Install -~~~bash -git clone https://git.suckless.org/dwm ~/.config/dwm -sudo cp ~/.config/dwm/dwm.desktop /usr/share/xsessions -cd ~/.config/dwm -sudo make clean install -~~~~
@@ -1,6 +0,0 @@
-#!/bin/sh -xautolock -time 5 -locker "betterlockscreen --off 300 -t \"Computer is lockerd\" -l" & -setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" & -nitrogen --restore & -lxsession & -picom -b &
@@ -1,125 +0,0 @@
-static const unsigned int borderpx = 1; // border pixel of windows -static const unsigned int snap = 32; // snap pixel -static const int showbar = 1; // 0 means no bar -static const int topbar = 1; // 0 means bottom bar -static const char *fonts[] = { "monospace:size=10" }; -static const char col_gray1[] = "#262A2B"; -static const char col_gray2[] = "#262A2B"; -static const char col_gray3[] = "#CED4DA"; -static const char col_gray4[] = "#FFFFFF"; -static const char col_cyan[] = "#008DCD"; -static const char *colors[][3] = { - [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, - [SchemeSel] = { col_gray4, col_cyan, col_cyan }, -}; - -// Workspaces names -//static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; -static const char *tags[] = { "", "", "", "", "", "", "", "", "" }; - -// Rules -static const Rule rules[] = { - { "Gimp", NULL, NULL, 0, 1, -1 }, - { "Firefox", NULL, NULL, 1 << 8,0, -1 }, -}; - -// Autostart -static const char *const autostart[] = { - "./.config/dwm/autostart.sh", NULL, - "./.script/dwmbar.sh", NULL, - NULL -}; - -// Layout -static const float mfact = 0.55; // factor of master area size [0.05..0.95] -static const int nmaster = 1; // number of clients in master area -static const int resizehints = 1; // 1 means respect size hints in tiled resizals -static const Layout layouts[] = { - { "[]=", tile }, - { "><>", NULL }, - { "[M]", monocle }, -}; - -// Key definitions -#define MODKEY Mod4Mask -#define TAGKEYS(KEY,TAG) \ - { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ - { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ - { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ - { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, -#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } - -// Commands -static char dmenumon[2] = "0"; -static const char *dmenucmd[] = { "dmenu_run", NULL }; -static const char *launchercmd[] = { "rofi", "-location", "2", "-show", "drun", NULL }; -static const char *passmenucmd[] = { "passmenu", "-h", "24", "-p", "Passwords", NULL }; -static const char *dmenuconfig[] = { "./.script/dmenu/dmenu-config-edit.sh", NULL }; -static const char *dmenupower[] = { "./.script/dmenu/dmenu-power.sh", NULL }; -static const char *browsercmd[] = { "firefox", NULL }; -static const char *filemanager[] = { "thunar", NULL }; -static const char *codeeditor[] = { "alacritty", "-e", "nvim", NULL }; -static const char *termcmd[] = { "alacritty", NULL }; - -// Keyboards binds -static Key keys[] = { - // User keys - { MODKEY, XK_b, togglebar, {0} }, // Toggle status bar - { MODKEY, XK_q, killclient, {0} }, // Kill window - { MODKEY, XK_Return, spawn, {.v = termcmd } }, // Terminal - { MODKEY|ShiftMask, XK_w, spawn, {.v = browsercmd } }, // Browser - { MODKEY|ShiftMask, XK_f, spawn, {.v = filemanager } }, // File manager - { MODKEY|ShiftMask, XK_e, spawn, {.v = codeeditor } }, // File manager - - // Menus - { MODKEY|ShiftMask, XK_Return, spawn, {.v = launchercmd } }, // Program menu - { MODKEY|ControlMask, XK_i, spawn, {.v = passmenucmd } }, // Password menu - { MODKEY|ControlMask, XK_u, spawn, {.v = dmenuconfig } }, // Configuration menu - { MODKEY, XK_Escape, spawn, {.v = dmenupower } }, // Power menu - - // Volume - { MODKEY, XK_minus, spawn, SHCMD("amixer sset 'Master' 2%-") }, - { MODKEY, XK_equal, spawn, SHCMD("amixer sset 'Master' 2%+") }, - { MODKEY|ShiftMask, XK_minus, spawn, SHCMD("amixer sset 'Master' toggle") }, - - // DWM keys - { MODKEY, XK_Tab, setlayout, {0} }, // Change layout - { MODKEY|ShiftMask, XK_Tab, togglefloating, {0} }, // Set floating layout - - { MODKEY, XK_j, focusstack, {.i = +1 } }, - { MODKEY, XK_k, focusstack, {.i = -1 } }, - { MODKEY, XK_i, incnmaster, {.i = +1 } }, - { MODKEY, XK_d, incnmaster, {.i = -1 } }, - { MODKEY, XK_h, setmfact, {.f = -0.05} }, - { MODKEY, XK_l, setmfact, {.f = +0.05} }, - { MODKEY, XK_Return, zoom, {0} }, - - // Workspaces - TAGKEYS( XK_1, 0) - TAGKEYS( XK_2, 1) - TAGKEYS( XK_3, 2) - TAGKEYS( XK_4, 3) - TAGKEYS( XK_5, 4) - TAGKEYS( XK_6, 5) - TAGKEYS( XK_7, 6) - TAGKEYS( XK_8, 7) - TAGKEYS( XK_9, 8) - { MODKEY, XK_0, view, {.ui = ~0 } }, - { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, -}; - -// Mouse binds -static Button buttons[] = { - // click event mask button function argument - { ClkLtSymbol, 0, Button1, setlayout, {0} }, - { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, - { ClkWinTitle, 0, Button2, zoom, {0} }, - { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, - { ClkClientWin, MODKEY, Button1, movemouse, {0} }, - { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, - { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, - { ClkTagBar, 0, Button1, view, {0} }, - { ClkTagBar, 0, Button3, toggleview, {0} }, - { ClkTagBar, MODKEY, Button1, tag, {0} }, - { ClkTagBar, MODKEY, Button3, toggletag, {0} }, -};
@@ -1,116 +0,0 @@
-diff --git a/config.def.h b/config.def.h -index 1c0b587..ed056a4 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -18,6 +18,11 @@ static const char *colors[][3] = { - [SchemeSel] = { col_gray4, col_cyan, col_cyan }, - }; - -+static const char *const autostart[] = { -+ "st", NULL, -+ NULL /* terminate */ -+}; -+ - /* tagging */ - static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; - -diff --git a/dwm.c b/dwm.c -index 9fd0286..1facd56 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -234,6 +234,7 @@ static int xerror(Display *dpy, XErrorEvent *ee); - static int xerrordummy(Display *dpy, XErrorEvent *ee); - static int xerrorstart(Display *dpy, XErrorEvent *ee); - static void zoom(const Arg *arg); -+static void autostart_exec(void); - - /* variables */ - static const char broken[] = "broken"; -@@ -275,6 +276,34 @@ static Window root, wmcheckwin; - /* compile-time check if all tags fit into an unsigned int bit array. */ - struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; }; - -+/* dwm will keep pid's of processes from autostart array and kill them at quit */ -+static pid_t *autostart_pids; -+static size_t autostart_len; -+ -+/* execute command from autostart array */ -+static void -+autostart_exec() { -+ const char *const *p; -+ size_t i = 0; -+ -+ /* count entries */ -+ for (p = autostart; *p; autostart_len++, p++) -+ while (*++p); -+ -+ autostart_pids = malloc(autostart_len * sizeof(pid_t)); -+ for (p = autostart; *p; i++, p++) { -+ if ((autostart_pids[i] = fork()) == 0) { -+ setsid(); -+ execvp(*p, (char *const *)p); -+ fprintf(stderr, "dwm: execvp %s\n", *p); -+ perror(" failed"); -+ _exit(EXIT_FAILURE); -+ } -+ /* skip arguments */ -+ while (*++p); -+ } -+} -+ - /* function implementations */ - void - applyrules(Client *c) -@@ -1249,6 +1278,16 @@ propertynotify(XEvent *e) - void - quit(const Arg *arg) - { -+ size_t i; -+ -+ /* kill child processes */ -+ for (i = 0; i < autostart_len; i++) { -+ if (0 < autostart_pids[i]) { -+ kill(autostart_pids[i], SIGTERM); -+ waitpid(autostart_pids[i], NULL, 0); -+ } -+ } -+ - running = 0; - } - -@@ -1632,9 +1671,25 @@ showhide(Client *c) - void - sigchld(int unused) - { -+ pid_t pid; -+ - if (signal(SIGCHLD, sigchld) == SIG_ERR) - die("can't install SIGCHLD handler:"); -- while (0 < waitpid(-1, NULL, WNOHANG)); -+ while (0 < (pid = waitpid(-1, NULL, WNOHANG))) { -+ pid_t *p, *lim; -+ -+ if (!(p = autostart_pids)) -+ continue; -+ lim = &p[autostart_len]; -+ -+ for (; p < lim; p++) { -+ if (*p == pid) { -+ *p = -1; -+ break; -+ } -+ } -+ -+ } - } - - void -@@ -2139,6 +2194,7 @@ main(int argc, char *argv[]) - if (!(dpy = XOpenDisplay(NULL))) - die("dwm: cannot open display"); - checkotherwm(); -+ autostart_exec(); - setup(); - #ifdef __OpenBSD__ - if (pledge("stdio rpath proc exec", NULL) == -1) -
@@ -1,7 +0,0 @@
-[Desktop Entry] -Encoding=UTF-8 -Name=Dwm -Comment=Dynamic window manager -Exec=dwm -Icon=dwm -Type=XSession
@@ -18,13 +18,14 @@
############ Variables ########### set $terminal alacritty set $browser firefox -set $filemanager thunar +set $filemanager alacritty -e ranger set $codeeditor alacritty -e nvim set $guicode vscodium +set $documentationreader org.zealdocs.Zeal ############ Autostart ############ exec --no-startup-id exec setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" -exec --no-startup-id exec picom --experimental-backends -b +exec_always --no-startup-id exec picom --experimental-backends -b exec_always --no-startup-id exec $HOME/.config/i3/bar.sh exec --no-startup-id exec nitrogen --restore exec --no-startup-id exec lxsession@@ -75,6 +76,7 @@ bindsym $mod+Shift+w exec $browser
bindsym $mod+Shift+f exec $filemanager bindsym $mod+Shift+e exec $codeeditor bindsym $mod+Shift+c exec $guicode +bindsym $mod+Shift+d exec $documentationreader # Toogle polybar bindsym $mod+b exec ~/.script/polybar-toggle@@ -93,6 +95,7 @@ bindsym $mod+Shift+minus exec "amixer sset Master toggle"
######### Window preferens ######## assign [class="(?i)telegram|discord"] $ws6 +for_window [title="Google Tasks"] floating enable for_window [class="(?i)telegram|discord"] layout tabbed focus_on_window_activation focus
@@ -2,10 +2,11 @@ call plug#begin('~/.vim/plugged')
Plug 'Smirnov-O/nten16.vim' " Color scheme Plug 'itchyny/lightline.vim' " Status line Plug 'airblade/vim-gitgutter' " Git indicator - Plug 'preservim/nerdtree' " File viewer Plug 'ap/vim-css-color' " CSS color preview Plug 'mhinz/vim-startify' " Start page Plug 'dense-analysis/ale' " Linter + Plug 'kassio/neoterm' " Terminal wrapper + Plug 'aurieh/discord.nvim' " Discord rich Plug 'editorconfig/editorconfig-vim' " EditorConfig support " Completion & snippets@@ -17,9 +18,10 @@ " Programing
Plug 'metakirby5/codi.vim' Plug 'plasticboy/vim-markdown', {'for': 'markdown'} Plug 'vim-python/python-syntax', {'for': 'python'} - Plug 'fatih/vim-go', {'for': 'go'} Plug 'PotatoesMaster/i3-vim-syntax', {'for': 'i3'} + Plug 'kovetskiy/sxhkd-vim' call plug#end() + " Theme set termguicolors@@ -92,17 +94,6 @@ " Markdown
let g:vim_markdown_folding_disabled = 1 let g:vim_markdown_frontmatter = 1 let g:markdown_fenced_languages = ['go', 'python', 'bash', 'sh=bash'] - -" Go -let g:go_template_autocreate = 0 -let g:go_highlight_structs = 1 -let g:go_highlight_methods = 1 -let g:go_highlight_functions = 1 -let g:go_highlight_operators = 1 -let g:go_highlight_build_constraints = 1 -let g:go_snippet_engine = "" -let g:go_fmt_command = "goimports" -let g:go_auto_type_info = 1 " == Plugins configuration
@@ -9,6 +9,12 @@ ${1}
) endsnippet +snippet fn "Function" +func ${1:main}(${2:arg} ${3:type}) ${4:type} ( + ${5} +) +endsnippet + snippet for "For loop" for ${1:i\:\=1}; ${2:i\<\=10}; ${3:\i\+\+} { ${4}
@@ -13,13 +13,16 @@ #"class_g = 'Polybar'"
]; ############ Fading ########### -fading = false; -fade-in-step = 0.03; -fade-out-step = 0.03; +fading = true; +fading-openclose = true; +fade-in-step = 1; +fade-out-step = 1; +fade-delta = 0; ##### Transparency/Opacity #### inactive-opacity = 1; -frame-opacity = 0.7; +active-opacity = 1; +frame-opacity = 0.8; inactive-opacity-override = false; focus-exclude = []; opacity-exclude = [ "class_g = 'openbox'" ];@@ -27,6 +30,7 @@ opacity-rule = [ "0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'" ];
no-fading-openclose = true ##### Background-Blurring ##### +blur = false; #blur-method = "dual_kawase"; #blur-strength = 5; #blur-kern = "3x3box";@@ -36,6 +40,7 @@
####### General Settings ###### backend = "glx"; vsync = true; +xrender-sync-fence = true; mark-wmwin-focused = true; mark-ovredir-focused = true; glx-no-stencil = true@@ -49,11 +54,11 @@ use-damage = true;
log-level = "warn"; wintypes: { tooltip = { fade = true; shadow = false; opacity = 1; focus = true; full-shadow = false; }; - menu = { fade = true; shadow = false; opacity = 1; }; - popup_menu = { fade = true; shadow = false; }; - dropdown_menu = { fade = true; shadow = false; }; - utility = { fade = true; shadow = false; }; - dialog = { fade = true; shadow = false; }; - notify = { fade = true; shadow = true; }; - unknown = { fade = true; shadow = false; }; + menu = { fade = true; shadow = false; opacity = false; }; + popup_menu = { fade = true; shadow = false; opacity = false; }; + dropdown_menu = { fade = true; shadow = false; opacity = false; }; + utility = { fade = true; shadow = false; opacity = false; }; + dialog = { fade = true; shadow = false; opacity = false; }; + notify = { fade = true; shadow = true; opacity = false; }; + unknown = { fade = true; shadow = false; opacity = false; }; };
@@ -9,7 +9,7 @@ foreground = #DFDFDF
secondary = #008DCD alert = #FF6C6B -[bar/i3bar] +[bar/bar] monitor = ${env:MONITOR_MIDDLE} width = 100% height = 24@@ -23,64 +23,18 @@ module-margin-right = 1
font-0 = Iosevka Nerd Font:style=Medium:size=8;3 font-1 = FontAwesome5Free:style=Solid:size=7.5;2.5 font-2 = Weather Icons:size=7;2 -modules-left = i3 menu pacman-up window-name +modules-left = i3 pacman-up window-name modules-right = pulseaudio backlight wifi-signal keyboard time date tray-position = right -[module/i3] -type = internal/i3 -format = <label-state><label-mode> -index-sort = false -wrapping-scroll = false -label-mode-padding = 1 -label-mode-background = ${colors.alert} - -label-focused = %icon% -label-focused-background = ${colors.secondary} -label-focused-foreground = ${colors.foreground} -label-focused-padding = 1 -label-focused-underline = ${colors.alert} - -label-unfocused = %icon% -label-unfocused-foreground = ${colors.foreground} -label-unfocused-padding = 1 - -label-urgent = %icon% -label-urgent-background = ${colors.alert} -label-urgent-foreground = ${colors.foreground} -label-urgent-padding = 1 -label-urgent-underline = ${colors.alert} - -label-visible = %icon% -label-visible-background = ${colors.background} -label-visible-foreground = ${colors.foreground} -label-visible-padding = 1 -label-visible-underline = ${colors.background} - -ws-icon-0 = "1;1 " -ws-icon-1 = "2;2 " -ws-icon-2 = "3;3 " -ws-icon-3 = "4;4 " -ws-icon-4 = "5;5 " -ws-icon-5 = "6;6 " -ws-icon-6 = "7;7 " -ws-icon-7 = "8;8 " -ws-icon-8 = "9;9 " - -[module/backlight] -type = internal/xbacklight -format = <ramp> <label> -label = %percentage%% -ramp-0 = - -[module/wifi-name] -type = internal/network -interface = wlp3s0 -format-connected = <ramp-signal> <label-connected> -label-connected = %essid% -format-disconnected = -ramp-signal-0 = -interval = 3 +[module/bspwm] +type = internal/bspwm +pin-workspaces = true +inline-mode = false +enable-click = false +enable-scroll = false +reverse-scroll = false +fuzzy-match = true [module/wifi-signal] type = custom/script
@@ -5,25 +5,10 @@ import os
API_KEY = os.getenv("OWM_POLYBAR") -CITY = "Horodnytsya,UA" - +CITY = os.getenv("OWM_CITY") -try: JSON = requests.get(f"http://api.openweathermap.org/data/2.5/weather?q={CITY}&lang=EN&&units=metric&appid={API_KEY}").json() -except Exception as a: print("No connection ") try: - if JSON['weather'][0]['main'] == "Clear": print("", int(JSON["main"]["temp"]),"°С") - elif JSON['weather'][0]['main'] == "Thunderstorm": print("", int(JSON["main"]["temp"]),"°С") - elif JSON['weather'][0]['main'] == "Drizzle": print("", int(JSON["main"]["temp"]),"°С") - elif JSON['weather'][0]['main'] == "Rain": print("", int(JSON["main"]["temp"]),"°С") - elif JSON['weather'][0]['main'] == "Snow": print("", int(JSON["main"]["temp"]),"°С") - elif JSON['weather'][0]['main'] == "Mist": print("", int(JSON["main"]["temp"]),"°С") - elif JSON['weather'][0]['main'] == "Smoke": print("", int(JSON["main"]["temp"]),"°С") - elif JSON['weather'][0]['main'] == "Haze": print("", int(JSON["main"]["temp"]),"°С") - elif JSON['weather'][0]['main'] == "Dust": print("", int(JSON["main"]["temp"]),"°С") - elif JSON['weather'][0]['main'] == "Fog": print("", int(JSON["main"]["temp"]),"°С") - elif JSON['weather'][0]['main'] == "Sand": print("", int(JSON["main"]["temp"]),"°С") - elif JSON['weather'][0]['main'] == "Ash": print("", int(JSON["main"]["temp"]),"°С") - elif JSON['weather'][0]['main'] == "Squall": print("", int(JSON["main"]["temp"]),"°С") - elif JSON['weather'][0]['main'] == "Tornado": print("", int(JSON["main"]["temp"]),"°С") - elif JSON['weather'][0]['main'] == "Clouds": print("", int(JSON["main"]["temp"]),"°С") -except Exception as e: print(int(JSON["main"]["temp"]),"°С") + JSON = requests.get(f"http://api.openweathermap.org/data/2.5/weather?q={CITY}&lang=EN&&units=metric&appid={API_KEY}").json() + print("", int(JSON["main"]["temp"]), "°С") +except: + print(" err °С")
@@ -1,25 +0,0 @@
-highlight clear - -highlight Win cterm=none ctermfg=default ctermbg=default -highlight Directory cterm=bold ctermfg=blue ctermbg=default -highlight Link cterm=bold ctermfg=cyan ctermbg=default -highlight BrokenLink cterm=bold ctermfg=red ctermbg=default -highlight Socket cterm=bold ctermfg=magenta ctermbg=default -highlight Device cterm=bold ctermfg=red ctermbg=default -highlight Fifo cterm=bold ctermfg=cyan ctermbg=default -highlight Executable cterm=bold ctermfg=green ctermbg=default -highlight Selected cterm=bold ctermfg=magenta ctermbg=default -highlight CurrLine cterm=bold,reverse ctermfg=4 ctermbg=black -highlight TopLine cterm=none ctermfg=white ctermbg=32 -highlight TopLineSel cterm=bold ctermfg=white ctermbg=default -highlight StatusLine cterm=bold ctermfg=white ctermbg=default -highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black -highlight CmdLine cterm=none ctermfg=white ctermbg=default -highlight ErrorMsg cterm=none ctermfg=red ctermbg=default -highlight Border cterm=none ctermfg=default ctermbg=default -highlight JobLine cterm=bold,reverse ctermfg=black ctermbg=white -highlight SuggestBox cterm=bold ctermfg=default ctermbg=default -highlight CmpMismatch cterm=bold ctermfg=white ctermbg=red -highlight AuxWin cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default -highlight TabLine cterm=none ctermfg=white ctermbg=default -highlight TabLineSel cterm=bold,reverse ctermfg=default ctermbg=default
@@ -1,93 +0,0 @@
-colorscheme nten16 -set vicmd=nvim -set syscalls -view -set history=100 -set nofollowlinks -set sortnumbers -set undolevels=100 -set norunexec -set timefmt=%m/%d\ %H:%M -set wildmenu -set wildstyle=popup -set suggestoptions=normal,visual,view,otherpane,keys,marks,registers -set ignorecase -set smartcase -set nohlsearch -set incsearch -set scrolloff=4 -set trashdir=$HOME/.local/share/Trash/files -set vifminfo=dhistory,chistory,state,shistory,phistory,fhistory,dirstack,registers,bookmarks,bmarks - -" === commands -command! zip zip -r %f.zip %f -command! targz tar -czvf %f.tar.gz %f -set rulerformat= - -" === Key maps -nmap q ZQ -nnoremap gg ggj -nnoremap ! :shell<cr> -nnoremap w :view<cr> -nnoremap S :sort<cr> -nnoremap se :!$HOME/bin/extract %f &<cr> -nnoremap sa :!zip -r %f.zip %f -nnoremap ss :!tar -czvf %f.tar.gz @f - -" === files -filetype *.csv,*.xlsx libreoffice %c %i -fileviewer *.csv sed "s/,,,,/,,-,,/g;s/,,/ /g" %c | column -t | sed "s/ - / /g" | cut -c -%pw - -fileviewer *.html w3m -dump %c -filextype *.html,*.htm qutebrowser %f 2>/dev/null & - -filetype <text/*> nvim -fileviewer <text/*> env -uCOLORTERM bat --color always --wrap never --pager never %c -p - -filextype *.pdf zathura %c %i & -fileviewer *.pdf - \ vifmimg pdfpreview %px %py %pw %ph %c - \ %pc - \ vifmimg clear - " \ pdftotext -nopgbrk %c - - -filetype <audio/*> mocp %c %i & -filetype <video/*> mpv %c %i & - -filextype <image/*> sxiv %c %i & -fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.xpm - \ ~/.config/vifm/vifmimg draw %px %py %pw %ph %c - \ %pc - \ ~/.config/vifm/vifmimg clear - -filextype *.py nvim %c %i & - -fileviewer *.zip,*.jar zip -sf %c -fileviewer *.tgz,*.tar.gz tar -tzf %c -fileviewer *.tar tar -tf %c -fileviewer *.rar unrar v %c -fileviewer *.7z 7z l %c - -fileviewer */ ls --color --group-directories-first -fileviewer .*/ ls --color --group-directories-first - -filetype * xdg-open %c -fileviewer * file -b %c - -" go keys -nnoremap gh :cd ~<cr> -nnoremap gc :cd ~/Code<cr> -nnoremap gd :cd ~/Documents<cr> -nnoremap gb :cd ~/Documents/Books<cr> -nnoremap gm :cd ~/.dotfiles<cr> -nnoremap gn :cd ~/bin<cr> -nnoremap gz :cd ~/.script<cr> - -" === file icons -set classify=' :dir:/, :exe:, :reg:, :link:' -set classify+=' ::../::, ::*.sh::, ::*.[hc]pp::, ::*.[hc]::, ::/^copying|license$/::, ::.git/,,*.git/::, ::*.epub,,*.fb2,,*.djvu::, ::*.pdf::, ::*.htm,,*.html,,**.[sx]html,,*.xml::' -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::' -set classify+=' ::*.bmp,,*.gif,,*.jpeg,,*.jpg,,*.ico,,*.png,,*.ppm,,*.svg,,*.svgz,,*.tga,,*.tif,,*.tiff,,*.xbm,,*.xcf,,*.xpm,,*.xspf,,*.xwd::' -set classify+=' ::*.aac,,*.anx,,*.asf,,*.au,,*.axa,,*.flac,,*.m2a,,*.m4a,,*.mid,,*.midi,,*.mp3,,*.mpc,,*.oga,,*.ogg,,*.ogx,,*.ra,,*.ram,,*.rm,,*.spx,,*.wav,,*.wma,,*.ac3::' -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::' -set classify+=' ::*.doc,,*.docx::, ::*.xls,,*.xls[mx]::, ::*.pptx,,*.ppt::'
@@ -1,8 +0,0 @@
-# Doom emacs - -### Install -~~~bash -sudo pacman -S emacs ripgrep fd -git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d -~/.emacs.d/bin/doom install -~~~
@@ -1,17 +0,0 @@
-(setq user-full-name "Smirnov Alexandr" - user-mail-address "ss2316544@gmail.com") - -(setq doom-theme 'doom-one) -(setq org-directory "~/org/") -(setq display-line-numbers-type t) - - -(defun gk-markdown-preview-buffer () - (interactive) - (let* ((buf-this (buffer-name (current-buffer))) - (buf-html (get-buffer-create - (format "*gk-md-html (%s)*" buf-this)))) - (markdown-other-window (buffer-name buf-html)) - (shr-render-buffer buf-html) - (eww-mode) - (kill-buffer buf-html)))
@@ -1,23 +0,0 @@
-(custom-set-variables - '(package-selected-packages '(racket-mode markdown-mode zoutline))) -(custom-set-faces) - -(use-package markdown-mode - :commands (markdown-mode gfm-mode) - - :mode - ("README.*\\.md\\'" . gfm-mode) - ("\\.md\\'" . markdown-mode) - ("\\.markdown\\'" . markdown-mode) - - :hook - (markdown-mode . variable-pitch-mode) - (markdown-mode . yas-minor-mode) - (markdown-mode . smartparens-mode) - - :custom - (markdown-command "pandoc") - (markdown-header-scaling t) - - :config - (unbind-key "DEL" gfm-mode-map))
@@ -1,168 +0,0 @@
-(doom! :input - ;;chinese - ;;japanese - ;;layout ; auie,ctsrnm is the superior home row - - :completion - company ; the ultimate code completion backend - ;;helm ; the *other* search engine for love and life - ;;ido ; the other *other* search engine... - ivy ; a search engine for love and life - - :ui - ;;deft ; notational velocity for Emacs - doom ; what makes DOOM look the way it does - doom-dashboard ; a nifty splash screen for Emacs - doom-quit ; DOOM quit-message prompts when you quit Emacs - (emoji +unicode) ; 🙂 - ;;fill-column ; a `fill-column' indicator - hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW - ;;hydra - ;;indent-guides ; highlighted indent columns - ;;ligatures ; ligatures and symbols to make your code pretty again - ;;minimap ; show a map of the code on the side - modeline ; snazzy, Atom-inspired modeline, plus API - ;;nav-flash ; blink cursor line after big motions - neotree ; a project drawer, like NERDTree for vim - ophints ; highlight the region an operation acts on - (popup +defaults) ; tame sudden yet inevitable temporary windows - tabs ; a tab bar for Emacs - ;;treemacs ; a project drawer, like neotree but cooler - unicode ; extended unicode support for various languages - ;;vc-gutter ; vcs diff in the fringe - ;;vi-tilde-fringe ; fringe tildes to mark beyond EOB - ;;window-select ; visually switch windows - ;;workspaces ; tab emulation, persistence & separate workspaces - ;;zen ; distraction-free coding or writing - - :editor - (evil +everywhere) ; come to the dark side, we have cookies - ;;file-templates ; auto-snippets for empty files - fold ; (nigh) universal code folding - ;;(format +onsave) ; automated prettiness - ;;god ; run Emacs commands without modifier keys - ;;lispy ; vim for lisp, for people who don't like vim - ;;multiple-cursors ; editing in many places at once - ;;objed ; text object editing for the innocent - ;;parinfer ; turn lisp into python, sort of - ;;rotate-text ; cycle region at point between text candidates - ;;snippets ; my elves. They type so I don't have to - ;;word-wrap ; soft wrapping with language-aware indent - - :emacs - dired ; making dired pretty [functional] - ;;electric ; smarter, keyword-based electric-indent - ;;ibuffer ; interactive buffer management - undo ; persistent, smarter undo for your inevitable mistakes - vc ; version-control and Emacs, sitting in a tree - - :term - eshell ; the elisp shell that works everywhere - ;;shell ; simple shell REPL for Emacs - ;;term ; basic terminal emulator for Emacs - ;;vterm ; the best terminal emulation in Emacs - - :checkers - syntax ; tasing you for every semicolon you forget - spell ; tasing you for misspelling mispelling - ;;grammar ; tasing grammar mistake every you make - - :tools - ;;ansible - ;;debugger ; FIXME stepping through code, to help you add bugs - ;;direnv - ;;docker - ;;editorconfig ; let someone else argue about tabs vs spaces - ;;ein ; tame Jupyter notebooks with emacs - (eval +overlay) ; run code, run (also, repls) - ;;gist ; interacting with github gists - lookup ; navigate your code and its documentation - lsp - magit ; a git porcelain for Emacs - ;;make ; run make tasks from Emacs - ;;pass ; password manager for nerds - ;;pdf ; pdf enhancements - ;;prodigy ; FIXME managing external services & code builders - ;;rgb ; creating color strings - ;;taskrunner ; taskrunner for all your projects - ;;terraform ; infrastructure as code - ;;tmux ; an API for interacting with tmux - ;;upload ; map local to remote projects via ssh/ftp - - :os - (:if IS-MAC macos) ; improve compatibility with macOS - ;;tty ; improve the terminal Emacs experience - - :lang - ;;agda ; types of types of types of types... - ;;cc ; C/C++/Obj-C madness - ;;clojure ; java with a lisp - ;;common-lisp ; if you've seen one lisp, you've seen them all - ;;coq ; proofs-as-programs - ;;crystal ; ruby at the speed of c - ;;csharp ; unity, .NET, and mono shenanigans - ;;data ; config/data formats - ;;(dart +flutter) ; paint ui and not much else - ;;elixir ; erlang done right - ;;elm ; care for a cup of TEA? - emacs-lisp ; drown in parentheses - ;;erlang ; an elegant language for a more civilized age - ;;ess ; emacs speaks statistics - ;;faust ; dsp, but you get to keep your soul - ;;fsharp ; ML stands for Microsoft's Language - ;;fstar ; (dependent) types and (monadic) effects and Z3 - ;;gdscript ; the language you waited for - (go +lsp) ; the hipster dialect - ;;(haskell +dante) ; a language that's lazier than I am - ;;hy ; readability of scheme w/ speed of python - ;;idris ; a language you can depend on - json ; At least it ain't XML - ;;(java +meghanada) ; the poster child for carpal tunnel syndrome - ;;javascript ; all(hope(abandon(ye(who(enter(here)))))) - ;;julia ; a better, faster MATLAB - ;;kotlin ; a better, slicker Java(Script) - ;;latex ; writing papers in Emacs has never been so fun - ;;lean - ;;factor - ;;ledger ; an accounting system in Emacs - ;;lua ; one-based indices? one-based indices - markdown ; writing docs for people to ignore - ;;nim ; python + lisp at the speed of c - ;;nix ; I hereby declare "nix geht mehr!" - ;;ocaml ; an objective camel - org ; organize your plain life in plain text - ;;php ; perl's insecure younger brother - ;;plantuml ; diagrams for confusing people more - ;;purescript ; javascript, but functional - python ; beautiful is better than ugly - ;;qt ; the 'cutest' gui framework ever - ;;racket ; a DSL for DSLs - ;;raku ; the artist formerly known as perl6 - ;;rest ; Emacs as a REST client - ;;rst ; ReST in peace - ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} - ;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() - ;;scala ; java, but good - ;;scheme ; a fully conniving family of lisps - sh ; she sells {ba,z,fi}sh shells on the C xor - ;;sml - ;;solidity ; do you need a blockchain? No. - ;;swift ; who asked for emoji variables? - ;;terra ; Earth and Moon in alignment for performance. - ;;web ; the tubes - ;;yaml ; JSON, but readable - - :email - ;;(mu4e +gmail) - ;;notmuch - ;;(wanderlust +gmail) - - :app - ;;calendar - ;;irc ; how neckbeards socialize - ;;(rss +org) ; emacs as an RSS reader - ;;twitter ; twitter client https://twitter.com/vnought - - :config - ;;literate - (default +bindings +smartparens))
@@ -1,3 +0,0 @@
-(package! async) -(package! go-autocomplete) -(package! markdown-mode)
@@ -16,19 +16,15 @@ #COMPLETION_WAITING_DOTS="true" # Display red dots whilst waiting for completion.
export UPDATE_ZSH_DAYS=7 # Change how often to auto-update. export LANG=en_US.UTF-8 # Set locale -plugins=(pip python golang pass sudo heroku vi-mode git encode64) +plugins=(pip python golang pass sudo git encode64) source $ZSH/oh-my-zsh.sh -### Vim mode ### -VI_MODE_RESET_PROMPT_ON_MODE_CHANGE=true -VI_MODE_SET_CURSOR=true -MODE_INDICATOR="%F{cyan}+%f" - ### Variables ### export EDITOR="nvim" export VISUAL="nvim" export GOPATH="$HOME/go" + ### Function ### function bgcolor {@@ -41,6 +37,7 @@ nvim -c "let g:startify_disable_at_vimenter = 1 |\
set bt=nofile ls=0 noru nonu nornu |\ Codi $syntax" "$@" } + ### Aliases ### alias cls="clear"@@ -73,9 +70,3 @@ alias .3="cd ../../.."
alias .4="cd ../../../.." alias .5="cd ../../../../.." alias .6="cd ../../../../../.." - -# Doom emacs -alias doomsync="$HOME/.emacs.d/bin/doom sync" -alias doomupgrade="$HOME/.emacs.d/bin/doom upgrade" -alias doomdoctor="$HOME/.emacs.d/bin/doom doctor" -alias doom="$HOME/.emacs.d/bin/doom"