summaryrefslogtreecommitdiff
path: root/fish
diff options
context:
space:
mode:
authorsophie <sophies@disroot.org>2026-08-30 19:59:05 +0200
committersophie <sophies@disroot.org>2026-08-30 19:59:05 +0200
commit34c54513085340fa1ef1e9feb8cca29999a9654a (patch)
tree265eb942ad6e9d84080f6a46b29eb6e40bce0457 /fish
init
Diffstat (limited to 'fish')
-rw-r--r--fish/.config/fish/config.fish83
-rw-r--r--fish/.config/fish/fish_variables31
2 files changed, 114 insertions, 0 deletions
diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish
new file mode 100644
index 0000000..efc8542
--- /dev/null
+++ b/fish/.config/fish/config.fish
@@ -0,0 +1,83 @@
+# Stinkpot Fish integration
+# (The exact generated contents depend on the stinkpot module.)
+
+set -g fish_greeting ""
+
+fortune -s | cowsay
+echo
+
+# Aliases
+alias ll "ls -la"
+alias vial "Vial"
+alias sudo "echo use doas faggot"
+
+# Functions
+
+function webpush
+ if test (count $argv) -eq 0
+ echo "usage: webpush <commit msg>"
+ return 1
+ end
+
+ set -l msg "$argv"
+ ssh raspi "cd /var/www/html && got add -R . ; got commit -m '$msg' && got send"
+end
+
+function gg
+ set -l gitdir (git rev-parse --git-dir 2>/dev/null)
+
+ if test -z "$gitdir"
+ echo "gg: not a git repo"
+ return 1
+ end
+
+ set -l anchor "$gitdir/gg-anchor"
+
+ if not test -e $anchor
+ git rev-parse HEAD > $anchor
+ end
+
+ git add -A
+ git commit -m "squash"
+end
+
+function gottem
+ got add -R . 2>/dev/null
+
+ got status | awk '/^!/ {print $2}' | while read -l f
+ got remove -f "$f"
+ end
+
+ got status
+end
+
+function gs
+ set -l gitdir (git rev-parse --git-dir 2>/dev/null)
+ set -l anchor "$gitdir/gg-anchor"
+
+ if test -e $anchor
+ git reset --soft (cat $anchor)
+ rm $anchor
+
+ else if git rev-parse --abbrev-ref --symbolic-full-name '@{u}' >/dev/null 2>&1
+ git reset --soft (git merge-base HEAD (git rev-parse --abbrev-ref --symbolic-full-name '@{u}'))
+
+ else
+ git reset --soft (git rev-list --max-parents=0 HEAD | tail -n 1)
+ end
+
+ git commit -m "squash_final"
+end
+
+function mkcd
+ mkdir -p $argv[1]
+ cd $argv[1]
+end
+
+function clip
+ if test (count $argv) -eq 0
+ cat | xclip -selection clipboard
+ else
+ $argv | xclip -selection clipboard
+ end
+end
diff --git a/fish/.config/fish/fish_variables b/fish/.config/fish/fish_variables
new file mode 100644
index 0000000..74b1ee1
--- /dev/null
+++ b/fish/.config/fish/fish_variables
@@ -0,0 +1,31 @@
+# This file contains fish universal variable definitions.
+# VERSION: 3.0
+SETUVAR __fish_initialized:3800
+SETUVAR fish_color_autosuggestion:brblack
+SETUVAR fish_color_cancel:\x2dr
+SETUVAR fish_color_command:normal
+SETUVAR fish_color_comment:red
+SETUVAR fish_color_cwd:green
+SETUVAR fish_color_cwd_root:red
+SETUVAR fish_color_end:green
+SETUVAR fish_color_error:brred
+SETUVAR fish_color_escape:brcyan
+SETUVAR fish_color_history_current:\x2d\x2dbold
+SETUVAR fish_color_host:normal
+SETUVAR fish_color_host_remote:yellow
+SETUVAR fish_color_normal:normal
+SETUVAR fish_color_operator:brcyan
+SETUVAR fish_color_param:cyan
+SETUVAR fish_color_quote:yellow
+SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold
+SETUVAR fish_color_search_match:white\x1e\x2d\x2dbackground\x3dbrblack
+SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
+SETUVAR fish_color_status:red
+SETUVAR fish_color_user:brgreen
+SETUVAR fish_color_valid_path:\x2d\x2dunderline
+SETUVAR fish_key_bindings:fish_default_key_bindings
+SETUVAR fish_pager_color_completion:normal
+SETUVAR fish_pager_color_description:yellow\x1e\x2di
+SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
+SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
+SETUVAR fish_pager_color_selected_background:\x2dr