refactor home/tiling
refactor home/terminal refactor home/apps refactor home/services refactor home/games
This commit is contained in:
parent
8c43814c4e
commit
52f48ab978
31 changed files with 39 additions and 21 deletions
28
home/terminal/fish_functions/fish-prompt.fish
Normal file
28
home/terminal/fish_functions/fish-prompt.fish
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
source ~/.config/fish/colors.fish
|
||||
set -l last_status $status
|
||||
set -l nix_shell_info (
|
||||
if test -n "$IN_NIX_SHELL"
|
||||
echo -n "<nix-shell> "
|
||||
end
|
||||
)
|
||||
set -g color_user $color_sky
|
||||
set -g color_host $color_red
|
||||
set -g color_cwd $color_green
|
||||
|
||||
# Set host color based on hostname
|
||||
if test (hostname) = peach
|
||||
set -g color_host $color_accent
|
||||
else if test (hostname) = alien
|
||||
set -g color_host $color_accent
|
||||
else if test (hostname) = vm
|
||||
set -g color_host $color_accent
|
||||
set -g color_cwd normal
|
||||
else if test (uname) = Darwin
|
||||
set -g color_host $color_yellow
|
||||
end
|
||||
|
||||
set -l user_host (set_color $color_user)"$USER"(set_color normal)"@"(set_color $color_host)(prompt_hostname)(set_color normal)
|
||||
set -l cwd (set_color $color_cwd)(prompt_pwd)(set_color normal)
|
||||
set -l git_info (fish_git_prompt)
|
||||
echo -s "$user_host" " " "$cwd" "$git_info $nix_shell_info"
|
||||
echo -n -s "> "
|
||||
5
home/terminal/fish_functions/kitty-ssh.fish
Normal file
5
home/terminal/fish_functions/kitty-ssh.fish
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
if set -q KITTY_WINDOW_ID
|
||||
kitty +kitten ssh $argv
|
||||
else
|
||||
command ssh $argv
|
||||
end
|
||||
5
home/terminal/fish_functions/logout.fish
Normal file
5
home/terminal/fish_functions/logout.fish
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
if status is-login
|
||||
builtin exit
|
||||
else
|
||||
/run/current-system/sw/bin/qdbus org.kde.Shutdown /Shutdown org.kde.Shutdown.logout
|
||||
end
|
||||
5
home/terminal/fish_functions/nix-shell.fish
Normal file
5
home/terminal/fish_functions/nix-shell.fish
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
if test (count $argv) -eq 0
|
||||
command nix-shell --run fish
|
||||
else
|
||||
command nix-shell --run fish $argv
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue