add config folder

This commit is contained in:
Tibeuleu
2024-02-27 11:54:00 +01:00
commit 738538d51b
33 changed files with 1776 additions and 0 deletions

361
.config/i3/config Executable file
View File

@@ -0,0 +1,361 @@
# vim: filetype=i3
# File originally by Luke Smith <https://lukesmith.xyz>
# This config file will use environmental variables such as $BROWSER and $TERMINAL.
# You can set these variables in ~/.profile or ~/.bash_profile if you have it as below:
#
# export TERMINAL="st"
# #---Basic Definitions---# #
set $inner_gaps 0
set $outer_gaps 0
set $term --no-startup-id $TERMINAL
set $mod Mod4
set $stoprec --no-startup-id dmenurecord kill
set $shutdown doas_askpass openrc-shutdown -h now
set $reboot doas_askpass openrc-shutdown -r now
set $netrefresh --no-startup-id doas_askpass rc-service NetworkManager restart
set $nettoggle --no startup-id [ $(doas rc-service NetworkManager | awk '{print $3}') != 'stopped' ] && doas rc-service NetworkManager stop || doas rc-service NetworkManager start
set $hibernate loginctl suspend && slock
# #---Gaps---# #
for_window [class="^.*"] border pixel 2
gaps inner $inner_gaps
gaps outer $outer_gaps
# #---Dropdown Windows---# #
# General dropdown window traits. The order can matter.
for_window [instance="dropdown_*"] floating enable
for_window [instance="dropdown_*"] move scratchpad
for_window [instance="dropdown_*"] sticky enable
for_window [instance="dropdown_*"] scratchpad show
for_window [instance="dropdown_tmuxdd"] resize set 625 450
for_window [instance="dropdown_dropdowncalc"] resize set 800 300
for_window [instance="dropdown_tmuxdd"] border pixel 3
for_window [instance="dropdown_dropdowncalc"] border pixel 2
for_window [instance="dropdown_*"] move position center
bar {
font pango:mono 10
status_command i3blocks
position top
mode dock
modifier None
}
# #---Basic Bindings---# #
bindsym $mod+Return exec $term
bindsym $mod+Shift+Return exec --no-startup-id samedir
bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle
bindsym $mod+Escape workspace prev
bindsym $mod+Shift+Escape exec --no-startup-id prompt "Exit i3?" "i3 exit"
# bindsym $mod+BackSpace
bindsym $mod+Shift+BackSpace exec --no-startup-id prompt "Reboot computer?" "$reboot"
##bindsym $mod+asciitilde
#STOP/HIDE EVERYTHING:
bindsym $mod+Shift+Delete exec --no-startup-id pulsemixer --mute ; exec --no-startup-id mpc pause && pkill -RTMIN+10 i3blocks ; exec --no-startup-id pauseallmpv; workspace 0; exec $term -e htop ; exec $term -e lf
# Show selection:
bindsym $mod+Insert exec --no-startup-id notify-send "📋 Clipboard contents:" "$(xclip -o -selection clipboard)"
##bindsym $mod+Pause
# #---Letter Key Bindings---# #
bindsym $mod+q [con_id="__focused__" instance="^(?!dropdown_).*$"] kill
bindsym $mod+Shift+q [con_id="__focused__" instance="^(?!dropdown_).*$"] exec --no-startup-id kill -9 `xdotool getwindowfocus getwindowpid`
bindsym $mod+w exec --no-startup-id $BROWSER
bindsym $mod+Shift+w exec $term -e nmtui
#bindsym $mod+e exec --no-startup-id element-desktop
bindsym $mod+Shift+e exec --no-startup-id dmenuunicode
bindsym $mod+r exec $term -e lf
bindsym $mod+Shift+r exec $term -e ranger
#bindsym $mod+y exec $term -e calcurse
bindsym $mod+Shift+y exec --no-startup-id i3resize left
bindsym $mod+u exec --no-startup-id ddspawn tmuxdd
bindsym $mod+Shift+u exec --no-startup-id i3resize down
bindsym $mod+i exec $term -e btop
bindsym $mod+Shift+i exec --no-startup-id i3resize up
bindsym $mod+o sticky toggle
bindsym $mod+Shift+o exec --no-startup-id i3resize right
bindsym $mod+p exec --no-startup-id mpc toggle
bindsym $mod+Shift+p exec --no-startup-id mpc stop
bindsym $mod+a exec --no-startup-id ddspawn dropdowncalc -f mono:pixelsize=24
bindsym $mod+Shift+a exec $term -e alsamixer
bindsym $mod+s exec --no-startup-id signal-desktop --use-tray-icon
bindsym $mod+Shift+s exec --no-startup-id slack
bindsym $mod+d exec --no-startup-id dmenu_run
bindsym $mod+Shift+d exec --no-startup-id discord
bindsym $mod+t exec --no-startup-id thunderbird
bindsym $mod+Shift+t exec --no-startup-id telegram-desktop
set $freeze Distraction-free mode (super+shift+f to reactivate bindings)
mode "$freeze" { bindsym $mod+Shift+f mode "default"
}
bindsym $mod+f fullscreen toggle
bindsym $mod+Shift+f fullscreen global
#bindsym $mod+Shift+f mode "$freeze" ;; exec --no-startup-id notify-send "Distraction-free mode activated." "Press Super+Shift+f to return."
bindsym $mod+g workspace prev
bindsym $mod+Shift+g exec --no-startup-id gimp; workspace $ws5
bindsym $mod+h focus left
bindsym $mod+Shift+h move left 30
bindsym $mod+Ctrl+h move workspace to output left
bindsym $mod+j focus down
bindsym $mod+Shift+j move down 30
bindsym $mod+Ctrl+j move workspace to output down
bindsym $mod+k focus up
bindsym $mod+Shift+k move up 30
bindsym $mod+Ctrl+k move workspace to output up
bindsym $mod+l focus right
bindsym $mod+Shift+l move right 30
bindsym $mod+Ctrl+l move workspace to output right
bindsym $mod+z gaps outer current plus 5
bindsym $mod+Shift+z gaps outer current minus 5
bindsym $mod+x exec --no-startup-id xset dpms force off && mpc pause && pauseallmpv && slock &
bindsym $mod+Shift+x exec --no-startup-id sysact
bindsym $mod+c exec --no-startup-id vscodium
bindsym $mod+Shift+c exec --no-startup-id camtoggle
bindsym $mod+v exec --no-startup-id $term -e $EDITOR -c "VimwikiIndex"
bindsym $mod+Shift+v split toggle
bindsym $mod+b bar mode toggle
bindsym $mod+Shift+b floating toggle; sticky toggle; exec --no-startup-id hover left
bindsym $mod+n exec $term -e newsboat && pkill -RTMIN+6 i3blocks
bindsym $mod+Shift+n floating toggle; sticky toggle; exec --no-startup-id hover right
bindsym $mod+m exec --no-startup-id mpd-mpris ;; exec --no-startup-id $term -e ncmpcpp
bindsym $mod+Shift+m exec --no-startup-id spotify-tray
# #---Workspace Bindings---# #
bindsym $mod+Home workspace $ws1
bindsym $mod+Shift+Home move container to workspace $ws1
bindsym $mod+End workspace $ws10
bindsym $mod+Shift+End move container to workspace $ws10
bindsym $mod+Prior workspace prev
bindsym $mod+Shift+Prior move container to workspace prev
bindsym $mod+Next workspace next
bindsym $mod+Shift+Next move container to workspace next
bindsym $mod+Tab workspace back_and_forth
bindsym $mod+XF86Back workspace prev
bindsym $mod+Shift+XF86Back move container to workspace prev
bindsym $mod+XF86Forward workspace next
bindsym $mod+Shift+XF86Forward move container to workspace next
bindsym $mod+semicolon workspace next
bindsym $mod+slash split vertical ;; exec $term
bindsym $mod+Shift+slash kill
bindsym $mod+backslash workspace back_and_forth
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9
bindsym $mod+Shift+0 move container to workspace $ws10
for_window [class="Pinentry"] sticky enable
for_window [class="sent"] border pixel 0px
for_window [title="GIMP Startup"] move workspace $ws5
for_window [class="Gimp"] move workspace $ws5
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.
for_window [title="mpvfloat"] floating enable
for_window [title="mpvfloat"] sticky enable
for_window [title="mpvfloat"] border pixel 0
no_focus [title="mpvfloat"]
# #---Function Buttons---# #
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"
bindsym $mod+F5 exec --no-startup-id $netrefresh
bindsym $mod+F6 exec --no-startup-id torwrap
bindsym $mod+F7 exec --no-startup-id td-toggle
bindsym $mod+F8 exec --no-startup-id mailsync
bindsym $mod+F9 exec --no-startup-id mounter
bindsym $mod+F10 exec --no-startup-id unmounter
bindsym $mod+F11 exec --no-startup-id ducksearch
bindsym $mod+F12 exec $term -e nmtui
bindsym $mod+Shift+F1 exec --no-startup-id toggle-welcome
# #---Arrow Keys---# #
bindsym $mod+Left focus left
bindsym $mod+Shift+Left move left
bindsym $mod+Ctrl+Left move workspace to output left
bindsym $mod+Down focus down
bindsym $mod+Shift+Down move down
bindsym $mod+Ctrl+Down move workspace to output down
bindsym $mod+Up focus up
bindsym $mod+Shift+Up move up
bindsym $mod+Ctrl+Up move workspace to output up
bindsym $mod+Right focus right
bindsym $mod+Shift+Right move right
bindsym $mod+Ctrl+Right move workspace to output right
# #---Media Keys---# #
# Volume keys
#bindsym $mod+plus exec --no-startup-id pulsemixer --change-volume +5 && pkill -RTMIN+10 i3blocks
#bindsym $mod+Shift+plus exec --no-startup-id pulsemixer --change-volume +15 && pkill -RTMIN+10 i3blocks
#bindsym $mod+minus exec --no-startup-id pulsemixer --change-volume -5 && pkill -RTMIN+10 i3blocks
#bindsym $mod+Shift+minus exec --no-startup-id pulsemixer --change-volume -15 && pkill -RTMIN+10 i3blocks
bindsym $mod+less exec --no-startup-id mpc prev
bindsym $mod+Shift+less exec --no-startup-id mpc next
#bindsym $mod+greater exec --no-startup-id mpc next
#bindsym $mod+Shift+greater exec --no-startup-id mpc next
# For advancing forward/backward in an mpd song
#bindsym $mod+bracketleft exec --no-startup-id mpc seek -10
#bindsym $mod+Shift+bracketleft exec --no-startup-id mpc seek -120
#bindsym $mod+bracketright exec --no-startup-id mpc seek +10
#bindsym $mod+Shift+bracketright exec --no-startup-id mpc seek +120
# For screenshots and recording
bindsym Print exec --no-startup-id maim pic-full-"$(date '+%y%m%d-%H%M-%S').png"
bindsym Shift+Print exec --no-startup-id maimpick
bindsym $mod+Print exec --no-startup-id dmenurecord
bindsym $mod+Shift+F12 exec --no-startup-id "killall screenkey || screenkey"
bindsym $mod+Delete exec $stoprec
bindsym XF86Launch1 exec --no-startup-id xset dpms force off
# #---Extra XF86 Keys---# #
bindsym XF86AudioMute exec --no-startup-id amixer sset Master toggle && pkill -RTMIN+10 i3blocks
bindsym XF86AudioMicMute exec --no-startup-id amixer sset Capture toggle
bindsym XF86AudioLowerVolume exec --no-startup-id amixer sset Master 5%- && pkill -RTMIN+10 i3blocks
bindsym Shift+XF86AudioLowerVolume exec --no-startup-id amixer sset Master 1%- && pkill -RTMIN+10 i3blocks
bindsym Control+XF86AudioLowerVolume exec --no-startup-id amixer sset Master 10%- && pkill -RTMIN+10 i3blocks
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer sset Master 5%+ && pkill -RTMIN+10 i3blocks
bindsym Shift+XF86AudioRaiseVolume exec --no-startup-id amixer sset Master 1%+ && pkill -RTMIN+10 i3blocks
bindsym Control+XF86AudioRaiseVolume exec --no-startup-id amixer sset Master 10%+ && pkill -RTMIN+10 i3blocks
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -time 500 -steps 5 -dec 5
bindsym Shift+XF86MonBrightnessDown exec --no-startup-id xbacklight -time 100 -steps 1 -dec 1
bindsym Control+XF86MonBrightnessDown exec --no-startup-id xbacklight -time 1000 -steps 10 -dec 10
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -time 500 -steps 5 -inc 5
bindsym Shift+XF86MonBrightnessUp exec --no-startup-id xbacklight -time 100 -steps 1 -inc 1
bindsym Control+XF86MonBrightnessUp exec --no-startup-id xbacklight -time 1000 -steps 10 -inc 10
bindsym XF86Display exec --no-startup-id displayselect
bindsym XF86WLAN exec $nettoggle
bindsym XF86Bluetooth exec doas rfkill unblock bluetooth | $term bluetoothctl
##bindsym XF86Copy exec
##bindsym XF86Open exec
##bindsym XF86Paste exec
##bindsym XF86Cut exec
##bindsym XF86MenuKB exec
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 XF86PowerOff exec --no-startup-id sysact
##bindsym XF86Explorer exec $term -e lf
##bindsym XF86Send exec
##bindsym XF86Xfer exec
##bindsym XF86WWW exec --no-startup-id $BROWSER
##bindsym XF86DOS exec
bindsym XF86ScreenSaver exec exec --no-startup-id lockscreen
##bindsym XF86RotateWindows exec
##bindsym XF86TaskPane exec
##bindsym XF86Favorites exec
##bindsym XF86MyComputer exec $term -e lf
##bindsym XF86Back exec
##bindsym XF86Forward exec
bindsym XF86Eject exec --no-startup-id dmenuumount
bindsym XF86AudioNext exec --no-startup-id mpc next
bindsym XF86AudioPlay exec --no-startup-id mpc toggle
bindsym XF86AudioPrev exec --no-startup-id mpc prev
bindsym XF86AudioStop exec --no-startup-id mpc toggle
##bindsym XF86AudioRecord exec --no-startup-id $term -e ncmpcpp
bindsym XF86AudioRewind exec --no-startup-id mpc seek -10
bindsym XF86AudioForward exec --no-startup-id mpc seek +10
bindsym XF86AudioMedia exec --no-startup-id $term -e ncmpcpp
##bindsym XF86Phone exec
##bindsym XF86Tools exec
##bindsym XF86HomePage exec $BROWSER
##bindsym XF86Reload restart
##bindsym XF86ScrollUp exec
##bindsym XF86ScrollDown exec
##bindsym XF86New exec
##bindsym XF86LaunchA exec
##bindsym XF86LaunchB exec
##bindsym XF86Launch2 exec
##bindsym XF86Launch3 exec
##bindsym XF86Launch4 exec
##bindsym XF86Launch5 exec
##bindsym XF86Launch6 exec
##bindsym XF86Launch7 exec
##bindsym XF86Launch8 exec
##bindsym XF86Launch9 exec
bindsym XF86TouchpadToggle exec --no-startup-id toggletouchpad
bindsym XF86TouchpadOn exec --no-startup-id synclient TouchpadOff=0
bindsym XF86TouchpadOff exec --no-startup-id synclient TouchpadOff=1
bindsym XF86Suspend exec --no-startup-id lockscreen
bindsym XF86Close kill
#bindsym XF86WebCam exec --no-startup-id camtoggle
bindsym XF86Mail exec --no-startup-id thunderbird
#bindsym XF86Messenger exec $term -e weechat
#bindsym XF86Search exec $BROWSER https://duckduckgo.com
##bindsym XF86Go exec
##bindsym XF86Finance exec
##bindsym XF86Game exec
#bindsym XF86Shop exec $BROWSER https://ebay.com
#bindsym XF86KbdLightOnOff exec
##bindsym XF86Reply exec
##bindsym XF86MailForward exec
##bindsym XF86Save exec
#bindsym XF86Documents exec $term -e lf ~/Documents
##bindsym XF86Battery exec

72
.config/i3blocks/config Executable file
View File

@@ -0,0 +1,72 @@
command=~/.local/bin/statusbar/$BLOCK_NAME
separator_block_width=15
markup=pango
#[record]
#command=cat /tmp/recordingicon
#interval=once
#signal=9
[music]
interval=30
signal=11
[news]
interval=once
signal=6
#[iplocate]
#interval=30
#[nettraf]
#interval=1
[pacpackages]
interval=once
signal=8
#[torrent]
#interval=20
#signal=7
#[weather]
#interval=18000
#signal=5
#[mailbox]
#interval=180
#signal=12
[memory]
interval=30
[cpu]
interval=15
[volume]
interval=once
signal=10
#[disk]
#interval=60
#command=disk /
#[disk]
#interval=60
#command=disk /home
[battery]
interval=5
command=battery BAT0
[clock]
interval=30
[kbselect]
interval=10
[internet]
interval=10
#[help-icon]
#interval=once

92
.config/lf/lfrc Executable file
View File

@@ -0,0 +1,92 @@
# Luke's lf settings
# Basic vars
set shell bash
set shellopts '-eu'
set ifs "\n"
set scrolloff 10
set color256
set icons
set period 1
set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml"
# Vars that depend on environmental variables
$lf -remote "send $id set previewer ${XDG_CONFIG_HOME:-$HOME/.config}/lf/scope"
# cmds/functions
cmd open ${{
case $(file --mime-type $f -b) in
image/vnd.djvu|application/pdf|application/octet-stream) setsid -f zathura $fx >/dev/null 2>&1 ;;
text/*) $EDITOR $fx;;
image/x-xcf|image/svg+xml) setsid -f gimp $f >/dev/null 2>&1 ;;
image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|tif\)\(_large\)*$" | sxiv -aio 2>/dev/null | lf-select ;;
audio/*) mpv --audio-display=no $f ;;
video/*) setsid -f mpv $f -quiet >/dev/null 2>&1 ;;
application/pdf|application/vnd*|application/epub*) setsid -f zathura $fx >/dev/null 2>&1 ;;
*) for f in $fx; do setsid -f $OPENER $f >/dev/null 2>&1; done;;
esac
}}
cmd mkdir $mkdir -p "$(echo $* | tr ' ' '\ ')"
cmd delete ${{
clear; tput cup $(($(tput lines)/3)); tput bold
set -f
printf "%s\n\t" "$fx"
printf "delete?[y/N]"
read ans
[ $ans = "y" ] && rm -rf $fx
}}
cmd moveto ${{
clear; tput cup $(($(tput lines)/3)); tput bold
set -f
clear; echo "Move to where?"
dest="$(cut -d' ' -f2- ${XDG_CONFIG_HOME:-$HOME/.config}/directories | fzf | sed 's|~|$HOME|' )" &&
for x in $fx; do
eval mv -iv \"$x\" \"$dest\"
done &&
notify-send "🚚 File(s) moved." "File(s) moved to $dest."
}}
cmd copyto ${{
clear; tput cup $(($(tput lines)/3)); tput bold
set -f
clear; echo "Copy to where?"
dest="$(cut -d' ' -f2- ${XDG_CONFIG_HOME:-$HOME/.config}/directories | fzf | sed 's|~|$HOME|' )" &&
for x in $fx; do
eval cp -ivr \"$x\" \"$dest\"
done &&
notify-send "📋 File(s) copied." "File(s) copies to $dest."
}}
cmd setbg "$1"
cmd bulkrename $vidir
# Bindings
map <c-f> $lf -remote "send $id select '$(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
map C copyto
map M moveto
map <c-n> push :mkdir<space>
map <c-r> reload
map <enter> shell
map x $$f
map X !$f
map o &mimeopen $f
map O $mimeopen --ask $f
map A rename # at the very end
map c push A<c-u> # new rename
map I push A<c-a> # at the very beginning
map i push A<a-b><a-b><a-f> # before extention
map a push A<a-b> # after extention
map B bulkrename
map b $setbg $f
map <c-e> down
map <c-y> up
map V push :!nvim<space>

58
.config/lf/scope Executable file
View File

@@ -0,0 +1,58 @@
#!/bin/bash
set -C -f -u
#IFS=$'\n'
IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}"
# ANSI color codes are supported.
# STDIN is disabled, so interactive scripts won't work properly
# This script is considered a configuration file and must be updated manually.
# Meanings of exit codes:
# code | meaning | action of ranger
# -----+------------+-------------------------------------------
# 0 | success | Display stdout as preview
# 1 | no preview | Display no preview at all
# 2 | plain text | Display the plain content of the file
# Script arguments
FILE_PATH="${1}" # Full path of the highlighted file
HEIGHT="${2}"
#FILE_EXTENSION="${FILE_PATH##*.}"
#FILE_EXTENSION_LOWER=$(echo ${FILE_EXTENSION} | tr '[:upper:]' '[:lower:]')
# Settings
HIGHLIGHT_SIZE_MAX=262143 # 256KiB
HIGHLIGHT_TABWIDTH=8
HIGHLIGHT_STYLE='pablo'
handle_mime() {
local mimetype="${1}"
case "${mimetype}" in
text/html) w3m -dump "${FILE_PATH}" ;;
text/troff) man ./ "${FILE_PATH}" | col -b ;;
text/* | */xml)
if [ "$( stat --printf='%s' -- "${FILE_PATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]; then
exit 2
fi
if [ "$( tput colors )" -ge 256 ]; then
local highlight_format='xterm256'
else
local highlight_format='ansi'
fi
highlight --replace-tabs="${HIGHLIGHT_TABWIDTH}" --out-format="${highlight_format}" \
--style="${HIGHLIGHT_STYLE}" --force -- "${FILE_PATH}" ;;
application/zip) atool --list -- "${FILE_PATH}" ;;
image/*) chafa --fill=block --symbols=block -c 256 -s 80x"${HEIGHT}" "${FILE_PATH}" || exit 1;;
video/* | audio/*|application/octet-stream) mediainfo "${FILE_PATH}" || exit 1;;
*/pdf) pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - ;;
*opendocument*) odt2txt "${FILE_PATH}" ;;
esac
}
MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )"
handle_mime "${MIMETYPE}"
exit 1

56
.config/newsboat/config Executable file
View File

@@ -0,0 +1,56 @@
#show-read-feeds no
auto-reload yes
external-url-viewer "urlscan -dc -r 'linkhandler {}'"
bind-key j down
bind-key k up
bind-key j next articlelist
bind-key k prev articlelist
bind-key J next-feed articlelist
bind-key K prev-feed articlelist
bind-key G end
bind-key g home
bind-key d pagedown
bind-key u pageup
bind-key l open
bind-key h quit
bind-key a toggle-article-read
bind-key z toggle-show-read-feeds
bind-key n next-unread
bind-key N prev-unread
bind-key D pb-download
bind-key U show-urls
bind-key x pb-delete
color listnormal cyan default
color listfocus black yellow standout bold
color listnormal_unread blue default
color listfocus_unread yellow default bold
color info red black bold
color article white default bold
browser linkhandler
macro o open-in-browser
macro t set browser "qndl" ; open-in-browser ; set browser linkhandler
macro a set browser "tsp yt-dlp --embed-metadata -xic -f bestaudio/best --restrict-filenames" ; open-in-browser ; set browser linkhandler
macro v set browser "setsid -f mpv" ; open-in-browser ; set browser linkhandler
macro w set browser "lynx" ; open-in-browser ; set browser linkhandler
macro d set browser "dmenuhandler" ; open-in-browser ; set browser linkhandler
macro c set browser "echo %u | xclip -r -sel c" ; open-in-browser ; set browser linkhandler
macro C set browser "youtube-viewer --comments=%u" ; open-in-browser ; set browser linkhandler
macro p set browser "peertubetorrent %u 480" ; open-in-browser ; set browser linkhandler
macro P set browser "peertubetorrent %u 1080" ; open-in-browser ; set browser linkhandler
highlight all "---.*---" yellow
highlight feedlist ".*(0/0))" black
highlight article "(^Feed:.*|^Title:.*|^Author:.*)" cyan default bold
highlight article "(^Link:.*|^Date:.*)" default default
highlight article "https?://[^ ]+" green default
highlight article "^(Title):.*$" blue default
highlight article "\\[[0-9][0-9]*\\]" magenta default bold
highlight article "\\[image\\ [0-9]+\\]" green default bold
highlight article "\\[embedded flash: [0-9][0-9]*\\]" green default bold
highlight article ":.*\\(link\\)$" cyan default
highlight article ":.*\\(image\\)$" blue default
highlight article ":.*\\(embedded flash\\)$" magenta default

8
.config/newsboat/urls Executable file
View File

@@ -0,0 +1,8 @@
http://arxiv.org/rss/astro-ph
http://feeds.feedburner.com/aa_highlights?format=xml
https://academic.oup.com/rss/site_5326/3192.xml
https://iopscience.iop.org/journal/rss/0004-637X
https://www.nature.com/subjects/astronomy-and-astrophysics.rss
https://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/meetings/rssFeed
https://artixlinux.org/feed.php
https://www.archlinux.org/feeds/news/ "tech"

View File

@@ -0,0 +1,10 @@
function ColorMyNVim(color)
color = color or "gruvbox"
vim.cmd.colorscheme(color)
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
end
ColorMyNVim()

View File

@@ -0,0 +1,8 @@
require("ts_context_commentstring").setup({
enable_autocmd = false,
})
require('Comment').setup({
ignore = '^$', -- Ignore empty lines
pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(),
})

View File

@@ -0,0 +1 @@
vim.keymap.set("n", "<leader>gs", vim.cmd.Git)

View File

@@ -0,0 +1,3 @@
vim.keymap.set("n", "<leader>hs", "<cmd>GitGutterStageHunk<cr>")
vim.keymap.set("n", "<leader>hu", "<cmd>GitGutterUndoHunk<cr>")
vim.keymap.set("n", "<leader>hp", "<cmd>GitGutterPreviewHunk<cr>")

View File

@@ -0,0 +1,10 @@
local mark = require("harpoon.mark")
local ui = require("harpoon.ui")
vim.keymap.set("n", "<leader>a", mark.add_file)
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
vim.keymap.set("n", "<C-a>", function() ui.nav_file(1) end)
vim.keymap.set("n", "<C-z>", function() ui.nav_file(2) end)
vim.keymap.set("n", "<C-q>", function() ui.nav_file(3) end)
vim.keymap.set("n", "<C-s>", function() ui.nav_file(4) end)

View File

@@ -0,0 +1,14 @@
vim.api.nvim_set_hl(0, "IndentBlanklineContextChar", { fg = "#d79921", bg = "none"})
require("ibl").setup({
indent = { char = " "},
whitespace = { },
scope = { char = "",
highlight = "IndentBlanklineContextChar",
show_start = false,
show_end = false,
include = { node_type = { python = { "if_statement",
"for_statement",
"with_statement", } } },
},
})

View File

@@ -0,0 +1,156 @@
local map_lsp_keybinds = require('config.remap').map_lsp_keybinds -- Has to load keymaps before pluginslsp
-- Use neodev to configure lua_ls in nvim directories - must load before lspconfig
require("neodev").setup()
require("fidget").setup({
notification = {
redirect = -- Conditionally redirect notifications to another backend
function(msg, level, opts)
if opts and opts.on_open then
return require("fidget.integration.nvim-notify").delegate(msg, level, opts)
end
end,
},
})
require('mason').setup({})
require('mason-lspconfig').setup({
ensure_installed = {'bashls', 'clangd', 'fortls', 'julials', 'marksman', 'pylsp', 'rust_analyzer', 'texlab'},
})
local cmp = require('cmp')
local cmp_select = {behavior = cmp.SelectBehavior.Select}
local servers = {
bashls = {},
clangd = {},
fortls = {},
julials = {},
marksman = {},
pylsp = {
settings = {
pylsp = {
plugins = {
pycodestyle = {
ignore = {},
maxLineLength = 160,
},
ruff = {
enabled = true, -- Enable the plugin
executable = "<path-to-ruff-bin>", -- Custom path to ruff
config = "<path_to_custom_ruff_toml>", -- Custom config for ruff to use
extendSelect = { "I" }, -- Rules that are additionally used by ruff
extendIgnore = { "C90" }, -- Rules that are additionally ignored by ruff
format = { "I" }, -- Rules that are marked as fixable by ruff that should be fixed when running textDocument/formatting
severities = { ["D212"] = "I" }, -- Optional table of rules where a custom severity is desired
unsafeFixes = false, -- Whether or not to offer unsafe fixes as code actions. Ignored with the "Fix All" action
-- Rules that are ignored when a pyproject.toml or ruff.toml is present:
lineLength = 80, -- Line length to pass to ruff checking and formatting
exclude = { "__about__.py" }, -- Files to be excluded by ruff checking
select = { "F" }, -- Rules to be enabled by ruff
ignore = { "D210" }, -- Rules to be ignored by ruff
perFileIgnores = { ["__init__.py"] = "CPY001" }, -- Rules that should be ignored for specific files
preview = false, -- Whether to enable the preview style linting and formatting.
targetVersion = "py310", -- The minimum python version to target (applies for both linting and formatting).
},
},
},
},
},
rust_analyzer = {},
texlab = {},
}
-- Default handlers for LSP
local default_handlers = {
["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded" }),
["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = "rounded" }),
}
-- this is the function that loads the extra snippets to luasnip
-- from rafamadriz/friendly-snippets
require('luasnip.loaders.from_vscode').lazy_load()
cmp.setup({
-- No preselection
preselect = 'None',
sources = {
{name = 'nvim_lsp'}, -- lsp
{name = 'buffer', max_item_count = 5}, -- Text within current buffer
{name = 'luasnip', max_item_count = 3}, -- Snippets
{name = 'path', max_item_count = 3}, -- File system paths
},
formatting = {
expandable_indicator = true,
},
experimental = {
ghost_text = true,
},
mapping = cmp.mapping.preset.insert({
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
['<C-y>'] = cmp.mapping.confirm({ select = true }),
['<C-Space>'] = cmp.mapping.complete(),
}),
snippet = {
expand = function(args)
local ls = require("luasnip")
if not ls then
return
end
ls.lsp_expand(args.body)
end,
},
})
-- nvim-cmp supports additional completion capabilities
local capabilities = vim.lsp.protocol.make_client_capabilities()
local default_capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities)
local on_attach = function(_client, buffer_number)
-- Pass the current buffer to map lsp keybinds
map_lsp_keybinds(buffer_number)
-- Create a command `:Format` local to the LSP buffer
vim.api.nvim_buf_create_user_command(buffer_number, "Format", function(_)
vim.lsp.buf.format({
filter = function(format_client)
-- Use Prettier to format TS/JS if it's available
return format_client.name ~= "tsserver" or not null_ls.is_registered("prettier")
end,
})
end, { desc = "LSP: Format current buffer with LSP" })
end
-- Iterate over our servers and set them up
for name, config in pairs(servers) do
require("lspconfig")[name].setup({
capabilities = default_capabilities,
filetypes = config.filetypes,
handlers = vim.tbl_deep_extend("force", {}, default_handlers, config.handlers or {}),
on_attach = on_attach,
settings = config.settings,
})
end
vim.diagnostic.config({
-- update_in_insert = true,
virtual_text = true,
underline = false,
float = {
focusable = false,
style = "minimal",
border = "rounded",
source = "always",
header = "",
prefix = "",
},
})

View File

@@ -0,0 +1,6 @@
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>pf', builtin.find_files, {})
vim.keymap.set('n', '<C-p>', builtin.git_files, {})
vim.keymap.set('n', '<leader>ps', function()
builtin.grep_string({ search = vim.fn.input("Grep > ") });
end)

View File

@@ -0,0 +1,56 @@
require'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all" (the five listed parsers should always be installed)
ensure_installed = { "bash", "c", "cpp", "cuda", "latex", "lua", "markdown", "rust", "vim", "vimdoc" },
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = true,
---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
highlight = {
enable = true,
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
}
local vim = vim
local opt = vim.opt
local api = vim.api
local M = {}
opt.foldmethod = "expr"
opt.foldexpr = "nvim_treesitter#foldexpr()"
-- function to create a list of commands and convert them to autocommands
-------- This function is taken from https://github.com/norcalli/nvim_utils
function M.nvim_create_augroups(definitions)
for group_name, definition in pairs(definitions) do
api.nvim_command('augroup '..group_name)
api.nvim_command('autocmd!')
for _, def in ipairs(definition) do
local command = table.concat(vim.tbl_flatten{'autocmd', def}, ' ')
api.nvim_command(command)
end
api.nvim_command('augroup END')
end
end
local autoCommands = {
-- other autocommands
open_folds = {
{"BufReadPost,FileReadPost", "*", "normal zR"}
}
}
M.nvim_create_augroups(autoCommands)

View File

@@ -0,0 +1 @@
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)

2
.config/nvim/init.lua Normal file
View File

@@ -0,0 +1,2 @@
require("config")
vim.cmd('source $HOME/.config/nvim/old_init.vim')

View File

@@ -0,0 +1,25 @@
-- setup must be called before loading the colorscheme
-- Default options:
require("gruvbox").setup({
undercurl = true,
underline = true,
bold = true,
italic = {
strings = false,
comments = true,
operators = false,
folds = true,
},
strikethrough = true,
invert_selection = false,
invert_signs = false,
invert_tabline = false,
invert_intend_guides = false,
inverse = true, -- invert background for search, diffs, statuslines and errors
contrast = "", -- can be "hard", "soft" or empty string
palette_overrides = {},
overrides = {},
dim_inactive = false,
transparent_mode = true,
})
vim.cmd.colorscheme("gruvbox")

View File

@@ -0,0 +1,4 @@
require("config.remap")
require("config.options")
require("config.gruvbox")

View File

@@ -0,0 +1,85 @@
-- Square cursor
vim.opt.guicursor = ""
-- Enable relative line number
vim.opt.nu = true
vim.opt.relativenumber = true
-- Set tabs to 4 spaces
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.expandtab = true
-- Enable auto indent and set it to 4 spaces
vim.opt.smartindent = true
vim.opt.shiftwidth = 4
-- Disable text wrap
vim.opt.wrap = true
-- Enable persistent undo history
vim.opt.swapfile = false
vim.opt.backup = false
vim.opt.undodir = os.getenv("HOME") .. "/.config/nvim/undodir"
vim.opt.undofile = true
-- Set better splitting
vim.opt.splitright = true
vim.opt.splitbelow = true
-- Better search options
vim.opt.hlsearch = false
vim.opt.incsearch = true
-- Enable 24-bit color
vim.opt.termguicolors = true
-- Always keep 8 lines above/below cursor unless at start/end of file
vim.opt.scrolloff = 8
-- Decrease uptade time
vim.opt.updatetime = 50
-- Remove trailing white spaces
vim.api.nvim_create_autocmd({"BufWritePre"}, {
group = vim.api.nvim_create_augroup("remove_trailing_spaces", { clear = true }),
pattern = "*",
desc = "Remove trailing white spaces",
command = [[%s/\s\+$//e]],
})
-- Restore cursor position
vim.api.nvim_create_autocmd({"BufReadPost"}, {
group = vim.api.nvim_create_augroup("restore_cursor_pos", { clear = true}),
pattern = "*",
desc = "Restore cursor position",
callback = function()
vim.cmd('silent! normal! g`"zv')
end,
})
-- Open help panel in a vsplit to the left
vim.api.nvim_create_autocmd("FileType", {
group = vim.api.nvim_create_augroup("vertical_help", { clear = true }),
pattern = "help",
callback = function()
vim.bo.bufhidden = "unload"
vim.cmd.wincmd("L")
vim.cmd.wincmd("=")
end,
})
-- Highlight yankzone
vim.api.nvim_create_autocmd('TextYankPost', {
group = vim.api.nvim_create_augroup("highlight_yank", { clear = true}),
pattern = '*',
desc = "Highlight selection on yank",
callback = function()
vim.highlight.on_yank({
higroup = 'IncSearch',
timeout = 200,
visual = true,
})
end,
})

View File

@@ -0,0 +1,59 @@
return require('packer').startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
use {
'nvim-telescope/telescope.nvim',
tag = '0.1.1',
-- or branch = '0.1.x',
requires = { {'nvim-lua/plenary.nvim'} }
}
use "ellisonleao/gruvbox.nvim"
use {
'nvim-treesitter/nvim-treesitter',
run = function()
local ts_update = require('nvim-treesitter.install').update({ with_sync = true })
ts_update()
end,
}
use 'nvim-treesitter/playground'
use {
'ThePrimeagen/harpoon',
requires = { {'nvim-lua/plenary.nvim'} }
}
use 'mbbill/undotree'
use 'tpope/vim-fugitive'
use 'airblade/vim-gitgutter'
use 'lukas-reineke/indent-blankline.nvim'
use 'JoosepAlviste/nvim-ts-context-commentstring'
use 'numToStr/Comment.nvim'
use 'lervag/vimtex'
use {
'neovim/nvim-lspconfig',
requires = {
-- LSP Support
{'williamboman/mason.nvim'},
{'williamboman/mason-lspconfig.nvim'},
-- Autocompletion
{'hrsh7th/nvim-cmp'},
{'hrsh7th/cmp-nvim-lsp'},
{'hrsh7th/cmp-buffer'},
{'hrsh7th/cmp-path'},
{'hrsh7th/cmp-cmdline'},
-- Snippets
{'L3MON4D3/LuaSnip'},
{'saadparwaiz1/cmp_luasnip'},
{'rafamadriz/friendly-snippets'},
{'onsails/lspkind.nvim'},
-- Utils
{'j-hui/fidget.nvim'},
{'folke/neodev.nvim'}
}
}
end)

View File

@@ -0,0 +1,133 @@
local nnoremap = require("config.remap_utils").nnoremap
local vnoremap = require("config.remap_utils").vnoremap
local inoremap = require("config.remap_utils").inoremap
local tnoremap = require("config.remap_utils").tnoremap
local xnoremap = require("config.remap_utils").xnoremap
local M = {}
-- Set leader key to space
vim.g.mapleader = " "
-- Set Explorer keybind to leader-"e"
vim.keymap.set("n","<leader>e", vim.cmd.Ex)
-- Disable Space bar since it'll be used as the leader key
nnoremap("<space>", "<nop>")
vnoremap("<space>", "<nop>")
-- Remap <C-c> to esc to avoid weird interaction
inoremap("<C-c>", "<Esc>")
-- <leader>s for quick find/replace for the word under the cursor
nnoremap("<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
-- Paste without deleting what's in the yank
xnoremap("<leader>p", [["_dP]])
-- <leader>f to format
nnoremap("<leader>f", ":Format<cr>")
-- Characters/Words/Lines count
nnoremap("<leader>cc", "<cmd>!wc -m %<cr>")
nnoremap("<leader>cw", "<cmd>!wc -w %<cr>")
nnoremap("<leader>cl", "<cmd>!wc -l %<cr>")
-- LSP Keybinds (exports a function to be used in ../../after/plugin/lsp.lua b/c we need a reference to the current buffer) --
M.map_lsp_keybinds = function(buffer_number)
-- Rename variable
nnoremap("<leader>rn", vim.lsp.buf.rename, { desc = "LSP: [R]e[n]ame", buffer = buffer_number })
-- LSP code action
nnoremap("<leader>ca", vim.lsp.buf.code_action, { desc = "LSP: [C]ode [A]ction", buffer = buffer_number })
-- Goto definition
nnoremap("gd", vim.lsp.buf.definition, { desc = "LSP: [G]oto [D]efinition", buffer = buffer_number })
-- Telescope LSP keybinds --
-- Goto reference
nnoremap(
"gr",
require("telescope.builtin").lsp_references,
{ desc = "LSP: [G]oto [R]eferences", buffer = buffer_number }
)
-- Goto implementation
nnoremap(
"gi",
require("telescope.builtin").lsp_implementations,
{ desc = "LSP: [G]oto [I]mplementation", buffer = buffer_number }
)
-- List of symbols in the current buffer
nnoremap(
"<leader>bs",
require("telescope.builtin").lsp_document_symbols,
{ desc = "LSP: [B]uffer [S]ymbols", buffer = buffer_number }
)
-- List of symbols in the workspace
nnoremap(
"<leader>ps",
require("telescope.builtin").lsp_workspace_symbols,
{ desc = "LSP: [P]roject [S]ymbols", buffer = buffer_number }
)
-- Hover documentation
nnoremap("K", vim.lsp.buf.hover, { desc = "LSP: Hover Documentation", buffer = buffer_number })
-- Signature documentation
nnoremap("<leader>k", vim.lsp.buf.signature_help, { desc = "LSP: Signature Documentation", buffer = buffer_number })
inoremap("<C-k>", vim.lsp.buf.signature_help, { desc = "LSP: Signature Documentation", buffer = buffer_number })
-- Goto declaration
nnoremap("gD", vim.lsp.buf.declaration, { desc = "LSP: [G]oto [D]eclaration", buffer = buffer_number })
-- Type definition
nnoremap("td", vim.lsp.buf.type_definition, { desc = "LSP: [T]ype [D]efinition", buffer = buffer_number })
end
-- Goto next diagnostic of any severity
nnoremap("]d", function()
vim.diagnostic.goto_next({})
vim.api.nvim_feedkeys("zz", "n", false)
end)
-- Goto prev diagnostic of any severity
nnoremap("[d", function()
vim.diagnostic.goto_prev({})
vim.api.nvim_feedkeys("zz", "n", false)
end)
-- Goto next error diagnostic
nnoremap("]e", function()
vim.diagnostic.goto_next({ severity = vim.diagnostic.severity.ERROR })
vim.api.nvim_feedkeys("zz", "n", false)
end)
-- Goto previous error diagnostic
nnoremap("[e", function()
vim.diagnostic.goto_prev({ severity = vim.diagnostic.severity.ERROR })
vim.api.nvim_feedkeys("zz", "n", false)
end)
-- Goto next warning diagnostic
nnoremap("]w", function()
vim.diagnostic.goto_next({ severity = vim.diagnostic.severity.WARN })
vim.api.nvim_feedkeys("zz", "n", false)
end)
-- Goto previous warning diagnostic
nnoremap("[w", function()
vim.diagnostic.goto_prev({ severity = vim.diagnostic.severity.WARN })
vim.api.nvim_feedkeys("zz", "n", false)
end)
-- Open diagnostic window
nnoremap("<leader>d", function()
vim.diagnostic.open_float({
border = "rounded",
})
end)
return M

View File

@@ -0,0 +1,21 @@
local M = {}
-- Remap bindkey functions
local function bind(op, outer_opts)
outer_opts = vim.tbl_extend("force", { noremap = true, silent = true }, outer_opts or {})
return function(lhs, rhs, opts)
opts = vim.tbl_extend("force", outer_opts, opts or {})
vim.keymap.set(op, lhs, rhs, opts)
end
end
M.map = bind("")
M.nmap = bind("n", { noremap = false })
M.nnoremap = bind("n")
M.vnoremap = bind("v")
M.xnoremap = bind("x")
M.inoremap = bind("i")
M.tnoremap = bind("t")
return M

62
.config/nvim/old_init.vim Normal file
View File

@@ -0,0 +1,62 @@
" Replace all is aliased to S.
nnoremap S :%s//g<Left><Left>
" Compile document, be it groff/LaTeX/markdown/etc.
map <leader>c :w! \| !compiler "%:p"<CR>
" Open corresponding .pdf/.html or preview
map <leader>p :!opout "%:p"<CR>
" Runs a script that cleans out tex build files whenever I close out of a .tex file.
autocmd VimLeave *.tex !texclear %
" Ensure files are read as what I want:
let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'}
map <leader>v :VimwikiIndex<CR>
let g:vimwiki_list = [{'path': '~/.local/share/nvim/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
" Save file as sudo on files that require root permission
cabbrev w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!
" Automatically deletes all trailing whitespace and newlines at end of file on save. & reset cursor position
autocmd BufWritePre * let currPos = getpos(".")
autocmd BufWritePre * %s/\s\+$//e
autocmd BufWritePre * %s/\n\+\%$//e
autocmd BufWritePre *.[ch] %s/\%$/\r/e " add trailing newline for ANSI C standard
autocmd BufWritePre *neomutt* %s/^--$/-- /e " dash-dash-space signature delimiter in emails
autocmd BufWritePre * cal cursor(currPos[1], currPos[2])
" When shortcut files are updated, renew bash and ranger configs with new material:
autocmd BufWritePost bm-files,bm-dirs !shortcuts
" Run xrdb whenever Xdefaults or Xresources are updated.
autocmd BufRead,BufNewFile Xresources,Xdefaults,xresources,xdefaults set filetype=xdefaults
autocmd BufWritePost Xresources,Xdefaults,xresources,xdefaults !xrdb %
" Recompile dwmblocks on config edit.
autocmd BufWritePost ~/.local/src/dwmblocks/config.h !cd ~/.local/src/dwmblocks/; sudo make install && { killall -q dwmblocks;setsid -f dwmblocks }
" Turns off highlighting on the bits of code that are changed, so the line that is changed is highlighted but the actual text that has changed stands out on the line and is readable.
if &diff
highlight! link DiffText MatchParen
endif
" Function for toggling the bottom statusbar:
let s:hidden_all = 0
function! ToggleHiddenAll()
if s:hidden_all == 0
let s:hidden_all = 1
set noshowmode
set noruler
set laststatus=0
set noshowcmd
else
let s:hidden_all = 0
set showmode
set ruler
set laststatus=2
set showcmd
endif
endfunction
nnoremap <leader>h :call ToggleHiddenAll()<CR>

53
.config/shell/aliasrc Executable file
View File

@@ -0,0 +1,53 @@
#!/bin/sh
# Use neovim for vim if present.
[ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d"
# Verbosity and settings that you pretty much just always are going to want.
alias \
mv="mv -iv" \
rm="rm -vI" \
mkd="mkdir -pv" \
yt="youtube-dl --add-metadata -i" \
yta="yt -x -f bestaudio/best" \
ffmpeg="ffmpeg -hide_banner"
cp="cp -iv" \
# Colorize commands when possible.
alias \
ls="ls -hN --color=auto --group-directories-first" \
grep="grep --color=auto" \
diff="diff --color=auto" \
ccat="highlight --out-format=ansi"
# These common commands are just too long! Abbreviate them.
alias \
ka="killall" \
g="git" \
trem="transmission-remote" \
YT="youtube-viewer" \
sdn="doas shutdown -h now" \
f="$FILE" \
e="$EDITOR" \
v="$EDITOR" \
p="doas pacman" \
pu="doas pacman -Syu" \
yu="yay -Syu --aur" \
xi="doas xbps-install" \
xr="doas xbps-remove -R" \
xq="xbps-query" \
z="zathura"
alias \
magit="nvim -c MagitOnly" \
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" \
weath="less -S ${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" \
tmux="tmux -f ${XDG_CONFIG_HOME:-$HOME/.config}/tmux/tmux.conf" \
scrcpy="scrcpy --shortcut-mod=lctrl" \
anaconda="source $HOME/.anaconda3/bin/activate" \
homestuck="./.config/unofficial-homestuck-collection-2.0.7/unofficial-homestuck-collection --no-sandbox 2>&1" \
hlup="wg-quick up artixbook" \
hldown="wg-quick down artixbook" \
ixpe="cd /home/tibeuleu/IXPE_analysis/Code && clear && ls" \
foc="cd /home/tibeuleu/FOC_reduction/Code && clear && ls" \
config='/usr/bin/git --git-dir=/home/tibeuleu/.cfg/ --work-tree=/home/tibeuleu' \

15
.config/shell/bm-dirs Executable file
View File

@@ -0,0 +1,15 @@
# You can add comments to these files with #
cac ${XDG_CACHE_HOME:-$HOME/.cache}
cf ${XDG_CONFIG_HOME:-$HOME/.config}
cfv ${XDG_CONFIG_HOME:-$HOME/.config}/nvim
cl ${XDG_LOCAL_HOME:-$HOME/.local}
dt ${XDG_DATA_HOME:-$HOME/.local/share}
sc ${XDG_LOCAL_HOME:-$HOME/.local}/bin
src ${XDG_LOCAL_HOME:-$HOME/.local}/src
h $HOME
d ${XDG_DOCUMENTS_DIR:-$HOME/Documents}
D ${XDG_DOWNLOAD_DIR:-$HOME/Downloads}
m ${XDG_MUSIC_DIR:-$HOME/Music}
pp ${XDG_PICTURES_DIR:-$HOME/Pictures}
vv ${XDG_VIDEOS_DIR:-$HOME/Videos}
mn /mnt

21
.config/shell/bm-files Executable file
View File

@@ -0,0 +1,21 @@
# These files automatically update when edited/saved in vim:
# keys filename description
bf ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-files # This file, a list of bookmarked files
bd ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs # A list of bookmarked directories similar to this file
cfi ${XDG_CONFIG_HOME:-$HOME/.config}/i3/config # i3: the window manager i3
cfib ${XDG_CONFIG_HOME:-$HOME/.config}/i3blocks/config # i3blocks: the status bar for i3
cfx ${XDG_CONFIG_HOME:-$HOME/.config}/x11/Xresources # Colors, themes and variables for X11
# These do not update automatically, but on the next new instance of a program:
cfa ${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc # aliases used by zsh (and potentially other shells)
cfl ${XDG_CONFIG_HOME:-$HOME/.config}/lf/lfrc # lf (file browser) config
cfL ${XDG_CONFIG_HOME:-$HOME/.config}/lf/scope # lf's scope/preview file
cfmb ${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp/bindings # ncmpcpp (music player) keybinds file
cfmc ${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp/config # ncmpcpp (music player) config
cfn ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/config # newsboat (RSS reader)
cfp ${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile # profile file for login settings for zsh
cfu ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/urls # RSS urls for newsboat
cfX ${XDG_CONFIG_HOME:-$HOME/.config}/sxiv/exec/key-handler # sxiv (image viewer) key/script handler
cfz $ZDOTDIR/.zshrc # zsh (shell) config

View File

@@ -0,0 +1,155 @@
#!/bin/zsh
# zsh profile file. Runs on login. Environmental variables are set here.
# If you don't plan on reverting to bash, you can remove the link in ~/.profile
# to clean up.
# Adds `~/.local/bin` to $PATH
export PATH="$PATH:$(du "$HOME/.local/bin" | cut -f2 | paste -sd ':')"
# Default programs:
export EDITOR="nvim"
export TERMINAL="st"
export BROWSER="brave"
export READER="zathura"
# ~/ Clean-up:
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"
#export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs.
export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config"
export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0"
export LESSHISTFILE="-"
export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc"
export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/shell/inputrc"
export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"
#export GNUPGHOME="$XDG_DATA_HOME/gnupg"
export WINEPREFIX="${XDG_DATA_HOME:-$HOME/.local/share}/wineprefixes/default"
export KODI_DATA="${XDG_DATA_HOME:-$HOME/.local/share}/kodi"
export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/password-store"
export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android"
export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo"
export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go"
export ANSIBLE_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/ansible/ansible.cfg"
export UNISON="${XDG_DATA_HOME:-$HOME/.local/share}/unison"
export HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/history"
# Xspec and IXPEobssim
export HEADAS="$HOME/.local/lib/heasoft-6.29/x86_64-pc-linux-gnu-libc2.35/"
export IXPEOBSSIM_ROOT="$HOME/Internship/IXPE/ixpeobssim_latest"
export IXPEOBSSIM_DATA="$HOME/Internship/IXPE/ixpeobssim_latest/ixpeobssimdata"
export IXPEOBSSIM_AUXFILES="$HOME/Internship/IXPE/ixpeobssim_latest/ixpeobssimauxfiles"
# Other program settings:
export DICS="/usr/share/stardict/dic/"
export SUDO_ASKPASS="$HOME/.local/bin/dmenupass"
export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
export LESS=-R
export LESS_TERMCAP_mb="$(printf '%b' '')"
export LESS_TERMCAP_md="$(printf '%b' '')"
export LESS_TERMCAP_me="$(printf '%b' '')"
export LESS_TERMCAP_so="$(printf '%b' '')"
export LESS_TERMCAP_se="$(printf '%b' '')"
export LESS_TERMCAP_us="$(printf '%b' '')"
export LESS_TERMCAP_ue="$(printf '%b' '')"
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme.
export MOZ_USE_XINPUT2="1" # Mozilla smooth scrolling/touchpads.
export AWT_TOOLKIT="MToolkit wmname LG3D" #May have to install wmname
export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm
export $(dbus-launch)
# This is the list for lf icons:
export LF_ICONS="di=📁:\
fi=📃:\
tw=🤝:\
ow=📂:\
ln=⛓:\
or=❌:\
ex=🎯:\
*.txt=✍:\
*.mom=✍:\
*.me=✍:\
*.ms=✍:\
*.png=🖼:\
*.webp=🖼:\
*.ico=🖼:\
*.jpg=📸:\
*.jpe=📸:\
*.jpeg=📸:\
*.gif=🖼:\
*.svg=🗺:\
*.tif=🖼:\
*.tiff=🖼:\
*.xcf=🖌:\
*.html=🌎:\
*.xml=📰:\
*.gpg=🔒:\
*.css=🎨:\
*.pdf=📚:\
*.djvu=📚:\
*.epub=📚:\
*.csv=📓:\
*.xlsx=📓:\
*.tex=📜:\
*.md=📘:\
*.r=📊:\
*.R=📊:\
*.rmd=📊:\
*.Rmd=📊:\
*.m=📊:\
*.mp3=🎵:\
*.opus=🎵:\
*.ogg=🎵:\
*.m4a=🎵:\
*.flac=🎼:\
*.mkv=🎥:\
*.mp4=🎥:\
*.webm=🎥:\
*.mpeg=🎥:\
*.avi=🎥:\
*.zip=📦:\
*.rar=📦:\
*.7z=📦:\
*.tar.gz=📦:\
*.z64=🎮:\
*.v64=🎮:\
*.n64=🎮:\
*.gba=🎮:\
*.nes=🎮:\
*.gdi=🎮:\
*.1=:\
*.nfo=:\
*.info=:\
*.log=📙:\
*.iso=📀:\
*.img=📀:\
*.bib=🎓:\
*.ged=👪:\
*.part=💔:\
*.torrent=🔽:\
*.jar=♨:\
*.java=♨:\
"
[ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ] && shortcuts >/dev/null 2>&1 &
if pacman -Qs libxft-bgra >/dev/null 2>&1; then
# Start graphical server on tty1 if not already running.
[ "$(tty)" = "/dev/tty1" ] && ! pidof Xorg >/dev/null 2>&1 && exec startx
else
echo "\033[31mIMPORTANT\033[0m: Note that \033[32m\`libxft-bgra\`\033[0m must be installed for this build of dwm.
Please run:
\033[32myay -S libxft-bgra-git\033[0m
and replace \`libxft\`"
fi
# Switch escape and caps if tty and no passwd required:
sudo -n loadkeys ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/ttymaps.kmap 2>/dev/null
# modifications by HEALPixAutoConf 3.80
[ -r /home/tibeuleu/.healpix/3_80_Linux/config ] && . /home/tibeuleu/.healpix/3_80_Linux/config

19
.config/shell/inputrc Executable file
View File

@@ -0,0 +1,19 @@
$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
Control-a: beginning-of-line
set keymap vi-insert
# these are for vi-insert mode
Control-l: clear-screen
Control-a: beginning-of-line
$endif

157
.config/shell/profile Executable file
View File

@@ -0,0 +1,157 @@
#!/bin/zsh
# zsh profile file. Runs on login. Environmental variables are set here.
# If you don't plan on reverting to bash, you can remove the link in ~/.profile
# to clean up.
# Adds `~/.local/bin` to $PATH
export PATH="$PATH:$(du "$HOME/.local/bin" | cut -f2 | paste -sd ':')"
# Default programs:
export EDITOR="nvim"
export TERMINAL="st"
export BROWSER="librewolf"
export READER="zathura"
# ~/ Clean-up:
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"
#export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs.
export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config"
export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0"
export LESSHISTFILE="-"
export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc"
export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/shell/inputrc"
export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"
#export GNUPGHOME="$XDG_DATA_HOME/gnupg"
export WINEPREFIX="${XDG_DATA_HOME:-$HOME/.local/share}/wineprefixes/default"
export KODI_DATA="${XDG_DATA_HOME:-$HOME/.local/share}/kodi"
export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/password-store"
export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android"
export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo"
export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go"
export ANSIBLE_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/ansible/ansible.cfg"
export UNISON="${XDG_DATA_HOME:-$HOME/.local/share}/unison"
export HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/history"
# Xspec and IXPEobssim
export HEADAS="$HOME/.local/lib/heasoft-6.30/x86_64-pc-linux-gnu-libc2.35/"
export TINYTIM="$HOME/.local/share/tinytim-7.5/"
export IXPEOBSSIM_ROOT="$HOME/IXPE_analysis/ixpeobssim_latest"
export IXPEOBSSIM_DATA="$HOME/IXPE_analysis/ixpeobssim_latest/ixpeobssimdata"
export IXPEOBSSIM_AUXFILES="$HOME/IXPE_analysis/ixpeobssim_latest/ixpeobssimauxfiles"
# Other program settings:
export DICS="/usr/share/stardict/dic/"
export SUDO_ASKPASS="$HOME/.local/bin/dmenupass"
export DOAS_ASKPASS="$HOME/.local/bin/dmenupass"
export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
export LESS=-R
export LESS_TERMCAP_mb="$(printf '%b' '')"
export LESS_TERMCAP_md="$(printf '%b' '')"
export LESS_TERMCAP_me="$(printf '%b' '')"
export LESS_TERMCAP_so="$(printf '%b' '')"
export LESS_TERMCAP_se="$(printf '%b' '')"
export LESS_TERMCAP_us="$(printf '%b' '')"
export LESS_TERMCAP_ue="$(printf '%b' '')"
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme.
export MOZ_USE_XINPUT2="1" # Mozilla smooth scrolling/touchpads.
export AWT_TOOLKIT="MToolkit wmname LG3D" #May have to install wmname
export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm
export $(dbus-launch)
# This is the list for lf icons:
export LF_ICONS="di=📁:\
fi=📃:\
tw=🤝:\
ow=📂:\
ln=⛓:\
or=❌:\
ex=🎯:\
*.txt=✍:\
*.mom=✍:\
*.me=✍:\
*.ms=✍:\
*.png=🖼:\
*.webp=🖼:\
*.ico=🖼:\
*.jpg=📸:\
*.jpe=📸:\
*.jpeg=📸:\
*.gif=🖼:\
*.svg=🗺:\
*.tif=🖼:\
*.tiff=🖼:\
*.xcf=🖌:\
*.html=🌎:\
*.xml=📰:\
*.gpg=🔒:\
*.css=🎨:\
*.pdf=📚:\
*.djvu=📚:\
*.epub=📚:\
*.csv=📓:\
*.xlsx=📓:\
*.tex=📜:\
*.md=📘:\
*.r=📊:\
*.R=📊:\
*.rmd=📊:\
*.Rmd=📊:\
*.m=📊:\
*.mp3=🎵:\
*.opus=🎵:\
*.ogg=🎵:\
*.m4a=🎵:\
*.flac=🎼:\
*.mkv=🎥:\
*.mp4=🎥:\
*.webm=🎥:\
*.mpeg=🎥:\
*.avi=🎥:\
*.zip=📦:\
*.rar=📦:\
*.7z=📦:\
*.tar.gz=📦:\
*.z64=🎮:\
*.v64=🎮:\
*.n64=🎮:\
*.gba=🎮:\
*.nes=🎮:\
*.gdi=🎮:\
*.1=:\
*.nfo=:\
*.info=:\
*.log=📙:\
*.iso=📀:\
*.img=📀:\
*.bib=🎓:\
*.ged=👪:\
*.part=💔:\
*.torrent=🔽:\
*.jar=♨:\
*.java=♨:\
"
[ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ] && shortcuts >/dev/null 2>&1 &
if pacman -Qs libxft-bgra >/dev/null 2>&1; then
# Start graphical server on tty1 if not already running.
[ "$(tty)" = "/dev/tty1" ] && ! pidof Xorg >/dev/null 2>&1 && exec startx
else
echo "\033[31mIMPORTANT\033[0m: Note that \033[32m\`libxft-bgra\`\033[0m must be installed for this build of dwm.
Please run:
\033[32myay -S libxft-bgra-git\033[0m
and replace \`libxft\`"
fi
# Switch escape and caps if tty and no passwd required:
doas -n loadkeys ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/ttymaps.kmap 2>/dev/null
# modifications by HEALPixAutoConf 3.80
[ -r /home/tibeuleu/.healpix/3_80_Linux/config ] && . /home/tibeuleu/.healpix/3_80_Linux/config

30
.config/shell/shortcutrc Executable file
View File

@@ -0,0 +1,30 @@
# vim: filetype=sh
alias cac="cd ${XDG_CACHE_HOME:-$HOME/.cache} && ls -a" \
cf="cd ${XDG_CONFIG_HOME:-$HOME/.config} && ls -a" \
cfv="cd ${XDG_CONFIG_HOME:-$HOME/.config}/nvim && ls -a" \
cl="cd ${XDG_LOCAL_HOME:-$HOME/.local} && ls -a" \
dt="cd ${XDG_DATA_HOME:-$HOME/.local/share} && ls -a" \
sc="cd ${XDG_LOCAL_HOME:-$HOME/.local}/bin && ls -a" \
src="cd ${XDG_LOCAL_HOME:-$HOME/.local}/src && ls -a" \
h="cd $HOME && ls -a" \
d="cd ${XDG_DOCUMENTS_DIR:-$HOME/Documents} && ls -a" \
D="cd ${XDG_DOWNLOAD_DIR:-$HOME/Downloads} && ls -a" \
m="cd ${XDG_MUSIC_DIR:-$HOME/Music} && ls -a" \
pp="cd ${XDG_PICTURES_DIR:-$HOME/Pictures} && ls -a" \
vv="cd ${XDG_VIDEOS_DIR:-$HOME/Videos} && ls -a" \
mn="cd /mnt && ls -a" \
bf="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-files" \
bd="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs" \
cfi="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/i3/config" \
cfib="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/i3blocks/config" \
cfx="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/x11/Xresources" \
cfa="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" \
cfl="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/lf/lfrc" \
cfL="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/lf/scope" \
cfmb="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp/bindings" \
cfmc="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp/config" \
cfn="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/config" \
cfp="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile" \
cfu="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/urls" \
cfX="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/sxiv/exec/key-handler" \
cfz="$EDITOR $ZDOTDIR/.zshrc" \

View File

@@ -0,0 +1,14 @@
hash -d cac=${XDG_CACHE_HOME:-$HOME/.cache}
hash -d cf=${XDG_CONFIG_HOME:-$HOME/.config}
hash -d cfv=${XDG_CONFIG_HOME:-$HOME/.config}/nvim
hash -d cl=${XDG_LOCAL_HOME:-$HOME/.local}
hash -d dt=${XDG_DATA_HOME:-$HOME/.local/share}
hash -d sc=${XDG_LOCAL_HOME:-$HOME/.local}/bin
hash -d src=${XDG_LOCAL_HOME:-$HOME/.local}/src
hash -d h=$HOME
hash -d d=${XDG_DOCUMENTS_DIR:-$HOME/Documents}
hash -d D=${XDG_DOWNLOAD_DIR:-$HOME/Downloads}
hash -d m=${XDG_MUSIC_DIR:-$HOME/Music}
hash -d pp=${XDG_PICTURES_DIR:-$HOME/Pictures}
hash -d vv=${XDG_VIDEOS_DIR:-$HOME/Videos}
hash -d mn=/mnt