diff --git a/.config/fish/config.fish b/.config/fish/config.fish deleted file mode 100644 index 9cbacc9..0000000 --- a/.config/fish/config.fish +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env fish -# vim:set ft=fish ai et sw=4 ts=4:# fzf keybindings -fzf_configure_bindings --directory=\cf --git_log=\cg --git_status=\cs --processes=\cp - -# environment vars -set -gx BAT_THEME "Catppuccin" -set -gx PAGER "less -X" -set -gx MANPAGER "less -X" -set -gx LS_COLORS (cat ~/.lscolors.sh) -set -gx GOPATH "$HOME/go" -set -gx LANG en_US.UTF-8 -set -gx EDITOR nvim -set -gx XDG_DATA_DIRS "$XDG_DATA_DIRS:/var/lib/flatpak/exports/share:$HOME/.local/share/flatpak/exports/share" -set -gx MANPATH "/usr/share/man:/usr/local/share/man:/var/home/jas/.fzf/man" - -# set FZF colors -set -Ux FZF_DEFAULT_OPTS "--color=bg+:#302D41,bg:#1E1E2E,spinner:#F8BD96,hl:#F28FAD --color=fg:#D9E0EE,header:#F28FAD,info:#DDB6F2,pointer:#F8BD96 --color=marker:#F8BD96,fg+:#F2CDCD,prompt:#DDB6F2,hl+:#F28FAD" - -# keybinding for fzf-marks -bind \eg "fzm" - -# set TERM -set -Ux TERM screen-256color - -# set PATH -set -ga fish_user_paths "$GOPATH/bin" -set -ga fish_user_paths "$HOME/.cargo/bin" -set -ga fish_user_paths "/usr/local/bin" -set -ga fish_user_paths "/usr/local/sbin" -set -ga fish_user_paths "/usr/bin" -set -ga fish_user_paths "/usr/sbin" -set -ga fish_user_paths "/bin" -set -ga fish_user_paths "/sbin" -set -ga fish_user_paths "$HOME/.local/bin" -set -ga fish_user_paths "$HOME/bin" -set -ga fish_user_paths "$HOME/.nimble/bin" - -# colored-man settings -set -g man_blink -o red -set -g man_bold -o FF80BF -set -g man_standout -b cyan black -set -g man_underline -u 8AFF80 - -starship init fish | source diff --git a/.config/fish/functions/batfun.fish b/.config/fish/functions/batfun.fish deleted file mode 100644 index 8563026..0000000 --- a/.config/fish/functions/batfun.fish +++ /dev/null @@ -1,7 +0,0 @@ -function batfun -d "Display function definition with bat" - if type -q bat - command bat (functions -D $argv[1]) - else - command echo "bat program not installed!" - end -end diff --git a/.config/fish/functions/cd.fish b/.config/fish/functions/cd.fish deleted file mode 100644 index a303022..0000000 --- a/.config/fish/functions/cd.fish +++ /dev/null @@ -1,3 +0,0 @@ -function cd -d "Do an ls after cd" - builtin cd $argv; ls -end diff --git a/.config/fish/functions/dnfgl.fish b/.config/fish/functions/dnfgl.fish deleted file mode 100644 index dcb1144..0000000 --- a/.config/fish/functions/dnfgl.fish +++ /dev/null @@ -1,3 +0,0 @@ -function dnfgl -d "List package groups" - dnf grouplist -end diff --git a/.config/fish/functions/dnfi.fish b/.config/fish/functions/dnfi.fish deleted file mode 100644 index 9f37663..0000000 --- a/.config/fish/functions/dnfi.fish +++ /dev/null @@ -1,3 +0,0 @@ -function dnfi -d "install packages" - sudo dnf install $argv -end diff --git a/.config/fish/functions/dnfl.fish b/.config/fish/functions/dnfl.fish deleted file mode 100644 index 7f5e312..0000000 --- a/.config/fish/functions/dnfl.fish +++ /dev/null @@ -1,3 +0,0 @@ -function dnfl -d "list packages" - dnf list -end diff --git a/.config/fish/functions/dnfli.fish b/.config/fish/functions/dnfli.fish deleted file mode 100644 index 232afe1..0000000 --- a/.config/fish/functions/dnfli.fish +++ /dev/null @@ -1,4 +0,0 @@ -function dnfli -d "list installed packages" - dnf list installed -end - diff --git a/.config/fish/functions/dnfp.fish b/.config/fish/functions/dnfp.fish deleted file mode 100644 index e6a68d7..0000000 --- a/.config/fish/functions/dnfp.fish +++ /dev/null @@ -1,3 +0,0 @@ -function dnfp -d "Show package info" - dnf info $argv -end diff --git a/.config/fish/functions/dnfr.fish b/.config/fish/functions/dnfr.fish deleted file mode 100644 index 3b7fcff..0000000 --- a/.config/fish/functions/dnfr.fish +++ /dev/null @@ -1,3 +0,0 @@ -function dnfr -d "remove packages" - sudo dnf remove $argv -end diff --git a/.config/fish/functions/dnfs.fish b/.config/fish/functions/dnfs.fish deleted file mode 100644 index d720191..0000000 --- a/.config/fish/functions/dnfs.fish +++ /dev/null @@ -1,3 +0,0 @@ -function dnfs -d "Search package" - dnf search $argv -end diff --git a/.config/fish/functions/dnfu.fish b/.config/fish/functions/dnfu.fish deleted file mode 100644 index a56516e..0000000 --- a/.config/fish/functions/dnfu.fish +++ /dev/null @@ -1,3 +0,0 @@ -function dnfu -d "Update packages" - sudo dnf update -y -end diff --git a/.config/fish/functions/dud.fish b/.config/fish/functions/dud.fish deleted file mode 100644 index ba2e74a..0000000 --- a/.config/fish/functions/dud.fish +++ /dev/null @@ -1,7 +0,0 @@ -function dud -d "Display disk usage with dust" - if type -q dust - command dust --depth 1 -w 88 $argv - else - command echo "dust program not installed!" - end -end diff --git a/.config/fish/functions/extract.fish b/.config/fish/functions/extract.fish deleted file mode 100644 index a775ab8..0000000 --- a/.config/fish/functions/extract.fish +++ /dev/null @@ -1,25 +0,0 @@ -# Taken from: https://github.com/dideler/dotfiles/blob/master/functions/extract.fish - -function extract --description "Expand or extract bundled & compressed files" - set --local ext (echo $argv[1] | awk -F. '{print $NF}') - switch $ext - case tar # non-compressed, just bundled - tar -xvf $argv[1] - case gz - if test (echo $argv[1] | awk -F. '{print $(NF-1)}') = tar # tar bundle compressed with gzip - tar -zxvf $argv[1] - else # single gzip - gunzip $argv[1] - end - case tgz # same as tar.gz - tar -zxvf $argv[1] - case bz2 # tar compressed with bzip2 - tar -jxvf $argv[1] - case rar - unrar x $argv[1] - case zip - unzip $argv[1] - case '*' - echo "unknown extension" - end -end diff --git a/.config/fish/functions/fw.fish b/.config/fish/functions/fw.fish deleted file mode 100644 index d8018da..0000000 --- a/.config/fish/functions/fw.fish +++ /dev/null @@ -1,3 +0,0 @@ -function fw -d "firewall-cmd alias" - sudo firewall-cmd $argv -end diff --git a/.config/fish/functions/fwr.fish b/.config/fish/functions/fwr.fish deleted file mode 100644 index 13ec7e9..0000000 --- a/.config/fish/functions/fwr.fish +++ /dev/null @@ -1,3 +0,0 @@ -function fwr -d "firewall-cmd --reload alias" - sudo firewall-cmd --reload -end diff --git a/.config/fish/functions/ga.fish b/.config/fish/functions/ga.fish deleted file mode 100644 index b53294c..0000000 --- a/.config/fish/functions/ga.fish +++ /dev/null @@ -1,3 +0,0 @@ -function ga -d "git add" - git add $argv -end diff --git a/.config/fish/functions/gcmsg.fish b/.config/fish/functions/gcmsg.fish deleted file mode 100644 index c27013f..0000000 --- a/.config/fish/functions/gcmsg.fish +++ /dev/null @@ -1,3 +0,0 @@ -function gcmsg -d "git commit -m" - git commit -m $argv -end diff --git a/.config/fish/functions/gp.fish b/.config/fish/functions/gp.fish deleted file mode 100644 index 97dcb2c..0000000 --- a/.config/fish/functions/gp.fish +++ /dev/null @@ -1,3 +0,0 @@ -function gp -d "git push" - git push $argv -end diff --git a/.config/fish/functions/grm.fish b/.config/fish/functions/grm.fish deleted file mode 100644 index 905dc51..0000000 --- a/.config/fish/functions/grm.fish +++ /dev/null @@ -1,3 +0,0 @@ -function grm -d "git rm" - git rm $argv -end diff --git a/.config/fish/functions/gst.fish b/.config/fish/functions/gst.fish deleted file mode 100644 index e111fc7..0000000 --- a/.config/fish/functions/gst.fish +++ /dev/null @@ -1,3 +0,0 @@ -function gst -d "git status" - git status -end diff --git a/.config/fish/functions/la.fish b/.config/fish/functions/la.fish deleted file mode 100644 index 68e71ac..0000000 --- a/.config/fish/functions/la.fish +++ /dev/null @@ -1,7 +0,0 @@ -function la - if type -q exa - command exa -a --icons $argv - else - command ls -a --color=auto $argv - end -end diff --git a/.config/fish/functions/lal.fish b/.config/fish/functions/lal.fish deleted file mode 100644 index ca90254..0000000 --- a/.config/fish/functions/lal.fish +++ /dev/null @@ -1,7 +0,0 @@ -function lal - if type -q exa - command exa -l -a --icons $argv - else - command ls -al --color=auto $argv - end -end diff --git a/.config/fish/functions/ll.fish b/.config/fish/functions/ll.fish deleted file mode 100644 index 2d24f28..0000000 --- a/.config/fish/functions/ll.fish +++ /dev/null @@ -1,7 +0,0 @@ -function ll - if type -q exa - command exa -l --icons --git $argv - else - command ls -l --color=auto $argv - end -end diff --git a/.config/fish/functions/ls.fish b/.config/fish/functions/ls.fish deleted file mode 100644 index 3bf1621..0000000 --- a/.config/fish/functions/ls.fish +++ /dev/null @@ -1,7 +0,0 @@ -function ls - if type -q exa - command exa --icons $argv - else - command ls --color=auto $argv - end -end diff --git a/.config/fish/functions/lse.fish b/.config/fish/functions/lse.fish deleted file mode 100644 index 268c47b..0000000 --- a/.config/fish/functions/lse.fish +++ /dev/null @@ -1,3 +0,0 @@ -function lse - command ls -lZ --color=auto $argv -end diff --git a/.config/fish/functions/lsock.fish b/.config/fish/functions/lsock.fish deleted file mode 100644 index a1c94bd..0000000 --- a/.config/fish/functions/lsock.fish +++ /dev/null @@ -1,3 +0,0 @@ -function lsock -d "List sockets in use" - command sudo lsof -i -P -end diff --git a/.config/fish/functions/lsockT.fish b/.config/fish/functions/lsockT.fish deleted file mode 100644 index 09a8477..0000000 --- a/.config/fish/functions/lsockT.fish +++ /dev/null @@ -1,3 +0,0 @@ -function lsockT -d "List TCP sockets in use" - command sudo lsof -nP | grep TCP -end diff --git a/.config/fish/functions/lsockU.fish b/.config/fish/functions/lsockU.fish deleted file mode 100644 index 979923b..0000000 --- a/.config/fish/functions/lsockU.fish +++ /dev/null @@ -1,3 +0,0 @@ -function lsockU -d "List UDP sockets in use" - command sudo lsof -nP | grep UDP -end diff --git a/.config/fish/functions/man.fish b/.config/fish/functions/man.fish deleted file mode 100644 index 3fbfa69..0000000 --- a/.config/fish/functions/man.fish +++ /dev/null @@ -1,41 +0,0 @@ -function man --wraps man --description 'Format and display manual pages' - set -q man_blink; and set -l blink (set_color $man_blink); or set -l blink (set_color -o red) - set -q man_bold; and set -l bold (set_color $man_bold); or set -l bold (set_color -o 5fafd7) - set -q man_standout; and set -l standout (set_color $man_standout); or set -l standout (set_color 949494) - set -q man_underline; and set -l underline (set_color $man_underline); or set -l underline (set_color -u afafd7) - - set -l end (printf "\e[0m") - - set -lx LESS_TERMCAP_mb $blink - set -lx LESS_TERMCAP_md $bold - set -lx LESS_TERMCAP_me $end - set -lx LESS_TERMCAP_so $standout - set -lx LESS_TERMCAP_se $end - set -lx LESS_TERMCAP_us $underline - set -lx LESS_TERMCAP_ue $end - set -lx LESS '-R -s' - - set -lx GROFF_NO_SGR yes # fedora - - set -lx MANPATH (string join : $MANPATH) - if test -z "$MANPATH" - type -q manpath - and set MANPATH (command manpath) - end - - # Check data dir for Fish 2.x compatibility - set -l fish_data_dir - if set -q __fish_data_dir - set fish_data_dir $__fish_data_dir - else - set fish_data_dir $__fish_datadir - end - - set -l fish_manpath (dirname $fish_data_dir)/fish/man - if test -d "$fish_manpath" -a -n "$MANPATH" - set MANPATH "$fish_manpath":$MANPATH - command man $argv - return - end - command man $argv -end diff --git a/.config/fish/functions/mkd.fish b/.config/fish/functions/mkd.fish deleted file mode 100644 index 87d807f..0000000 --- a/.config/fish/functions/mkd.fish +++ /dev/null @@ -1,3 +0,0 @@ -function mkd -d "Create new directory and enter it" - mkdir -p $argv[1]; cd $argv[1] -end diff --git a/.config/fish/functions/netcons.fish b/.config/fish/functions/netcons.fish deleted file mode 100644 index b704220..0000000 --- a/.config/fish/functions/netcons.fish +++ /dev/null @@ -1,3 +0,0 @@ -function netcons -d "Network connections" - lsof -i $argv -end diff --git a/.config/fish/functions/openports.fish b/.config/fish/functions/openports.fish deleted file mode 100644 index 2749b75..0000000 --- a/.config/fish/functions/openports.fish +++ /dev/null @@ -1,3 +0,0 @@ -function openports -d "Open ports" - sudo lsof -i | grep LISTEN -end diff --git a/.config/fish/functions/pbcopy.fish b/.config/fish/functions/pbcopy.fish deleted file mode 100644 index f301917..0000000 --- a/.config/fish/functions/pbcopy.fish +++ /dev/null @@ -1,9 +0,0 @@ -function pbcopy -d "Copy data from STDIN to the clipboard" - if type -q xclip - command xclip -selection clipboard - else if type -q xsel - command xsel --clipboard --input - else - command echo "ERROR: xclip or xsel not found" - end -end diff --git a/.config/fish/functions/pids.fish b/.config/fish/functions/pids.fish deleted file mode 100644 index c127eb1..0000000 --- a/.config/fish/functions/pids.fish +++ /dev/null @@ -1,3 +0,0 @@ -function pids -d "List pids" - command pgrep -a $argv[1] -end diff --git a/.config/fish/functions/pong.fish b/.config/fish/functions/pong.fish deleted file mode 100644 index 565dfa3..0000000 --- a/.config/fish/functions/pong.fish +++ /dev/null @@ -1,3 +0,0 @@ -function pong -d "Ping google" - ping -c 3 www.google.com -end diff --git a/.config/fish/functions/pubip.fish b/.config/fish/functions/pubip.fish deleted file mode 100644 index 0fe14a0..0000000 --- a/.config/fish/functions/pubip.fish +++ /dev/null @@ -1,7 +0,0 @@ -function pubip - if type -q jq - command curl -s ipinfo.io | command jq - else - command curl -s ipinfo.io - end -end diff --git a/.config/fish/functions/pubkey.fish b/.config/fish/functions/pubkey.fish deleted file mode 100644 index 3d428f1..0000000 --- a/.config/fish/functions/pubkey.fish +++ /dev/null @@ -1,11 +0,0 @@ -function pubkey -d "Copy SSH pubkey to clipboard" - if type -q xclip - command cat "$HOME/.ssh/id_ed25519.pub" | command xclip -selection clipboard - command echo "==> SSH public key copied" - else if type -q xsel - command cat "$HOME/.ssh/id_ed25519.pub" | command xsel -ib - command echo "==> SSH public key copied" - else - command echo "ERROR: xclip or xsel not found" - end -end diff --git a/.config/fish/functions/rsrc.fish b/.config/fish/functions/rsrc.fish deleted file mode 100644 index 6f6efe6..0000000 --- a/.config/fish/functions/rsrc.fish +++ /dev/null @@ -1,4 +0,0 @@ -function rsrc -d "Refresh and re-source shell" - cd ~/ - clear -end diff --git a/.config/fish/functions/sc-daemon-reload.fish b/.config/fish/functions/sc-daemon-reload.fish deleted file mode 100644 index da7f50f..0000000 --- a/.config/fish/functions/sc-daemon-reload.fish +++ /dev/null @@ -1,3 +0,0 @@ -function sc-daemon-reload -d "Reload systemd daemons" - sudo systemctl daemon-reload -end diff --git a/.config/fish/functions/sc-disable-now.fish b/.config/fish/functions/sc-disable-now.fish deleted file mode 100644 index 4f23dca..0000000 --- a/.config/fish/functions/sc-disable-now.fish +++ /dev/null @@ -1,3 +0,0 @@ -function sc-disable-now -d "Disable and stop systemd service" - sudo systemctl disable --now $argv -end diff --git a/.config/fish/functions/sc-disable.fish b/.config/fish/functions/sc-disable.fish deleted file mode 100644 index f4829c2..0000000 --- a/.config/fish/functions/sc-disable.fish +++ /dev/null @@ -1,3 +0,0 @@ -function sc-disable -d "Disable systemd service" - sudo systemctl disable $argv -end diff --git a/.config/fish/functions/sc-enable-now.fish b/.config/fish/functions/sc-enable-now.fish deleted file mode 100644 index a83ab1d..0000000 --- a/.config/fish/functions/sc-enable-now.fish +++ /dev/null @@ -1,3 +0,0 @@ -function sc-enable-now -d "Enable and start systemd service" - sudo systemctl enable --now $argv -end diff --git a/.config/fish/functions/sc-enable.fish b/.config/fish/functions/sc-enable.fish deleted file mode 100644 index 7aebcd3..0000000 --- a/.config/fish/functions/sc-enable.fish +++ /dev/null @@ -1,3 +0,0 @@ -function sc-enable -d "Enable systemd service" - sudo systemctl enable $argv -end diff --git a/.config/fish/functions/sc-list-socks.fish b/.config/fish/functions/sc-list-socks.fish deleted file mode 100644 index 4bb79e2..0000000 --- a/.config/fish/functions/sc-list-socks.fish +++ /dev/null @@ -1,3 +0,0 @@ -function sc-list-socks -d "List used systemd sockets" - sudo systemctl list-sockets -end diff --git a/.config/fish/functions/sc-list-srvs.fish b/.config/fish/functions/sc-list-srvs.fish deleted file mode 100644 index 3822534..0000000 --- a/.config/fish/functions/sc-list-srvs.fish +++ /dev/null @@ -1,3 +0,0 @@ -function sc-list-srvs -d "List systemd services" - sudo systemctl list-units --type=service -end diff --git a/.config/fish/functions/sc-list-timers.fish b/.config/fish/functions/sc-list-timers.fish deleted file mode 100644 index 9a0e344..0000000 --- a/.config/fish/functions/sc-list-timers.fish +++ /dev/null @@ -1,3 +0,0 @@ -function sc-list-timers -d "List systemd timers" - sudo systemctl list-timers -end diff --git a/.config/fish/functions/sc-reboot.fish b/.config/fish/functions/sc-reboot.fish deleted file mode 100644 index 8a5e9bc..0000000 --- a/.config/fish/functions/sc-reboot.fish +++ /dev/null @@ -1,3 +0,0 @@ -function rbt -d "Reboot system" - sudo systemctl reboot -end diff --git a/.config/fish/functions/sc-restart.fish b/.config/fish/functions/sc-restart.fish deleted file mode 100644 index 9588ad6..0000000 --- a/.config/fish/functions/sc-restart.fish +++ /dev/null @@ -1,3 +0,0 @@ -function sc-restart -d "Restart systemd service" - sudo systemctl restart $argv -end diff --git a/.config/fish/functions/sc-show.fish b/.config/fish/functions/sc-show.fish deleted file mode 100644 index 03624c2..0000000 --- a/.config/fish/functions/sc-show.fish +++ /dev/null @@ -1,3 +0,0 @@ -function sc-show -d "Show systemd units" - sudo systemctl show -end diff --git a/.config/fish/functions/sc-start.fish b/.config/fish/functions/sc-start.fish deleted file mode 100644 index ca76db8..0000000 --- a/.config/fish/functions/sc-start.fish +++ /dev/null @@ -1,3 +0,0 @@ -function sc-start -d "Start systemd service" - sudo systemctl start $argv -end diff --git a/.config/fish/functions/sc-status.fish b/.config/fish/functions/sc-status.fish deleted file mode 100644 index 97c4d24..0000000 --- a/.config/fish/functions/sc-status.fish +++ /dev/null @@ -1,3 +0,0 @@ -function sc-status -d "Show status of systemd service" - sudo systemctl status $argv -end diff --git a/.config/fish/functions/sc-stop.fish b/.config/fish/functions/sc-stop.fish deleted file mode 100644 index da2d7af..0000000 --- a/.config/fish/functions/sc-stop.fish +++ /dev/null @@ -1,3 +0,0 @@ -function sc-stop -d "Stop systemd service" - sudo systemctl stop $argv -end diff --git a/.config/fish/functions/scu-daemon-reload.fish b/.config/fish/functions/scu-daemon-reload.fish deleted file mode 100644 index 7c8aa81..0000000 --- a/.config/fish/functions/scu-daemon-reload.fish +++ /dev/null @@ -1,3 +0,0 @@ -function scu-daemon-reload -d "Reload systemd user daemons" - systemctl --user daemon-reload -end diff --git a/.config/fish/functions/scu-disable-now.fish b/.config/fish/functions/scu-disable-now.fish deleted file mode 100644 index dd3cfb9..0000000 --- a/.config/fish/functions/scu-disable-now.fish +++ /dev/null @@ -1,3 +0,0 @@ -function scu-disable-now -d "Disable and stop systemd user service" - systemctl --user disable --now $argv -end diff --git a/.config/fish/functions/scu-disable.fish b/.config/fish/functions/scu-disable.fish deleted file mode 100644 index 0b4df97..0000000 --- a/.config/fish/functions/scu-disable.fish +++ /dev/null @@ -1,3 +0,0 @@ -function scu-disable -d "Disable systemd user service" - systemctl --user disable $argv -end diff --git a/.config/fish/functions/scu-enable-now.fish b/.config/fish/functions/scu-enable-now.fish deleted file mode 100644 index 200c247..0000000 --- a/.config/fish/functions/scu-enable-now.fish +++ /dev/null @@ -1,3 +0,0 @@ -function scu-enable-now -d "Enable and start systemd user service" - systemctl --user enable --now $argv -end diff --git a/.config/fish/functions/scu-enable.fish b/.config/fish/functions/scu-enable.fish deleted file mode 100644 index 65f5ab9..0000000 --- a/.config/fish/functions/scu-enable.fish +++ /dev/null @@ -1,3 +0,0 @@ -function scu-enable -d "Enable systemd user service" - systemctl --user enable $argv -end diff --git a/.config/fish/functions/scu-restart.fish b/.config/fish/functions/scu-restart.fish deleted file mode 100644 index b737fb4..0000000 --- a/.config/fish/functions/scu-restart.fish +++ /dev/null @@ -1,3 +0,0 @@ -function scu-restart -d "Restart systemd user service" - systemctl --user restart $argv -end diff --git a/.config/fish/functions/scu-show.fish b/.config/fish/functions/scu-show.fish deleted file mode 100644 index 5a0bfca..0000000 --- a/.config/fish/functions/scu-show.fish +++ /dev/null @@ -1,3 +0,0 @@ -function scu-show -d "Show systemd user units" - systemctl --user show -end diff --git a/.config/fish/functions/scu-start.fish b/.config/fish/functions/scu-start.fish deleted file mode 100644 index 37e3ada..0000000 --- a/.config/fish/functions/scu-start.fish +++ /dev/null @@ -1,3 +0,0 @@ -function scu-start -d "Start systemd user service" - systemctl --user start $argv -end diff --git a/.config/fish/functions/scu-status.fish b/.config/fish/functions/scu-status.fish deleted file mode 100644 index 245475e..0000000 --- a/.config/fish/functions/scu-status.fish +++ /dev/null @@ -1,3 +0,0 @@ -function scu-status -d "Show status of systemd user service" - systemctl --user status $argv -end diff --git a/.config/fish/functions/scu-stop.fish b/.config/fish/functions/scu-stop.fish deleted file mode 100644 index 52b9cfe..0000000 --- a/.config/fish/functions/scu-stop.fish +++ /dev/null @@ -1,3 +0,0 @@ -function scu-stop -d "Stop systemd user service" - systemctl --user stop $argv -end diff --git a/.config/fish/functions/tulp.fish b/.config/fish/functions/tulp.fish deleted file mode 100644 index 4bf3c07..0000000 --- a/.config/fish/functions/tulp.fish +++ /dev/null @@ -1,3 +0,0 @@ -function tulp -d "Open ports" - ss -tulp -end diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua deleted file mode 100644 index 73d9280..0000000 --- a/.config/nvim/init.lua +++ /dev/null @@ -1,486 +0,0 @@ --- Install packer -local install_path = vim.fn.stdpath 'data' .. '/site/pack/packer/start/packer.nvim' - -if vim.fn.empty(vim.fn.glob(install_path)) > 0 then - vim.fn.execute('!git clone https://github.com/wbthomason/packer.nvim ' .. install_path) -end - -vim.api.nvim_exec( -[[ -augroup Packer -autocmd! -autocmd BufWritePost init.lua PackerCompile -augroup end -]], -false -) - -local use = require('packer').use -require('packer').startup(function() - -- Package manager - use 'wbthomason/packer.nvim' - - -- UI to select things (files, grep results, open buffers...) - use { - 'nvim-telescope/telescope.nvim', - requires = { - { 'nvim-lua/popup.nvim' }, - { 'nvim-lua/plenary.nvim' }, - { 'nvim-telescope/telescope-fzf-native.nvim', run = "make" }, - { 'nvim-telescope/telescope-media-files.nvim' } - } - } - - -- Add indentation guides even on blank lines - use 'lukas-reineke/indent-blankline.nvim' - - -- Add git related info in the signs columns and popups - -- use { - -- 'lewis6991/gitsigns.nvim', - -- config = function() - -- require('gitsigns').setup() - -- end - -- } - - -- Highlight, edit, and navigate code using a fast incremental parsing library - use 'nvim-treesitter/nvim-treesitter' - - -- LSP - use 'neovim/nvim-lspconfig' - - -- Autocompletion - use 'hrsh7th/nvim-compe' - - -- Snippets - use 'L3MON4D3/LuaSnip' - - -- Bufferline for tabs - use { 'akinsho/nvim-bufferline.lua', requires = 'kyazdani42/nvim-web-devicons'} - - -- Remember last edit location in file - use 'ethanholz/nvim-lastplace' - - -- File manager - use { - 'kyazdani42/nvim-tree.lua', - requires = { - 'kyazdani42/nvim-web-devicons', - }, - config = function() require'nvim-tree'.setup{} end - } - - -- lualine - use { - 'nvim-lualine/lualine.nvim', - requires = { 'kyazdan42/nvim-web-devicons', opt = true } - } - - -- Editorconfig - use 'editorconfig/editorconfig-vim' - - -- nvim-commenter - use 'terrortylor/nvim-comment' - - -- sloum/gemini-vim-syntax - use 'https://tildegit.org/sloum/gemini-vim-syntax' - - -- catppuccin theme - use { - 'catppuccin/nvim', - as = 'catppuccin' - } - -end) - --- Local map function -local function map(mode, lhs, rhs, opts) - local options = { noremap = true, silent = true } - if opts then - options = vim.tbl_extend("force", options, opts) - end - vim.api.nvim_set_keymap(mode, lhs, rhs, options) -end - -local opt = {} - ---Remap space as leader key -map('', '', '', { noremap = true, silent = true }) -vim.g.mapleader = ' ' -vim.g.maplocalleader = ' ' - ---Incremental live completion -vim.o.inccommand = 'split' - ---Set highlight on search -vim.o.hlsearch = true - ---Make line numbers default -vim.wo.number = true - --- Relative line numbers -vim.wo.relativenumber = true - ---Do not save when switching buffers -vim.o.hidden = true - ---Enable mouse mode -vim.o.mouse = 'a' - ---Enable break indent -vim.o.breakindent = true - ---Save undo history -vim.cmd [[set undofile]] - ---Case insensitive searching UNLESS /C or capital in search -vim.o.ignorecase = true -vim.o.smartcase = true - ---Decrease update time -vim.o.updatetime = 250 -vim.wo.signcolumn = 'yes' - ---Set colorscheme (order is important here) -vim.o.termguicolors = true -vim.g.catppuccin_flavour = "mocha" -require("catppuccin").setup() -vim.cmd("colorscheme catppuccin") - ---Highlight column 88 -vim.cmd("set colorcolumn=88") - ---Set splits -vim.o.splitbelow = true -vim.o.splitright = true - ---Clipboard -vim.o.clipboard = "unnamedplus" - --- Press ESC to turn off search highlight -map("n", "", ":noh", opt) - ---Tabs and indents -vim.o.shiftwidth = 4 -vim.o.smartindent = true -vim.o.softtabstop = 4 -vim.o.tabstop = 4 -vim.o.autoindent = true - --- Lualine -require('lualine').setup{ - options = { - theme = "catppuccin" - } -} - --- Sometimes I don't let go of the shift key in time -vim.cmd("command! WQ wq") -vim.cmd("command! Wq wq") -vim.cmd("command! Wqa wqa") -vim.cmd("command! WQa wqa") -vim.cmd("command! W w") -vim.cmd("command! Q q") - --- Sometimes I accidentally undo a change when trying to enter INSERT mode -map("n", "u", "", opt) - --- Don't copy deleted text -map("n", "dd", [=[ "_dd ]=], opt) -map("v", "dd", [=[ "_dd ]=], opt) -map("v", "x", [=[ "_x ]=], opt) - --- Copy whole file content -map("n", "", [[ %y+]], opt) - --- Commenter keybinding -require('nvim_comment').setup() -map("n", "/", ":CommentToggle", opt) -map("v", "/", ":CommentToggle", opt) - ---Remap for dealing with word wrap -map('n', 'k', "v:count == 0 ? 'gk' : 'k'", { noremap = true, expr = true, silent = true }) -map('n', 'j', "v:count == 0 ? 'gj' : 'j'", { noremap = true, expr = true, silent = true }) - ---Map blankline -vim.g.indent_blankline_char = '┊' -vim.g.indent_blankline_filetype_exclude = { 'help', 'packer' } -vim.g.indent_blankline_buftype_exclude = { 'terminal', 'nofile' } -vim.g.indent_blankline_char_highlight = 'LineNr' -vim.g.indent_blankline_show_trailing_blankline_indent = false - --- Ansible-flavorited YAML -vim.g.ansible_unindent_after_newline = true - --- nvim-lastplace -require'nvim-lastplace'.setup{} - --- nvim-bufferline.lua -require("bufferline").setup{ - options = { - separator_style = "slant" - } -} - -map("n", "", ":enew", opt) -- new buffer -map("n", "b", ":tabnew", opt) -- new tab -map("n", "", ":bd!", opt) -- close tab -map("n", "", ":BufferLineCycleNext", opt) -map("n", "", ":BufferLineCyclePrev", opt) - --- Telescope -require('telescope').setup { - defaults = { - mappings = { - i = { - [''] = false, - [''] = false, - }, - }, - }, -} ---Add leader shortcuts -map('n', '', [[lua require('telescope.builtin').buffers()]], { noremap = true, silent = true }) -map('n', 'sf', [[lua require('telescope.builtin').find_files({previewer = false})]], { noremap = true, silent = true }) -map('n', 'sb', [[lua require('telescope.builtin').current_buffer_fuzzy_find()]], { noremap = true, silent = true }) -map('n', 'sh', [[lua require('telescope.builtin').help_tags()]], { noremap = true, silent = true }) -map('n', 'st', [[lua require('telescope.builtin').tags()]], { noremap = true, silent = true }) -map('n', 'sd', [[lua require('telescope.builtin').grep_string()]], { noremap = true, silent = true }) -map('n', 'sp', [[lua require('telescope.builtin').live_grep()]], { noremap = true, silent = true }) -map('n', 'so', [[lua require('telescope.builtin').tags{ only_current_buffer = true }]], { noremap = true, silent = true }) -map('n', '?', [[lua require('telescope.builtin').oldfiles()]], { noremap = true, silent = true }) - --- Highlight on yank -vim.api.nvim_exec( -[[ -augroup YankHighlight -autocmd! -autocmd TextYankPost * silent! lua vim.highlight.on_yank() -augroup end -]], -false -) - --- Y yank until the end of line -map('n', 'Y', 'y$', { noremap = true }) - --- Nvim Tree -map('n', '', ':NvimTreeToggle', opt) -map('n', 'r', ':NvimTreeRefresh', opt) -map('n', 'n', ':NvimTreeFindFile', opt) - --- LSP settings -local nvim_lsp = require 'lspconfig' -local on_attach = function(_, bufnr) - vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') - - local opts = { noremap = true, silent = true } - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gD', 'lua vim.lsp.buf.declaration()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', 'lua vim.lsp.buf.definition()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', 'lua vim.lsp.buf.hover()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', 'lua vim.lsp.buf.implementation()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', '', 'lua vim.lsp.buf.signature_help()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'D', 'lua vim.lsp.buf.type_definition()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'rn', 'lua vim.lsp.buf.rename()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', 'lua vim.lsp.buf.references()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'ca', 'lua vim.lsp.buf.code_action()', opts) - -- vim.api.nvim_buf_set_keymap(bufnr, 'v', 'ca', 'lua vim.lsp.buf.range_code_action()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'e', 'lua vim.lsp.diagnostic.show_line_diagnostics()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', '[d', 'lua vim.lsp.diagnostic.goto_prev()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', ']d', 'lua vim.lsp.diagnostic.goto_next()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'q', 'lua vim.lsp.diagnostic.set_loclist()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'so', [[lua require('telescope.builtin').lsp_document_symbols()]], opts) - vim.cmd [[ command! Format execute 'lua vim.lsp.buf.formatting()' ]] -end - -local capabilities = vim.lsp.protocol.make_client_capabilities() -capabilities.textDocument.completion.completionItem.snippetSupport = true - --- Enable the following language servers -local servers = { 'ansiblels', 'bashls', 'dockerls', 'jsonls', 'pyright', 'yamlls' } -for _, lsp in ipairs(servers) do - nvim_lsp[lsp].setup { - on_attach = on_attach, - capabilities = capabilities, - } -end - --- Sumneko Lua Language Server -local sumneko_root_path -local sumneko_binary -sumneko_root_path = vim.fn.getenv("HOME").."/.local/share/lua-language-server" -sumneko_binary = sumneko_root_path .. "/bin/lua-language-server" - --- Make runtime files discoverable to the server -local runtime_path = vim.split(package.path, ';') -table.insert(runtime_path, 'lua/?.lua') -table.insert(runtime_path, 'lua/?/init.lua') - -require('lspconfig').sumneko_lua.setup { - cmd = { sumneko_binary, '-E', sumneko_root_path .. '/main.lua' }, - on_attach = on_attach, - capabilities = capabilities, - settings = { - Lua = { - runtime = { - -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) - version = 'LuaJIT', - -- Setup your lua path - path = runtime_path, - }, - diagnostics = { - -- Get the language server to recognize the `vim` global - globals = { 'vim' }, - }, - workspace = { - -- Make the server aware of Neovim runtime files - library = vim.api.nvim_get_runtime_file('', true), - preloadFileSize = 1000, - checkThirdParty = false, - }, - -- Do not send telemetry data containing a randomized but unique identifier - telemetry = { - enable = false, - }, - }, - }, -} - --- Ansible LSP -require('lspconfig').ansiblels.setup{} - --- Bash LSP -require('lspconfig').bashls.setup{} - --- Docker LSP -require('lspconfig').dockerls.setup{} - --- JSON LSP -require('lspconfig').jsonls.setup{} - --- Pyright (Python) LSP -require('lspconfig').pyright.setup{} - --- Treesitter configuration --- Parsers must be installed manually via :TSInstall -require('nvim-treesitter.configs').setup { - highlight = { - enable = true, -- false will disable the whole extension - }, - incremental_selection = { - enable = true, - keymaps = { - init_selection = 'gnn', - node_incremental = 'grn', - scope_incremental = 'grc', - node_decremental = 'grm', - }, - }, - indent = { - enable = true, - }, - textobjects = { - select = { - enable = true, - lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim - keymaps = { - -- You can use the capture groups defined in textobjects.scm - ['af'] = '@function.outer', - ['if'] = '@function.inner', - ['ac'] = '@class.outer', - ['ic'] = '@class.inner', - }, - }, - move = { - enable = true, - set_jumps = true, -- whether to set jumps in the jumplist - goto_next_start = { - [']m'] = '@function.outer', - [']]'] = '@class.outer', - }, - goto_next_end = { - [']M'] = '@function.outer', - [']['] = '@class.outer', - }, - goto_previous_start = { - ['[m'] = '@function.outer', - ['[['] = '@class.outer', - }, - goto_previous_end = { - ['[M'] = '@function.outer', - ['[]'] = '@class.outer', - }, - }, - }, -} - --- Set completeopt to have a better completion experience -vim.o.completeopt = 'menuone,noinsert' - --- Compe setup -require('compe').setup { - source = { - path = true, - nvim_lsp = true, - luasnip = true, - buffer = false, - calc = false, - nvim_lua = false, - vsnip = false, - ultisnips = false, - }, -} - --- Utility functions for compe and luasnip -local t = function(str) - return vim.api.nvim_replace_termcodes(str, true, true, true) -end - -local check_back_space = function() - local col = vim.fn.col '.' - 1 - if col == 0 or vim.fn.getline('.'):sub(col, col):match '%s' then - return true - else - return false - end -end - --- Use (s-)tab to: ---- move to prev/next item in completion menuone ---- jump to prev/next snippet's placeholder -local luasnip = require 'luasnip' - -_G.tab_complete = function() - if vim.fn.pumvisible() == 1 then - return t '' - elseif luasnip.expand_or_jumpable() then - return t 'luasnip-expand-or-jump' - elseif check_back_space() then - return t '' - else - return vim.fn['compe#complete']() - end -end - -_G.s_tab_complete = function() - if vim.fn.pumvisible() == 1 then - return t '' - elseif luasnip.jumpable(-1) then - return t 'luasnip-jump-prev' - else - return t '' - end -end - --- Map tab to the above tab complete functiones -map('i', '', 'v:lua.tab_complete()', { expr = true }) -map('s', '', 'v:lua.tab_complete()', { expr = true }) -map('i', '', 'v:lua.s_tab_complete()', { expr = true }) -map('s', '', 'v:lua.s_tab_complete()', { expr = true }) - --- Map compe confirm and complete functions -map('i', '', 'compe#confirm("")', { expr = true }) -map('i', '', 'compe#complete()', { expr = true }) - diff --git a/.config/zathura/.github/issue_template.md b/.config/zathura/.github/issue_template.md deleted file mode 100644 index 45a7be3..0000000 --- a/.config/zathura/.github/issue_template.md +++ /dev/null @@ -1 +0,0 @@ -> If you're reporting an UI issue, make sure you take a screenshot that shows the actual bug. \ No newline at end of file diff --git a/.config/zathura/.github/pull_request_template.md b/.config/zathura/.github/pull_request_template.md deleted file mode 100644 index 622089f..0000000 --- a/.config/zathura/.github/pull_request_template.md +++ /dev/null @@ -1 +0,0 @@ -> If you're fixing a UI issue, make sure you take two screenshots. One that shows the actual bug and another that shows how you fixed it. \ No newline at end of file diff --git a/.config/zathura/catppuccin b/.config/zathura/catppuccin deleted file mode 100644 index 0ee2513..0000000 --- a/.config/zathura/catppuccin +++ /dev/null @@ -1,37 +0,0 @@ -set default-fg "#d9e0ee" -set default-bg "#1e1d2f" - -set completion-bg "#302d41" -set completion-fg "#d9e0ee" -set completion-highlight-bg "#575268" -set completion-highlight-fg "#d9e0ee" -set completion-group-bg "#302d41" -set completion-group-fg "#96cdfb" - -set statusbar-fg "#d9e0ee" -set statusbar-bg "#302d41" - -set notification-bg "#302d41" -set notification-fg "#d9e0ee" -set notification-error-bg "#302d41" -set notification-error-fg "#f28fad" -set notification-warning-bg "#302d41" -set notification-warning-fg "#fae3b0" - -set inputbar-fg "#d9e0ee" -set inputbar-bg "#302d41" - -set recolor-lightcolor "#1e1d2f" -set recolor-darkcolor "#d9e0ee" - -set index-fg "#d9e0ee" -set index-bg "#1e1d2f" -set index-active-fg "#d9e0ee" -set index-active-bg "#302d41" - -set render-loading-bg "#1e1d2f" -set render-loading-fg "#d9e0ee" - -set highlight-color "#575268" -set highlight-fg "#f5c2e7" -set highlight-active-color "#f5c2e7" diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc deleted file mode 100644 index ebcf759..0000000 --- a/.config/zathura/zathurarc +++ /dev/null @@ -1,5 +0,0 @@ -set window-title-basename "true" -set selection-clipboard "clipboard" -set adjust-open width -set recolor true -include catppuccin diff --git a/.config/zellij/config.yaml b/.config/zellij/config.yaml deleted file mode 100644 index 95f18d3..0000000 --- a/.config/zellij/config.yaml +++ /dev/null @@ -1,604 +0,0 @@ ---- -# Configuration for zellij. - -# In order to troubleshoot your configuration try using the following command: -# `zellij setup --check` -# It should show current config locations and features that are enabled. - -keybinds: - unbind: true - normal: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [MoveFocusOrTab: Left,] - key: [ Alt: 'h',] - - action: [MoveFocusOrTab: Right,] - key: [ Alt: 'l',] - - action: [MoveFocus: Down,] - key: [ Alt: 'j',] - - action: [MoveFocus: Up,] - key: [ Alt: 'k',] - - action: [FocusPreviousPane,] - key: [ Alt: '[',] - - action: [FocusNextPane,] - key: [ Alt: ']',] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - locked: - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'g',] - resize: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'n', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [Resize: Left,] - key: [Char: 'h', Left,] - - action: [Resize: Down,] - key: [Char: 'j', Down,] - - action: [Resize: Up,] - key: [Char: 'k', Up, ] - - action: [Resize: Right,] - key: [Char: 'l', Right,] - - action: [Resize: Increase,] - key: [Char: '='] - - action: [Resize: Increase,] - key: [ Char: '+'] - - action: [Resize: Decrease,] - key: [Char: '-'] - - action: [MoveFocus: Left,] - key: [ Alt: 'h',] - - action: [MoveFocus: Right,] - key: [ Alt: 'l',] - - action: [MoveFocus: Down,] - key: [ Alt: 'j',] - - action: [MoveFocus: Up,] - key: [ Alt: 'k',] - - action: [FocusPreviousPane,] - key: [ Alt: '[',] - - action: [FocusNextPane,] - key: [ Alt: ']',] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - pane: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'p', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [MoveFocus: Left,] - key: [ Char: 'h', Left,] - - action: [MoveFocus: Right,] - key: [ Char: 'l', Right,] - - action: [MoveFocus: Down,] - key: [ Char: 'j', Down,] - - action: [MoveFocus: Up,] - key: [ Char: 'k', Up,] - - action: [SwitchFocus,] - key: [Char: 'p'] - - action: [NewPane: , SwitchToMode: Normal,] - key: [Char: 'n',] - - action: [NewPane: Down, SwitchToMode: Normal,] - key: [Char: 'd',] - - action: [NewPane: Right, SwitchToMode: Normal,] - key: [Char: 'r',] - - action: [CloseFocus, SwitchToMode: Normal,] - key: [Char: 'x',] - - action: [ToggleFocusFullscreen, SwitchToMode: Normal,] - key: [Char: 'f',] - - action: [TogglePaneFrames, SwitchToMode: Normal,] - key: [Char: 'z',] - - action: [ToggleFloatingPanes, SwitchToMode: Normal,] - key: [Char: 'w'] - - action: [TogglePaneEmbedOrFloating, SwitchToMode: Normal,] - key: [Char: 'e'] - - action: [MoveFocus: Left,] - key: [ Alt: 'h',] - - action: [MoveFocus: Right,] - key: [ Alt: 'l',] - - action: [MoveFocus: Down,] - key: [ Alt: 'j',] - - action: [MoveFocus: Up,] - key: [ Alt: 'k',] - - action: [FocusPreviousPane,] - key: [ Alt: '[',] - - action: [FocusNextPane,] - key: [ Alt: ']',] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [SwitchToMode: RenamePane, PaneNameInput: [0],] - key: [Char: 'c'] - move: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'h', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [MovePane: ,] - key: [Char: 'n', Char: "\t",] - - action: [MovePane: Left,] - key: [Char: 'h', Left,] - - action: [MovePane: Down,] - key: [Char: 'j', Down,] - - action: [MovePane: Up,] - key: [Char: 'k', Up, ] - - action: [MovePane: Right,] - key: [Char: 'l', Right,] - - action: [MoveFocus: Left,] - key: [ Alt: 'h',] - - action: [MoveFocus: Right,] - key: [ Alt: 'l',] - - action: [MoveFocus: Down,] - key: [ Alt: 'j',] - - action: [MoveFocus: Up,] - key: [ Alt: 'k',] - - action: [FocusPreviousPane,] - key: [ Alt: '[',] - - action: [FocusNextPane,] - key: [ Alt: ']',] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - tab: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 't', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: RenameTab, TabNameInput: [0],] - key: [Char: 'r'] - - action: [GoToPreviousTab,] - key: [ Char: 'h', Left, Up, Char: 'k',] - - action: [GoToNextTab,] - key: [ Char: 'l', Right,Down, Char: 'j'] - - action: [NewTab: , SwitchToMode: Normal,] - key: [ Char: 'n',] - - action: [CloseTab, SwitchToMode: Normal,] - key: [ Char: 'x',] - - action: [ToggleActiveSyncTab, SwitchToMode: Normal,] - key: [Char: 's'] - - action: [GoToTab: 1, SwitchToMode: Normal,] - key: [ Char: '1',] - - action: [GoToTab: 2, SwitchToMode: Normal,] - key: [ Char: '2',] - - action: [GoToTab: 3, SwitchToMode: Normal,] - key: [ Char: '3',] - - action: [GoToTab: 4, SwitchToMode: Normal,] - key: [ Char: '4',] - - action: [GoToTab: 5, SwitchToMode: Normal,] - key: [ Char: '5',] - - action: [GoToTab: 6, SwitchToMode: Normal,] - key: [ Char: '6',] - - action: [GoToTab: 7, SwitchToMode: Normal,] - key: [ Char: '7',] - - action: [GoToTab: 8, SwitchToMode: Normal,] - key: [ Char: '8',] - - action: [GoToTab: 9, SwitchToMode: Normal,] - key: [ Char: '9',] - - action: [ToggleTab] - key: [ Char: "\t" ] - - action: [MoveFocus: Left,] - key: [ Alt: 'h',] - - action: [MoveFocus: Right,] - key: [ Alt: 'l',] - - action: [MoveFocus: Down,] - key: [ Alt: 'j',] - - action: [MoveFocus: Up,] - key: [ Alt: 'k',] - - action: [FocusPreviousPane,] - key: [ Alt: '[',] - - action: [FocusNextPane,] - key: [ Alt: ']',] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - scroll: - - action: [SwitchToMode: Normal,] - key: [Ctrl: 's', Char: ' ', Char: "\n", Esc] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Session,] - key: [Ctrl: 'o',] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [ScrollToBottom, SwitchToMode: Normal,] - key: [Ctrl: 'c',] - - action: [ScrollDown,] - key: [Char: 'j', Down,] - - action: [ScrollUp,] - key: [Char: 'k', Up,] - - action: [PageScrollDown,] - key: [Ctrl: 'f', PageDown, Right, Char: 'l',] - - action: [PageScrollUp,] - key: [Ctrl: 'b', PageUp, Left, Char: 'h',] - - action: [HalfPageScrollDown,] - key: [Char: 'd',] - - action: [HalfPageScrollUp,] - key: [Char: 'u',] - - action: [MoveFocus: Left,] - key: [ Alt: 'h',] - - action: [MoveFocus: Right,] - key: [ Alt: 'l',] - - action: [MoveFocus: Down,] - key: [ Alt: 'j',] - - action: [MoveFocus: Up,] - key: [ Alt: 'k',] - - action: [FocusPreviousPane,] - key: [ Alt: '[',] - - action: [FocusNextPane,] - key: [ Alt: ']',] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - renametab: - - action: [SwitchToMode: Normal,] - key: [Char: "\n", Ctrl: 'c', Esc] - - action: [TabNameInput: [27] , SwitchToMode: Tab,] - key: [Esc,] - - action: [MoveFocus: Left,] - key: [ Alt: 'h',] - - action: [MoveFocus: Right,] - key: [ Alt: 'l',] - - action: [MoveFocus: Down,] - key: [ Alt: 'j',] - - action: [MoveFocus: Up,] - key: [ Alt: 'k',] - - action: [FocusPreviousPane,] - key: [ Alt: '[',] - - action: [FocusNextPane,] - key: [ Alt: ']',] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - renamepane: - - action: [SwitchToMode: Normal,] - key: [Char: "\n", Ctrl: 'c', Esc] - - action: [PaneNameInput: [27] , SwitchToMode: Pane,] - key: [Esc,] - - action: [MoveFocus: Left,] - key: [ Alt: 'h',] - - action: [MoveFocus: Right,] - key: [ Alt: 'l',] - - action: [MoveFocus: Down,] - key: [ Alt: 'j',] - - action: [MoveFocus: Up,] - key: [ Alt: 'k',] - - action: [FocusPreviousPane,] - key: [ Alt: '[',] - - action: [FocusNextPane,] - key: [ Alt: ']',] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - session: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tmux,] - key: [Ctrl: 'b',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'o', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [Detach,] - key: [Char: 'd',] - - action: [MoveFocus: Left,] - key: [ Alt: 'h',] - - action: [MoveFocus: Right,] - key: [ Alt: 'l',] - - action: [MoveFocus: Down,] - key: [ Alt: 'j',] - - action: [MoveFocus: Up,] - key: [ Alt: 'k',] - - action: [FocusPreviousPane,] - key: [ Alt: '[',] - - action: [FocusNextPane,] - key: [ Alt: ']',] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - tmux: - - action: [SwitchToMode: Locked,] - key: [Ctrl: 'g'] - - action: [SwitchToMode: Resize,] - key: [Ctrl: 'n',] - - action: [SwitchToMode: Pane,] - key: [Ctrl: 'p',] - - action: [SwitchToMode: Move,] - key: [Ctrl: 'h',] - - action: [SwitchToMode: Tab,] - key: [Ctrl: 't',] - - action: [SwitchToMode: Normal,] - key: [Ctrl: 'o', Char: "\n", Char: ' ', Esc] - - action: [SwitchToMode: Scroll,] - key: [Ctrl: 's'] - - action: [SwitchToMode: Scroll,] - key: [ Char: '['] - - action: [Write: [2,], SwitchToMode: Normal] - key: [Ctrl: 'b'] - - action: [NewPane: Down, SwitchToMode: Normal,] - key: [Char: "\"",] - - action: [NewPane: Right, SwitchToMode: Normal,] - key: [Char: '%',] - - action: [ToggleFocusFullscreen, SwitchToMode: Normal,] - key: [Char: 'z',] - - action: [NewTab: , SwitchToMode: Normal,] - key: [ Char: 'c',] - - action: [SwitchToMode: RenameTab, TabNameInput: [0],] - key: [Char: ','] - - action: [GoToPreviousTab, SwitchToMode: Normal,] - key: [ Char: 'p'] - - action: [GoToNextTab, SwitchToMode: Normal,] - key: [ Char: 'n'] - - action: [MoveFocus: Left, SwitchToMode: Normal,] - key: [ Left,] - - action: [MoveFocus: Right, SwitchToMode: Normal,] - key: [ Right,] - - action: [MoveFocus: Down, SwitchToMode: Normal,] - key: [ Down,] - - action: [MoveFocus: Up, SwitchToMode: Normal,] - key: [ Up,] - - action: [MoveFocus: Left, SwitchToMode: Normal,] - key: [ Char: 'h'] - - action: [MoveFocus: Right, SwitchToMode: Normal,] - key: [ Char: 'l'] - - action: [MoveFocus: Down, SwitchToMode: Normal,] - key: [ Char: 'j'] - - action: [MoveFocus: Up, SwitchToMode: Normal,] - key: [ Char: 'k'] - - action: [MoveFocus: Left,] - key: [ Alt: 'h',] - - action: [MoveFocus: Right,] - key: [ Alt: 'l',] - - action: [MoveFocus: Down,] - key: [ Alt: 'j',] - - action: [MoveFocus: Up,] - key: [ Alt: 'k',] - - action: [FocusPreviousPane,] - key: [ Alt: '[',] - - action: [FocusNextPane,] - key: [ Alt: ']',] - - action: [FocusNextPane,] - key: [ Char: 'o'] - - action: [Resize: Increase,] - key: [ Alt: '='] - - action: [Resize: Increase,] - key: [ Alt: '+'] - - action: [Resize: Decrease,] - key: [ Alt: '-'] - - action: [Detach,] - key: [Char: 'd',] -plugins: - - path: tab-bar - tag: tab-bar - - path: status-bar - tag: status-bar - - path: strider - tag: strider -themes: - dracula: - fg: [248, 248, 242] - bg: [40, 42, 54] - black: [0, 0, 0] - gray: [68, 71, 90] - red: [255, 85, 85] - green: [80, 250, 123] - yellow: [241, 250, 140] - blue: [98, 114, 164] - magenta: [255, 121, 198] - cyan: [139, 233, 253] - white: [255, 255, 255] - orange: [255, 184, 108] - - catppuccin: - bg: - - 48 - - 45 - - 65 - black: - - 22 - - 19 - - 32 - blue: - - 150 - - 205 - - 251 - cyan: - - 26 - - 24 - - 38 - fg: - - 217 - - 224 - - 238 - gray: - - 87 - - 82 - - 104 - green: - - 171 - - 233 - - 179 - magenta: - - 245 - - 194 - - 231 - orange: - - 248 - - 189 - - 150 - red: - - 242 - - 143 - - 173 - white: - - 217 - - 224 - - 238 - yellow: - - 250 - - 227 - - 176 -# Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP -# eg. when terminal window with an active zellij session is closed -# Options: -# - detach (Default) -# - quit -#on_force_close: quit - -# Send a request for a simplified ui (without arrow fonts) to plugins -# Options: -# - true -# - false (Default) -#simplified_ui: true - -# Choose the path to the default shell that zellij will use for opening new panes -# Default: $SHELL - -# Toggle between having pane frames around the panes -# Options: -# - true (default) -# - false -#pane_frames: true - -# Choose the theme that is specified in the themes section. -# Default: default -theme: catppuccin - -# Choose the mode that zellij uses when starting up. -# Default: normal -#default_mode: locked - -# Toggle enabling the mouse mode. -# On certain configurations, or terminals this could -# potentially interfere with copying text. -# Options: -# - true (default) -# - false -#mouse_mode: false - -# Configure the scroll back buffer size -# This is the number of lines zellij stores for each pane in the scroll back -# buffer. Excess number of lines are discarded in a FIFO fashion. -# Valid values: positive integers -# Default value: 10000 -#scroll_buffer_size: 10000 - -# Provide a command to execute when copying text. The text will be piped to -# the stdin of the program to perform the copy. This can be used with -# terminal emulators which do not support the OSC 52 ANSI control sequence -# that will be used by default if this option is not set. -# Examples: -copy_command: "xclip -selection clipboard" # x11 -#copy_command: "wl-copy" # wayland -#copy_command: "pbcopy" # osx - -# Choose the destination for copied text -# Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. -# Does not apply when using copy_command. -# Options: -# - system (default) -# - primary -# copy_clipboard: system diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 6ab88c6..0000000 --- a/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -root = true - -[*] -end_of_line = lf -insert_final_newline = true -indent_style = space -indent_size = 4 -charset = utf-8 - -[Makefile] -indent_style = tab - -[*.yml] -indent_size = 2 - -[*.yaml] -indent_size = 2 - -[*.toml] -indent_size = 2 diff --git a/.gnupg/gpg-agent.conf b/.gnupg/gpg-agent.conf deleted file mode 100644 index e184044..0000000 --- a/.gnupg/gpg-agent.conf +++ /dev/null @@ -1,4 +0,0 @@ -enable-ssh-support - -default-cache-ttl 60 -max-cache-ttl 120 diff --git a/.gnupg/gpg.conf b/.gnupg/gpg.conf deleted file mode 100644 index e1cc722..0000000 --- a/.gnupg/gpg.conf +++ /dev/null @@ -1,96 +0,0 @@ -# -# This is an implementation of the Riseup OpenPGP Best Practices -# https://help.riseup.net/en/security/message-security/openpgp/best-practices -# - -#----------------------------- -# default key -#----------------------------- - -# The default key to sign with. If this option is not used, the default key is -# the first key found in the secret keyring - -default-key 0x9129BD07C3509CED - -#----------------------------- -# behavior -#----------------------------- - -# Disable inclusion of the version string in ASCII armored output -no-emit-version - -# Disable comment string in clear text signatures and ASCII armored messages -no-comments - -# Display long key IDs -keyid-format 0xlong - -# List all keys (or the specified ones) along with their fingerprints -with-fingerprint - -# Display the calculated validity of user IDs during key listings -list-options show-uid-validity -verify-options show-uid-validity - -# Try to use the GnuPG-Agent. With this option, GnuPG first tries to connect to -# the agent before it asks for a passphrase. -use-agent - -charset utf-8 -fixed-list-mode - -#----------------------------- -# keyserver -#----------------------------- - -# This is the server that --recv-keys, --send-keys, and --search-keys will -# communicate with to receive keys from, send keys to, and search for keys on -#keyserver hkps://hkps.pool.sks-keyservers.net -keyserver pgp.mit.edu - -# Provide a certificate store to override the system default -# Get this from https://sks-keyservers.net/sks-keyservers.netCA.pem -#keyserver-options ca-cert-file=/usr/local/etc/ssl/certs/hkps.pool.sks-keyservers.net.pem - -# Set the proxy to use for HTTP and HKP keyservers - default to the standard -# local Tor socks proxy -# It is encouraged to use Tor for improved anonymity. Preferrably use either a -# dedicated SOCKSPort for GnuPG and/or enable IsolateDestPort and -# IsolateDestAddr -# -# I run my tor socks proxy in a container, see .dockerfunc and -# github.com/jfrazelle/dockerfiles -#keyserver-options http-proxy=socks5-hostname://torproxy:9050 - -# Don't leak DNS, see https://trac.torproject.org/projects/tor/ticket/2846 -#keyserver-options no-try-dns-srv - -# When using --refresh-keys, if the key in question has a preferred keyserver -# URL, then disable use of that preferred keyserver to refresh the key from -keyserver-options no-honor-keyserver-url - -# When searching for a key with --search-keys, include keys that are marked on -# the keyserver as revoked -keyserver-options include-revoked - -#----------------------------- -# algorithm and ciphers -#----------------------------- - -# list of personal digest preferences. When multiple digests are supported by -# all recipients, choose the strongest one -personal-cipher-preferences AES256 AES192 AES CAST5 - -# list of personal digest preferences. When multiple ciphers are supported by -# all recipients, choose the strongest one -personal-digest-preferences SHA512 SHA384 SHA256 SHA224 - -# message digest algorithm used when signing a key -cert-digest-algo SHA512 -s2k-cipher-algo AES256 -s2k-digest-algo SHA512 - -# This preference list is used for new keys and becomes the default for -# "setpref" in the edit menu -default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed - diff --git a/.zshrc.d/functions.zsh b/.zshrc.d/functions.zsh deleted file mode 100644 index da1f977..0000000 --- a/.zshrc.d/functions.zsh +++ /dev/null @@ -1,333 +0,0 @@ -# Mullvad VPN checker. -function mullvad() { -echo "" -python3 <(cat < ' given. - last=$3 - case $1 in - ("") - printf '%s\n\n' 'ERROR: No search string specified. Aborting.' - printf '%s\n%s\n\n' ${usage} ${help} && return 1 - ;; - (-h) - printf '%s\n\n' ${usage} - print 'OPTIONS:' - printf $format_l '-h' 'show help text' - print '\f' - print 'SEARCH RANGE:' - printf $format_l "'0'" 'the whole history,' - printf $format_l '-' 'offset to the current history number; (default: -100)' - printf $format_s '<[-]first> []' 'just searching within a give range' - printf '\n%s\n' 'EXAMPLES:' - printf ${format_l/(\\t)/} 'whatwhen grml' '# Range is set to -100 by default.' - printf $format_l 'whatwhen zsh -250' - printf $format_l 'whatwhen foo 1 99' - ;; - (\?) - printf '%s\n%s\n\n' ${usage} ${help} && return 1 - ;; - (*) - # -l list results on stout rather than invoking $EDITOR. - # -i Print dates as in YYYY-MM-DD. - # -m Search for a - quoted - pattern within the history. - fc -li -m "*${first_char}${remain}*" $first $last - ;; - esac -} - -# Lifted from the extract plugin for oh-my-zsh. -# Extract archive into current directory. -function extract() { - setopt localoptions noautopushd - - if (( $# == 0 )); then - cat >&2 <<'EOF' -Usage: extract [-option] [file ...] - -Options: - -r, --remove Remove archive after unpacking. -EOF - fi - - local remove_archive=1 - if [[ "$1" == "-r" ]] || [[ "$1" == "--remove" ]]; then - remove_archive=0 - shift - fi - - local pwd="$PWD" - while (( $# > 0 )); do - if [[ ! -f "$1" ]]; then - echo "extract: '$1' is not a valid file" >&2 - shift - continue - fi - - local success=0 - local extract_dir="${1:t:r}" - local file="$1" full_path="${1:A}" - case "${file:l}" in - (*.tar.gz|*.tgz) (( $+commands[pigz] )) && { pigz -dc "$file" | tar xv } || tar zxvf "$file" ;; - (*.tar.bz2|*.tbz|*.tbz2) tar xvjf "$file" ;; - (*.tar.xz|*.txz) - tar --xz --help &> /dev/null \ - && tar --xz -xvf "$file" \ - || xzcat "$file" | tar xvf - ;; - (*.tar.zma|*.tlz) - tar --lzma --help &> /dev/null \ - && tar --lzma -xvf "$file" \ - || lzcat "$file" | tar xvf - ;; - (*.tar.zst|*.tzst) - tar --zstd --help &> /dev/null \ - && tar --zstd -xvf "$file" \ - || zstdcat "$file" | tar xvf - ;; - (*.tar) tar xvf "$file" ;; - (*.tar.lz) (( $+commands[lzip] )) && tar xvf "$file" ;; - (*.tar.lz4) lz4 -c -d "$file" | tar xvf - ;; - (*.tar.lrz) (( $+commands[lrzuntar] )) && lrzuntar "$file" ;; - (*.gz) (( $+commands[pigz] )) && pigz -dk "$file" || gunzip -k "$file" ;; - (*.bz2) bunzip2 "$file" ;; - (*.xz) unxz "$file" ;; - (*.lrz) (( $+commands[lrunzip] )) && lrunzip "$file" ;; - (*.lz4) lz4 -d "$file" ;; - (*.lzma) unlzma "$file" ;; - (*.z) uncompress "$file" ;; - (*.zip|*.war|*.jar|*.ear|*.sublime-package|*.ipa|*.ipsw|*.xpi|*.apk|*.aar|*.whl) unzip "$file" -d "$extract_dir" ;; - (*.rar) unrar x -ad "$file" ;; - (*.rpm) - command mkdir -p "$extract_dir" && builtin cd -q "$extract_dir" \ - && rpm2cpio "$full_path" | cpio --quiet -id ;; - (*.7z) 7za x "$file" ;; - (*.deb) - command mkdir -p "$extract_dir/control" "$extract_dir/data" - builtin cd -q "$extract_dir"; ar vx "$full_path" > /dev/null - builtin cd -q control; extract ../control.tar.* - builtin cd -q ../data; extract ../data.tar.* - builtin cd -q ..; command rm *.tar.* debian-binary ;; - (*.zst) unzstd "$file" ;; - (*.cab) cabextract -d "$extract_dir" "$file" ;; - (*.cpio) cpio -idmvF "$file" ;; - (*) - echo "extract: '$file' cannot be extracted" >&2 - success=1 ;; - esac - - (( success = success > 0 ? success : $? )) - (( success == 0 && remove_archive == 0 )) && rm "$full_path" - shift - - # Go back to original working directory in case we ran cd previously - builtin cd -q "$pwd" - done -} -alias x=extract - -# Create a tarball from given directory. -function create-archive() { - local archive_name - archive_name="$1.tar.gz" - archive_name=${archive_name/\//} - tar cvfz "$archive_name" "$1" - echo "Created archive $archive_name" -} -compdef _directories create-archive - -# Create a /overview/ of all available function()'s; the description for -# each funtion() *must* be the first line above the string `function'! -# Otherwise it wont work. -# Display all function()'s with their descriptions. -function funlist() { - grep -B 1 "^function" $HOME/.zshrc.d/functions.zsh | \ - grep -v "^\-\-$" | \ - awk '{ if(/^#/) { gsub(/^#[:space:]*/, ""); ht=$0 }; getline; gsub(/ ?\(\)/, ":"); printf("-> %-20s %s\n", $2, ht); }' | \ - sort -u -k 3 -} - -# Show directory stack and ask for a dir to switch to. -function dstack() { - emulate -L zsh - autoload -U colors - local color=$fg_bold[blue] - integer i=0 - dirs -p | while read dir - do - local num="${$(printf "%-4d " $i)/ /.}" - printf " %s $color%s$reset_color\n" $num $dir - (( i++ )) - done - integer dir=-1 - read -r 'dir?Jump to directory: ' || return - (( dir == -1 )) && return - if (( dir < 0 || dir >= i )) - then - echo d: no such directory stack entry: $dir - return 1 - fi - cd ~$dir -} - -# zremovecomp() remove *.zwc files. -function zremovecomp() { - local i - for i in ${HOME}/*.zwc(N); do - printf "Removing $i\n" - command rm -f $i - done -} - -# grep(1)'ing $HISTFILE. -function histgrep () { fc -fl -m "*(#i)$1*" 1 | grep -i --color $1 } - -# A nicer output of cal(1) -# Colorize the output of cal(1). -function calendar() { - if [[ ! -f /usr/bin/cal ]] ; then - echo "Please install cal before trying to use it!" - return - fi - if [[ "$#" = "0" ]] ; then - /usr/bin/cal | egrep -C 40 --color "\<$(date +%e| tr -d ' ')\>" - else - /usr/bin/cal $@ | egrep -C 40 --color "\<($(date +%B)|$(date +%e | tr -d ' '))\>" - fi -} - -# Invoke this every time you change .zshrc to recompile it. -function src() { - autoload -U zrecompile - [ -f ~/.zshrc ] && zrecompile -p ~/.zshrc - [ -f ~/.zcompdump ] && zrecompile -p ~/.zcompdump - [ -f ~/.zcompdump ] && zrecompile -p ~/.zcompdump - [ -f ~/.zshrc.zwc.old ] && command rm -f ~/.zshrc.zwc.old - [ -f ~/.zcompdump.zwc.old ] && command rm -f ~/.zcompdump.zwc.old - source ~/.zshrc -} - -# Do an ls after cd. -function cd() { builtin cd "$@" && ls; } - -# Create new directory and enter it. -function mkd() { mkdir -p "$@" && cd "$_"; } - -# Display pids of commands. -function pids() { pgrep -a "$@"; } - -# zshall manpage. -function manzsh() { /usr/bin/man zshall | most +/"$1" ; } - -# Restart zsh. -function restart() { exec $SHELL $SHELL_ARGS "$@"; } - -# cd to ~, clear screen, and restart zsh. -function rsrc() { cd && clear && restart; } - -# Parse HackerNews feed (https://hnrss.org/newest). -function hn() { -python3 <(cat < [ ]"` +# The string used when the variable is set may contain the `%s` mark, +# which is replaced by the actual content of the variable. +LP_ENV_VARS=( +# # Display "V" if VERBOSE is set, nothing if it's unset. +# "VERBOSE V" +# # Display the name of the desktop session, if set, T if unset. +# "DESKTOP_SESSION %s T" +# # Display "ed:" followed the name of the default editor, nothing if unset. +# "EDITOR ed:%s" +) + +# Use the permissions feature and display a red ':' before the prompt to show +# when you don't have write permission to the current directory. +# Recommended value is 1 +LP_ENABLE_PERM=1 + +# Enable the proxy detection feature. +# Recommended value is 1 +LP_ENABLE_PROXY=1 + +# Enable the jobs feature. +# Recommended value is 1 +LP_ENABLE_JOBS=1 + +# Enable the detached sessions feature. +# Default value is 1 +LP_ENABLE_DETACHED_SESSIONS=1 + +# Enable the load feature. +# Recommended value is 1 +LP_ENABLE_LOAD=1 + +# Enable the battery feature. +# Recommended value is 1 +LP_ENABLE_BATT=0 + +# Enable the 'sudo credentials' feature. +# Be warned that this may pollute the syslog if you don't have sudo +# credentials, and the sysadmin might hate you. +LP_ENABLE_SUDO=1 + +# Enable the directory stack support. +LP_ENABLE_DIRSTACK=0 + +# Enable the VCS features with the root account. +# Recommended value is 0 +LP_ENABLE_VCS_ROOT=0 + +# Enable the Git special features. +# Recommended value is 1 +LP_ENABLE_GIT=1 + +# Enable the Subversion special features. +# Recommended value is 1 +LP_ENABLE_SVN=0 + +# Enable the Mercurial special features. +# Recommended value is 1 +LP_ENABLE_HG=0 + +# Enable the Fossil special features. +# Recommended value is 1 +LP_ENABLE_FOSSIL=0 + +# Enable the Bazaar special features. +# Recommended value is 1 +LP_ENABLE_BZR=0 + +# Show time of when the current prompt was displayed. +LP_ENABLE_TIME=1 + +# Show runtime of the previous command if over LP_RUNTIME_THRESHOLD +# Recommended value is 0 +LP_ENABLE_RUNTIME=0 + +# Minimal runtime (in seconds) before the runtime will be displayed +# Recommended value is 2 +LP_RUNTIME_THRESHOLD=2 + +# Ring the terminal bell if the runtime of the previous command exceeded +# LP_RUNTIME_BELL_THRESHOLD +# Recommended value is 0 +LP_ENABLE_RUNTIME_BELL=0 + +# Minimal runtime (in seconds) before the terminal bell will be rung. +# Recommended value is 10 +LP_RUNTIME_BELL_THRESHOLD=10 + +# Display the virtualenv that is currently activated, if any +# Recommended value is 1 +LP_ENABLE_VIRTUALENV=1 + +# Display the ruby virtual env that is currently activated, if any +# Recommended value is 1 +LP_ENABLE_RUBY_VENV=1 + +# If using RVM, personalize the rvm-prompt. +# see http://rvm.io/workflow/prompt for details. +# Warning, this variable must be a shell array. +LP_RUBY_RVM_PROMPT_OPTIONS=(i v g s) + +# Display the terraform workspace that is currently activated, if any +# Recommended value is 0 +LP_ENABLE_TERRAFORM=0 + +# Display the enabled software collections, if any +# Recommended value is 1 +LP_ENABLE_SCLS=1 + +# Show current Kubernetes kubectl context +LP_ENABLE_KUBECONTEXT=0 + +# Delimiter to shorten kubectl context by removing a suffix. +# E.g. when your context names are dev-cluster and test-cluster, set to "-" +# in order to output "dev" and "test" in prompt. +LP_DELIMITER_KUBECONTEXT_SUFFIX= + +# Delimiter to shorten kubectl context by removing a prefix. +# E.g. when your context names are like +# arn:aws:eks:$REGION:$ACCOUNT_ID:cluster/$CLUSTER_NAME, set to "/" +# in order to output "$CLUSTER_NAME" in prompt. +LP_DELIMITER_KUBECONTEXT_PREFIX= + +# Display the current active AWS_PROFILE, if any +# Recommended value is 1 +LP_ENABLE_AWS_PROFILE=0 + +# Show highest system temperature +LP_ENABLE_TEMP=0 + +# When showing the time, use an analog clock instead of numeric values. +# Recommended value is 0 +LP_TIME_ANALOG=0 + +# Use the prompt as the title of the terminal window +# Recommended value is 0 +LP_ENABLE_TITLE=1 + +# Enable Title for screen, byobu, and tmux +LP_ENABLE_SCREEN_TITLE=1 + +# Use different colors for the different hosts you SSH to +LP_ENABLE_SSH_COLORS=1 + +# Show the error code of the last command if it was not 0 +LP_ENABLE_ERROR=1 + +# Show the (guessed) error meaning after the error code. +LP_ENABLE_ERROR_MEANING=1 + +# Extends the list of guessed error meanings (may produce wrong meanings). +LP_ENABLE_ERROR_MEANING_EXTENDED=0 + +# Specify an array of absolute paths in which all vcs will be disabled. +# Ex: ("/root" "/home/me/large-remove-svn-repo") +LP_DISABLED_VCS_PATHS=() + +# Indicate if the shell is running in a container environment. +LP_ENABLE_CONTAINER=1 + +# Don't show the value of $SHLVL +LP_ENABLE_SHLVL=0 + +# Colors +# LP_COLOR_HOST="$BOLD_RED" +# LP_COLOR_USER="$BOLD" +# LP_COLOR_USER_LOGGED="$BOLD" + +# Use a local liquidpromptrc if it exists. +# Can be helpful if you sync your primary config across machines, or if +# there's a system-wide config at /etc/liquidpromptrc from which you'd +# like to make only minor deviations. +#LOCAL_RCFILE=$HOME/.liquidpromptrc.local +#[ -f "$LOCAL_RCFILE" ] && source "$LOCAL_RCFILE" + +# vim: set et sts=4 sw=4 tw=120 ft=sh: diff --git a/.config/mc/ini b/config/.config/mc/ini similarity index 100% rename from .config/mc/ini rename to config/.config/mc/ini diff --git a/.config/mc/panels.ini b/config/.config/mc/panels.ini similarity index 100% rename from .config/mc/panels.ini rename to config/.config/mc/panels.ini diff --git a/config/.config/oh-my-tmux/themes/catppuccin_mocha.conf b/config/.config/oh-my-tmux/themes/catppuccin_mocha.conf new file mode 100644 index 0000000..3eb0be6 --- /dev/null +++ b/config/.config/oh-my-tmux/themes/catppuccin_mocha.conf @@ -0,0 +1,80 @@ +# --- Catppuccin Mocha Theme ----------------------------------------------------------- +# +# Catppuccin Mocha Color Pallette + white='#cdd6f4' # Foreground + gray='#f5e0dc' # Current Line / Selection + dark_gray='#313244' # Background + light_purple='#b4befe' # Purple + dark_purple='#45475a' # Comment + cyan='#94e2d5' # Cyan + green='#a6e3a1' # Green + orange='#fab387' # Orange + red='#f38ba8' # Red + pink='#eba0ac' # Pink + yellow='#f9e2af' # Yellow + blue='#89b4fa' # Blue + +# Focused pane colours: +tmux_conf_theme_focused_pane_fg='default' +tmux_conf_theme_focused_pane_bg="${gray}" + +# Pane borders colours: +tmux_conf_theme_pane_border="${gray}" +tmux_conf_theme_pane_active_border="${light_purple}" + +# Pane indicator colours +tmux_conf_theme_pane_indicator="${dark_purple}" +tmux_conf_theme_pane_active_indicator="${light_purple}" + +# Status line message style +tmux_conf_theme_message_fg="${white}" +tmux_conf_theme_message_bg="${dark_purple}" +tmux_conf_theme_message_attr='bold' + +# Status line command style ( : Escape) +tmux_conf_theme_message_command_fg="${white}" +tmux_conf_theme_message_command_bg="${gray}" +tmux_conf_theme_message_command_attr='bold' + +# Window modes style +tmux_conf_theme_mode_fg="${gray}" +tmux_conf_theme_mode_bg="${pink}" +tmux_conf_theme_mode_attr='bold' + +# Status line style +tmux_conf_theme_status_fg="${white}" +tmux_conf_theme_status_bg="${dark_gray}" +tmux_conf_theme_status_attr='none' + +# Window status style +tmux_conf_theme_window_status_fg="${white}" +tmux_conf_theme_window_status_bg="${dark_gray}" + +# Window current status style +tmux_conf_theme_window_status_current_fg="${white}" +tmux_conf_theme_window_status_current_bg="${dark_purple}" +tmux_conf_theme_window_status_current_attr='none' + +# Window bell status style +tmux_conf_theme_window_status_bell_fg="${cyan}" +tmux_conf_theme_window_status_bell_bg='default' +tmux_conf_theme_window_status_bell_attr='blink,bold' + +# Windows last status style +tmux_conf_theme_window_status_last_fg="${light_purple}" +tmux_conf_theme_window_status_last_bg='default' +tmux_conf_theme_window_status_last_attr='none' + +# Status left style +tmux_conf_theme_status_left_fg="${dark_gray},${dark_gray},${dark_gray}" +tmux_conf_theme_status_left_bg="${green},${pink},${light_purple}" +tmux_conf_theme_status_left_attr='bold,none,none' + +# Status right style +tmux_conf_theme_status_right_fg="${white},${dark_gray},${dark_gray}" +tmux_conf_theme_status_right_bg="${dark_purple},${cyan},${orange}" +tmux_conf_theme_status_right_attr='none,none,bold' + +# Clock +tmux_conf_theme_clock_colour="${light_purple}" + diff --git a/.config/rofi/config.rasi b/config/.config/rofi/config.rasi similarity index 95% rename from .config/rofi/config.rasi rename to config/.config/rofi/config.rasi index 193620b..a554a28 100644 --- a/.config/rofi/config.rasi +++ b/config/.config/rofi/config.rasi @@ -1,10 +1,10 @@ configuration{ modi: "drun,Emoji:/usr/bin/rofimoji -a copy"; lines: 5; - font: "CaskaydiaCove Nerd Font Mono 22"; + font: "JetBrainsMono Nerd Font Mono 22"; show-icons: true; icon-theme: "Papirus-Dark"; - terminal: "xfce4-terminal"; + terminal: "gnome-terminal"; drun-display-format: "{icon} {name}"; location: 0; disable-history: false; diff --git a/config/.config/rofi/dracula.rasi b/config/.config/rofi/dracula.rasi new file mode 100644 index 0000000..7506431 --- /dev/null +++ b/config/.config/rofi/dracula.rasi @@ -0,0 +1,139 @@ +* { + /* Dracula theme colour palette */ + drac-bgd: #282a36; + drac-cur: #44475a; + drac-fgd: #f8f8f2; + drac-cmt: #6272a4; + drac-cya: #8be9fd; + drac-grn: #50fa7b; + drac-ora: #ffb86c; + drac-pnk: #ff79c6; + drac-pur: #bd93f9; + drac-red: #ff5555; + drac-yel: #f1fa8c; + + font: "Rec Mono Linear 22"; + + foreground: @drac-fgd; + background-color: @drac-bgd; + active-background: @drac-pnk; + urgent-background: @drac-red; + + selected-background: @active-background; + selected-urgent-background: @urgent-background; + selected-active-background: @active-background; + separatorcolor: @active-background; + bordercolor: #6272a4; +} + +#window { + background-color: @background-color; + border: 3; + border-radius: 6; + border-color: @bordercolor; + padding: 5; +} +#mainbox { + border: 0; + padding: 5; +} +#message { + border: 1px dash 0px 0px ; + border-color: @separatorcolor; + padding: 1px ; +} +#textbox { + text-color: @foreground; +} +#listview { + fixed-height: 0; + border: 2px dash 0px 0px ; + border-color: @bordercolor; + spacing: 2px ; + scrollbar: false; + padding: 2px 0px 0px ; +} +#element { + border: 0; + padding: 1px ; +} +#element.normal.normal { + background-color: @background-color; + text-color: @foreground; +} +#element.normal.urgent { + background-color: @urgent-background; + text-color: @urgent-foreground; +} +#element.normal.active { + background-color: @active-background; + text-color: @background-color; +} +#element.selected.normal { + background-color: @selected-background; + text-color: @foreground; +} +#element.selected.urgent { + background-color: @selected-urgent-background; + text-color: @foreground; +} +#element.selected.active { + background-color: @selected-active-background; + text-color: @background-color; +} +#element.alternate.normal { + background-color: @background-color; + text-color: @foreground; +} +#element.alternate.urgent { + background-color: @urgent-background; + text-color: @foreground; +} +#element.alternate.active { + background-color: @active-background; + text-color: @foreground; +} +#scrollbar { + width: 2px ; + border: 0; + handle-width: 8px ; + padding: 0; +} +#sidebar { + border: 2px dash 0px 0px ; + border-color: @separatorcolor; +} +#button.selected { + background-color: @selected-background; + text-color: @foreground; +} +#inputbar { + spacing: 0; + text-color: @foreground; + padding: 1px ; +} +#case-indicator { + spacing: 0; + text-color: @foreground; +} +#entry { + spacing: 0; + text-color: @drac-cya; +} +#prompt { + spacing: 0; + text-color: @drac-grn; +} +#inputbar { + children: [ prompt,textbox-prompt-colon,entry,case-indicator ]; +} +#textbox-prompt-colon { + expand: false; + str: ":"; + margin: 0px 0.3em 0em 0em ; + text-color: @drac-grn; +} +element-text, element-icon { + background-color: inherit; + text-color: inherit; +} diff --git a/.config/starship.toml b/config/.config/starship.toml similarity index 60% rename from .config/starship.toml rename to config/.config/starship.toml index 85b8e75..bcb0012 100644 --- a/.config/starship.toml +++ b/config/.config/starship.toml @@ -1,22 +1,30 @@ -## FIRST LINE/ROW: Info & Status +format = """$time$container$directory$all$line_break$username$hostname$character""" +right_format = """$cmd_duration $jobs $status""" + +[time] +disabled = false +format = '[\[ $time \]]($style) ' +time_format = "%T" +style = "bold #fab387" + [username] -format = " [$user]($style)@" +format = "[$user]($style)@" style_user = "#f38ba8" style_root = "bold red" show_always = true # Second param [hostname] -format = "[$hostname]($style):" +format = "[$hostname]($style)" style = "#b4befe" -trim_at = "." +trim_at = ".local" ssh_only = false disabled = false # Third param [directory] -style = "#fab387" -truncation_length = 0 +style = "#a6e3a1" +truncation_length = 8 truncate_to_repo = true truncation_symbol = "repo: " @@ -30,25 +38,25 @@ deleted = "x" [container] style = "bold #f5c2e7" -format = "[$symbol \\[$name\\]]($style)" +format = "[$symbol \\[ $name \\]]($style) " # Last param in the first line/row [cmd_duration] min_time = 1 style = "#f9e2af" -format = "[$duration]($style)" +format = "duration: [$duration]($style)" disabled = false # Prompt: param 2 [character] format = "$symbol " -success_symbol = " [%%](#94e2d5)" -error_symbol = " [%%](#d20f39)" +success_symbol = " [:](#94e2d5)" +error_symbol = " [:](#d20f39)" vicmd_symbol = " [<](#94e2d5)" # SYMBOLS [status] -format = '[$status_common_meaning$status_signal_name$status]($style)' +format = 'exit status: [$status_common_meaning$status_signal_name$status]($style)' disabled = false style = "bold #ff0000" @@ -61,24 +69,15 @@ symbol = " " [golang] symbol = " " -[nix_shell] -symbol = " " - [nodejs] symbol = " " [package] symbol = " " -[perl] -symbol = " " - [python] symbol = " " -[ruby] -symbol = " " - [rust] symbol = " " diff --git a/.config/systemd/user/container-offlineimap.service b/config/.config/systemd/user/container-offlineimap.service similarity index 100% rename from .config/systemd/user/container-offlineimap.service rename to config/.config/systemd/user/container-offlineimap.service diff --git a/.config/systemd/user/container-offlineimap.timer b/config/.config/systemd/user/container-offlineimap.timer similarity index 100% rename from .config/systemd/user/container-offlineimap.timer rename to config/.config/systemd/user/container-offlineimap.timer diff --git a/config/.config/xonsh/rc.xsh b/config/.config/xonsh/rc.xsh new file mode 100644 index 0000000..d8aa8c1 --- /dev/null +++ b/config/.config/xonsh/rc.xsh @@ -0,0 +1,13 @@ +# XONSH WIZARD START +$ALIAS_COMPLETIONS_OPTIONS_BY_DEFAULT = '1' +$CMD_COMPLETIONS_SHOW_DESC = '1' +$COMMANDS_CACHE_SAVE_INTERMEDIATE = '1' +$SUBSEQUENCE_PATH_COMPLETION = '' +$UPDATE_COMPLETIONS_ON_KEYPRESS = '1' +$XONSH_TRACEBACK_LOGFILE = '/var/home/jas/.config/xonsh/traceback' +xontrib load abbrevs coreutils prompt_ret_code vox +# XONSH WIZARD END + +xontrib load prompt_starship +xontrib load xlsd +xontrib load pipeliner diff --git a/config/.config/xonsh/traceback b/config/.config/xonsh/traceback new file mode 100644 index 0000000..c27ebf2 --- /dev/null +++ b/config/.config/xonsh/traceback @@ -0,0 +1,21 @@ +xonsh.__amalgam__.XonshError: xonsh: subprocess mode: command not found: k +Did you mean one of the following? + [: Command ([) + w: Command (w) + cd: Alias + fg: Alias + bg: Alias +xonsh.__amalgam__.XonshError: xonsh: subprocess mode: command not found: lsd +Did you mean one of the following? + ls: Alias + ld: Command (ld) + ldd: Command (ldd) + dd: Command (dd) + ss: Command (ss) +xonsh.__amalgam__.XonshError: xonsh: subprocess mode: command not found: k +Did you mean one of the following? + [: Command ([) + w: Command (w) + cd: Alias + fg: Alias + bg: Alias diff --git a/.doom.d/config.el b/doom/.doom.d/config.el similarity index 73% rename from .doom.d/config.el rename to doom/.doom.d/config.el index 28c44f0..a7b2ff8 100644 --- a/.doom.d/config.el +++ b/doom/.doom.d/config.el @@ -7,15 +7,14 @@ ;; See 'C-h v doom-font' for documentation and more examples of what they ;; accept. For example: -(if (eq system-type 'darwin) - (setq doom-font (font-spec :family "JetBrainsMono Nerd Font Mono" :size 14) - doom-variable-pitch-font (font-spec :family "Rubik") - doom-unicode-font (font-spec :family "JetBrainsMono Nerd Font Mono" :size 14) - doom-big-font (font-spec :family "JetBrainsMono Nerd Font Mono" :size 14)) - (setq doom-font (font-spec :family "JetBrainsMono Nerd Font Mono" :size 28) - doom-variable-pitch-font (font-spec :family "Rubik") - doom-unicode-font (font-spec :family "JetBrainsMono Nerd Font Mono" :size 28) - doom-big-font (font-spec :family "JetBrainsMono Nerd Font Mono" :size 28))) +(setq doom-font (font-spec :family "JetBrains Mono Nerd Font Mono" :size 28) + doom-variable-pitch-font (font-spec :family "Rubik") + doom-unicode-font (font-spec :family "JetBrains Mono Nerd Font Mono" :size 28) + doom-big-font (font-spec :family "JetBrains Mono Nerd Font Mono" :size 28)) +;; (setq doom-font (font-spec :family "Iosevka" :size 30) +;; doom-variable-pitch-font (font-spec :family "Rubik") +;; doom-unicode-font (font-spec :family "Iosevka" :size 30) +;; doom-big-font (font-spec :family "Iosevka" :size 30)) ;; Use catppuccin-mocha theme (setq doom-theme 'catppuccin-mocha) @@ -85,16 +84,14 @@ Version 2015-08-22" (kill-new (buffer-string)) (delete-region (point-min) (point-max))))) -;; Set Firefox as default web browser -(if (eq system-type 'darwin) - (setq browse-url-browser-function 'browse-url-default-macosx-browser) - (setq browse-url-browser-function 'browse-host-firefox)) - -(defun browse-host-firefox (url &rest ignore) +;; open URL in Firefox +(defun browse-host-firefox (url &rest ignored) "Browse URL with the host's Firefox using distrobox-exec." (interactive "sURL: ") (shell-command (concat "distrobox-host-exec firefox " url))) +(setq browse-url-browser-function 'browse-host-firefox) + ;; after copy Ctrl+c in Linux X11, you can paste by `yank' in emacs (setq select-enable-clipboard t) @@ -133,7 +130,7 @@ If point was already at that position, move point to beginning of line." (add-to-list 'default-frame-alist '(fullscreen . maximized)) ;; mastodon -(setq mastodon-instance-url "https://fosstodon.org" +(setq mastodon-instance-url "https://mastodon.hyperreal.coffee" mastodon-active-user "hyperreal") ;; use gemtext2md to convert gmi to md and move to zola main site directory @@ -146,26 +143,21 @@ to edit frontmatter." (async-shell-command (concat "gemtext2md < " (buffer-file-name) " > " filename)) (find-file filename)) -;; use gemtext2md to convert gmi to md and move to zola reads site directory -(defun gemini-to-zola-reads () - "Convert gmi to md, send to zola reads site content directory, and open file -to edit frontmatter." - (interactive) - (setq filename-prefix "~/Nextcloud/sites/reads.hyperreal.coffee/content/") - (setq filename (concat filename-prefix (file-name-base buffer-file-name) ".md")) - (async-shell-command (concat "gemtext2md < " (buffer-file-name) " > " filename)) - (find-file filename)) - ;; Build zola main site (defun build-zola-main () "Build zola main site." (interactive) (let ((default-directory "~/Nextcloud/sites/hyperreal.coffee")) - (async-shell-command (concat "zola build -o ~/public/html")))) + (shell-command (concat "zola build -o ~/public/html")))) -;; Build zola reads site -(defun build-zola-reads () - "Build zola reads site." +;; rsync the contents of ~/public to web server +(defun rsync-zola-site () + "Rsync the contents of ~/public to web server." (interactive) - (let ((default-directory "~/Nextcloud/sites/reads.hyperreal.coffee")) - (async-shell-command (concat "zola build -o ~/public/reads")))) + (shell-command (concat "rsync -aAX ~/public/ jas@raspberrypi.local:/home/jas/public"))) + +;; keybinds for evil-nerd-commenter +(global-set-key (kbd "M-;") 'evilnc-comment-or-uncomment-lines) +(global-set-key (kbd "C-c l") 'evilnc-quick-comment-or-uncomment-to-the-line) +(global-set-key (kbd "C-c c") 'evilnc-copy-and-comment-lines) +(global-set-key (kbd "C-c p") 'evilnc-comment-or-uncomment-paragraphs) diff --git a/.doom.d/init.el b/doom/.doom.d/init.el similarity index 98% rename from .doom.d/init.el rename to doom/.doom.d/init.el index ad5ea86..0e772df 100644 --- a/.doom.d/init.el +++ b/doom/.doom.d/init.el @@ -135,7 +135,7 @@ ;;fsharp ; ML stands for Microsoft's Language ;;fstar ; (dependent) types and (monadic) effects and Z3 ;;gdscript ; the language you waited for - ;;(go +lsp) ; the hipster dialect + (go +lsp) ; the hipster dialect ;;(graphql +lsp) ; Give queries a REST ;;(haskell +lsp) ; a language that's lazier than I am ;;hy ; readability of scheme w/ speed of python @@ -177,8 +177,8 @@ ;;zig ; C, but simpler :email - ;;(mu4e +org +gmail) - notmuch + ;; (mu4e +org) + ;;notmuch ;;(wanderlust +gmail) :app @@ -186,7 +186,7 @@ ;;emms ;;everywhere ; *leave* Emacs!? You must be joking ;;irc ; how neckbeards socialize - ;;rss ; emacs as an RSS reader + rss ; emacs as an RSS reader ;;twitter ; twitter client https://twitter.com/vnought :config diff --git a/.doom.d/packages.el b/doom/.doom.d/packages.el similarity index 95% rename from .doom.d/packages.el rename to doom/.doom.d/packages.el index 6133557..5fcf504 100644 --- a/.doom.d/packages.el +++ b/doom/.doom.d/packages.el @@ -12,7 +12,7 @@ (package! catppuccin-theme) (package! elpher) ;;(package! gemini :recipe -;; (:host nil :repo "https://git.carcosa.net/jmcbray/gemini.el")) +;; (:host nil :repo "https://git.carcosa.net/jmcbray/gemini.el")) (package! python-docstring) (package! importmagic) (package! systemd) @@ -22,6 +22,8 @@ (package! mastodon) (package! nushell-mode :recipe (:host github :repo "azzamsa/emacs-nushell")) +(package! evil-nerd-commenter) +(package! elfeed-protocol) ;; To install a package directly from a remote git repo, you must specify a ;; `:recipe'. You'll find documentation on what `:recipe' accepts here: diff --git a/.gitconfig b/gitconfig/.gitconfig similarity index 100% rename from .gitconfig rename to gitconfig/.gitconfig diff --git a/local/.local/share/applications/emacs.desktop b/local/.local/share/applications/emacs.desktop new file mode 100644 index 0000000..d4ffc7d --- /dev/null +++ b/local/.local/share/applications/emacs.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=Emacs +GenericName=Text Editor +Comment=Edit text +MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; +Exec=/var/home/jas/bin/emacs %F +Icon=emacs +Type=Application +Terminal=false +Categories=Development;TextEditor; +StartupNotify=true +StartupWMClass=Emacs diff --git a/.local/share/rofi/themes/catppuccin.rasi b/local/.local/share/rofi/themes/catppuccin.rasi similarity index 100% rename from .local/share/rofi/themes/catppuccin.rasi rename to local/.local/share/rofi/themes/catppuccin.rasi diff --git a/.lscolors.sh b/lscolors/.lscolors.sh similarity index 100% rename from .lscolors.sh rename to lscolors/.lscolors.sh diff --git a/tmux/.tmux.conf.local b/tmux/.tmux.conf.local new file mode 100644 index 0000000..cfb8776 --- /dev/null +++ b/tmux/.tmux.conf.local @@ -0,0 +1,418 @@ +# : << EOF +# https://github.com/gpakosz/.tmux +# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license, +# without any warranty. +# Copyright 2012— Gregory Pakosz (@gpakosz). + + +# -- navigation ---------------------------------------------------------------- + +# if you're running tmux within iTerm2 +# - and tmux is 1.9 or 1.9a +# - and iTerm2 is configured to let option key act as +Esc +# - and iTerm2 is configured to send [1;9A -> [1;9D for option + arrow keys +# then uncomment the following line to make Meta + arrow keys mapping work +#set -ga terminal-overrides "*:kUP3=\e[1;9A,*:kDN3=\e[1;9B,*:kRIT3=\e[1;9C,*:kLFT3=\e[1;9D" + +# Appropriate terminal colors +set -g default-terminal "xterm-256color" +set -ga terminal-overrides ",xterm-256color:Tc" + +# -- windows & pane creation --------------------------------------------------- + +# new window retains current path, possible values are: +# - true +# - false (default) +tmux_conf_new_window_retain_current_path=false + +# new pane retains current path, possible values are: +# - true (default) +# - false +tmux_conf_new_pane_retain_current_path=true + +# new pane tries to reconnect ssh sessions (experimental), possible values are: +# - true +# - false (default) +tmux_conf_new_pane_reconnect_ssh=false + +# prompt for session name when creating a new session, possible values are: +# - true +# - false (default) +tmux_conf_new_session_prompt=false + + +# -- display ------------------------------------------------------------------- + +# RGB 24-bit colour support (tmux >= 2.2), possible values are: +# - true +# - false (default) +tmux_conf_24b_colour=true + +# default theme +tmux_conf_theme_colour_1="#080808" # dark gray +tmux_conf_theme_colour_2="#303030" # gray +tmux_conf_theme_colour_3="#8a8a8a" # light gray +tmux_conf_theme_colour_4="#00afff" # light blue +tmux_conf_theme_colour_5="#ffff00" # yellow +tmux_conf_theme_colour_6="#080808" # dark gray +tmux_conf_theme_colour_7="#e4e4e4" # white +tmux_conf_theme_colour_8="#080808" # dark gray +tmux_conf_theme_colour_9="#ffff00" # yellow +tmux_conf_theme_colour_10="#ff00af" # pink +tmux_conf_theme_colour_11="#5fff00" # green +tmux_conf_theme_colour_12="#8a8a8a" # light gray +tmux_conf_theme_colour_13="#e4e4e4" # white +tmux_conf_theme_colour_14="#080808" # dark gray +tmux_conf_theme_colour_15="#080808" # dark gray +tmux_conf_theme_colour_16="#d70000" # red +tmux_conf_theme_colour_17="#e4e4e4" # white + +# default theme (ansi) +#tmux_conf_theme_colour_1="colour0" +#tmux_conf_theme_colour_2="colour8" +#tmux_conf_theme_colour_3="colour8" +#tmux_conf_theme_colour_4="colour14" +#tmux_conf_theme_colour_5="colour11" +#tmux_conf_theme_colour_6="colour0" +#tmux_conf_theme_colour_7="colour15" +#tmux_conf_theme_colour_8="colour0" +#tmux_conf_theme_colour_9="colour11" +#tmux_conf_theme_colour_10="colour13" +#tmux_conf_theme_colour_11="colour10" +#tmux_conf_theme_colour_12="colour8" +#tmux_conf_theme_colour_13="colour15" +#tmux_conf_theme_colour_14="colour0" +#tmux_conf_theme_colour_15="colour0" +#tmux_conf_theme_colour_16="colour1" +#tmux_conf_theme_colour_17="colour15" + +# window style +tmux_conf_theme_window_fg="default" +tmux_conf_theme_window_bg="default" + +# highlight focused pane (tmux >= 2.1), possible values are: +# - true +# - false (default) +tmux_conf_theme_highlight_focused_pane=false + +# focused pane colours: +tmux_conf_theme_focused_pane_bg="$tmux_conf_theme_colour_2" + +# pane border style, possible values are: +# - thin (default) +# - fat +tmux_conf_theme_pane_border_style=thin + +# pane borders colours: +tmux_conf_theme_pane_border="$tmux_conf_theme_colour_2" +tmux_conf_theme_pane_active_border="$tmux_conf_theme_colour_4" + +# pane indicator colours (when you hit + q) +tmux_conf_theme_pane_indicator="$tmux_conf_theme_colour_4" +tmux_conf_theme_pane_active_indicator="$tmux_conf_theme_colour_4" + +# status line style +tmux_conf_theme_message_fg="$tmux_conf_theme_colour_1" +tmux_conf_theme_message_bg="$tmux_conf_theme_colour_5" +tmux_conf_theme_message_attr="bold" + +# status line command style ( : Escape) +tmux_conf_theme_message_command_fg="$tmux_conf_theme_colour_5" +tmux_conf_theme_message_command_bg="$tmux_conf_theme_colour_1" +tmux_conf_theme_message_command_attr="bold" + +# window modes style +tmux_conf_theme_mode_fg="$tmux_conf_theme_colour_1" +tmux_conf_theme_mode_bg="$tmux_conf_theme_colour_5" +tmux_conf_theme_mode_attr="bold" + +# status line style +tmux_conf_theme_status_fg="$tmux_conf_theme_colour_3" +tmux_conf_theme_status_bg="$tmux_conf_theme_colour_1" +tmux_conf_theme_status_attr="none" + +# terminal title +# - built-in variables are: +# - #{circled_window_index} +# - #{circled_session_name} +# - #{hostname} +# - #{hostname_ssh} +# - #{hostname_full} +# - #{hostname_full_ssh} +# - #{username} +# - #{username_ssh} +tmux_conf_theme_terminal_title="[#h] [#S] [#I #W]" + +# window status style +# - built-in variables are: +# - #{circled_window_index} +# - #{circled_session_name} +# - #{hostname} +# - #{hostname_ssh} +# - #{hostname_full} +# - #{hostname_full_ssh} +# - #{username} +# - #{username_ssh} +tmux_conf_theme_window_status_fg="$tmux_conf_theme_colour_3" +tmux_conf_theme_window_status_bg="$tmux_conf_theme_colour_1" +tmux_conf_theme_window_status_attr="none" +tmux_conf_theme_window_status_format="#I #W" +#tmux_conf_theme_window_status_format="#{circled_window_index} #W" +#tmux_conf_theme_window_status_format="#I #W#{?window_bell_flag,🔔,}#{?window_zoomed_flag,🔍,}" + +# window current status style +# - built-in variables are: +# - #{circled_window_index} +# - #{circled_session_name} +# - #{hostname} +# - #{hostname_ssh} +# - #{hostname_full} +# - #{hostname_full_ssh} +# - #{username} +# - #{username_ssh} +tmux_conf_theme_window_status_current_fg="$tmux_conf_theme_colour_1" +tmux_conf_theme_window_status_current_bg="$tmux_conf_theme_colour_4" +tmux_conf_theme_window_status_current_attr="bold" +tmux_conf_theme_window_status_current_format="#I #W" +#tmux_conf_theme_window_status_current_format="#{circled_window_index} #W" +#tmux_conf_theme_window_status_current_format="#I #W#{?window_zoomed_flag,🔍,}" + +# window activity status style +tmux_conf_theme_window_status_activity_fg="default" +tmux_conf_theme_window_status_activity_bg="default" +tmux_conf_theme_window_status_activity_attr="underscore" + +# window bell status style +tmux_conf_theme_window_status_bell_fg="$tmux_conf_theme_colour_5" +tmux_conf_theme_window_status_bell_bg="default" +tmux_conf_theme_window_status_bell_attr="blink,bold" + +# window last status style +tmux_conf_theme_window_status_last_fg="$tmux_conf_theme_colour_4" +tmux_conf_theme_window_status_last_bg="$tmux_conf_theme_colour_2" +tmux_conf_theme_window_status_last_attr="none" + +# status left/right sections separators +#tmux_conf_theme_left_separator_main="" +#tmux_conf_theme_left_separator_sub="|" +#tmux_conf_theme_right_separator_main="" +#tmux_conf_theme_right_separator_sub="|" +# tmux_conf_theme_left_separator_main="\uE0B0" # /!\ you don't need to install Powerline +# tmux_conf_theme_left_separator_sub="\uE0B1" # you only need fonts patched with +# tmux_conf_theme_right_separator_main="\uE0B2" # Powerline symbols or the standalone +# tmux_conf_theme_right_separator_sub="\uE0B3" # PowerlineSymbols.otf font, see README.md +tmux_conf_theme_left_separator_main='\ue0b8' +tmux_conf_theme_left_separator_sub='\ue0b9' +tmux_conf_theme_right_separator_main='\ue0be' +tmux_conf_theme_right_separator_sub='\ue0b9' + +# status left/right content: +# - separate main sections with "|" +# - separate subsections with "," +# - built-in variables are: +# - #{battery_bar} +# - #{battery_hbar} +# - #{battery_percentage} +# - #{battery_status} +# - #{battery_vbar} +# - #{circled_session_name} +# - #{hostname_ssh} +# - #{hostname} +# - #{hostname_full} +# - #{hostname_full_ssh} +# - #{loadavg} +# - #{mouse} +# - #{pairing} +# - #{prefix} +# - #{root} +# - #{synchronized} +# - #{uptime_y} +# - #{uptime_d} (modulo 365 when #{uptime_y} is used) +# - #{uptime_h} +# - #{uptime_m} +# - #{uptime_s} +# - #{username} +# - #{username_ssh} +tmux_conf_theme_status_left="  #S | ↑#{?uptime_y, #{uptime_y}y,}#{?uptime_d, #{uptime_d}d,}#{?uptime_h, #{uptime_h}h,}#{?uptime_m, #{uptime_m}m,} " +tmux_conf_theme_status_right="#{prefix} , %R , %d %b | #{username}#{root} | #{hostname} " + +# status left style +tmux_conf_theme_status_left_fg="$tmux_conf_theme_colour_6,$tmux_conf_theme_colour_7,$tmux_conf_theme_colour_8" +tmux_conf_theme_status_left_bg="$tmux_conf_theme_colour_9,$tmux_conf_theme_colour_10,$tmux_conf_theme_colour_11" +tmux_conf_theme_status_left_attr="bold,none,none" + +# status right style +tmux_conf_theme_status_right_fg="$tmux_conf_theme_colour_12,$tmux_conf_theme_colour_13,$tmux_conf_theme_colour_14" +tmux_conf_theme_status_right_bg="$tmux_conf_theme_colour_15,$tmux_conf_theme_colour_16,$tmux_conf_theme_colour_17" +tmux_conf_theme_status_right_attr="none,none,bold" + +# pairing indicator +tmux_conf_theme_pairing="⚇" # U+2687 +tmux_conf_theme_pairing_fg="none" +tmux_conf_theme_pairing_bg="none" +tmux_conf_theme_pairing_attr="none" + +# prefix indicator +tmux_conf_theme_prefix="⌨" # U+2328 +tmux_conf_theme_prefix_fg="none" +tmux_conf_theme_prefix_bg="none" +tmux_conf_theme_prefix_attr="none" + +# mouse indicator +tmux_conf_theme_mouse="↗" # U+2197 +tmux_conf_theme_mouse_fg="none" +tmux_conf_theme_mouse_bg="none" +tmux_conf_theme_mouse_attr="none" + +# root indicator +tmux_conf_theme_root="ﲂ" +tmux_conf_theme_root_fg="none" +tmux_conf_theme_root_bg="none" +tmux_conf_theme_root_attr="bold,blink" + +# synchronized indicator +tmux_conf_theme_synchronized="⚏" # U+268F +tmux_conf_theme_synchronized_fg="none" +tmux_conf_theme_synchronized_bg="none" +tmux_conf_theme_synchronized_attr="none" + +# battery bar symbols +#tmux_conf_battery_bar_symbol_full="◼" +#tmux_conf_battery_bar_symbol_empty="◻" +tmux_conf_battery_bar_symbol_full="♥" +tmux_conf_battery_bar_symbol_empty="·" + +# battery bar length (in number of symbols), possible values are: +# - auto +# - a number, e.g. 5 +tmux_conf_battery_bar_length="auto" + +# battery bar palette, possible values are: +# - gradient (default) +# - heat +# - "colour_full_fg,colour_empty_fg,colour_bg" +tmux_conf_battery_bar_palette="gradient" +#tmux_conf_battery_bar_palette="#d70000,#e4e4e4,#000000" # red, white, black + +# battery hbar palette, possible values are: +# - gradient (default) +# - heat +# - "colour_low,colour_half,colour_full" +tmux_conf_battery_hbar_palette="gradient" +#tmux_conf_battery_hbar_palette="#d70000,#ff5f00,#5fff00" # red, orange, green + +# battery vbar palette, possible values are: +# - gradient (default) +# - heat +# - "colour_low,colour_half,colour_full" +tmux_conf_battery_vbar_palette="gradient" +#tmux_conf_battery_vbar_palette="#d70000,#ff5f00,#5fff00" # red, orange, green + +# symbols used to indicate whether battery is charging or discharging +tmux_conf_battery_status_charging="↑" # U+2191 +tmux_conf_battery_status_discharging="↓" # U+2193 +#tmux_conf_battery_status_charging="🔌" # U+1F50C +#tmux_conf_battery_status_discharging="🔋" # U+1F50B + +# clock style (when you hit + t) +# you may want to use %I:%M %p in place of %R in tmux_conf_theme_status_right +tmux_conf_theme_clock_colour="$tmux_conf_theme_colour_4" +tmux_conf_theme_clock_style="24" + + +# -- clipboard ----------------------------------------------------------------- + +# in copy mode, copying selection also copies to the OS clipboard +# - true +# - false (default) +# on macOS, this requires installing reattach-to-user-namespace, see README.md +# on Linux, this requires xsel or xclip +tmux_conf_copy_to_os_clipboard=true + + +# -- user customizations ------------------------------------------------------- +# this is the place to override or undo settings + +# increase history size +#set -g history-limit 10000 + +# start with mouse mode enabled +#set -g mouse on + +# force Vi mode +# really you should export VISUAL or EDITOR environment variable, see manual +#set -g status-keys vi +#set -g mode-keys vi + +# replace C-b by C-a instead of using both prefixes +# set -gu prefix2 +# unbind C-a +# unbind C-b +# set -g prefix C-a +# bind C-a send-prefix + +# move status line to top +#set -g status-position top + +# -- tpm ----------------------------------------------------------------------- + +# while I don't use tpm myself, many people requested official support so here +# is a seamless integration that automatically installs plugins in parallel + +# whenever a plugin introduces a variable to be used in 'status-left' or +# 'status-right', you can use it in 'tmux_conf_theme_status_left' and +# 'tmux_conf_theme_status_right' variables. + +# by default, launching tmux will update tpm and all plugins +# - true (default) +# - false +tmux_conf_update_plugins_on_launch=true +tmux_conf_uninstall_plugins_on_reload=true +# by default, reloading the configuration will update tpm and all plugins +# - true (default) +# - false +tmux_conf_update_plugins_on_reload=true + +# /!\ do not add set -g @plugin 'tmux-plugins/tpm' +# /!\ do not add run '~/.tmux/plugins/tpm/tpm' + +# to enable a plugin, use the 'set -g @plugin' syntax: +# visit https://github.com/tmux-plugins for available plugins +#set -g @plugin 'tmux-plugins/tmux-copycat' +#set -g @plugin 'tmux-plugins/tmux-cpu' +#set -g @plugin 'tmux-plugins/tmux-resurrect' +#set -g @plugin 'tmux-plugins/tmux-continuum' +#set -g @continuum-restore 'on' + + +# -- custom variables ---------------------------------------------------------- + +# to define a custom #{foo} variable, define a POSIX shell function between the +# '# EOF' and the '# "$@"' lines. Please note that the opening brace { character +# must be on the same line as the function name otherwise the parse won't detect +# it. +# +# then, use #{foo} in e.g. the 'tmux_conf_theme_status_left' or the +# 'tmux_conf_theme_status_right' variables. + +# # /!\ do not remove the following line +# EOF +# +# # /!\ do not "uncomment" the functions: the leading "# " characters are needed +# +# weather() { +# curl -m 1 wttr.in?format=3 2>/dev/null +# sleep 900 # sleep for 15 minutes, throttle network requests whatever the value of status-interval +# } +# +# online() { +# ping -c 1 1.1.1.1 >/dev/null 2>&1 && printf '✔' || printf '✘' +# } +# +# "$@" +# # /!\ do not remove the previous line +# +themes_folder='~/.config/oh-my-tmux/themes/' +theme="catppuccin_mocha.conf" + +if "[ -d ${themes_folder} ]" "source ${themes_folder}${theme}" diff --git a/.zshenv b/zsh/.zshenv similarity index 79% rename from .zshenv rename to zsh/.zshenv index 8b69f67..99f6bc1 100644 --- a/.zshenv +++ b/zsh/.zshenv @@ -22,13 +22,23 @@ path+=("/bin" "/sbin" "/usr/bin" "/usr/sbin") export PATH # Setup pager -if [[ -x $(which most) ]]; then - export PAGER="most" - export MANPAGER="most" -else - export PAGER="less -X" - export MANPAGER="less -iMXF" -fi +export PAGER="less -X" + +# Setup manpages +export MANWIDTH="88" +export MANROFFOPT="-c" +export MANPAGER="less -X" + +# Have less display colours +# from: https://wiki.archlinux.org/index.php/Color_output_in_console#man +export LESS_TERMCAP_mb=$'\e[1;31m' # begin bold +export LESS_TERMCAP_md=$'\e[1;34m' # begin blink +export LESS_TERMCAP_so=$'\e[01;0;33m' # begin reverse video +export LESS_TERMCAP_us=$'\e[01;31m' # begin underline +export LESS_TERMCAP_me=$'\e[0m' # reset bold/blink +export LESS_TERMCAP_se=$'\e[0m' # reset reverse video +export LESS_TERMCAP_ue=$'\e[0m' # reset underline +export GROFF_NO_SGR=1 # for konsole and gnome-terminal # Editor - emacs else nano if test -x "$(command -v emacs)"; then diff --git a/.zshrc b/zsh/.zshrc similarity index 89% rename from .zshrc rename to zsh/.zshrc index b559885..144cdbd 100644 --- a/.zshrc +++ b/zsh/.zshrc @@ -63,12 +63,12 @@ zplug "plugins/sudo", from:oh-my-zsh # systemd aliases zplug "plugins/systemd", from:oh-my-zsh -# Directory bookmarks using FZF -zplug "urbainvaes/fzf-marks" - # Load file from ~/.zshrc.d zplug "~/.zshrc.d", from:local, use:'*' +# Load prompt theme +zplug "nojhan/liquidprompt" + if ! zplug check; then zplug install; exec $SHELL $SHELL_ARGS "$@" @@ -78,13 +78,3 @@ zplug load # lscolors.sh export LS_COLORS=$(cat ~/.lscolors.sh) - -# linuxbrew if on moonshadow.local -if [ "$(hostname)" = "moonshadow.local" ]; then - eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" -fi - -# starship.rs -if [ -x "$(command -v starship)" ]; then - eval "$(starship init zsh)" -fi diff --git a/.zshrc.d/aliases.zsh b/zsh/.zshrc.d/aliases.zsh similarity index 100% rename from .zshrc.d/aliases.zsh rename to zsh/.zshrc.d/aliases.zsh diff --git a/.zshrc.d/bindings.zsh b/zsh/.zshrc.d/bindings.zsh similarity index 56% rename from .zshrc.d/bindings.zsh rename to zsh/.zshrc.d/bindings.zsh index 92d60e4..74605bb 100644 --- a/.zshrc.d/bindings.zsh +++ b/zsh/.zshrc.d/bindings.zsh @@ -14,6 +14,29 @@ if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop fi +## check if fzf keybindings file exists +if test -f /home/jas/.fzf/shell/key-bindings.zsh; then + source /home/jas/.fzf/shell/key-bindings.zsh + + page-up-within-tmux() { + if (( ${+TMUX} )); then + tmux copy-mode -u + fi + } + zle -N page-up-within-tmux + + # page up + bindkey "${terminfo[kpp]}" page-up-within-tmux +fi + +## keybinding for convenient viewing of man pages +if test -x "${HOME}/bin/tman"; then + tman-widget() { "${HOME}/bin/tman"} + zle -N tman-widget + + bindkey '^[m' tman-widget +fi + ## history substring search bindkey '^[[1;5A' history-substring-search-up bindkey '^[[1;5B' history-substring-search-down diff --git a/.zshrc.d/catppuccin-zsh-syntax-highlighting.zsh b/zsh/.zshrc.d/catppuccin-zsh-syntax-highlighting.zsh similarity index 100% rename from .zshrc.d/catppuccin-zsh-syntax-highlighting.zsh rename to zsh/.zshrc.d/catppuccin-zsh-syntax-highlighting.zsh diff --git a/zsh/.zshrc.d/functions.zsh b/zsh/.zshrc.d/functions.zsh new file mode 100644 index 0000000..844585e --- /dev/null +++ b/zsh/.zshrc.d/functions.zsh @@ -0,0 +1,133 @@ +# Create a bookmark. +function mark() { + + if ! test -f "${HOME}/.shellmarks"; then + touch "${HOME}/.shellmarks" + fi + + mark_to_add="$(pwd)" + + if grep -qxFe "${mark_to_add}" "${HOME}/.shellmarks"; then + gum style \ + --foreground 210 \ + --margin "1 2" \ + "This bookmark already exists: ${mark_to_add}" + else + echo "${mark_to_add}" >> "${HOME}/.shellmarks" + gum style \ + --foreground "#73F59F" \ + --margin "1 2" \ + "${mark_to_add} added to shellmarks file" + fi + + return 0 +} + +# Remove bookmarks. +function delmark() { + selection=$(cat "${HOME}/.shellmarks" | gum choose --no-limit) + + if test -n "${selection}"; then + while read -r line; do + perl -n -i -e "print unless /^\\Q${line//\//\\/}\\E\$/" "${HOME}/.shellmarks" + done <<< "${selection}" + else + return 0 + fi + + gum format -t markdown -- \ + "# The following bookmarks were deleted:" \ + "$(printf "%s\n" "${selection}")" + + return 0 +} + +# Goto a bookmark. +function gotomark() { + if ! test -f "${HOME}/.shellmarks"; then + echo "No bookmarks exist yet. Add some!" + return 1 + fi + + echo + builtin cd $(cat "${HOME}/.shellmarks" | gum choose --limit=1) + + local precmd + for precmd in $precmd_functions; do + $precmd + done + zle && zle reset-prompt +} +zle -N gotomark +bindkey '^[g' gotomark + +# Choose a directory from the directory stack. +function dstack() { + echo "# Choose a directory" | gum format -t markdown + selection=$(dirs -lp | gum choose --limit=1) + cd $selection +} + +# Print timestamp as %Y-%m-%d %H:%M:%S. +function tstamp() { + emulate -L zsh + date '+%Y-%m-%d %H:%M:%S' +} + +# Print timestamp as %Y-%m-%dT%H:%M:%S%:z +function tstampz() { + emulate -L zsh + date '+%Y-%m-%dT%H:%M:%S%:z' +} + +# Create a /overview/ of all available function()'s; the description for +# each funtion() *must* be the first line above the string `function'! +# Otherwise it wont work. +# Display all function()'s with their descriptions. +function funlist() { + grep -B 1 "^function" $HOME/.zshrc.d/functions.zsh | \ + grep -v "^\-\-$" | \ + awk '{ if(/^#/) { gsub(/^#[:space:]*/, ""); ht=$0 }; getline; gsub(/ ?\(\)/, ":"); printf("-> %-20s %s\n", $2, ht); }' | \ + sort -u -k 3 +} + +# zrmcomp() remove *.zwc files. +function zrmcomp() { + local i + for i in ${HOME}/*.zwc(N); do + printf "Removing $i\n" + command rm -f $i + done +} + +# grep(1)'ing $HISTFILE. +function histgrep () { fc -fl -m "*(#i)$1*" 1 | grep -i --color $1 } + +# Invoke this every time you change .zshrc to recompile it. +function src() { + autoload -U zrecompile + [ -f ~/.zshrc ] && zrecompile -p ~/.zshrc + [ -f ~/.zcompdump ] && zrecompile -p ~/.zcompdump + [ -f ~/.zcompdump ] && zrecompile -p ~/.zcompdump + [ -f ~/.zshrc.zwc.old ] && command rm -f ~/.zshrc.zwc.old + [ -f ~/.zcompdump.zwc.old ] && command rm -f ~/.zcompdump.zwc.old + source ~/.zshrc +} + +# Do an ls after cd. +function cd() { builtin cd "$@" && ls; } + +# Create new directory and enter it. +function mkd() { mkdir -p "$@" && cd "$_"; } + +# Display pids of commands. +function pids() { pgrep -a "$@"; } + +# zshall manpage. +function manzsh() { /usr/bin/man zshall | most +/"$1" ; } + +# Restart zsh. +function restart() { exec $SHELL $SHELL_ARGS "$@"; } + +# cd to ~, clear screen, and restart zsh. +function rsrc() { cd && clear && restart; } diff --git a/.zshrc.d/fzf.zsh b/zsh/.zshrc.d/fzf.zsh similarity index 56% rename from .zshrc.d/fzf.zsh rename to zsh/.zshrc.d/fzf.zsh index 70506f6..a132f1d 100644 --- a/.zshrc.d/fzf.zsh +++ b/zsh/.zshrc.d/fzf.zsh @@ -10,20 +10,3 @@ export FZF_COMPLETION_TRIGGER="~~" ## default source for fzf export FZF_DEFAULT_COMMAND="fd --type f --hidden --follow --exclude .git" - -## keybinding for fzf-marks -bindkey '\eg' fzm - -## page up within tmux enters scroll mode -if [ -f ~/.fzf/shell/keybindings.zsh ]; then - source ~/.fzf/shell/keybindings.zsh - - page-up-within-tmux() { - if (( ${+TMUX} )); then - tmux copy-mode -u - fi - } - zle -N page-up-within-tmux - - bindkey "${terminfo[kpp]}" page-up-within-tmux -fi diff --git a/.zshrc.d/options.zsh b/zsh/.zshrc.d/options.zsh similarity index 100% rename from .zshrc.d/options.zsh rename to zsh/.zshrc.d/options.zsh