Add common fish

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
Georg Pfuetzenreuter 2025-04-29 11:02:44 +02:00
parent 84c310dbd7
commit 014f60da35
Signed by: Georg
GPG Key ID: 1ED2F138E7E6FF57
7 changed files with 58 additions and 0 deletions

View File

@ -1,4 +1,5 @@
include:
- profile.zypper
- profile.fish
- profile.quilt
- profile.vim

View File

@ -0,0 +1,3 @@
function fish_greeting
echo "<3"
end

View File

@ -0,0 +1,7 @@
if status is-interactive
fish_add_path -aP ~/bin
set -x SSH_AUTH_SOCK "$(gpgconf --list-dirs agent-ssh-socket)"
set -x QT_STYLE_OVERRIDE Adwaita-Dark
end

View File

@ -0,0 +1,23 @@
function envsource
if test "$argv[1]" = '-e'
set -f envfile "$argv[2]"
else
set -f envfile "$argv[1]"
end
if not test -f "$envfile"
echo "Unable to load $envfile"
return 1
end
while read line
if not string match -qr '^#|^$' "$line"
set item (string split -m 1 '=' $line)
if test "$argv[1]" = '-e'
set -e $item[1]
echo "Deleted key $item[1]"
else
set -gx $item[1] $item[2]
echo "Exported key $item[1]"
end
end
end < "$envfile"
end

View File

@ -0,0 +1,3 @@
function heroespass -w 'PASSWORD_STORE_DIR=~/Work/git/pass-opensuse pass' -d 'Shared pass store'
PASSWORD_STORE_GPG_OPTS='--trust-model always' PASSWORD_STORE_DIR=~/Work/git/pass-opensuse pass $argv
end

View File

@ -0,0 +1,3 @@
function up
curl -sT $argv https://hugz.io/ | sed s/http/https/
end

18
salt/profile/fish.sls Normal file
View File

@ -0,0 +1,18 @@
fish_package:
pkg.installed:
- name: fish
fish_files:
file.recurse:
- clean: true
- names:
- /etc/fish/conf.d:
- source: salt://files/etc/fish/conf.d
- /home/georg/.config/fish:
- source: salt://files/home/georg/.config/fish
- exclude_pat:
# empty
- completions
- conf.d
# I set exported variables in config.fish, this hence mostly contains universal default variables
- fish_variables