add terminal settings

This commit is contained in:
fbachus
2024-11-08 18:52:35 +01:00
parent fae4da8315
commit 6ea752e214
16 changed files with 2742 additions and 0 deletions

68
.config/fish/config.fish Executable file
View File

@@ -0,0 +1,68 @@
# Configure Jump
# status --is-interactive; and source (jump shell fish | psub)
# Load all saved ssh keys
#/usr/bin/ssh-add >> &/dev/null&
eval (ssh-agent -c)
function last_history_item
echo $history[1]
end
# add abbreviations
abbr -a -- gcp git cherry-pick
abbr -a -- gs git status
abbr -a -- lgb git lgb
abbr -a !! --position anywhere --function last_history_item
abbr -a mksilent --position anywhere "&>/dev/null&"
abbr -a inbg --position anywhere "&>/dev/null& && jobs | disown"
abbr -a -- rm-orphans "sudo pacman -Qtdq | sudo pacman -Rns -"
abbr -a -- screenl "systemctl hybrid-sleep && hyprlock &>/dev/null&"
abbr -a -- tree "eza -T"
abbr -a -- trd "eza -T -D"
abbr -a -- trl "eza -T -L "
abbr -a -- trld "eza -T -D -L "
abbr -a -- trdl "eza -T -D -L "
abbr -a "packagelist-update" "pacman -Qe | sed 's/ .*//g' | tee ~/Sync/explicitly_installed"
abbr -a "nvim-headless-update" 'nvim --headless "+Lazy! sync" +qa'
abbr -a "nvim-headless-clean" 'nvim --headless "+Lazy! clean" +qa'
alias ll "eza -lh"
alias la "eza -lha"
alias ls "eza"
# Fish syntax highlighting
set -g fish_color_autosuggestion '555' 'brblack'
set -g fish_color_cancel -r
set -g fish_color_command --bold
set -g fish_color_comment red
set -g fish_color_cwd green
set -g fish_color_cwd_root red
set -g fish_color_end brmagenta
set -g fish_color_error brred
set -g fish_color_escape 'bryellow' '--bold'
set -g fish_color_history_current --bold
set -g fish_color_host normal
set -g fish_color_match --background=brblue
set -g fish_color_normal normal
set -g fish_color_operator bryellow
set -g fish_color_param cyan
set -g fish_color_quote yellow
set -g fish_color_redirection brblue
set -g fish_color_search_match 'bryellow' '--background=brblack'
set -g fish_color_selection 'white' '--bold' '--background=brblack'
set -g fish_color_user brgreen
set -g fish_color_valid_path --underline
# exports, execute only once and manually
# set -Ux RUSTC_WRAPPER sccache
# set -Ux ELECTRON_OZONE_PLATFORM_HINT wayland
starship init fish | source
zoxide init --cmd cd fish | source
# pnpm
set -gx PNPM_HOME "/home/felix/.local/share/pnpm"
if not string match -q -- $PNPM_HOME $PATH
set -gx PATH "$PNPM_HOME" $PATH
end
# pnpm end

View File

@@ -0,0 +1,63 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR --export BAT_THEME:OneHalfDark
SETUVAR --export EDITOR:nvim
SETUVAR --export ELECTRON_OSZONE_PLATFORM_HINT:wayland
SETUVAR --export ELECTRON_OZONE_PLATFORM_HINT:wayland
SETUVAR FLASK_ENV:development
SETUVAR --export --path GODOT_ADDON_PATH:\x7e/\x2elocal/share/godot/addons
SETUVAR LANG:en_GB\x2eUTF\x2d8
SETUVAR LANGUAGE:en_GB\x2eUTF\x2d8
SETUVAR --export LAST_DIR:/home/felix/Code/CODE/tutorials/rust_web_server
SETUVAR --export MY_GITLAB_TOKEN:glpat\x2dye6rAJswy24rQcRNnmLo
SETUVAR --export RUSTC_WRAPPER:sccache
SETUVAR --export SUDO_ASKPASS:/usr/bin/ksshaskpass
SETUVAR TERMINAL_FONT_SIZE:14
SETUVAR --export VISUAL_EDITOR:nvim
SETUVAR __fish_initialized:3400
SETUVAR _fish_abbr_audio_2D_switch:\x7e/Code/scripts/alsa\x2dfp\x2dswitch\x2esh
SETUVAR _fish_abbr_clera:clear
SETUVAR _fish_abbr_current_2D_project:vim\x20Code/side/first_rust_gui
SETUVAR _fish_abbr_secscreen:\x2e/Code/scripts/act_second_monitor\x2esh
SETUVAR _fish_abbr_uin:sudo\x20pacman\x20\x2dRuscn
SETUVAR fish_color_autosuggestion:969896
SETUVAR fish_color_cancel:\x2d\x2dreverse
SETUVAR fish_color_command:b294bb
SETUVAR fish_color_comment:f0c674
SETUVAR fish_color_cwd:green
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:b294bb
SETUVAR fish_color_error:cc6666
SETUVAR fish_color_escape:00a6b2
SETUVAR fish_color_history_current:\x2d\x2dbold
SETUVAR fish_color_host:normal
SETUVAR fish_color_host_remote:\x1d
SETUVAR fish_color_keyword:\x1d
SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue
SETUVAR fish_color_normal:normal
SETUVAR fish_color_operator:00a6b2
SETUVAR fish_color_option:\x1d
SETUVAR fish_color_param:81a2be
SETUVAR fish_color_quote:b5bd68
SETUVAR fish_color_redirection:8abeb7
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_greeting:Welcome\x20to\x20fish\x2c\x20the\x20friendly\x20interactive\x20shell\x0aType\x20\x60help\x60\x20for\x20instructions\x20on\x20how\x20to\x20use\x20fish
SETUVAR fish_key_bindings:fish_default_key_bindings
SETUVAR fish_pager_color_background:\x1d
SETUVAR fish_pager_color_completion:normal
SETUVAR fish_pager_color_description:B3A06D
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_secondary_background:\x1d
SETUVAR fish_pager_color_secondary_completion:\x1d
SETUVAR fish_pager_color_secondary_description:\x1d
SETUVAR fish_pager_color_secondary_prefix:\x1d
SETUVAR fish_pager_color_selected_background:\x2d\x2dbackground\x3dbrblack
SETUVAR fish_pager_color_selected_completion:\x1d
SETUVAR fish_pager_color_selected_description:\x1d
SETUVAR fish_pager_color_selected_prefix:\x1d
SETUVAR fish_user_paths:/home/felix/\x2ecargo/bin

View File

@@ -0,0 +1,3 @@
function fish_greeting
fortune -a vimtips billwurtz
end

View File

@@ -0,0 +1,19 @@
function fish_prompt --description 'Informative prompt'
#Save the return status of the previous command
set -l last_pipestatus $pipestatus
switch "$USER"
case root toor
printf '%s@%s %s%s%s# ' $USER (prompt_hostname) (set -q fish_color_cwd_root
and set_color $fish_color_cwd_root
or set_color $fish_color_cwd) \
(prompt_pwd) (set_color normal)
case '*'
set -l pipestatus_string (__fish_print_pipestatus "[" "] " "|" (set_color $fish_color_status) \
(set_color --bold $fish_color_status) $last_pipestatus)
printf '[%s] %s%s@%s %s%s %s%s%s \f\r> ' (date "+%H:%M:%S") (set_color brblue) \
$USER (prompt_hostname) (set_color $fish_color_cwd) $PWD $pipestatus_string \
(set_color normal)
end
end

View File

@@ -0,0 +1,4 @@
function restart --argument x
pkill $x && $x &>/dev/null& && jobs | disown
end

View File

@@ -0,0 +1,6 @@
function setscreenb --argument x
for i in (seq 1 2)
sudo ddcutil setvcp 10 $x -d $i
end
end

View File

@@ -0,0 +1,4 @@
function silentstart --argument x
$x &>/dev/null& && sleep 1 && jobs | disown
end