summaryrefslogtreecommitdiffstats
path: root/.config
diff options
context:
space:
mode:
Diffstat (limited to '.config')
-rw-r--r--.config/aliasrc4
-rw-r--r--.config/directories2
-rw-r--r--.config/files28
-rwxr-xr-x.config/fontconfig/fonts.conf2
-rw-r--r--.config/i3/config2
-rw-r--r--.config/lf/lfrc10
-rw-r--r--.config/mpd/mpd.conf12
-rw-r--r--.config/ncmpcpp/config9
-rwxr-xr-x.config/ranger/commands.py2
-rw-r--r--.config/ranger/luke_ranger_readme.md2
-rw-r--r--.config/ranger/rc.conf4
-rw-r--r--.config/sxhkd/sxhkdrc4
-rwxr-xr-x.config/sxiv/exec/key-handler4
-rw-r--r--.config/vifm/vifmrc2
-rw-r--r--.config/zsh/.zshrc53
15 files changed, 71 insertions, 69 deletions
diff --git a/.config/aliasrc b/.config/aliasrc
index c1ae2a8..2bf5813 100644
--- a/.config/aliasrc
+++ b/.config/aliasrc
@@ -42,5 +42,5 @@ alias mpv="mpv --input-ipc-server=/tmp/mpvsoc$(date +%s)"
# Some other stuff
alias \
magit="nvim -c MagitOnly" \
- ref="shortcuts >/dev/null; source ~/.config/shortcutrc; source ~/.config/zshnameddirrc" \
- weath="less -S ~/.local/share/weatherreport" \
+ ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/zshnameddirrc" \
+ weath="less -S ${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" \
diff --git a/.config/directories b/.config/directories
index 24bdd21..707a1c7 100644
--- a/.config/directories
+++ b/.config/directories
@@ -5,6 +5,6 @@ D ~/Downloads
m ~/Music
pp ~/Pictures
vv ~/Videos
-cf ~/.config
+cf ${XDG_CONFIG_HOME:-$HOME/.config}
sc ~/.local/bin
mn /mnt
diff --git a/.config/files b/.config/files
index b34f184..6e07499 100644
--- a/.config/files
+++ b/.config/files
@@ -1,15 +1,15 @@
-bf ~/.config/files
-bd ~/.config/directories
-bw ~/.config/bookmarks
-cfa ~/.config/aliasrc
+bf ${XDG_CONFIG_HOME:-$HOME/.config}/files
+bd ${XDG_CONFIG_HOME:-$HOME/.config}/directories
+bw ${XDG_CONFIG_HOME:-$HOME/.config}/bookmarks
+cfa ${XDG_CONFIG_HOME:-$HOME/.config}/aliasrc
cfz $ZDOTDIR/.zshrc
-cfv ~/.config/nvim/init.vim
-cfm ~/.config/mutt/muttrc
-cfd ~/.Xdefaults
-cfu ~/.config/newsboat/urls
-cfn ~/.config/newsboat/config
-cfmb ~/.config/ncmpcpp/bindings
-cfmc ~/.config/ncmpcpp/config
-cfk ~/.config/sxhkd/sxhkdrc
-cfi ~/.config/i3/config
-cfb ~/.config/i3blocks/config
+cfv ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/init.vim
+cfm ${XDG_CONFIG_HOME:-$HOME/.config}/mutt/muttrc
+cfx ${XDG_CONFIG_HOME:-$HOME/.config}/Xresources
+cfu ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/urls
+cfn ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/config
+cfmb ${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp/bindings
+cfmc ${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp/config
+cfk ${XDG_CONFIG_HOME:-$HOME/.config}/sxhkd/sxhkdrc
+cfi ${XDG_CONFIG_HOME:-$HOME/.config}/i3/config
+cfb ${XDG_CONFIG_HOME:-$HOME/.config}/i3blocks/config
diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf
index 1a4b404..2d58803 100755
--- a/.config/fontconfig/fonts.conf
+++ b/.config/fontconfig/fonts.conf
@@ -30,8 +30,6 @@
<prefer>
<family>Noto Sans Mono</family>
<family>Liberation Mono</family>
- <family>Joy Pixels</family>
- <family>Noto Color Emoji</family>
</prefer>
</alias>
</fontconfig>
diff --git a/.config/i3/config b/.config/i3/config
index a22fe8e..ef8077f 100644
--- a/.config/i3/config
+++ b/.config/i3/config
@@ -222,7 +222,7 @@ for_window [title="mpvfloat"] border pixel 0
no_focus [title="mpvfloat"]
# #---Function Buttons---# #
-bindsym $mod+F1 exec --no-startup-id groff -mom ~/.local/share/larbs/readme.mom -Tpdf | zathura -
+bindsym $mod+F1 exec --no-startup-id groff -mom ${XDG_DATA_HOME:-$HOME/.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"
diff --git a/.config/lf/lfrc b/.config/lf/lfrc
index 27900a1..2925808 100644
--- a/.config/lf/lfrc
+++ b/.config/lf/lfrc
@@ -2,7 +2,7 @@
# Basic vars
set shell sh
-set previewer ~/.config/lf/scope
+set previewer ${XDG_CONFIG_HOME:-$HOME/.config}/lf/scope
set shellopts '-eu'
set ifs "\n"
set scrolloff 10
@@ -36,7 +36,7 @@ cmd delete ${{
cmd moveto ${{
set -f
clear; echo "Move to where?"
- dest="$(cut -d' ' -f2- ~/.config/directories | fzf)" &&
+ dest="$(cut -d' ' -f2- ${XDG_CONFIG_HOME:-$HOME/.config}/directories | fzf)" &&
eval mv -iv $fx $dest &&
notify-send "🚚 File(s) moved." "File(s) moved to $dest."
}}
@@ -44,7 +44,7 @@ cmd moveto ${{
cmd copyto ${{
set -f
clear; echo "Copy to where?"
- dest="$(cut -d' ' -f2- ~/.config/directories | fzf)" &&
+ dest="$(cut -d' ' -f2- ${XDG_CONFIG_HOME:-$HOME/.config}/directories | fzf)" &&
eval cp -ivr $fx $dest &&
notify-send "📋 File(s) copied." "File(s) copies to $dest."
}}
@@ -54,9 +54,9 @@ cmd bulkrename ${{
}}
# Bindings
-map c $lf -remote "send $id cd $(cut -d' ' -f2 ~/.config/directories | fzf)"
+map c $lf -remote "send $id cd $(cut -d' ' -f2 ${XDG_CONFIG_HOME:-$HOME/.config}/directories | fzf)"
map <c-f> $lf -remote "send $id select '$(fzf)'"
-map J $lf -remote "send $id cd $(cut -d' ' -f2 ~/.config/directories | fzf)"
+map J $lf -remote "send $id cd $(cut -d' ' -f2 ${XDG_CONFIG_HOME:-$HOME/.config}/directories | fzf)"
map gh
map g top
map D delete
diff --git a/.config/mpd/mpd.conf b/.config/mpd/mpd.conf
index a0548ec..ee7ed17 100644
--- a/.config/mpd/mpd.conf
+++ b/.config/mpd/mpd.conf
@@ -1,10 +1,10 @@
-db_file "~/.config/mpd/database"
-log_file "~/.config/mpd/log"
+db_file "${XDG_CONFIG_HOME:-$HOME/.config}/mpd/database"
+log_file "${XDG_CONFIG_HOME:-$HOME/.config}/mpd/log"
music_directory "~/Music"
-playlist_directory "~/.config/mpd/playlists"
-pid_file "~/.config/mpd/pid"
-state_file "~/.config/mpd/state"
-sticker_file "~/.config/mpd/sticker.sql"
+playlist_directory "${XDG_CONFIG_HOME:-$HOME/.config}/mpd/playlists"
+pid_file "${XDG_CONFIG_HOME:-$HOME/.config}/mpd/pid"
+state_file "${XDG_CONFIG_HOME:-$HOME/.config}/mpd/state"
+sticker_file "${XDG_CONFIG_HOME:-$HOME/.config}/mpd/sticker.sql"
auto_update "yes"
diff --git a/.config/ncmpcpp/config b/.config/ncmpcpp/config
index 2c9eda4..6f321b0 100644
--- a/.config/ncmpcpp/config
+++ b/.config/ncmpcpp/config
@@ -1,16 +1,11 @@
-##############################################################################
-## This is the example configuration file. Copy it to $HOME/.ncmpcpp/config ##
-## or $XDG_CONFIG_HOME/ncmpcpp/config and set up your preferences. ##
-##############################################################################
-#
-ncmpcpp_directory = ~/.config/ncmpcpp
+ncmpcpp_directory = ${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp
#
##
## Directory for storing downloaded lyrics. It defaults to ~/.lyrics since other
## MPD clients (eg. ncmpc) also use that location.
##
#
-lyrics_directory = ~/.local/share/lyrics
+lyrics_directory = ${XDG_DATA_HOME:-$HOME/.local/share}/lyrics
#
##### connection settings #####
#
diff --git a/.config/ranger/commands.py b/.config/ranger/commands.py
index 71fd2a2..c1c7419 100755
--- a/.config/ranger/commands.py
+++ b/.config/ranger/commands.py
@@ -38,7 +38,7 @@ class my_edit(Command):
# reference to the currently selected file.
target_filename = self.fm.thisfile.path
- # This is a generic function to print text in ranger.
+ # This is a generic function to print text in ranger.
self.fm.notify("Let's edit the file " + target_filename + "!")
# Using bad=True in fm.notify allows you to print error messages:
diff --git a/.config/ranger/luke_ranger_readme.md b/.config/ranger/luke_ranger_readme.md
index 51c5dd1..4511151 100644
--- a/.config/ranger/luke_ranger_readme.md
+++ b/.config/ranger/luke_ranger_readme.md
@@ -60,7 +60,7 @@ Press any "verb" followed by any "argument" to perform a folder operation. "gd"
+ Txs -- copy slideshow/beamer template to new file
+ Txh -- copy handout template to new file
+ Image commands:
- + bg -- (for i3 users) makes an image your background (assuming i3 is looking at ~/.config/wall.png for your background)
+ + bg -- makes an image your background (assuming i3 is looking at ~/.local/share/bg for your background)
+ bw -- runs Pywal on the selected image, making it your background and generating a color scheme based off of it.
+ C -- rotates an image (requires imagemagick)
+ F -- flips an image (requires imagemagick)
diff --git a/.config/ranger/rc.conf b/.config/ranger/rc.conf
index 89b4b8c..ba5ec84 100644
--- a/.config/ranger/rc.conf
+++ b/.config/ranger/rc.conf
@@ -5,7 +5,7 @@ set column_ratios 1,3,4
set hidden_filter ^\.|\.(?:pyc|vrb|pyo|lof|bak|swp|aux|log|nav|out|snm|toc|bcf|run\.xml|synctex\.gz|blg|bbl)$|^lost\+found$|^__(py)?cache__$
set show_hidden false
set confirm_on_delete multiple
-set preview_script ~/.config/ranger/scope.sh
+set preview_script ${XDG_CONFIG_HOME:-$HOME/.config}/ranger/scope.sh
set use_preview_script true
set automatically_count_files true
set open_all_images true
@@ -505,4 +505,4 @@ map Tn eval fm.open_console('shell eyeD3 -n "" ' + fm.thisfile.relative_path, po
#Downloading
map ytv console shell youtube-dl -ic%space
map yta console shell youtube-dl -xic%space
-source ~/.config/ranger/shortcuts.conf
+source ${XDG_CONFIG_HOME:-$HOME/.config}/ranger/shortcuts.conf
diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc
index 0b05a3d..ffef0b4 100644
--- a/.config/sxhkd/sxhkdrc
+++ b/.config/sxhkd/sxhkdrc
@@ -137,10 +137,10 @@ XF86MyComputer
# Function keys
super + shift + F1
- grep LARBSWELCOME ~/.xprofile && ( sed -i "/LARBSWELCOME/d" ~/.xprofile && notify-send "LARBS welcome message" "Welcome message disabled. Press Super+Shift+F1 again to reverse." ) || ( echo "notify-send -i "$HOME/.local/share/larbs/larbs.png" \"Welcome to LARBS\" \"Press super+F1 for the help menu.\" # LARBSWELCOME" >> ~/.xprofile && notify-send "LARBS welcome message" "Welcome message re-enabled." )
+ grep LARBSWELCOME ~/.xprofile && ( sed -i "/LARBSWELCOME/d" ~/.xprofile && notify-send "LARBS welcome message" "Welcome message disabled. Press Super+Shift+F1 again to reverse." ) || ( echo "notify-send -i "${XDG_DATA_HOME:-$HOME/.local/share}/larbs/larbs.png" \"Welcome to LARBS\" \"Press super+F1 for the help menu.\" # LARBSWELCOME" >> ~/.xprofile && notify-send "LARBS welcome message" "Welcome message re-enabled." )
# Show readme
super + F1
- groff -mom $HOME/.local/share/larbs/readme.mom -Tpdf | zathura -
+ groff -mom ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/readme.mom -Tpdf | zathura -
# F2 restarts either dwm or i3 and is bound in each.
# Change display
super + F3
diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler
index 73b572a..dc68313 100755
--- a/.config/sxiv/exec/key-handler
+++ b/.config/sxiv/exec/key-handler
@@ -4,13 +4,13 @@ do
case "$1" in
"w") setbg "$file" & ;;
"c")
- [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.config/directories | 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" ${XDG_CONFIG_HOME:-$HOME/.config}/directories | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")"
[ -z "$destdir" ] && exit
[ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit
cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." &
;;
"m")
- [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.config/directories | 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" ${XDG_CONFIG_HOME:-$HOME/.config}/directories | awk '{print $2}' | dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")"
[ -z "$destdir" ] && exit
[ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && 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 b327786..56e5fca 100644
--- a/.config/vifm/vifmrc
+++ b/.config/vifm/vifmrc
@@ -1,5 +1,5 @@
" vim: filetype=vifm
-source ~/.config/vifm/vifmshortcuts
+source ${XDG_CONFIG_HOME:-$HOME/.config}/vifm/vifmshortcuts
set vicmd=$EDITOR
set syscalls
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc
index eef425d..97f47eb 100644
--- a/.config/zsh/.zshrc
+++ b/.config/zsh/.zshrc
@@ -1,20 +1,31 @@
# Luke's config for the Zoomer Shell
-autoload -U colors && colors
+# Enable colors and change prompt:
+autoload -U colors && colors # Load colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
+setopt autocd # Automatically cd into typed directory.
+stty stop undef # Disable ctrl-s to freeze terminal.
-# Load aliases, shortcuts and nameddirs if existent.
-[ -f "$HOME/.config/shortcutrc" ] && source "$HOME/.config/shortcutrc"
-[ -f "$HOME/.config/aliasrc" ] && source "$HOME/.config/aliasrc"
-[ -f "$HOME/.config/zshnameddirrc" ] && source "$HOME/.config/zshnameddirrc"
+# History in cache directory:
+HISTSIZE=10000
+SAVEHIST=10000
+HISTFILE=~/.cache/zsh/history
+# Load aliases and shortcuts if existent.
+[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shortcutrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shortcutrc"
+[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/aliasrc"
+[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/zshnameddirrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/zshnameddirrc"
+
+# Basic auto/tab complete:
autoload -U compinit
zstyle ':completion:*' menu select
zmodload zsh/complist
compinit
+_comp_options+=(globdots) # Include hidden files.
-# Include hidden files in autocomplete:
-_comp_options+=(globdots)
+# vi mode
+bindkey -v
+export KEYTIMEOUT=1
# Use vim keys in tab complete menu:
bindkey -M menuselect 'h' vi-backward-char
@@ -23,14 +34,11 @@ bindkey -M menuselect 'l' vi-forward-char
bindkey -M menuselect 'j' vi-down-line-or-history
bindkey -v '^?' backward-delete-char
-export KEYTIMEOUT=1
-
# Change cursor shape for different vi modes.
function zle-keymap-select {
if [[ ${KEYMAP} == vicmd ]] ||
[[ $1 = 'block' ]]; then
echo -ne '\e[1 q'
-
elif [[ ${KEYMAP} == main ]] ||
[[ ${KEYMAP} == viins ]] ||
[[ ${KEYMAP} = '' ]] ||
@@ -39,17 +47,13 @@ function zle-keymap-select {
fi
}
zle -N zle-keymap-select
-
zle-line-init() {
zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere)
echo -ne "\e[5 q"
}
zle -N zle-line-init
-
-# Use beam shape cursor on startup.
-echo -ne '\e[5 q'
-# Use beam shape cursor for each new prompt.
-preexec() { echo -ne '\e[5 q' ;}
+echo -ne '\e[5 q' # Use beam shape cursor on startup.
+preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
# Use lf to switch directories and bind it to ctrl-o
lfcd () {
@@ -58,15 +62,20 @@ lfcd () {
if [ -f "$tmp" ]; then
dir="$(cat "$tmp")"
rm -f "$tmp"
- if [ -d "$dir" ]; then
- if [ "$dir" != "$(pwd)" ]; then
- cd "$dir"
- fi
- fi
+ [ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
fi
}
+bindkey -s '^o' 'lfcd\n'
+
+bindkey -s '^a' 'bc -l\n'
+
+bindkey -s '^f' 'cd "$(dirname "$(fzf)")"\n'
+
+bindkey '^[[P' delete-char
-bindkey -s '^o' 'lfcd\n' # zsh
+# Edit line in vim with ctrl-e:
+autoload edit-command-line; zle -N edit-command-line
+bindkey '^e' edit-command-line
# Load zsh-syntax-highlighting; should be last.
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null