Added fish shell config

This commit is contained in:
alvinlollo
2026-05-08 21:21:33 +10:00
parent 0d8a50e8bd
commit 3d4731e61e
12 changed files with 214 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
# Auto start Hyprland on tty1
if test -z "$DISPLAY" ;and test "$XDG_VTNR" -eq 1
mkdir -p ~/.cache
exec start-hyprland > ~/.cache/hyprland.log 2>&1
end
@@ -0,0 +1,14 @@
# This file was created by fish when upgrading to version 4.3, to migrate
# the 'fish_key_bindings' variable from its old default scope (universal)
# to its new default scope (global). We recommend you delete this file
# and configure key bindings in ~/.config/fish/config.fish if needed.
# set --global fish_key_bindings fish_default_key_bindings
# Prior to version 4.3, fish shipped an event handler that runs
# `set --universal fish_key_bindings fish_default_key_bindings`
# whenever the fish_key_bindings variable is erased.
# This means that as long as any fish < 4.3 is still running on this system,
# we cannot complete the migration.
# As a workaround, erase the universal variable at every shell startup.
set --erase --universal fish_key_bindings
@@ -0,0 +1,14 @@
# This file was created by fish when upgrading to version 4.3, to migrate
# the 'fish_key_bindings' variable from its old default scope (universal)
# to its new default scope (global). We recommend you delete this file
# and configure key bindings in ~/.config/fish/config.fish if needed.
# set --global fish_key_bindings fish_default_key_bindings
# Prior to version 4.3, fish shipped an event handler that runs
# `set --universal fish_key_bindings fish_default_key_bindings`
# whenever the fish_key_bindings variable is erased.
# This means that as long as any fish < 4.3 is still running on this system,
# we cannot complete the migration.
# As a workaround, erase the universal variable at every shell startup.
set --erase --universal fish_key_bindings
@@ -0,0 +1,37 @@
# This file was created by fish when upgrading to version 4.3, to migrate
# theme variables from universal to global scope.
# Don't edit this file, as it will be written by the web-config tool (`fish_config`).
# To customize your theme, delete this file and see
# help interactive#syntax-highlighting
# or
# man fish-interactive | less +/^SYNTAX.HIGHLIGHTING
# for appropriate commands to add to ~/.config/fish/config.fish instead.
# See also the release notes for fish 4.3.0 (run `help relnotes`).
set --global fish_color_autosuggestion 555 brblack
set --global fish_color_cancel -r
set --global fish_color_command blue
set --global fish_color_comment red
set --global fish_color_cwd green
set --global fish_color_cwd_root red
set --global fish_color_end green
set --global fish_color_error brred
set --global fish_color_escape brcyan
set --global fish_color_history_current --bold
set --global fish_color_host normal
set --global fish_color_host_remote yellow
set --global fish_color_normal normal
set --global fish_color_operator brcyan
set --global fish_color_param cyan
set --global fish_color_quote yellow
set --global fish_color_redirection cyan --bold
set --global fish_color_search_match --background=111
set --global fish_color_selection white --bold --background=brblack
set --global fish_color_status red
set --global fish_color_user brgreen
set --global fish_color_valid_path --underline
set --global fish_pager_color_completion normal
set --global fish_pager_color_description B3A06D yellow -i
set --global fish_pager_color_prefix cyan --bold --underline
set --global fish_pager_color_progress brwhite --background=cyan
set --global fish_pager_color_selected_background -r
@@ -0,0 +1,37 @@
# This file was created by fish when upgrading to version 4.3, to migrate
# theme variables from universal to global scope.
# Don't edit this file, as it will be written by the web-config tool (`fish_config`).
# To customize your theme, delete this file and see
# help interactive#syntax-highlighting
# or
# man fish-interactive | less +/^SYNTAX.HIGHLIGHTING
# for appropriate commands to add to ~/.config/fish/config.fish instead.
# See also the release notes for fish 4.3.0 (run `help relnotes`).
set --global fish_color_autosuggestion 555 brblack
set --global fish_color_cancel -r
set --global fish_color_command blue
set --global fish_color_comment red
set --global fish_color_cwd green
set --global fish_color_cwd_root red
set --global fish_color_end green
set --global fish_color_error brred
set --global fish_color_escape brcyan
set --global fish_color_history_current --bold
set --global fish_color_host normal
set --global fish_color_host_remote yellow
set --global fish_color_normal normal
set --global fish_color_operator brcyan
set --global fish_color_param cyan
set --global fish_color_quote yellow
set --global fish_color_redirection cyan --bold
set --global fish_color_search_match --background=111
set --global fish_color_selection white --bold --background=brblack
set --global fish_color_status red
set --global fish_color_user brgreen
set --global fish_color_valid_path --underline
set --global fish_pager_color_completion normal
set --global fish_pager_color_description B3A06D yellow -i
set --global fish_pager_color_prefix cyan --bold --underline
set --global fish_pager_color_progress brwhite --background=cyan
set --global fish_pager_color_selected_background -r
+48
View File
@@ -0,0 +1,48 @@
# Commands to run in interactive sessions can go here
if status is-interactive
# No greeting
set fish_greeting
# Use starship
function starship_transient_prompt_func
starship module character
end
if test "$TERM" != "linux"
starship init fish | source
enable_transience
end
# Colors
if test -f ~/.local/state/quickshell/user/generated/terminal/sequences.txt
cat ~/.local/state/quickshell/user/generated/terminal/sequences.txt
end
# Aliases
# kitty doesn't clear properly so we need to do this weird printing
alias clear "printf '\033[2J\033[3J\033[1;1H'"
alias celar "printf '\033[2J\033[3J\033[1;1H'"
alias claer "printf '\033[2J\033[3J\033[1;1H'"
alias pamcan pacman
alias q 'qs -c ii'
if test "$TERM" != "linux"
alias ls 'eza --icons'
end
if test "$TERM" = "xterm-kitty"
alias ssh 'kitten ssh'
end
end
set -gx PATH $HOME/.local/bin $HOME/bin /usr/local/bin /usr/bin $PATH
export WAYLAND_DISPLAY=$WAYLAND_DISPLAY
export XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR
# Homebrew (If installed)
if test -f "/home/linusbrew/.linuxbrew/bin/brew"
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv zsh)"
end
# Ydotool
if test -f "/tmp/.ydotool_socket"
set -gx YDOTOOL_SOCKET /tmp/.ydotool_socket
end
+6
View File
@@ -0,0 +1,6 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR __fish_initialized:4300
SETUVAR _fisher_jorgebucaran_2F_fisher_files:\x7e/\x2econfig/fish/functions/fisher\x2efish\x1e\x7e/\x2econfig/fish/completions/fisher\x2efish
SETUVAR _fisher_plugins:jorgebucaran/fisher
SETUVAR _fisher_upgraded_to_4_4:\x1d
+3
View File
@@ -0,0 +1,3 @@
function edit --wraps=nvim --description 'alias edit=nvim'
nvim $argv
end
+3
View File
@@ -0,0 +1,3 @@
function lzd --wraps=lazydocker --description 'alias lzd=lazydocker'
lazydocker $argv
end
+3
View File
@@ -0,0 +1,3 @@
function precmd --wraps="print -Pn '\\e]133;D;%?\\a\\e]133;A\\a'" --description "alias precmd=print -Pn '\\e]133;D;%?\\a\\e]133;A\\a'"
print -Pn '\e]133;D;%?\a\e]133;A\a' $argv
end
+3
View File
@@ -0,0 +1,3 @@
function preexec --wraps="print -Pn '\\e]133;B\\a\\e]133;C\\a'" --description "alias preexec=print -Pn '\\e]133;B\\a\\e]133;C\\a'"
print -Pn '\e]133;B\a\e]133;C\a' $argv
end
+41
View File
@@ -0,0 +1,41 @@
function update --description 'Automatically finds binarys and uses update commands'
if command -v pacman >/dev/null && command -v yay >/dev/null
echo "✅ 'pacman' and 'yay' found. Updating."
sudo pacman -Syu --noconfirm
yay -Syu --sudoloop --save --answerclean None --answerdiff None --noconfirm
else if command -v pacman >/dev/null
echo "✅ 'pacman' found. Updating."
sudo pacman -Syu --noconfirm
end
if command -v paru >/dev/null
echo "✅ 'paru' found. Updating."
paru -Syu
end
if command -v apt >/dev/null
echo "✅ 'apt' found. Updating."
sudo apt update && sudo apt full-upgrade -y
end
if command -v hyprpm >/dev/null
echo "✅ 'hyprpm' found. Updating."
hyprpm reload
sleep 2
hyprpm update
end
if command -v flatpak >/dev/null
echo "✅ 'flatpak' found. Updating."
flatpak update -y
end
if command -v npm >/dev/null
echo "✅ 'npm' found. Updating."
sudo npm install -g npm-check-updates
end
if command -v omz >/dev/null
omz update
end
end