summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
l---------.Xdefaults1
-rw-r--r--.Xresources21
-rw-r--r--.bashrc42
-rw-r--r--.config/aliasrc33
-rw-r--r--.config/bmdirs (renamed from .bmdirs)0
-rw-r--r--.config/bmfiles (renamed from .bmfiles)15
-rw-r--r--.config/calcurse/conf (renamed from .calcurse/conf)0
-rw-r--r--.config/calcurse/keys (renamed from .calcurse/keys)0
-rw-r--r--.config/getkeys/i318
-rw-r--r--.config/getkeys/i3keysguide43
-rw-r--r--.config/gtk-2.0/gtkrc-2.0 (renamed from .gtkrc-2.0)0
-rw-r--r--.config/gtk-3.0/settings.ini2
-rw-r--r--.config/i3/config58
-rw-r--r--.config/ncmpcpp/config8
-rw-r--r--.config/nvim/autoload/plug.vim (renamed from .vim/autoload/plug.vim)0
-rw-r--r--.config/nvim/init.vim60
-rw-r--r--.config/ranger/rc.conf2
-rwxr-xr-x.config/sxiv/exec/key-handler4
-rw-r--r--.config/vifm/vifmrc2
-rw-r--r--.inputrc4
-rw-r--r--.local/share/applications/vim.desktop4
-rw-r--r--.local/share/larbs/readme.mom (renamed from .readme.mom)126
-rw-r--r--.profile25
-rw-r--r--.scripts/SCRIPTS.md2
-rwxr-xr-x.scripts/cron/checkup2
-rwxr-xr-x.scripts/cron/newsup4
-rwxr-xr-x.scripts/i3cmds/displayselect4
-rwxr-xr-x.scripts/i3cmds/dmenumount6
-rwxr-xr-x.scripts/i3cmds/dmenuumount4
-rwxr-xr-x.scripts/i3cmds/dropdowncalc5
-rwxr-xr-x.scripts/i3cmds/lockscreen19
-rwxr-xr-x.scripts/i3cmds/maimpick4
-rwxr-xr-x.scripts/i3cmds/td-toggle13
-rwxr-xr-x.scripts/i3cmds/torwrap6
-rwxr-xr-x.scripts/i3cmds/xcqr2
-rwxr-xr-x.scripts/statusbar/battery16
-rwxr-xr-x.scripts/statusbar/mailbox3
-rwxr-xr-x.scripts/statusbar/mpdupdate3
-rwxr-xr-x.scripts/statusbar/popupgrade1
-rwxr-xr-x.scripts/statusbar/torrent5
-rwxr-xr-x.scripts/tools/compiler25
-rwxr-xr-x.scripts/tools/ifinstalled2
-rwxr-xr-x.scripts/tools/linkhandler9
-rwxr-xr-x.scripts/tools/note8
-rwxr-xr-x.scripts/tools/qndl11
-rwxr-xr-x.scripts/tools/queueandnotify7
-rwxr-xr-x.scripts/tools/setbg2
-rwxr-xr-x.scripts/tools/shortcuts10
-rwxr-xr-x.scripts/tools/texclear2
-rwxr-xr-x.scripts/tools/transadd11
-rw-r--r--.tmux.conf20
l---------.vim1
-rw-r--r--.xinitrc6
-rw-r--r--README.md6
54 files changed, 273 insertions, 414 deletions
diff --git a/.Xdefaults b/.Xdefaults
deleted file mode 120000
index 70e956f..0000000
--- a/.Xdefaults
+++ /dev/null
@@ -1 +0,0 @@
-.Xresources \ No newline at end of file
diff --git a/.Xresources b/.Xresources
deleted file mode 100644
index 7d88a35..0000000
--- a/.Xresources
+++ /dev/null
@@ -1,21 +0,0 @@
-!! The default colors are "Gruvbox":
-*.color0: #1d2021
-*.color1: #cc241d
-*.color2: #98971a
-*.color3: #d79921
-*.color4: #458588
-*.color5: #b16286
-*.color6: #689d6a
-*.color7: #a89984
-*.color8: #928374
-*.color9: #fb4934
-*.color10: #b8bb26
-*.color11: #fabd2f
-*.color12: #83a598
-*.color13: #d3869b
-*.color14: #8ec07c
-*.color15: #ebdbb2
-!! Transparency (0-255):
-st.alpha: 230
-!! Set a default font and font size as below:
-!! *.font: Monospace-14;
diff --git a/.bashrc b/.bashrc
index 366bc56..9338a0c 100644
--- a/.bashrc
+++ b/.bashrc
@@ -4,43 +4,5 @@ shopt -s autocd #Allows you to cd into directory merely by typing the directory
HISTSIZE= HISTFILESIZE= # Infinite history.
export PS1="\[$(tput bold)\]\[$(tput setaf 1)\][\[$(tput setaf 3)\]\u\[$(tput setaf 2)\]@\[$(tput setaf 4)\]\h \[$(tput setaf 5)\]\W\[$(tput setaf 1)\]]\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]"
-[ -f "$HOME/.shortcuts" ] && source "$HOME/.shortcuts" # Load shortcut aliases
-
-# System Maintainence
-alias mw="~/.config/mutt/mutt-wizard.sh"
-alias sdn="sudo shutdown now"
-alias psref="gpg-connect-agent RELOADAGENT /bye" # Refresh gpg
-alias gua="git remote | xargs -L1 git push --all"
-
-# Some aliases
-alias e="$EDITOR"
-alias p="sudo pacman"
-alias SS="sudo systemctl"
-alias v="$EDITOR"
-alias f="vifm"
-alias r="ranger"
-alias sr="sudo ranger"
-alias ka="killall"
-alias g="git"
-alias trem="transmission-remote"
-alias mkd="mkdir -pv"
-alias ref="shortcuts >/dev/null ; source ~/.bashrc" # Refresh shortcuts manually and reload bashrc
-alias mpv="mpv --input-ipc-server=/tmp/mpvsoc$(date +%s)"
-alias x="sxiv -ft *"
-alias lsp="pacman -Qett --color=always | less"
-
-# Adding color
-alias ls='ls -hN --color=auto --group-directories-first'
-alias grep="grep --color=auto"
-alias diff="diff --color=auto"
-alias ccat="highlight --out-format=ansi" # Color cat - print file with syntax highlighting.
-
-# Internet
-alias yt="youtube-dl --add-metadata -i" # Download video link
-alias yta="yt -x -f bestaudio/best" # Download only audio
-alias YT="youtube-viewer"
-
-shdl() { curl -O $(curl -s http://sci-hub.tw/"$@" | grep location.href | grep -o http.*pdf) ;}
-se() { du -a ~/.scripts/* ~/.config/* | awk '{print $2}' | fzf | xargs -r $EDITOR ;}
-sv() { vcopy "$(du -a ~/.scripts/* ~/.config/* | awk '{print $2}' | fzf)" ;}
-vf() { fzf | xargs -r -I % $EDITOR % ;}
+[ -f "$HOME/.config/shortcutrc" ] && source "$HOME/.config/shortcutrc" # Load shortcut aliases
+[ -f "$HOME/.config/aliasrc" ] && source "$HOME/.config/aliasrc"
diff --git a/.config/aliasrc b/.config/aliasrc
new file mode 100644
index 0000000..69baf9c
--- /dev/null
+++ b/.config/aliasrc
@@ -0,0 +1,33 @@
+#!/bin/sh
+alias ka="killall" \
+ mpv="mpv --input-ipc-server=/tmp/mpvsoc$(date +%s)" \
+ calcurse="calcurse -D ~/.config/calcurse" \
+ magit="nvim -c Magit" \
+ p="sudo pacman" \
+ SS="sudo systemctl" \
+ f="vifm" \
+ g="git" \
+ trem="transmission-remote" \
+ e="$EDITOR" \
+ v="$EDITOR" \
+ x="sxiv -ft *" \
+ sdn="sudo shutdown -h now" \
+ gua="git remote | xargs -L1 git push --all" \
+ ls="ls -hN --color=auto --group-directories-first" \
+ grep="grep --color=auto" \
+ diff="diff --color=auto" \
+ ccat="highlight --out-format=ansi" \
+ yt="youtube-dl --add-metadata -i -o '%(upload_date)s-%(title)s.%(ext)s'" \
+ yta="yt -x -f bestaudio/best" \
+ YT="youtube-viewer" \
+ ref="shortcuts >/dev/null; source ~/.config/shortcutrc" \
+ upc="sudo pacman -Syu; pkill -RTMIN+8 i3blocks" \
+ lsp="pacman -Qett --color=always | less" \
+ ffmpeg="ffmpeg -hide_banner"
+
+command -v nvim >/dev/null && alias vim="nvim" vimdiff="nvim -d" # Use neovim for vim if present.
+
+shdl() { curl -O $(curl -s http://sci-hub.tw/"$@" | grep location.href | grep -o http.*pdf) ;}
+se() { du -a ~/.scripts/* ~/.config/* | awk '{print $2}' | fzf | xargs -r $EDITOR ;}
+sv() { vcopy "$(du -a ~/.scripts/* ~/.config/* | awk '{print $2}' | fzf)" ;}
+vf() { fzf | xargs -r -I % $EDITOR % ;}
diff --git a/.bmdirs b/.config/bmdirs
index f3e29be..f3e29be 100644
--- a/.bmdirs
+++ b/.config/bmdirs
diff --git a/.bmfiles b/.config/bmfiles
index e794fa4..c6ded94 100644
--- a/.bmfiles
+++ b/.config/bmfiles
@@ -1,22 +1,17 @@
-bf ~/.bmfiles
-bd ~/.bmdirs
+bf ~/.config/bmfiles
+bd ~/.config/bmdirs
cfb ~/.bashrc
+cfa ~/.config/aliasrc
cfz ~/.zshrc
-cfv ~/.vimrc
+cfv ~/.config/nvim/init.vim
cfr ~/.config/ranger/rc.conf
cfi ~/.config/i3/config
-cfq ~/.config/qutebrowser/config.py
cfm ~/.config/mutt/muttrc
-cft ~/.config/termite/config
eb ~/Documents/LaTeX/uni.bib
cv ~/Documents/LaTeX/cv.tex
-cfp ~/.config/polybar/config
cfd ~/.Xdefaults
cfu ~/.config/newsboat/urls
cfn ~/.config/newsboat/config
-cfA ~/.asoundrc
cfmb ~/.config/ncmpcpp/bindings
cfmc ~/.config/ncmpcpp/config
-cfmpd ~/.config/mpd/mpd.conf
-cfM ~/.config/mpd/mpd.conf
-er ~/.referbib
+er ~/Documents/referbib
diff --git a/.calcurse/conf b/.config/calcurse/conf
index e829390..e829390 100644
--- a/.calcurse/conf
+++ b/.config/calcurse/conf
diff --git a/.calcurse/keys b/.config/calcurse/keys
index f188702..f188702 100644
--- a/.calcurse/keys
+++ b/.config/calcurse/keys
diff --git a/.config/getkeys/i3 b/.config/getkeys/i3
index 82be77d..695744a 100644
--- a/.config/getkeys/i3
+++ b/.config/getkeys/i3
@@ -13,9 +13,9 @@ This is a partial key list.
= + vol ++ vol
+ + vol ++ vol
q kill win kill win
- w browser browser
+ w nmtui (wlan) browser
e neomutt tutorials
- r ranger sudo ranger
+ r ranger winresize
t toggle hor/vert gaps=15px
y calcurse resize left
u dropdown term resize down
@@ -39,12 +39,10 @@ This is a partial key list.
z + outer gaps - outer gaps
x lock screen shutdown
c webcam
- v
- b bar on/off stick/float win
- n newsboat
+ v open Vimwiki
+ b bar on/off stick/float win (left)
+ n newsboat stick/float win (right)
m ncmpcpp mute audio
- , previous song restart song
- < previous song restart song
- . next song
- > next song
- /,? fast win below kill win
+ , < previous song restart song
+ . > next song
+ / ? fast win below kill win
diff --git a/.config/getkeys/i3keysguide b/.config/getkeys/i3keysguide
deleted file mode 100644
index d2d49a1..0000000
--- a/.config/getkeys/i3keysguide
+++ /dev/null
@@ -1,43 +0,0 @@
-esc left workspace exit i3
-tab last workspace
-- - vol -- vol
-_ - vol -- vol
-= + vol ++ vol
-+ + vol ++ vol
-q kill win kill win
-w browser browser
-e neomutt tutorials
-r ranger sudo ranger
-t toggle hor/vert gaps=15px
-y calcurse resize left
-u dropdown term resize down
-i htop resize up
-o sticky win resize right
-p pause music
-[ back 10 secs back 2 min
-] forward 10 secs forward 2 min
-\ last workspace
-a calculator audio control
-s + inner gaps - inner gaps
-d dmenu remove gaps
-f fullscreen freeze mode
-g left workspace GIMP
-h focus left move win left
-j focus down move win down
-k focus up move win up
-l focus right move win right
-; right workspace
-' fast right win
-z + outer gaps - outer gaps
-x lock screen shutdown
-c webcam
-v visualizer projectm
-b bar on/off stick/float win
-n newsboat
-m ncmpcpp mute audio
-, previous song restart song
-< previous song restart song
-. next song
-> next song
-/ fast win below kill win
-? fast win below kill win
diff --git a/.gtkrc-2.0 b/.config/gtk-2.0/gtkrc-2.0
index 9aa6a6e..9aa6a6e 100644
--- a/.gtkrc-2.0
+++ b/.config/gtk-2.0/gtkrc-2.0
diff --git a/.config/gtk-3.0/settings.ini b/.config/gtk-3.0/settings.ini
index 21fef7e..371c307 100644
--- a/.config/gtk-3.0/settings.ini
+++ b/.config/gtk-3.0/settings.ini
@@ -1,5 +1,5 @@
[Settings]
-gtk-theme-name=Adwaita-dark
+gtk-theme-name=Arc-Gruvbox
gtk-icon-theme-name=Adwaita
gtk-font-name=Sans 10
gtk-cursor-theme-size=0
diff --git a/.config/i3/config b/.config/i3/config
index c30ef9a..46effce 100644
--- a/.config/i3/config
+++ b/.config/i3/config
@@ -44,6 +44,8 @@ for_window [instance="dropdown_dropdowncalc"] border pixel 2
for_window [instance="dropdown_*"] move position center
# #---Starting External Scripts---# #
+# mpd startup
+exec --no-startup-id mpd
# Setting the background:
exec --no-startup-id setbg
# Starts dunst for notifications:
@@ -56,48 +58,11 @@ exec --no-startup-id remaps
exec --no-startup-id unclutter
# Run the script to update the mpd i3block on change.
exec_always --no-startup-id mpdupdate
-# mpd startup
-exec --no-startup-id mpd
# Podboat automatic queue and download
exec_always --no-startup-id podentr
-# Set Xresources colors:
-set_from_resource $darkblack color0 #000000
-set_from_resource $black color8 #000000
-set_from_resource $darkred color1 #000000
-set_from_resource $red color9 #000000
-set_from_resource $darkgreen color2 #000000
-set_from_resource $green color10 #000000
-set_from_resource $darkyellow color3 #000000
-set_from_resource $yellow color11 #000000
-set_from_resource $darkblue color4 #000000
-set_from_resource $blue color12 #000000
-set_from_resource $darkmagenta color5 #000000
-set_from_resource $magenta color13 #000000
-set_from_resource $darkcyan color6 #000000
-set_from_resource $cyan color14 #000000
-set_from_resource $darkwhite color7 #000000
-set_from_resource $white color15 #000000
-set $transparent #00000000
-
-# BORDER BACKGROUND TEXT INDICATOR CHILD_BORDER
-client.focused $red $red $magenta $darkmagenta $darkblue
-client.unfocused $transparent $blue $white $darkblue $darkblack
-client.focused_inactive $transparent $blue $white $darkblue $darkblack
-client.urgent $darkred $darkred $black $darkred $darkred
-client.background $black
-
bar {
font pango:mono 10
- colors {
- background $darkblack
- statusline $darkwhite
- separator $cyan
- focused_workspace $blue $darkblue $darkblack
- active_workspace $blue $blue $darkwhite
- inactive_workspace $darkblack $darkblack $white
- urgent_workspace $darkblack $darkblack $white
- }
status_command i3blocks
position top
mode dock
@@ -143,7 +108,7 @@ bindsym $mod+Shift+r exec --no-startup-id winresize
bindsym $mod+t split toggle
bindsym $mod+Shift+t gaps inner current set 15; gaps outer current set 15
-bindsym $mod+y exec $term -e calcurse
+bindsym $mod+y exec $term -e calcurse -D ~/.config/calcurse
bindsym $mod+Shift+y exec --no-startup-id i3resize left
bindsym $mod+u exec --no-startup-id ddspawn tmuxdd
@@ -192,13 +157,13 @@ bindsym $mod+Shift+l move right 30
bindsym $mod+z gaps outer current plus 5
bindsym $mod+Shift+z gaps outer current minus 5
-bindsym $mod+x exec --no-startup-id lockscreen
+bindsym $mod+x exec --no-startup-id mpc pause; exec --no-startup-id pauseallmpv ; exec --no-startup-id i3lock -e -f -c 1d2021
bindsym $mod+Shift+x exec --no-startup-id prompt "Shutdown computer?" "$shutdown"
bindsym $mod+c exec --no-startup-id freealf
bindsym $mod+Shift+c exec --no-startup-id camtoggle
-bindsym $mod+v exec --no-startup-id st -e vim -c "VimwikiIndex"
+bindsym $mod+v exec --no-startup-id $term -e $EDITOR -c "VimwikiIndex"
#bindsym $mod+Shift+v
bindsym $mod+b bar mode toggle
@@ -267,11 +232,10 @@ bindsym $mod+Shift+0 move container to workspace $ws10
for_window [class="Pinentry"] sticky enable
for_window [class="sent"] border pixel 0px
-for_window [class="Blender"] move to workspace $ws6
-for_window [class="marble"] move to workspace $ws7
for_window [title="GIMP Startup"] move workspace $ws5
for_window [class="Gimp"] move workspace $ws5
-for_window [window_role="GtkFileChooserDialog"] resize shrink height 10 px
+for_window [window_role="GtkFileChooserDialog"] resize set 800 600
+for_window [window_role="GtkFileChooserDialog"] move position center
for_window [title="Default - Wine desktop"] floating enable
# Bindings to make the webcam float and stick.
@@ -281,12 +245,12 @@ for_window [title="mpvfloat"] border pixel 0
no_focus [title="mpvfloat"]
# #---Function Buttons---# #
-bindsym $mod+F1 exec --no-startup-id groff -kejpt -mom ~/.readme.mom -Tpdf | zathura -
+bindsym $mod+F1 exec --no-startup-id groff -kejpt -mom ~/.local/share/larbs/readme.mom -Tpdf | zathura -
bindsym $mod+F2 restart
bindsym $mod+F3 exec --no-startup-id displayselect
bindsym $mod+F4 exec --no-startup-id prompt "Hibernate computer?" "$hibernate"
bindsym $mod+F5 exec --no-startup-id $netrefresh
-bindsym $mod+F6 exec --no-startup-id $term -e transmission-remote-cli
+bindsym $mod+F6 exec --no-startup-id torwrap
bindsym $mod+F7 exec --no-startup-id td-toggle
bindsym $mod+F8 exec --no-startup-id ~/.config/mutt/etc/mailsync.sh
bindsym $mod+F9 exec --no-startup-id dmenumount
@@ -345,7 +309,7 @@ bindsym XF86PowerOff exec --no-startup-id prompt "Shutdown computer?" "$shutdow
##bindsym XF86Paste exec
##bindsym XF86Cut exec
##bindsym XF86MenuKB exec
-bindsym XF86Calculator exec $term -e R -q --no-save
+bindsym XF86Calculator exec --no-startup-id ddspawn dropdowncalc -f mono:pixelsize=24
##bindsym XF86Sleep This binding is typically mapped by systemd automatically.
##bindsym XF86WakeUp exec
bindsym XF86Explorer exec $term -e $FILE
@@ -413,5 +377,3 @@ bindsym XF86Documents exec $term -e $FILE ~/Documents
##bindsym XF86Battery exec
##bindsym XF86Bluetooth exec
bindsym XF86WLAN exec $netrefresh
-
-exec --no-startup-id lukescripts
diff --git a/.config/ncmpcpp/config b/.config/ncmpcpp/config
index 999c6bc..6e1e0f7 100644
--- a/.config/ncmpcpp/config
+++ b/.config/ncmpcpp/config
@@ -11,14 +11,14 @@
## ncmpcpp.
##
#
-#ncmpcpp_directory = ~/.ncmpcpp
+ncmpcpp_directory = ~/.config/ncmpcpp
#
##
## Directory for storing downloaded lyrics. It defaults to ~/.lyrics since other
## MPD clients (eg. ncmpc) also use that location.
##
#
-#lyrics_directory = ~/.lyrics
+lyrics_directory = ~/.config/lyrics
#
##### connection settings #####
#
@@ -292,7 +292,7 @@ current_item_inactive_column_suffix = $/r$(end)
##
## Note: Possible display modes: classic, columns.
##
-#playlist_display_mode = columns
+playlist_display_mode = columns
#
browser_display_mode = columns
#
@@ -521,7 +521,7 @@ empty_tag_color = magenta
#
#state_flags_color = default:b
#
-#main_window_color = white
+main_window_color = white
#
#color1 = white
#
diff --git a/.vim/autoload/plug.vim b/.config/nvim/autoload/plug.vim
index ace33a8..ace33a8 100644
--- a/.vim/autoload/plug.vim
+++ b/.config/nvim/autoload/plug.vim
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index b462bbd..2833984 100644
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -1,19 +1,21 @@
-" _
-" __ _(_)_ __ ___ _ __ ___
-" \ \ / / | '_ ` _ \| '__/ __|
-" \ V /| | | | | | | | | (__
-" \_/ |_|_| |_| |_|_| \___|
+let mapleader =","
-let mapleader =" "
-
-call plug#begin('~/.vim/plugged')
+call plug#begin('~/.config/nvim/plugged')
+Plug 'tpope/vim-surround'
+Plug 'scrooloose/nerdtree'
Plug 'junegunn/goyo.vim'
Plug 'PotatoesMaster/i3-vim-syntax'
Plug 'jreybert/vimagit'
Plug 'LukeSmithxyz/vimling'
Plug 'vimwiki/vimwiki'
+Plug 'bling/vim-airline'
+Plug 'tpope/vim-commentary'
call plug#end()
+set bg=light
+set mouse=a
+set nohlsearch
+set clipboard=unnamedplus
" Some basics:
set nocompatible
filetype plugin on
@@ -26,7 +28,7 @@ call plug#end()
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
" Goyo plugin makes text more readable when writing prose:
- map <leader>f :Goyo \| set linebreak<CR>
+ map <leader>f :Goyo \| set bg=light \| set linebreak<CR>
" Spell-check set to <leader>o, 'o' for 'orthography':
map <leader>o :setlocal spell! spelllang=en_us<CR>
@@ -34,6 +36,17 @@ call plug#end()
" Splits open at the bottom and right, which is non-retarded, unlike vim defaults.
set splitbelow splitright
+" Nerd tree
+ map <C-n> :NERDTreeToggle<CR>
+ autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
+
+" vimling:
+ nm <leader>d :call ToggleDeadKeys()<CR>
+ imap <leader>d <esc>:call ToggleDeadKeys()<CR>a
+ nm <leader>i :call ToggleIPA()<CR>
+ imap <leader>i <esc>:call ToggleIPA()<CR>a
+ nm <leader>q :call ToggleProse()<CR>
+
" Shortcutting split navigation, saving a keypress:
map <C-h> <C-w>h
map <C-j> <C-w>j
@@ -51,7 +64,7 @@ call plug#end()
nnoremap S :%s//g<Left><Left>
" Compile document, be it groff/LaTeX/markdown/etc.
- map <leader>c :w! \| !compiler <c-r>%<CR><CR>
+ map <leader>c :w! \| !compiler <c-r>%<CR>
" Open corresponding .pdf/.html or preview
map <leader>p :!opout <c-r>%<CR><CR>
@@ -61,17 +74,11 @@ call plug#end()
" Ensure files are read as what I want:
let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'}
+ let g:vimwiki_list = [{'path': '~/vimwiki', 'syntax': 'markdown', 'ext': '.md'}]
autocmd BufRead,BufNewFile /tmp/calcurse*,~/.calcurse/notes/* set filetype=markdown
autocmd BufRead,BufNewFile *.ms,*.me,*.mom,*.man set filetype=groff
autocmd BufRead,BufNewFile *.tex set filetype=tex
-" Readmes autowrap text:
- autocmd BufRead,BufNewFile *.md set tw=79
-
-" Use urlscan to choose and open a url:
- :noremap <leader>u :w<Home> !urlscan -r 'linkhandler {}'<CR>
- :noremap ,, !urlscan -r 'linkhandler {}'<CR>
-
" Copy selected text to system clipboard (requires gvim/nvim/vim-x11 installed):
vnoremap <C-c> "+y
map <C-p> "+P
@@ -79,32 +86,25 @@ call plug#end()
" Enable Goyo by default for mutt writting
" Goyo's width will be the line limit in mutt.
autocmd BufRead,BufNewFile /tmp/neomutt* let g:goyo_width=80
- autocmd BufRead,BufNewFile /tmp/neomutt* :Goyo
+ autocmd BufRead,BufNewFile /tmp/neomutt* :Goyo \| set bg=light
" Automatically deletes all trailing whitespace on save.
autocmd BufWritePre * %s/\s\+$//e
" When shortcut files are updated, renew bash and ranger configs with new material:
- autocmd BufWritePost ~/.bm* !shortcuts
+ autocmd BufWritePost ~/.bmdirs,~/.bmfiles !shortcuts
" Run xrdb whenever Xdefaults or Xresources are updated.
autocmd BufWritePost ~/.Xresources,~/.Xdefaults !xrdb %
" Navigating with guides
- inoremap <Space><Tab> <Esc>/<++><Enter>"_c4l
- vnoremap <Space><Tab> <Esc>/<++><Enter>"_c4l
- map <Space><Tab> <Esc>/<++><Enter>"_c4l
-
- "____ _ _
-"/ ___| _ __ (_)_ __ _ __ ___| |_ ___
-"\___ \| '_ \| | '_ \| '_ \ / _ \ __/ __|
- "___) | | | | | |_) | |_) | __/ |_\__ \
-"|____/|_| |_|_| .__/| .__/ \___|\__|___/
- "|_| |_|
+ inoremap <leader><leader> <Esc>/<++><Enter>"_c4l
+ vnoremap <leader><leader> <Esc>/<++><Enter>"_c4l
+ map <leader><leader> <Esc>/<++><Enter>"_c4l
"""LATEX
" Word count:
- autocmd FileType tex map <leader><leader>o :w !detex \| wc -w<CR>
+ autocmd FileType tex map <leader>w :w !detex \| wc -w<CR>
" Code snippets
autocmd FileType tex inoremap ,fr \begin{frame}<Enter>\frametitle{}<Enter><Enter><++><Enter><Enter>\end{frame}<Enter><Enter><++><Esc>6kf}i
autocmd FileType tex inoremap ,fi \begin{fitch}<Enter><Enter>\end{fitch}<Enter><Enter><++><Esc>3kA
diff --git a/.config/ranger/rc.conf b/.config/ranger/rc.conf
index d15a98c..930560a 100644
--- a/.config/ranger/rc.conf
+++ b/.config/ranger/rc.conf
@@ -475,7 +475,7 @@ map Txh console shell cp ~/Documents/LaTeX/handout.tex%space
#Image commands
map bg shell setbg %f
-map bw shell wal -i %f && cp %f ~/.config/wall.png
+map bw shell wal -i %f && setbg %f
map C shell killall w3mimgdisplay && convert -rotate 90 %s %s
map F shell killall w3mimgdisplay && convert -flop %s %s
map bl shell killall w3mimgdisplay && convert %s -resize 1440x1080\> bl_%s
diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler
index 71aab4b..11050ea 100755
--- a/.config/sxiv/exec/key-handler
+++ b/.config/sxiv/exec/key-handler
@@ -4,12 +4,12 @@ do
case "$1" in
"w") setbg "$file" & ;;
"c")
- [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.bmdirs | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")"
+ [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.config/bmdirs | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")"
[ -z "$destdir" ] && exit
cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." &
;;
"m")
- [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.bmdirs | awk '{print $2}' | dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")"
+ [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.config/bmdirs | awk '{print $2}' | dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")"
[ -z "$destdir" ] && exit
mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." &
;;
diff --git a/.config/vifm/vifmrc b/.config/vifm/vifmrc
index b58788c..06ced49 100644
--- a/.config/vifm/vifmrc
+++ b/.config/vifm/vifmrc
@@ -1,5 +1,5 @@
" vim: filetype=vim
-source ~/.vifmshortcuts
+source ~/.config/vifm/vifmshortcuts
map <C-h> <C-w>h
map <C-j> <C-w>j
diff --git a/.inputrc b/.inputrc
index 862d347..f9b94dd 100644
--- a/.inputrc
+++ b/.inputrc
@@ -2,6 +2,10 @@ $include /etc/inputrc
set editing-mode vi
$if mode=vi
+set show-mode-in-prompt on
+set vi-ins-mode-string \1\e[6 q\2
+set vi-cmd-mode-string \1\e[2 q\2
+
set keymap vi-command
# these are for vi-command mode
Control-l: clear-screen
diff --git a/.local/share/applications/vim.desktop b/.local/share/applications/vim.desktop
index 963303e..aa2284e 100644
--- a/.local/share/applications/vim.desktop
+++ b/.local/share/applications/vim.desktop
@@ -1,4 +1,4 @@
[Desktop Entry]
Type=Application
-Name=Vim
-Exec=/usr/local/bin/st -e vim %u
+Name=Neovim
+Exec=/usr/local/bin/st -e nvim %u
diff --git a/.readme.mom b/.local/share/larbs/readme.mom
index 37aa7cc..ed09185 100644
--- a/.readme.mom
+++ b/.local/share/larbs/readme.mom
@@ -13,10 +13,10 @@
Use vim keys (\f(CWh/j/k/l\fP) to navigate this document.
Pressing \f(CWs\fP will fit it to window width (\f(CWa\fP to revert).
\f(CWK\fP and \f(CWJ\fP zoom in and out.
-\f(CWMod+f\fP to toggle fullscreen.
+\f(CWSuper+f\fP to toggle fullscreen.
\f(CWf\fP will highlight links to follow which are selectable by typing the number that appears plus \f(CWEnter\fP.
\f(CWq\fP to quit.
-(These are general zathura shortcuts.)
+(These are general shortcuts of \f(CWzathura\fP, the pdf reader.)
.LI
.ITEM
\f(CWMod+F1\fP will show this document at any time.
@@ -35,8 +35,9 @@ My website:
.PDF_WWW_LINK "https://lukesmith.xyz"
.ITEM
Donate:
-.PDF_WWW_LINK "https://paypal.me/LukeMSmith/20" "https://paypal.me/LukeMSmith"
+.PDF_WWW_LINK "https://lukesmith.xyz/donate" "https://lukesmith.xyz/donate"
.LIST OFF
+FAQs are at the end of this document.
.HEADING 1 "Welcome!"
.HEADING 2 "Basic goals and principles of this system:"
.LI
@@ -69,12 +70,11 @@ but you can also hold it down and it will act as another Windows/super/mod key.
The menu button (usually between the right Alt and Ctrl) is an alternative Super/Mod button.
This is to make one-handing on laptops easier.
.LIST OFF
-.PP
If you'd like to change any of these keyboard changes, you need only open and change \f(CW~/.scripts/tools/remaps\fP.
Actually, this should go without saying, but \fIeverything\fP here can easily be changed.
.PP
Additionally, while this isn't a part of i3, the default editing mode in the shell is using vi bindings.
-If you want to learn more of this, run \f(CWMod+Super+E\fP and type and select the option for "vi mode in shell".
+If you want to learn more of this, run \f(CWMod+Shift+E\fP and type and select the option for "vi mode in shell".
This setting can be changed if you don't like it by deleting or commenting out the contents of \f(CW~/.inputrc\fP.
.HEADING 2 "The Status Bar"
.PP
@@ -85,8 +85,7 @@ I'm sure you can figure it out.
Several modules will be click-sensitive, although if you're using my system as indented, you probably won't be doing much clicking.
Still, you can right click on a module to get some information about what exactly it means.\c
.FOOTNOTE
-Some people think the icons I use in the status bar are a little gaudy.
-Obviously I like them, but these are actually just unicode characters, meaning you can just change your default font in the status bar to change them.
+The statusbar icons are merely emojis and you can change them by changing your emoji font.
If you just want black and white icons, you should actually just be able to uninstall \f(CWttf-emojione\fP and the font will fall back on a black and white font.
.FOOTNOTE END
.PP
@@ -113,13 +112,17 @@ To type capital letters, hold down the \f(CWShift\fP key\(emthat might sound lik
, Be sure you play around with these. Be flexible with the basic commands and the system will grow on you quick.
.LI
.ITEM
-\f(CWMod+Enter\fP \(en Spawn terminal
+\f(CWMod+Enter\fP \(en Spawn terminal (the default terminal is \f(CWst\fP; run \f(CWman st\fP for more.)
.ITEM
\f(CWMod+q/Q\fP \(en Close window
.ITEM
\f(CWMod+d\fP \(en dmenu (For running commands or programs without shortcuts)
.ITEM
-\f(CWMod+t\fP \(en Toggle between spawning vertically and horizontally
+\f(CWMod+t\fP \(en Toggle between spawning vertically and horizontally\c
+.FOOTNOTE
+You may notice that one side of your window border is a different color.
+This indicates the direction that the next window will spawn.
+.FOOTNOTE END
.ITEM
\f(CWMod+f\fP \(en Fullscreen
.ITEM
@@ -152,7 +155,7 @@ To type capital letters, hold down the \f(CWShift\fP key\(emthat might sound lik
.ITEM
\f(CWMod+B\fP \(en Toggle window float in bottom left corner (good for video watched intermittently)
.ITEM
-\f(CWMod+N\fP \(en Same as above, but for the botttom right corner.
+\f(CWMod+N\fP \(en Same as above, but for the bottom right corner.
.LIST OFF
.HEADING 2 "Basic Programs"
.PP
@@ -162,13 +165,13 @@ Naturally, you can use \f(CWyay\fP to look for and install any you want to add.
.ITEM
\f(CWMod+r\fP \(en ranger (file browser/manager)
.ITEM
-\f(CWMod+e\fP \(en mutt (email)
+\f(CWMod+e\fP \(en mutt (email; not installed by default, see below)
.ITEM
\f(CWMod+m\fP \(en ncmpcpp (music player)
.ITEM
\f(CWMod+w\fP \(en nmtui (for connecting to wireless internet)
.ITEM
-\f(CWMod+a\fP \(en R/Python calculator (hide with \f(CWmod+a\fP)
+\f(CWMod+a\fP \(en Dropdown calculator (hide with \f(CWmod+a\fP)
.ITEM
\f(CWMod+i\fP \(en htop (system info)
.ITEM
@@ -254,7 +257,7 @@ I use ncmpcpp as a music player, which is a front end for mpd.
.ITEM
\f(CWMod+]\fP \(en Forward 10 seconds (holding shift increases amount)
.ITEM
-\f(CWMod+A\fP \(en ncpamixer (general volume sink/source control)
+\f(CWMod+A\fP \(en pulsemixer (general volume sink/source control)
.LIST OFF
.HEADING 2 "Workspaces"
.PP
@@ -283,9 +286,9 @@ All of these recording shortcuts will output into \f(CW~\fP, and will not overwr
previous recordings as their names are based on their exact times.
.LI
.ITEM
-\f(CWPrintScreen\fP \(en Take a scrot screenshot
+\f(CWPrintScreen\fP \(en Take a screenshot
.ITEM
-\f(CWShift+PrintScreen\fP \(en Take a scrot screenshot of only selected window
+\f(CWShift+PrintScreen\fP \(en Select area to screenshot
.ITEM
\f(CWMod+PrintScreen\fP \(en Opens dmenu menu to select kind of audio/video recording
.ITEM
@@ -300,42 +303,51 @@ previous recordings as their names are based on their exact times.
I've mapped those extra buttons that some keyboards have (play and pause
buttons, screen brightness, email, web browsing buttons, etc.) to what you
would expect.
-.HEADING 1 "Special traits of this system"
-.HEADING 2 "Easy config access"
-.PP
-Open a terminal and type \f(CWbf\fP. This will open a file where you will see
-customizable pairs of key shortcuts and config files and other important text
-files. Enter any of these shortcuts in bash or ranger to immediately open the
-file in vim.
+.HEADING 1 "Bookmarking Files and Directories"
.PP
-You may add new entries here and they will be refreshed when you save the file
-in vim. This will take effect immediately once you start a new instance of bash
-or ranger or reload your previous sessions.
-.HEADING 2 "Folder and config shortcuts"
+Note the files \f(CW~/.config/bmdirs\fP and \f(CW~/.config/bmfiles\fP.
+These files hold bookmarked directories and files respectively, along with shortcut keys to their left.
+LARBS, specfically the \f(CWshortcuts\fP script, will automatically read these files and autogenerate aliases and shortcuts for bash/zsh and ranger from them.
.PP
-Open a terminal and type \f(CWbd\fP. This opens a file when you can keep and create
-directory/folder shortcuts. There are only a few here now, because I don't know
-what your folder structure is going to look like, but on my machine, I have 109
-and growing.
+For example, by default, the shortcut key for \f(CW~/Documents\fP is simply \f(CWd\fP.
+Thus, if you type and run \f(CWd\fP in bash, you will automatically \f(CWcd\fP to \f(CW~/Documents\fP.
+It also generates four ranger shortcuts using the shortcut \f(CWd\fP:
+.LI
+.ITEM
+\f(CWgd\fP \(en
+Go to \f(CW~/Documents\fP
+.ITEM
+\f(CWmd\fP \(en
+Move (mv) selected file(s) to \f(CW~/Documents\fP
+.ITEM
+\f(CWtd\fP \(en
+Create a new tab in \f(CW~/Documents\fP
+.ITEM
+\f(CWYd\fP \(en
+Copy/yank (cp) a copy of the selected file(s) to \f(CWDocuments\fP
+.LIST OFF
+Shortcuts like these are generated for all key sequence/directory pairs in \f(CW~/.config/bmdirs\fP.
+Additionally, you may also add editable files to \f(CW~/.config/bmfiles\fP.
+Each key sequence you pair with a file will become an alias to edit it in either bash or ranger.
.PP
-Each line has a shortcut key/keys and its target. These can be used in several
-applications. In bash, simply press \f(CWd\fP, the shortcut for \f(CW~/Documents\fP and you
-will cd there (and automatically \f(CWls -a\fP).
+Whenever you edit and save one of the bookmark files, vim will automatically rerun the shortcut script, thus updating the shortcuts that will be used in new instances of bash and ranger.
+It just werks.
+Note that it is your responsibility to ensure that none of the bindings you add conflict with another necessary function or command.
+.HEADING 1 "Frequently Asked Questions (FAQs)"
+.HEADING 2 "My keyboard isn't working as expected!"
.PP
-ranger works similarly.
-When in ranger, just press \f(CWg\fP then the shortcut of the folder you want to go to.
-You may also press \f(CWt\fP plus the shortcut to open a new tab there.
-\f(CWm\fP plus the shortcut moves the selected files to the folder and \f(CWY\fP copies them there.
-\fBGet good at this. It will make management of even the most complex file system easy.\fP
-.HEADING 2 "Dynamically constructed configs"
+LARBS runs some custom keyboard settings in \f(CW~/.scripts/tools/remaps\fP.
+These settings may override your preferred settings, so you should open this file and comment out troublesome lines if you have issues.
+.HEADING 2 "My audio isn't working!"
.PP
-Each time you save changes to either the config shortcut file or the folder shortcut file in vim, vim will automatically run a bash script that updates your bash/ranger config, allowing you to use your new shortcuts in your next instance of bash/ranger or after resourcing your rc files.
-.HEADING 1 "Frequently Asked Questions (FAQs)"
+Sometimes, PulseAudio can be finicky on initial installation and configuration.
+If you have no audio output, chances are your problems will be resolved by a reboot or manually killing and restarting PulseAudio.
+You may also need to set your preferred default output sink which you can do by the command line, or by selecting one with \f(CWpulsemixer\fP (\f(CWmod+A\fP).
.HEADING 2 "How do I change the background/wallpaper?"
.PP
-The easiest way is to use ranger, navigate to the file you want as your background, and press \f(CWbg\fP.
-To be specific, i3 will always be looking to the file in \f(CW~/.config/wall.png\fP for the wallpaper, this ranger command copies the given file there and reruns feh to update it.
-So if you want a persistent wallpaper, move/rename it to \f(CW~/.config/wall.png\fP.
+The i3 configuration will always read the file \f(CW~/.config/wall.png\fP as the wallpaper.
+The script \f(CWsetbg\fP, if run on an image will set it as the persistent background.
+When using the file manager, you can simply hover over an image name and type \f(CWbg\fP and this will run \f(CWsetbg\fP.
.HEADING 2 "How I change the colorscheme?"
.PP
You can edit \f(CW~/.Xresources\fP to change the colorscheme.
@@ -344,13 +356,18 @@ Check
.PDF_WWW_LINK "https://wiki.archlinux.org/index.php/X_resources" "the Arch Wiki's article"
for more information.
LARBS is also compatible with pywal, but it is not installed or used by default anymore.
+.PP
+Do not remove \f(CW~/.Xresources\fP or the color settings specifically because some programs, especially the i3 bar read them and will display as blank if they are deleted.
.HEADING 2 "How do I set up my email?"
.LI
.ITEM
-Create a GPG private/public key pair if you haven't already.
+Install \f(CWneomutt\fP, \f(CWofflineimap\fP and \f(CWmsmtp\fP if you haven't already.
+.ITEM
+Create a GPG private/public key pair if you haven't already. Type \f(CWmod+shift+e\fP and you can select a tutorial for how to do this.
.ITEM
Download the mutt-wizard repository to the mutt config directory:
-\f(CWgit clone https://github.com/lukesmithxyz/mutt-wizard ~/.config/mutt\fP
+\f(CWgit clone https://github.com/lukesmithxyz/mutt-wizard ~/.config/mutt\fP.
+\fBREAD THE README.\fP
.PP
.ITEM
There run \f(CWmutt-wizard.sh\fP and follow the directions, specifically:
@@ -360,7 +377,7 @@ Add an account.
.ITEM
Run \f(CWofflineimap -o\fP in the terminal.
.ITEM
-Select the "Autodetect mailboxes" option.
+Then select the "Autodetect mailboxes" option.
.LIST OFF
.LIST OFF
.PP
@@ -379,6 +396,12 @@ By default, mpd, the music daemon assumes that \f(CW~/Music\fP is your music dir
This can be changed in \f(CW~/.config/mpd/mpd.conf\fP.
When you add music to your music folder, you may have to run \f(CWmpc up\fP in the terminal to update the database.
mpd is controlled by ncmpcpp, which is accessible by \f(CWMod+m\fP.
+.HEADING 2 "How do I update LARBS?"
+.PP
+LARBS is deployed as a git repository in your home directory.
+You can use it as such to fetch, diff and merge changes from the remote repository.
+If you don't want to do that or don't know how to use git, you can actually just rerun the script (as root) and reinstall LARBS and it will automatically update an existing install if you select the same username.
+This will overwrite the original config files though, including changes you made for them, but this is an easier brute force approach that will also install any new dependencies.
.HEADING 1 "Contact"
.LI
.ITEM
@@ -388,15 +411,12 @@ mpd is controlled by ncmpcpp, which is accessible by \f(CWMod+m\fP.
.PDF_WWW_LINK "http://lukesmith.xyz" "https://lukesmith.xyz"
\(en For stalking!
.ITEM
-.PDF_WWW_LINK "https://paypal.me/LukeMSmith" "PayPal"
-\(en For gratitude!
-.ITEM
-.PDF_WWW_LINK "https://patreon.com/lukesmith" "Patreon"
-\(en For support!
+.PDF_WWW_LINK "https://lukesmith.xyz/donate" "https://lukesmith.xyz/donate"
+\(en To incentivize more development of LARBS!
.ITEM
.PDF_WWW_LINK "https://github.com/LukeSmithxyz" "My Github Page"
\(en For the code behind it!
.ITEM
.PDF_WWW_LINK "http://lukesmith.xyz/rss.xml" "RSS"
-\(en For even better updates!
+\(en For updates!
.LIST OFF
diff --git a/.profile b/.profile
index 838c9f0..dbf59eb 100644
--- a/.profile
+++ b/.profile
@@ -1,29 +1,30 @@
-#!/bin/bash
+#!/bin/sh
# Profile file. Runs on login.
# Adds `~/.scripts` and all subdirectories to $PATH
-export PATH="$PATH:$(du "$HOME/.scripts/" | cut -f2 | tr '\n' ':')"
+export PATH="$PATH:$(du "$HOME/.scripts/" | cut -f2 | tr '\n' ':' | sed 's/:*$//')"
export EDITOR="nvim"
export TERMINAL="st"
export BROWSER="firefox"
export READER="zathura"
export FILE="ranger"
export BIB="$HOME/Documents/LaTeX/uni.bib"
-export REFER="$HOME/.referbib"
+export REFER="$HOME/Documents/referbib"
export SUDO_ASKPASS="$HOME/.scripts/tools/dmenupass"
-export PIX="$HOME/.pix/"
+export NOTMUCH_CONFIG="$HOME/.config/notmuch-config"
+export GTK2_RC_FILES="$HOME/.config/gtk-2.0/gtkrc-2.0"
# less/man colors
export LESS=-R
-export LESS_TERMCAP_mb=$'\E[1;31m' # begin bold
-export LESS_TERMCAP_md=$'\E[1;36m' # begin blink
-export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink
-export LESS_TERMCAP_so=$'\E[01;44;33m' # begin reverse video
-export LESS_TERMCAP_se=$'\E[0m' # reset reverse video
-export LESS_TERMCAP_us=$'\E[1;32m' # begin underline
-export LESS_TERMCAP_ue=$'\E[0m' # reset underline
+export LESS_TERMCAP_mb="$(printf '%b' '')"; a="${a%_}"
+export LESS_TERMCAP_md="$(printf '%b' '')"; a="${a%_}"
+export LESS_TERMCAP_me="$(printf '%b' '')"; a="${a%_}"
+export LESS_TERMCAP_so="$(printf '%b' '')"; a="${a%_}"
+export LESS_TERMCAP_se="$(printf '%b' '')"; a="${a%_}"
+export LESS_TERMCAP_us="$(printf '%b' '')"; a="${a%_}"
+export LESS_TERMCAP_ue="$(printf '%b' '')"; a="${a%_}"
-[ ! -f ~/.shortcuts ] && shortcuts >/dev/null 2>&1
+[ ! -f ~/.config/shortcutrc ] && shortcuts >/dev/null 2>&1
echo "$0" | grep "bash$" >/dev/null && [ -f ~/.bashrc ] && source "$HOME/.bashrc"
diff --git a/.scripts/SCRIPTS.md b/.scripts/SCRIPTS.md
index 34bb01b..a99e35e 100644
--- a/.scripts/SCRIPTS.md
+++ b/.scripts/SCRIPTS.md
@@ -54,7 +54,7 @@ in vim or another program.
- `opout` -- "Open output", opens the corresponding `.pdf` file if run on a `.md`, `.tex` or `.rmd` file, or if given an `.html` file, will open it in the browser. Bound to `<leader>p` in my vim config to reveal typical output.
- `pauseallmpv` -- Pauses all mpv instances by sending the `,` key to each. Used by several scripts, but can be used alone as well. It will not pause an audio only mpv instance. If you know how to add a hack to do this, feel free to PR it or email me an addition.
- `remaps` -- Remaps capslock to escape when pressed and super/mod when held. Maps the menu key to super as well. Runs the US international keyboard setup. If you want another keyboard setup, edit this fine.
-- `shortcuts` -- For updating bash and ranger shortcuts. Reads `~/.key_directories` and `~/.key_files` for pairs of keypresses and directories and files, then autoproduces bash aliases and ranger shortcuts for them which output to `~/.shortcuts` and `~/.config/ranger/shortcuts.conf` respectively. These are read automatically by my bash and ranger configs. You don't have to run this script manually though, as it's run by vim whenever you edit one of the `~/.key_*` files.
+- `shortcuts` -- For updating bash and ranger shortcuts. Reads `~/.config/bmdirs` and `~/.config/bmfiles` for pairs of keypresses and directories and files, then autoproduces bash aliases and ranger shortcuts for them which output to `~/.config/shortcutrc` and `~/.config/ranger/shortcuts.conf` respectively. These are read automatically by my bash and ranger configs. You don't have to run this script manually though, as it's run by vim whenever you edit one of the `~/.bm*` files.
- `speedvid` -- Speed up a given video file (`$1`) by a given ammount (`$2`).
- `tpb` -- Search Pirate Bay for the certain search terms given as arguments.
- `texclear` -- Remove all `.tex` related build files. This is run by my vim when I stop editing any `.tex` file.
diff --git a/.scripts/cron/checkup b/.scripts/cron/checkup
index 770c349..a32cdcb 100755
--- a/.scripts/cron/checkup
+++ b/.scripts/cron/checkup
@@ -3,7 +3,7 @@
ping -q -w 1 -c 1 `ip r | grep -m 1 default | cut -d ' ' -f 3` >/dev/null || exit
-notify-send -i "$PIX/larbs.gif" "Checking for pacakge updates..."
+notify-send -i "$PIX/larbs.svg" "Checking for pacakge updates..."
sudo pacman -Syyuw --noconfirm || notify-send "Error downloading updates.
diff --git a/.scripts/cron/newsup b/.scripts/cron/newsup
index 598cced..32f6a37 100755
--- a/.scripts/cron/newsup
+++ b/.scripts/cron/newsup
@@ -4,7 +4,7 @@
ping -q -t 1 -c 1 `ip r | grep -m 1 default | cut -d ' ' -f 3` >/dev/null || exit
-/usr/bin/notify-send -i "$PIX/rss.gif" "Updating RSS feeds..."
+/usr/bin/notify-send -i "$PIX/rss.svg" "Updating RSS feeds..."
pgrep -x newsboat >/dev/null && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name newsboat)" R && exit
@@ -13,4 +13,4 @@ pkill -RTMIN+6 i3blocks
/usr/bin/newsboat -x reload
rm -f ~/.config/newsboat/.update
pkill -RTMIN+6 i3blocks
-/usr/bin/notify-send -i "$PIX/rss.gif" "RSS feed update complete."
+/usr/bin/notify-send -i "$PIX/rss.svg" "RSS feed update complete."
diff --git a/.scripts/i3cmds/displayselect b/.scripts/i3cmds/displayselect
index 2c3133f..e526014 100755
--- a/.scripts/i3cmds/displayselect
+++ b/.scripts/i3cmds/displayselect
@@ -49,7 +49,7 @@ morescreen() { # If multi-monitor is selected and there are more than two screen
multimon() { # Multi-monitor handler.
case "$(echo "$screens" | wc -l)" in
- 1) xrandr $(echo "$allposs" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;;
+ 1) xrandr $(echo "$allposs" | grep -v "$screens" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;;
2) twoscreen ;;
*) morescreen ;;
esac ;}
@@ -65,7 +65,7 @@ chosen=$(printf "%s\\nmulti-monitor\\nmanual selection" "$screens" | dmenu -i -p
case "$chosen" in
"manual selection") arandr ; exit ;;
"multi-monitor") multimon ;;
- *) xrandr --output "$chosen" --auto --scale 1.0x1.0 $(echo "$screens" | grep -v "$chosen" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;;
+ *) xrandr --output "$chosen" --auto --scale 1.0x1.0 $(echo "$allposs" | grep -v "$chosen" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;;
esac
setbg # Fix background if screen size/arangement has changed.
diff --git a/.scripts/i3cmds/dmenumount b/.scripts/i3cmds/dmenumount
index 4de7438..a270886 100755
--- a/.scripts/i3cmds/dmenumount
+++ b/.scripts/i3cmds/dmenumount
@@ -17,21 +17,21 @@ getmount() { \
mountusb() { \
chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?" | awk '{print $1}')"
- sudo -A mount "$chosen" && notify-send "$chosen mounted." && exit 0
+ sudo -A mount "$chosen" && notify-send -i "$PIX/usb.svg" "$chosen mounted." && exit 0
getmount "/mnt /media /mount /home -maxdepth 5 -type d"
partitiontype="$(lsblk -no "fstype" "$chosen")"
case "$partitiontype" in
"vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;;
*) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" 741 "$mp";;
esac
- notify-send "$chosen mounted to $mp."
+ notify-send -i "$PIX/usb.svg" "$chosen mounted to $mp."
}
mountandroid() { \
chosen=$(echo "$anddrives" | dmenu -i -p "Which Android device?" | cut -d : -f 1)
getmount "$HOME -maxdepth 3 -type d"
simple-mtpfs --device "$chosen" "$mp"
- notify-send "Android device mounted to $mp."
+ notify-send -i "$PIX/android.svg" "Android device mounted to $mp."
}
asktype() { \
diff --git a/.scripts/i3cmds/dmenuumount b/.scripts/i3cmds/dmenuumount
index a267010..e4ec064 100755
--- a/.scripts/i3cmds/dmenuumount
+++ b/.scripts/i3cmds/dmenuumount
@@ -7,13 +7,13 @@ unmountusb() {
[ -z "$drives" ] && exit
chosen=$(echo "$drives" | dmenu -i -p "Unmount which drive?" | awk '{print $1}')
[ -z "$chosen" ] && exit
- sudo -A umount "$chosen" && pgrep -x dunst && notify-send "$chosen unmounted."
+ sudo -A umount "$chosen" && pgrep -x dunst && notify-send -i "$PIX/usb.svg" "$chosen unmounted."
}
unmountandroid() { \
chosen=$(awk '/simple-mtpfs/ {print $2}' /etc/mtab | dmenu -i -p "Unmount which device?")
[ -z "$chosen" ] && exit
- fusermount -u "$chosen" && pgrep -x dunst && notify-send "$chosen unmounted."
+ sudo -A umount -l "$chosen" && pgrep -x dunst && notify-send -i "$PIX/android.svg" "$chosen unmounted."
}
asktype() { \
diff --git a/.scripts/i3cmds/dropdowncalc b/.scripts/i3cmds/dropdowncalc
index fee8f07..4d41f88 100755
--- a/.scripts/i3cmds/dropdowncalc
+++ b/.scripts/i3cmds/dropdowncalc
@@ -1,5 +1,2 @@
#!/bin/sh
-# This script ensures that i3 will spawn a calculator.
-# If R is installed, it will run R, otherwise it will run
-# Python.
-([ -e /usr/bin/R ] && R -q --no-save) || python -q
+ifinstalled bc && echo "Welcome to the Calculator." && bc -lq
diff --git a/.scripts/i3cmds/lockscreen b/.scripts/i3cmds/lockscreen
deleted file mode 100755
index b745a6a..0000000
--- a/.scripts/i3cmds/lockscreen
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-rm -f /tmp/locked.png
-
-# If `imagemagick` is not installed, use a blank screen.
-[ -f /usr/bin/convert ] &&
-scrot -m -z /tmp/base.png &&
-pgrep -x dunst && notify-send -i ~/.scripts/pix/lock.png "Locking computer..." &&
-convert /tmp/base.png -blur 0x8 /tmp/locked.png
-
-# Pause music (mocp, mpd and send the pause key to all mpv videos):
-mocp -P >/dev/null 2>&1
-mpc pause >/dev/null 2>&1
-pauseallmpv >/dev/null 2>&1
-
-i3lock -e -f -c 000000 -i /tmp/locked.png
-
-# In five seconds, turn off display unless key press in last 4 seconds.
-sleep 5 && [ 4000 -lt "$(xssstate -i)" ] && pgrep -x i3lock && xset dpms force off
diff --git a/.scripts/i3cmds/maimpick b/.scripts/i3cmds/maimpick
index f3f72fe..07d032f 100755
--- a/.scripts/i3cmds/maimpick
+++ b/.scripts/i3cmds/maimpick
@@ -1,9 +1,9 @@
#!/bin/sh
-case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfullscreen (copy)" | dmenu -l 6 -i -p "Screenshot which area?")" in
+case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)" | dmenu -l 6 -i -p "Screenshot which area?")" in
"a selected area") maim -s pic-selected-"$(date '+%y%m%d-%H%M-%S').png" ;;
"current window") maim -i "$(xdotool getactivewindow)" pic-window-"$(date '+%y%m%d-%H%M-%S').png" ;;
"full screen") maim pic-full-"$(date '+%y%m%d-%H%M-%S').png" ;;
"a selected area (copy)") maim -s | xclip -selection clipboard -t image/png ;;
- "current window (copy)") maim -i | xclip -selection clipboard -t image/png ;;
+ "current window (copy)") maim -i "$(xdotool getactivewindow)" | xclip -selection clipboard -t image/png ;;
"full screen (copy)") maim | xclip -selection clipboard -t image/png ;;
esac
diff --git a/.scripts/i3cmds/td-toggle b/.scripts/i3cmds/td-toggle
index 6489626..729e697 100755
--- a/.scripts/i3cmds/td-toggle
+++ b/.scripts/i3cmds/td-toggle
@@ -1,15 +1,10 @@
#!/bin/sh
-
# If transmission-daemon is running, will ask to kill, else will ask to start.
-
-[ ! -f /usr/bin/transmission-daemon ] && notify-send "Transmission daemon not installed." && exit
-
-if pgrep -x transmission-da >/dev/null ;
+if pgrep -x transmission-da >/dev/null ;
then
- yn=$(printf "No\\nYes" | dmenu -i -p "Kill transmission-daemon?")
- [ "$yn" = "Yes" ] && killall transmission-da
+ [ "$(printf "No\\nYes" | dmenu -i -p "Kill transmission-daemon?")" = "Yes" ] && killall transmission-da && notify-send -i "$PIX/torrent.svg" "transmission-daemon killed."
else
- yn=$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?")
- [ "$yn" = "Yes" ] && transmission-daemon
+ ifinstalled transmission-cli || exit
+ [ "$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?")" = "Yes" ] && transmission-daemon && notify-send -i "$PIX/torrent.svg" "tranmission-daemon started."
fi
sleep 3 && pkill -RTMIN+7 i3blocks
diff --git a/.scripts/i3cmds/torwrap b/.scripts/i3cmds/torwrap
new file mode 100755
index 0000000..6b501cc
--- /dev/null
+++ b/.scripts/i3cmds/torwrap
@@ -0,0 +1,6 @@
+#!/bin/sh
+ifinstalled transmission-remote-cli transmission-cli || exit
+
+! pgrep -x transmission-da >/dev/null && transmission-daemon && notify-send -i "$PIX/torrent.svg" "Starting torrent daemon..." && sleep 3 && pkill -RTMIN+7 i3blocks
+
+$TERMINAL -e transmission-remote-cli
diff --git a/.scripts/i3cmds/xcqr b/.scripts/i3cmds/xcqr
index 5e7b5f0..2352599 100755
--- a/.scripts/i3cmds/xcqr
+++ b/.scripts/i3cmds/xcqr
@@ -1,6 +1,6 @@
#!/bin/sh
# Credit to Maddison Hellstrom (@b0o on Github)
-qrencode -o - -s 1 \
+ifinstalled feh && qrencode -o - -s 1 \
"$(xclip -out -selection clipboard)" |
feh --zoom max \
-F \
diff --git a/.scripts/statusbar/battery b/.scripts/statusbar/battery
index b2634e6..e5f6ec7 100755
--- a/.scripts/statusbar/battery
+++ b/.scripts/statusbar/battery
@@ -1,12 +1,10 @@
#!/bin/sh
# Give a battery name (e.g. BAT0) as an argument.
-# get xresources colors
-for x in "$(xrdb -query | sed "s/.*\./export /g;s/:\s*/=\"/g;s/$/\"/g")"; do eval "$x"; done
-
case $BLOCK_BUTTON in
3) pgrep -x dunst >/dev/null && notify-send "<b>🔋 Battery module:</b>
🔋: discharging
+🛑: not charging
♻: stagnant charge
🔌: charging
⚡: charged
@@ -18,18 +16,18 @@ capacity=$(cat /sys/class/power_supply/"$1"/capacity) || exit
status=$(cat /sys/class/power_supply/"$1"/status)
if [ "$capacity" -ge 75 ]; then
- color="$color10"
+ color="#00ff00"
elif [ "$capacity" -ge 50 ]; then
- color="$color15"
+ color="#ffffff"
elif [ "$capacity" -ge 25 ]; then
- color="$color11"
+ color="#ffff00"
else
- color="$color9"
+ color="#ff0000"
warn="❗"
fi
[ -z $warn ] && warn=" "
-[ "$status" = "Charging" ] && color="$color15"
+[ "$status" = "Charging" ] && color="#ffffff"
-printf "<span color='%s'>%s%s%s</span>" "$color" "$(echo "$status" | sed -e "s/,//g;s/Discharging/🔋/;s/Charging/🔌/;s/Unknown/♻️/;s/Full/⚡/;s/ 0*/ /g;s/ :/ /g")" "$warn" "$(echo "$capacity" | sed -e 's/$/%/')"
+printf "<span color='%s'>%s%s%s</span>" "$color" "$(echo "$status" | sed -e "s/,//;s/Discharging/🔋/;s/Not Charging/🛑/;s/Charging/🔌/;s/Unknown/♻️/;s/Full/⚡/;s/ 0*/ /g;s/ :/ /g")" "$warn" "$(echo "$capacity" | sed -e 's/$/%/')"
diff --git a/.scripts/statusbar/mailbox b/.scripts/statusbar/mailbox
index bb72c5d..0c5ccbe 100755
--- a/.scripts/statusbar/mailbox
+++ b/.scripts/statusbar/mailbox
@@ -14,5 +14,4 @@ case $BLOCK_BUTTON in
- Middle click syncs mail" ;;
esac
-echo "$(du -a ~/.mail/*/INBOX/new/* 2>/dev/null | sed -n '$=')$(cat ~/.config/mutt/.dl 2>/dev/null)"
-
+echo "$(du -a ~/.mail/*/INBOX/new/* 2>/dev/null | sed -n '$=')$(cat /tmp/imapsyncicon 2>/dev/null)"
diff --git a/.scripts/statusbar/mpdupdate b/.scripts/statusbar/mpdupdate
index 84c7ab1..9a57ca4 100755
--- a/.scripts/statusbar/mpdupdate
+++ b/.scripts/statusbar/mpdupdate
@@ -1,8 +1,7 @@
#!/bin/sh
-
[ "$(pgrep -x "$(basename "$0")" | wc -l)" -gt 2 ] && exit
-while : ; do
+sleep 5 && while : ; do
pgrep -x mpd || exit
mpc idle > /dev/null
pkill -RTMIN+11 i3blocks ;
diff --git a/.scripts/statusbar/popupgrade b/.scripts/statusbar/popupgrade
index 739fcb7..83035c3 100755
--- a/.scripts/statusbar/popupgrade
+++ b/.scripts/statusbar/popupgrade
@@ -3,7 +3,6 @@
printf "Beginning upgrade.\\n"
yay -Syu
-pacman -Qu | wc -l > ~/.pacupgrnum
pkill -RTMIN+8 i3blocks
printf "\\nUpgrade complete.\\nPress <Enter> to exit window.\\n\\n"
diff --git a/.scripts/statusbar/torrent b/.scripts/statusbar/torrent
index 06ddd3e..8534cb1 100755
--- a/.scripts/statusbar/torrent
+++ b/.scripts/statusbar/torrent
@@ -6,10 +6,12 @@ transmission-remote -l | grep % |
s/.*Seeding.*/Z/g;
s/.*100%.*/N/g;
s/.*Idle.*/B/g;
+ s/.*Uploading.*/L/g;
s/.*%.*/M/g" |
sort -h | uniq -c | sed " # Now we replace the standin letters with icons.
s/A/🛑/g;
s/B/⌛️/g;
+ s/L/🔼/g;
s/M/🔽/g;
s/N/✅/g;
s/Z/🌱/g" | awk '{print $2, $1}' | tr '\n' ' ' | sed -e "s/ $//g"
@@ -18,7 +20,8 @@ case $BLOCK_BUTTON in
1) $TERMINAL -e transmission-remote-cli ;;
3) pgrep -x dunst >/dev/null && notify-send "<b>Torrent module:</b>
🛑: paused
-⏳: waiting
+⏳: idle (seeds needed)
+🔼: uploading (unfinished)
🔽: downloading
✅: done
🌱: done and seeding" ;;
diff --git a/.scripts/tools/compiler b/.scripts/tools/compiler
index cf628aa..7d3bf1d 100755
--- a/.scripts/tools/compiler
+++ b/.scripts/tools/compiler
@@ -1,21 +1,14 @@
#!/bin/sh
-
# This script will compile or run another finishing operation on a document. I
# have this script run via vim.
#
-# tex files: Compiles to pdf, including bibliography if necessary
-# md files: Compiles to pdf via pandoc
-# rmd files: Compiles via R Markdown
-# c files: Compiles via whatever compiler is set to cc. Usually gcc.
-# py files: runs via python command
-# go files: compiles and runs with "go run"
-# config.h files: (For suckless utils) recompiles and installs program.
-# all others: run `sent` to show a presentation
+# Compiles .tex. groff (.mom, .ms), .rmd, .md.
+# Opens .sent files as sent presentations.
+# Runs scripts based on extention or shebang
file=$(readlink -f "$1")
dir=$(dirname "$file")
base="${file%.*}"
-shebang=$(sed -n 1p "$file")
cd "$dir" || exit
@@ -29,22 +22,16 @@ textype() { \
$command --output-directory="$dir" "$base"
}
-shebangtest() {
- case "$shebang" in
- \#\!*) "$file" ;;
- *) sent "$file" 2>/dev/null & ;;
- esac
-}
-
case "$file" in
*\.ms) refer -PS -e "$file" | groff -me -ms -kejpt -T pdf > "$base".pdf ;;
*\.mom) refer -PS -e "$file" | groff -mom -kejpt -T pdf > "$base".pdf ;;
*\.rmd) echo "require(rmarkdown); render('$file')" | R -q --vanilla ;;
*\.tex) textype "$file" ;;
*\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;;
- *config.h) make && sudo make install ;;
+ *config.h) sudo make install ;;
*\.c) cc "$file" -o "$base" && "$base" ;;
*\.py) python "$file" ;;
*\.go) go run "$file" ;;
- *) shebangtest ;;
+ *\.sent) setsid sent "$file" 2>/dev/null & ;;
+ *) sed 1q "$file" | grep "^#!/" | sed "s/^#!//" | xargs -r -I % "$file" ;;
esac
diff --git a/.scripts/tools/ifinstalled b/.scripts/tools/ifinstalled
index bdbcbc4..0305f4f 100755
--- a/.scripts/tools/ifinstalled
+++ b/.scripts/tools/ifinstalled
@@ -1,3 +1,3 @@
#!/bin/sh
# If $1 command is not available, error code and notify.
-command -v "$1" >/dev/null || { notify-send "$1 is not installed." && exit 1 ;}
+command -v "$1" >/dev/null || { notify-send "📦 <b>$1</b> must be installed for this function." && exit 1 ;}
diff --git a/.scripts/tools/linkhandler b/.scripts/tools/linkhandler
index 0719660..c616d04 100755
--- a/.scripts/tools/linkhandler
+++ b/.scripts/tools/linkhandler
@@ -1,14 +1,11 @@
#!/bin/sh
# Feed script a url or file location.
-# If an image, it will view in feh,
+# If an image, it will view in sxiv,
# if a video or gif, it will view in mpv
# if a music file or pdf, it will download,
# otherwise it opens link in browser.
-# Sci-Hub's domain occasionally changes due to shutdowns:
-scihub="http://sci-hub.tw/"
-
# If no url given. Opens browser. For using script as $BROWSER.
[ -z "$1" ] && { "$BROWSER"; exit; }
@@ -16,11 +13,9 @@ case "$1" in
*mkv|*webm|*mp4|*youtube.com*|*youtu.be*|*hooktube.com*|*bitchute.com*)
setsid mpv --input-ipc-server=/tmp/mpvsoc$(date +%s) -quiet "$1" >/dev/null 2>&1 & ;;
*png|*jpg|*jpe|*jpeg|*gif)
- setsid sxiv -a "$1" >/dev/null 2>&1 & ;;
+ curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///")" >/dev/null 2>&1 & ;;
*mp3|*flac|*opus|*mp3?source*)
setsid tsp curl -LO "$1" >/dev/null 2>&1 & ;;
- *springer.com*)
- setsid curl -sO "$(curl -s "$scihub$*" | grep -Po "(?<=location.href=').+.pdf")" >/dev/null 2>&1 & ;;
*)
if [ -f "$1" ]; then "$TERMINAL" -e "$EDITOR $1"
else setsid "$BROWSER" "$1" >/dev/null 2>&1 & fi ;;
diff --git a/.scripts/tools/note b/.scripts/tools/note
deleted file mode 100755
index 09186ea..0000000
--- a/.scripts/tools/note
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-# This is a general notification command for my own ease.
-# $1 should be a message
-# $2 is an optional image for notify-send
-# Echos content on terminal and if dunst is running, shows notification.
-
-[ -z "$2" ] || img="-i $2"
-echo "$1" && pgrep -x dunst >/dev/null && notify-send $img "$1"
diff --git a/.scripts/tools/qndl b/.scripts/tools/qndl
new file mode 100755
index 0000000..a99d37e
--- /dev/null
+++ b/.scripts/tools/qndl
@@ -0,0 +1,11 @@
+#!/bin/sh
+# $1 is a url; $2 is a command
+[ -z "$1" ] && exit
+base="$(basename "$1")"
+notify-send "⏳ Queuing $base..."
+cmd="$2"
+[ -z "$cmd" ] && cmd="youtube-dl --add-metadata"
+idnum="$(tsp $cmd "$1")"
+realname="$(echo "$base" | sed "s/?\(source\|dest\).*//;s/%20/ /g")"
+tsp -D "$idnum" mv "$base" "$realname"
+tsp -D "$idnum" notify-send "👍 $realname done."
diff --git a/.scripts/tools/queueandnotify b/.scripts/tools/queueandnotify
index 332668f..a1417ec 100755
--- a/.scripts/tools/queueandnotify
+++ b/.scripts/tools/queueandnotify
@@ -7,12 +7,7 @@ queuefile="$HOME/.local/share/newsboat/queue"
while read -r line; do
[ -z "$line" ] && continue
url="$(echo "$line" | awk '{print $1}')"
- base="$(basename "$url")"
- notify-send -i "$PIX/dl.png" "Queuing $base..."
- idnum="$(tsp curl -LO "$url")"
- realname="$(echo "$base" | sed "s/?\(source\|dest\).*//;s/%20/ /g")"
- tsp -D "$idnum" mv "$base" "$realname"
- tsp -D "$idnum" notify-send -i "$PIX/check.png" "$realname done."
+ qndl "$url" "curl -LO"
done < "$queuefile"
echo > "$queuefile"
diff --git a/.scripts/tools/setbg b/.scripts/tools/setbg
index 00e996a..950ae7c 100755
--- a/.scripts/tools/setbg
+++ b/.scripts/tools/setbg
@@ -1,4 +1,4 @@
#!/bin/sh
# Sets the background. If given an argument, will set file as background.
[ ! -z "$1" ] && cp "$1" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Wallpaper changed."
-xwallpaper --center ~/.config/wall.png
+xwallpaper --zoom ~/.config/wall.png
diff --git a/.scripts/tools/shortcuts b/.scripts/tools/shortcuts
index cb4cc6e..3ac0bbd 100755
--- a/.scripts/tools/shortcuts
+++ b/.scripts/tools/shortcuts
@@ -1,10 +1,10 @@
#!/bin/bash
# Output locations. Unactivated progs should go to /dev/null.
-shell_shortcuts="$HOME/.shortcuts"
+shell_shortcuts="$HOME/.config/shortcutrc"
ranger_shortcuts="$HOME/.config/ranger/shortcuts.conf"
qute_shortcuts="/dev/null"
-fish_shortcuts="$HOME/.config/fish/shortcuts.fish"
-vifm_shortcuts="$HOME/.vifmshortcuts"
+fish_shortcuts="/dev/null"
+vifm_shortcuts="$HOME/.config/vifm/vifmshortcuts"
# Remove, prepare files
rm -f "$ranger_shortcuts" "$qute_shortcuts" 2>/dev/null
@@ -13,14 +13,14 @@ printf "# vim: filetype=sh\\nalias " > "$shell_shortcuts"
printf "\" vim: filetype=vim\\n" > "$vifm_shortcuts"
# Format the `bmdirs` file in the correct syntax and sent it to all three configs.
-sed "s/\s*#.*$//;/^\s*$/d" "$HOME/.bmdirs" | tee >(awk '{print $1"=\"cd "$2" && ls -a\" \\"}' >> "$shell_shortcuts") \
+sed "s/\s*#.*$//;/^\s*$/d" "$HOME/.config/bmdirs" | tee >(awk '{print $1"=\"cd "$2" && ls -a\" \\"}' >> "$shell_shortcuts") \
>(awk '{print "abbr", $1, "\"cd " $2 "; and ls -a\""}' >> "$fish_shortcuts") \
>(awk '{print "map g" $1, ":cd", $2 "<CR>\nmap t" $1, "<tab>:cd", $2 "<CR><tab>\nmap M" $1, "<tab>:cd", $2 "<CR><tab>:mo<CR>\nmap Y" $1, "<tab>:cd", $2 "<CR><tab>:co<CR>" }' >> "$vifm_shortcuts") \
>(awk '{print "config.bind(\";"$1"\", \"set downloads.location.directory "$2" ;; hint links download\")"}' >> "$qute_shortcuts") \
| awk '{print "map g"$1" cd "$2"\nmap t"$1" tab_new "$2"\nmap m"$1" shell mv -v %s "$2"\nmap Y"$1" shell cp -rv %s "$2}' >> "$ranger_shortcuts"
# Format the `configs` file in the correct syntax and sent it to both configs.
-sed "s/\s*#.*$//;/^\s*$/d" "$HOME/.bmfiles" | tee >(awk '{print $1"=\"$EDITOR "$2"\" \\"}' >> "$shell_shortcuts") \
+sed "s/\s*#.*$//;/^\s*$/d" "$HOME/.config/bmfiles" | tee >(awk '{print $1"=\"$EDITOR "$2"\" \\"}' >> "$shell_shortcuts") \
>(awk '{print "abbr", $1, "\"$EDITOR "$2"\""}' >> "$fish_shortcuts") \
>(awk '{print "map", $1, ":e", $2 "<CR>" }' >> "$vifm_shortcuts") \
| awk '{print "map "$1" shell $EDITOR "$2}' >> "$ranger_shortcuts"
diff --git a/.scripts/tools/texclear b/.scripts/tools/texclear
index 20f435c..f6a5062 100755
--- a/.scripts/tools/texclear
+++ b/.scripts/tools/texclear
@@ -8,7 +8,7 @@ case "$1" in
file=$(readlink -f "$1")
dir=$(dirname "$file")
base="${file%.*}"
- find "$dir" -maxdepth 1 -type f -regextype gnu-awk -regex "^$base\\.(4tc|xref|tmp|pyc|pyo|fls|vrb|fdb_latexmk|bak|swp|aux|log|synctex\\(busy\\)|lof|nav|out|snm|toc|bcf|run\\.xml|synctex\\.gz|blg|bbl)" -delete ;;
+ find "$dir" -maxdepth 1 -type f -regextype gnu-awk -regex "^$base\\.(4tc|xref|tmp|pyc|pyo|fls|vrb|fdb_latexmk|bak|swp|aux|log|synctex\\(busy\\)|lof|lot|maf|idx|mtc|mtc0|nav|out|snm|toc|bcf|run\\.xml|synctex\\.gz|blg|bbl)" -delete ;;
*) printf "Give .tex file as argument.\\n" ;;
esac
diff --git a/.scripts/tools/transadd b/.scripts/tools/transadd
index 8cc7e80..ad2ee7f 100755
--- a/.scripts/tools/transadd
+++ b/.scripts/tools/transadd
@@ -1,12 +1,9 @@
#!/bin/sh
-# Mimeapp script for adding torrent to transmission-daemon, but will also start
-# the daemon first if not running.
+# Mimeapp script for adding torrent to transmission-daemon, but will also start the daemon first if not running.
-# Optionally requires my `note` script. The sleep of 3 seconds is because the
-# transmission-daemon sometimes fails to take remote requests in its first
-# moments.
+# transmission-daemon sometimes fails to take remote requests in its first moments.
-pgrep -x transmission-da || (transmission-daemon && note "Starting daemon..." "$PIX/dl.png" && sleep 3 && pkill -RTMIN+7 i3blocks)
+pgrep -x transmission-da || (transmission-daemon && notify-send "Starting transmission daemon..." && sleep 3 && pkill -RTMIN+7 i3blocks)
-transmission-remote -a "$@" && note "Torrent added." "$PIX/dl.png"
+transmission-remote -a "$@" && notify-send "🔽 Torrent added."
diff --git a/.tmux.conf b/.tmux.conf
index f255afa..5902aa2 100644
--- a/.tmux.conf
+++ b/.tmux.conf
@@ -2,7 +2,7 @@
# _
# | |_ _ __ ___ _ ___ __
# | __| '_ ` _ \| | | \ \/ /
-# | |_| | | | | | |_| |> <
+# | |_| | | | | | |_| |> <
# \__|_| |_| |_|\__,_/_/\_\
#
#############################
@@ -137,11 +137,11 @@ bind C-j previous-window
bind C-k next-window
bind-key C-a last-window # C-a C-a for last active window
bind A command-prompt "rename-window %%"
-# By default, all windows in a session are constrained to the size of the
-# smallest client connected to that session,
-# even if both clients are looking at different windows.
-# It seems that in this particular case, Screen has the better default
-# where a window is only constrained in size if a smaller client
+# By default, all windows in a session are constrained to the size of the
+# smallest client connected to that session,
+# even if both clients are looking at different windows.
+# It seems that in this particular case, Screen has the better default
+# where a window is only constrained in size if a smaller client
# is actively looking at it.
setw -g aggressive-resize on
@@ -156,10 +156,10 @@ bind-key k select-pane -U
bind-key l select-pane -R
# Resizing ---------------------------------------------------------------
-bind-key C-h resize-pane -L
-bind-key C-j resize-pane -D
-bind-key C-k resize-pane -U
-bind-key C-l resize-pane -R
+bind-key -r C-h resize-pane -L
+bind-key -r C-j resize-pane -D
+bind-key -r C-k resize-pane -U
+bind-key -r C-l resize-pane -R
# use vim motion keys while in copy mode
setw -g mode-keys vi
diff --git a/.vim b/.vim
new file mode 120000
index 0000000..63c7159
--- /dev/null
+++ b/.vim
@@ -0,0 +1 @@
+.config/nvim/ \ No newline at end of file
diff --git a/.xinitrc b/.xinitrc
index cb1e277..da03604 100644
--- a/.xinitrc
+++ b/.xinitrc
@@ -1,8 +1,2 @@
#!/bin/sh
-
-[ -f ~/.Xmodmap ] && xmodmap ~/.Xmodmap
-[ -f ~/.Xresources ] && xrdb -merge ~/.Xresources
-
-xset r rate 200 50
-
exec i3
diff --git a/README.md b/README.md
index fd29529..da2019c 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Luke's GNU/Linux Dotfiles
-There are my dotfiles! The name of the repo, "voidrice", came from the fact they were originally on my Void Linux machine, but these files are distro-independent. In fact, I now push changes from my X200 running Parabola or my X220 running Arch.
+These are my dotfiles! The name of the repo, "voidrice", came from the fact they were originally on my Void Linux machine, but these files are distro-independent. In fact, I now push changes from my X200 running Parabola or my X220 running Arch.
## Programs whose configs can be found here
@@ -30,8 +30,8 @@ The command `getkeys` will also show basic key binds for different programs.
## Dynamic Configuration Files
-Store your favorite or high-traffic directories in `~/.bmdirs` or your most
-important config files in `~/.bmfiles` with keyboard shortcuts. When you add
+Store your favorite or high-traffic directories in `~/.config/bmdirs` or your most
+important config files in `~/.config/bmfiles` with keyboard shortcuts. When you add
things to theses files my vimrc will automatically run `shortcuts` which will
dynamically generate shortcuts for these in bash, ranger and optionally
qutebrowser and fish.