diff options
author | Rose <rose@pinkro.se> | 2025-10-10 11:29:10 +0200 |
---|---|---|
committer | Rose <rose@pinkro.se> | 2025-10-10 11:29:10 +0200 |
commit | b7dfa5fdb2330f1e1cd222365055c3d45ad473be (patch) | |
tree | 78e455c8c43c6c00fc4639932ba7315e8c074cd3 /fish/Config | |
parent | 98424148dfe9ab666ee928df7565e65faa41b61b (diff) | |
download | dotfiles-main.tar.gz dotfiles-main.tar.bz2 |
Diffstat (limited to 'fish/Config')
-rw-r--r-- | fish/Config/fish/config.fish | 37 | ||||
-rw-r--r-- | fish/Config/fish/fish_variables | 32 | ||||
-rw-r--r-- | fish/Config/fish/functions/fish_greeting.fish | 5 | ||||
-rw-r--r-- | fish/Config/fish/functions/fish_prompt.fish | 42 |
4 files changed, 116 insertions, 0 deletions
diff --git a/fish/Config/fish/config.fish b/fish/Config/fish/config.fish new file mode 100644 index 0000000..af29a37 --- /dev/null +++ b/fish/Config/fish/config.fish @@ -0,0 +1,37 @@ +if status is-interactive + alias w='dbus-run-session startxfce4 --wayland niri --session' + alias :vpn='doas /etc/init.d/wg-quick.vpn ' + alias :launch launch.sh + alias :media mediactl.sh + alias :sys sysctls.sh + alias :firefox "launch.sh firefox-bin" + alias :music "launch.sh qmmp" + alias :edit "launch.sh foot emacs -nw" + alias :files "launch.sh thunar" + alias :git git.sh + alias :upload upload.sh + alias :ytdlp "yt-dlp (wl-paste)" + alias :download "curl -SL (wl-paste) -o" + alias :play "mpv --keep-open (wl-paste) > /tmp/mpvout" + if test (hostname) = "cherryblossom" + alias :phone "sshfs defaultuser@tulip:/home/defaultuser Phone -o allow_other" + end + if test (hostname) = "bamboo" + alias :vm vm.sh + alias :launchvm launchvm.sh + alias :edge "launchvm.sh microsoft-edge-stable --ozone-platform=wayland" + end + #alias w='dbus-run-session startplasma-wayland' + #alias w='dbus-run-session sway' + # Commands to run in interactive sessions can go here +end +set SSH_AUTH_SOCK $XDG_RUNTIME_DIR/hissh-agent +set EDITOR emacs +set GPG_TTY (tty) +export SSH_AUTH_SOCK +export EDITOR +export GPG_TTY + +#if test "$TERM" = "xterm-kitty" +# tput cup $COLUMNS 0 +#end diff --git a/fish/Config/fish/fish_variables b/fish/Config/fish/fish_variables new file mode 100644 index 0000000..72fe39c --- /dev/null +++ b/fish/Config/fish/fish_variables @@ -0,0 +1,32 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR __fish_initialized:3400 +SETUVAR fish_color_autosuggestion:brblack +SETUVAR fish_color_cancel:\x2dr +SETUVAR fish_color_command:blue +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:bryellow\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 +SETUVAR fish_user_paths:/home/lain/\x2elocal/bin diff --git a/fish/Config/fish/functions/fish_greeting.fish b/fish/Config/fish/functions/fish_greeting.fish new file mode 100644 index 0000000..3b024f3 --- /dev/null +++ b/fish/Config/fish/functions/fish_greeting.fish @@ -0,0 +1,5 @@ +function fish_greeting + if test "$TERM" != "xterm-kitty" + /home/lain/.local/bin/nofetch + end +end diff --git a/fish/Config/fish/functions/fish_prompt.fish b/fish/Config/fish/functions/fish_prompt.fish new file mode 100644 index 0000000..3a5c04d --- /dev/null +++ b/fish/Config/fish/functions/fish_prompt.fish @@ -0,0 +1,42 @@ +function fish_prompt + if test "$TERM" = "xterm-kitty" + tput cup 0 0 + pwd + tput cup $COLUMNS 0 + echo -n "] " + else + orig_fish_prompt + end +end + +function orig_fish_prompt --description 'Write out the prompt' + set -l last_pipestatus $pipestatus + set -lx __fish_last_status $status # Export for __fish_print_pipestatus. + set -l normal (set_color normal) + set -q fish_color_status + or set -g fish_color_status red + + # Color the prompt differently when we're root + set -l color_cwd $fish_color_cwd + set -l suffix '%' + if functions -q fish_is_root_user; and fish_is_root_user + if set -q fish_color_cwd_root + set color_cwd $fish_color_cwd_root + end + set suffix '%' + end + + # Write pipestatus + # If the status was carried over (if no command is issued or if `set` leaves the status untouched), don't bold it. + set -l bold_flag --bold + set -q __fish_prompt_status_generation; or set -g __fish_prompt_status_generation $status_generation + if test $__fish_prompt_status_generation = $status_generation + set bold_flag + end + set __fish_prompt_status_generation $status_generation + set -l status_color (set_color $fish_color_status) + set -l statusb_color (set_color $bold_flag $fish_color_status) + set -l prompt_status (__fish_print_pipestatus "[" "]" "|" "$status_color" "$statusb_color" $last_pipestatus) + + echo -n -s (prompt_login)' ' (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) $normal " "$suffix " " +end |