all repos

dotfiles @ 102aa36798f17adf2eaac48c399ea8643d503ac4

my dotfiles
15 files changed, 152 insertions(+), 140 deletions(-)
Update i3, polybar, emacs, qtile, zsh & sctipts
Author: Smirnov Olexandr ss2316544@gmail.com
Committed at: 2021-01-02 21:48:35 +0200
Parent: 8822c65
M bin/catfetch

@@ -11,7 +11,7 @@

# Shell shell=$(basename $SHELL) -# Pakages +# Packages manager=$(which apt pacman yay apk xbps-query 2>/dev/null) manager=${manager##*/} case "$manager" in

@@ -42,5 +42,5 @@ echo -e " ${blue}${bold} WM ${reset}${wmname}"

echo -e " /\_/\ ${blue}${bold} SHELL ${reset}${shell}" echo -e " (=^.^=) ${blue}${bold}KERNEL ${reset}${kernel}" echo -e " (\") (\")_/ ${blue}${bold} PKG ${reset}${packages}" -echo -e " ${black}卑${red}卑${green}卑${yellow}卑${blue}卑${magenta}卑${cyan}卑${reset} " +echo -e " ${black} ${red} ${green} ${yellow} ${blue} ${magenta} ${cyan} ${reset} " exit 0
M config/i3/config

@@ -25,12 +25,12 @@ exec --no-startup-id exec picom --experimental-backends -b

exec --no-startup-id exec nitrogen --restore exec --no-startup-id exec setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" exec --no-startup-id exec org.telegram.desktop -exec --no-startup-id exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 -exec_always --no-startup-id exec xautolock -time 3 -locker "betterlockscreen --off 180 -t \"Computer is lockerd\" -l" +exec --no-startup-id exec lxsession +exec --no-startup-id exec xautolock -time 3 -locker "betterlockscreen --off 180 -t \"Computer is lockerd\" -l" exec_always --no-startup-id exec $HOME/.config/i3/bar.sh +exec --no-startup-id exec discord #exec --no-startup-id exec conky #exec --no-startup-id exec redshift-gtk -#exec --no-startup-id exec discord ############## WM keys ############

@@ -60,11 +60,11 @@

############## User key ########### # Menus -bindsym $mod+Shift+apostrophe exec "rofi -show run" -bindsym $mod+Shift+Return exec "rofi -show drun" -bindsym $mod+Escape exec ~/.script/dmenu/dmenu-power.sh -h 24 -bindsym $mod+Control+u exec ~/.script/dmenu/dmenu-config-edit.sh -h 24 -bindsym $mod+Control+i exec passmenu -h 24 -p Passwords +bindsym $mod+Shift+apostrophe exec "rofi -location 6 -show run" +bindsym $mod+Shift+Return exec "rofi -location 6 -show drun" +bindsym $mod+Escape exec ~/.script/dmenu/dmenu-power.sh -b -h 24 +bindsym $mod+Control+u exec ~/.script/dmenu/dmenu-config-edit.sh -b -h 24 +bindsym $mod+Control+i exec passmenu -b -h 24 -p Passwords # Apps bindsym $mod+Return exec $terminal

@@ -84,11 +84,11 @@ bindsym $mod+minus exec "pactl set-sink-volume alsa_output.pci-0000_00_1b.0.analog-stereo -2%"

bindsym $mod+Shift+minus exec "pactl set-sink-mute alsa_output.pci-0000_00_1b.0.analog-stereo toggle" ######### Window preferens ######## -assign [class="(?i)firefox|qutebrowser"] $ws2 -assign [class="(?i)telegram|discord|viber"] $ws6 +assign [class="(?i)telegram|discord"] $ws6 +for_window [class="(?i)telegram|discord"] layout tabbed #focus_on_window_activation focus -########## Change focus ########## +########## Change focus ########### bindsym $mod+h focus left bindsym $mod+Left focus left bindsym $mod+j focus down

@@ -109,14 +109,14 @@ bindsym $mod+Shift+l move right

bindsym $mod+Shift+Right move right ########## Resize window ########## -bindsym $mod+Control+h resize shrink width 20 px or 20 ppt -bindsym $mod+Control+Left resize shrink width 20 px or 20 ppt -bindsym $mod+Control+j resize grow height 20 px or 20 ppt -bindsym $mod+Control+Down resize grow height 20 px or 20 ppt -bindsym $mod+Control+k resize shrink height 20 px or 20 ppt -bindsym $mod+Control+Up resize shrink height 20 px or 20 ppt -bindsym $mod+Control+l resize grow width 20 px or 20 ppt -bindsym $mod+Control+Right resize grow width 20 px or 20 ppt +bindsym $mod+Control+h resize shrink width 5 px or 5 ppt +bindsym $mod+Control+Left resize shrink width 5 px or 5 ppt +bindsym $mod+Control+j resize grow height 5 px or 5 ppt +bindsym $mod+Control+Down resize grow height 5 px or 5 ppt +bindsym $mod+Control+k resize shrink height 5 px or 5 ppt +bindsym $mod+Control+Up resize shrink height 5 px or 5 ppt +bindsym $mod+Control+l resize grow width 5 px or 5 ppt +bindsym $mod+Control+Right resize grow width 5 px or 5 ppt ############ Workspaces ########### set $ws1 "1"
M config/nvim/init.vim

@@ -37,7 +37,7 @@

" Colors set termguicolors set background=dark -colorscheme nten16 +colo nten16 set t_Co=256 " Syntax & line numbars
M config/picom.conf

@@ -9,7 +9,7 @@ shadow-offset-y = -7;

shadow-exclude = [ "override_redirect", "class_g = 'Firefox' && argb", - "class_g = 'Polybar'" + #"class_g = 'Polybar'" ]; ############ Fading ###########

@@ -27,10 +27,10 @@ opacity-rule = [ "0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'" ];

no-fading-openclose = true ##### Background-Blurring ##### -blur-method = "dual_kawase"; -blur-strength = 5; -blur-kern = "3x3box"; -blur-background-exclude = []; +#blur-method = "dual_kawase"; +#blur-strength = 5; +#blur-kern = "3x3box"; +#blur-background-exclude = []; ####### General Settings ######
M config/polybar/config

@@ -11,6 +11,7 @@

[bar/i3bar] width = 100% height = 24 +bottom = true fixed-center = true wm-restack = i3 background = ${colors.background}

@@ -20,7 +21,7 @@ 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 pacman-up +modules-left = i3 menu pacman-up window-name modules-right = keyboard pulseaudio backlight wifi-signal time date tray-position = right

@@ -104,6 +105,10 @@ type = custom/script

exec = ~/.config/polybar/scripts/updates-pacman-aur.sh interval = 60 +[module/window-name] +type = internal/xwindow +label-maxlen = 100 + [module/keyboard] type = internal/xkeyboard format-prefix = ""

@@ -111,6 +116,22 @@ label-layout =  %layout%

blacklist-0 = num lock blacklist-1 = scroll lock blacklist-2= caps lock + +[module/menu] +type = custom/menu +format = <label-toggle> <menu> +format-padding = 1 +format-spacing = 2 +label-open =  +label-close =  +menu-0-0 =  +menu-0-0-exec = thunar +menu-0-1 =  +menu-0-1-exec = firefox +menu-0-2 =  +menu-0-2-exec = alacritty +menu-0-3 =  +menu-0-3-exec = emacs [module/date] type = internal/date
M config/qtile/config.py

@@ -44,14 +44,6 @@ Key([mod], "f",

lazy.spawn(filemanager), desc="Launch filemanager" ), - Key([mod, "shift"], "f", - lazy.spawn("dmenufm"), - desc="Launch dmenu filemanager" - ), - Key([mod, alt], "t", - lazy.spawn(f"{terminal} -e nvim /home/{user}/.todo"), - desc="Open ~/.todo file in nvim" - ), # Window control Key([mod], "q",

@@ -137,11 +129,11 @@ ),

# Menus(dmenu or/and rofi) Key([mod, "shift"], "Return", - lazy.spawn("rofi -show drun"), + lazy.spawn("rofi -location 2 -show drun"), desc="(Rofi) Program launcher" ), Key([mod, "shift"], "apostrophe", - lazy.spawn("rofi -show run"), + lazy.spawn("rofi -location 2 -show run"), desc="(Rofi) Program launcher" ), Key([mod],"Escape",
M config/rofi/themes/nten-dmenu.rasi

@@ -7,7 +7,7 @@ selected-background: #008DCD;

selected-foreground: #ffffff; } #window { - location: north; + /* location: north; */ width: 100%; height: 24px; padding: 0px;
M doom.d/config.el

@@ -4,3 +4,14 @@

(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)))
M doom.d/custom.el

@@ -1,3 +1,12 @@

(custom-set-variables - '(package-selected-packages '(zoutline))) -(custom-set-faces) + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(package-selected-packages '(markdown-mode zoutline))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + )
M doom.d/init.el

@@ -23,16 +23,16 @@ ;;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 + 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 + ;;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 + ;;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 + ;;workspaces ; tab emulation, persistence & separate workspaces ;;zen ; distraction-free coding or writing :editor

@@ -51,7 +51,7 @@ ;;word-wrap ; soft wrapping with language-aware indent

:emacs dired ; making dired pretty [functional] - electric ; smarter, keyword-based electric-indent + ;;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

@@ -64,7 +64,7 @@ ;;vterm ; the best terminal emulation in Emacs

:checkers syntax ; tasing you for every semicolon you forget - ;;spell ; tasing you for misspelling mispelling + spell ; tasing you for misspelling mispelling ;;grammar ; tasing grammar mistake every you make :tools

@@ -91,7 +91,7 @@ ;;upload ; map local to remote projects via ssh/ftp

:os (:if IS-MAC macos) ; improve compatibility with macOS - tty ; improve the terminal Emacs experience + ;;tty ; improve the terminal Emacs experience :lang ;;agda ; types of types of types of types...

@@ -150,7 +150,7 @@ ;;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 + ;;yaml ; JSON, but readable :email ;;(mu4e +gmail)
M doom.d/packages.el

@@ -1,3 +1,5 @@

(package! rainbow-mode) (package! async) (package! go-autocomplete) +(package! markdown-mode) +(package! hy-mode)
M script/dmenu/dmenu-config-edit.sh

@@ -3,75 +3,78 @@ declare options=("i3

qtile berry openbox -polybar +alacritty +kitty picom -dunst +ranger qutebrowser -taskwarrior +emacs +nvim tmux -alacritty -kitty -neovim -ranger -sh") +dunst +castero +redshift +rofi") -choice=$(echo -e "${options[@]}" | dmenu -p 'Edit config file' $@) +choice=$(echo -e "${options[@]}"|dmenu -p "Config edit" $@) case "$choice" in - dunst) choice="$HOME/.config/dunst/dunstrc" ;; - neovim) choice="$HOME/.config/nvim/init.vim" ;; - taskwarior) choice="$HOME/.taskrc" ;; - picom) choice="$HOME/.config/picom.conf" ;; - kitty) choice="$HOME/.config/kitty/kitty.conf" ;; - alacritty) choice="$hoME/.config/alacritty.yml" ;; - polybar) choice="$HOME/.config/polybar/config" ;; - tmux) choice="$HOME/.tmux.conf" ;; - i3) choice="$HOME/.config/i3/config" ;; - qtile) - opt=$(echo -e "config.py\nautostart.sh"|dmenu -p 'Qtile' $@) - case "$opt" in - "config.py") choice="$HOME/.config/qtile/config.py" ;; - "autostart.sh") choice="$HOME/.config/qtile/autostart.sh" ;; + i3) + case "$(echo -e "config\npolybar"|dmenu -p "I3wm" $@)" in + config) choice="$HOME/.config/i3/config" ;; + polybar) choice="$HOME/.config/polybar/config" ;; + esac + ;; + qtile) + case "$(echo -e "config\nautostart"|dmenu -p "Qtile" $@)" in + config) choice="$HOME/.config/qtile/config.py" ;; + autostart) choice="$HOME/.config/qtile/autostart.sh" ;; esac ;; berry) - declare opt=$(echo -e "berry\npolybar\nsxhkd"|dmenu -p 'Berry' $@) - case "$opt" in - "berry") choice="$HOME/.config/berry/autostart" ;; - "polybar") choice="$HOME/.config/berry/polybar/polybar" ;; - "sxhkd") choice="$HOME/.config/berry/sxhkdrc" ;; + case "$(echo -e "config\npolybar\nsxhkd"|dmenu -p "Berry" $@)" in + config) choice="$HOME/.config/berry/autostart" ;; + polybar) choice="$HOME/.config/berry/polybar/polybar" ;; + sxhkd) choice="$HOME/.config/berry/sxhkdrc" ;; esac ;; openbox) - opt=$(echo -e "openbox\nautostart\nmenu\nreload"|dmenu -p 'OpenBox' $@) - case "$opt" in - "openbox") choice="$HOME/.config/openbox/rc.xml" ;; - "autostart") choice="$HOME/.config/openbox/autostart" ;; - "menu") choice="$HOME/.config/openbox/menu.xml" ;; - "reload") openbox --reconfigure && pkill kitty ;; + case "$(echo -p "config\nautostart\nmenu\ntint2|dmenu -p "OpenBox" $@")" in + config) choice="$HOME/.config/openbox/rc.xml" ;; + autostart) choice="$HOME/.config/openbox/autostart" ;; + menu) choice="$HOME/.config/openbox/menu.xml" ;; + tint2) choice="$HOME/.config/tint2/tint2rc" ;; esac ;; + alacritty) choice="$hoME/.config/alacritty.yml" ;; + kitty) choice="$HOME/.config/kitty/kitty.conf" ;; + picom) choice="$HOME/.config/picom.conf" ;; + ranger) choice="$HOME/.config/ranger/rc.conf" ;; qutebrowser) - why=$(echo -e "config.py\nquickmarks"|dmenu -p 'Qutebrowser' $@) - case "$why" in - "config.py") choice="$HOME/.config/qutebrowser/config.py" ;; - "quickmarks") choice="$HOME/.config/qutebrowser/quickmarks" ;; + case "$(echo -e "config\nquickmarks"|dmenu -p "Qutebrowser" $@)" in + config) choice="$HOME/.config/qutebrowser/config.py" ;; + quickmarks) choice="$HOME/.config/qutebrowser/quickmarks" ;; esac ;; - ranger) - why=$(echo -e "rc.conf\nrifle.conf"|dmenu -p 'Ranger' $@) - case "$why" in - "rc.conf") choice="$HOME/.config/ranger/rc.conf" ;; - "rifle.conf") choice="$HOME/.config/ranger/rifle.conf" ;; + emacs) + case "$(echo -e "config.el\ncustom.el\ninit.el\npackages.el"|dmenu -p "Doom emacs" $@)" in + config.el) choice="$HOME/.doom.d/config.el" ;; + init.el) choice="$HOME/.doom.d/init.el" ;; + custom.el) choice="$HOME/.doom.d/custom.el" ;; + packages.el) choice="$HOME/.doom.d/packages.el" ;; esac ;; - sh) - why=$(echo -e "zsh\nfish\nbash"|dmenu -p "Shell" $@) - case "$why" in - zsh) choice="$HOME/.zshrc" ;; - fish) choice="$HOME/.config/fish/config.fish" ;; - bash) choice="$hoME/.bashrc" + nvim) choice="$HOME/.config/nvim/init.vim" ;; + tmux) choice="$HOME/.tmux.conf" ;; + dunst) choice="$HOME/.config/dunst/dunstrc" ;; + zsh) choice="$HOME/.zshrc" ;; + castero) choice="$HOME/.config/castero/castero.conf" ;; + redshift) choice="$HOME/.config/redshift.conf" ;; + rofi) + case "$(echo -e "config\nnten-dmenu"|dmenu -p "Rofi" $@)" in + config) choice="$HOME/.config/rofi/config" ;; + nten-dmenu) choice="$HOME/.config/rofi/themes/nten-dmenu.rasi" ;; esac ;; - *) exit 1 ;; esac alacritty -e nvim "$choice" +# emacsclient -c -a emacs "$choice"
M script/dmenu/dmenu-power.sh

@@ -1,42 +1,28 @@

#!/bin/sh -declare options=("Poweroff +declare options=("ShutDown Lock Logout Reboot") -choice=$(echo -e "${options[@]}" | dmenu -p 'Power' $@) +choice=$(echo -e "${options[@]}" | dmenu -p "Power" $@) case "$choice" in - "Poweroff") - declare opt=("Yes\nNo") - yesno=$(echo -e "${opt[@]}" | dmenu -p 'Power' $@) - case "$yesno" in + "ShutDown") + case "$(echo -e "Yes\nNo"|dmenu -p "ShutDown" $@)" in "Yes") exec systemctl poweroff ;; - "No") exec exit 0 ;; + "No") exec exit 0 ;; esac ;; - "Lock") - exec betterlockscreen --off 300 -t "Computer is lockerd" -l ;; + "Lock") exec betterlockscreen --off 300 -t "Computer is lockerd" -l ;; "Logout") - declare opt=("Yes\nNo") - yesno=$(echo -e "${opt[@]}" | dmenu -p 'Logout' $@) - case "$yesno" in - "Yes") - if [[ "$(pgrep spectrwm)" ]]; then - exec pkill spectrwm - else - exec loginctl terminate-session $XDG_SESSION_ID - fi - ;; - "No") exec exit 0 ;; + case "$(echo -e "Yes\nNo"|dmenu -p "ShutDown" $@)" in + "Yes") exec loginctl terminate-session $XDG_SESSION_ID ;; + "No") exec exit 0 ;; esac ;; "Reboot") - declare opt=("Yes\nNo") - yesno=$(echo -e "${opt[@]}" | dmenu -p 'Power' $@) - case "$yesno" in + case "$(echo -e "Yes\nNo"|dmenu -p "Reboot" $@)" in "Yes") exec systemctl reboot ;; - "No") exec exit 0 ;; + "No") exec exit 0 ;; esac ;; - *) exit 1 ;; esac
D script/dmenu/dmenu-sysmon.sh

@@ -1,15 +0,0 @@

-#!/bin/sh - -declare options=("htop -bashtop -gtop") - -choice=$(echo -e "${options[@]}" | dmenu -h 24 -p 'System monitor ') - -case "$choice" in - htop) choice="htop" ;; - bashtop) choice="bashtop" ;; - gtop) choice="gtop" ;; - *) exit 1 ;; -esac -kitty -e "$choice"
M zshrc

@@ -42,6 +42,7 @@ alias du="du -sh"

alias df="df -h" alias lns="ln -s" alias uln="unlink" +alias rf="rm -rf" # Program alias vim="nvim"

@@ -69,3 +70,5 @@ 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" + +eval $(thefuck --alias)