transfer fish/alacritty to homemanager
This commit is contained in:
@@ -39,6 +39,99 @@
|
|||||||
zip
|
zip
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# MOVE TO IT's OWN PLACE
|
||||||
|
programs.fish = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
functions.fish_greeting = "";
|
||||||
|
functions.fish_prompt = ''
|
||||||
|
function 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 " "$prompt_status $suffix " "
|
||||||
|
end
|
||||||
|
|
||||||
|
function prompt_pwd --description 'short CWD for the prompt'
|
||||||
|
set -l options h/help d/dir-length= D/full-length-dirs=
|
||||||
|
argparse -n prompt_pwd $options -- $argv
|
||||||
|
or return
|
||||||
|
|
||||||
|
if set -q _flag_help
|
||||||
|
__fish_print_help prompt_pwd
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
set -q argv[1]
|
||||||
|
or set argv $PWD
|
||||||
|
|
||||||
|
set -ql _flag_d
|
||||||
|
and set -l fish_prompt_pwd_dir_length $_flag_d
|
||||||
|
|
||||||
|
set -q fish_prompt_pwd_dir_length
|
||||||
|
or set -l fish_prompt_pwd_dir_length 1
|
||||||
|
|
||||||
|
set -l fulldirs 0
|
||||||
|
set -ql _flag_D
|
||||||
|
and set -l fish_prompt_pwd_full_dirs $_flag_D
|
||||||
|
|
||||||
|
set -q fish_prompt_pwd_full_dirs
|
||||||
|
or set -l fish_prompt_pwd_full_dirs 1
|
||||||
|
|
||||||
|
for path in $argv
|
||||||
|
# Replace $HOME with "~"
|
||||||
|
set -l realhome (string escape --style=regex -- ~)
|
||||||
|
set -l tmp (string replace -r '^'"$realhome"'($|/)' '~$1' $path)
|
||||||
|
|
||||||
|
if test "$fish_prompt_pwd_dir_length" -eq 0
|
||||||
|
echo $tmp
|
||||||
|
else
|
||||||
|
# Shorten to at most $fish_prompt_pwd_dir_length characters per directory
|
||||||
|
# with full-length-dirs components left at full length.
|
||||||
|
set -l full
|
||||||
|
if test $fish_prompt_pwd_full_dirs -gt 0
|
||||||
|
set -l all (string split -m (math $fish_prompt_pwd_full_dirs - 1) -r / $tmp)
|
||||||
|
set tmp $all[1]
|
||||||
|
set full $all[2..]
|
||||||
|
else if test $fish_prompt_pwd_full_dirs -eq 0
|
||||||
|
# 0 means not even the last component is kept
|
||||||
|
string replace -ar '(\.?[^/]{'"$fish_prompt_pwd_dir_length"'})[^/]*' '$1' $tmp
|
||||||
|
continue
|
||||||
|
end
|
||||||
|
|
||||||
|
string join / -- (string replace -ar -- '(\.?[^/]{'"$fish_prompt_pwd_dir_length"'})[^/]*/' '$1/' $tmp) $full
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
@@ -55,16 +148,32 @@
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.alacritty = {
|
||||||
|
enable = true;
|
||||||
|
theme = "catpuccin_frappe";
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
terminal.shell = "fish";
|
||||||
|
|
||||||
|
font = {
|
||||||
|
normal.family = "UbuntuMono Nerd Font";
|
||||||
|
normal.italic = "UbuntuMono Nerd Font";
|
||||||
|
normal.bold = "UbuntuMono Nerd Font";
|
||||||
|
size = 16;
|
||||||
|
};
|
||||||
|
|
||||||
|
window = {
|
||||||
|
decorations = "full";
|
||||||
|
opacity = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
# user program config files
|
# user program config files
|
||||||
home.file = {
|
home.file = {
|
||||||
".config/hypr".source = ./roy-config/hypr;
|
".config/hypr".source = ./roy-config/hypr;
|
||||||
".config/waybar".source = ./roy-config/waybar;
|
".config/waybar".source = ./roy-config/waybar;
|
||||||
|
|
||||||
# Fish cries if whole dir is managed
|
|
||||||
".config/fish/config.fish".source = ./roy-config/fish/config.fish;
|
|
||||||
".config/fish/functions".source = ./roy-config/fish/functions;
|
|
||||||
".config/fish/fish_variables".source = ./roy-config/fish/fish_variables;
|
|
||||||
|
|
||||||
".config/alacritty".source = ./roy-config/alacritty;
|
".config/alacritty".source = ./roy-config/alacritty;
|
||||||
".local/share/PrismLauncher/instances/1.21.6/minecraft/options.txt".source =
|
".local/share/PrismLauncher/instances/1.21.6/minecraft/options.txt".source =
|
||||||
./roy-config/PrismLauncher/instances/1.21.6/minecraft/options.txt;
|
./roy-config/PrismLauncher/instances/1.21.6/minecraft/options.txt;
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
[general]
|
|
||||||
import = [
|
|
||||||
"~/.config/alacritty/catppuccin-frappe.toml"
|
|
||||||
]
|
|
||||||
|
|
||||||
[terminal]
|
|
||||||
shell = "fish"
|
|
||||||
|
|
||||||
[font]
|
|
||||||
normal = { family = "UbuntuMono Nerd Font" }
|
|
||||||
italic = { family = "UbuntuMono Nerd Font" }
|
|
||||||
bold = { family = "UbuntuMono Nerd Font" }
|
|
||||||
size = 16
|
|
||||||
|
|
||||||
[window]
|
|
||||||
decorations = "full"
|
|
||||||
opacity = 1
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
[colors.primary]
|
|
||||||
background = "#303446"
|
|
||||||
foreground = "#c6d0f5"
|
|
||||||
dim_foreground = "#838ba7"
|
|
||||||
bright_foreground = "#c6d0f5"
|
|
||||||
|
|
||||||
[colors.cursor]
|
|
||||||
text = "#303446"
|
|
||||||
cursor = "#f2d5cf"
|
|
||||||
|
|
||||||
[colors.vi_mode_cursor]
|
|
||||||
text = "#303446"
|
|
||||||
cursor = "#babbf1"
|
|
||||||
|
|
||||||
[colors.search.matches]
|
|
||||||
foreground = "#303446"
|
|
||||||
background = "#a5adce"
|
|
||||||
|
|
||||||
[colors.search.focused_match]
|
|
||||||
foreground = "#303446"
|
|
||||||
background = "#a6d189"
|
|
||||||
|
|
||||||
[colors.footer_bar]
|
|
||||||
foreground = "#303446"
|
|
||||||
background = "#a5adce"
|
|
||||||
|
|
||||||
[colors.hints.start]
|
|
||||||
foreground = "#303446"
|
|
||||||
background = "#e5c890"
|
|
||||||
|
|
||||||
[colors.hints.end]
|
|
||||||
foreground = "#303446"
|
|
||||||
background = "#a5adce"
|
|
||||||
|
|
||||||
[colors.selection]
|
|
||||||
text = "#303446"
|
|
||||||
background = "#f2d5cf"
|
|
||||||
|
|
||||||
[colors.normal]
|
|
||||||
black = "#51576d"
|
|
||||||
red = "#e78284"
|
|
||||||
green = "#a6d189"
|
|
||||||
yellow = "#e5c890"
|
|
||||||
blue = "#8caaee"
|
|
||||||
magenta = "#f4b8e4"
|
|
||||||
cyan = "#81c8be"
|
|
||||||
white = "#b5bfe2"
|
|
||||||
|
|
||||||
[colors.bright]
|
|
||||||
black = "#626880"
|
|
||||||
red = "#e78284"
|
|
||||||
green = "#a6d189"
|
|
||||||
yellow = "#e5c890"
|
|
||||||
blue = "#8caaee"
|
|
||||||
magenta = "#f4b8e4"
|
|
||||||
cyan = "#81c8be"
|
|
||||||
white = "#a5adce"
|
|
||||||
|
|
||||||
[[colors.indexed_colors]]
|
|
||||||
index = 16
|
|
||||||
color = "#ef9f76"
|
|
||||||
|
|
||||||
[[colors.indexed_colors]]
|
|
||||||
index = 17
|
|
||||||
color = "#f2d5cf"
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
if status is-interactive
|
|
||||||
# Commands to run in interactive sessions can go here
|
|
||||||
end
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
# This file contains fish universal variable definitions.
|
|
||||||
# VERSION: 3.0
|
|
||||||
SETUVAR __fish_initialized:3800
|
|
||||||
SETUVAR fish_color_autosuggestion:brblack
|
|
||||||
SETUVAR fish_color_cancel:\x2dr
|
|
||||||
SETUVAR fish_color_command:normal
|
|
||||||
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:white\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_prompt_pwd_dir_length:100
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
function fish_greeting
|
|
||||||
# echo (set_color yellow)(date +%T)
|
|
||||||
end
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
function 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 " "$prompt_status $suffix " "
|
|
||||||
end
|
|
||||||
|
|
||||||
function prompt_pwd --description 'short CWD for the prompt'
|
|
||||||
set -l options h/help d/dir-length= D/full-length-dirs=
|
|
||||||
argparse -n prompt_pwd $options -- $argv
|
|
||||||
or return
|
|
||||||
|
|
||||||
if set -q _flag_help
|
|
||||||
__fish_print_help prompt_pwd
|
|
||||||
return 0
|
|
||||||
end
|
|
||||||
|
|
||||||
set -q argv[1]
|
|
||||||
or set argv $PWD
|
|
||||||
|
|
||||||
set -ql _flag_d
|
|
||||||
and set -l fish_prompt_pwd_dir_length $_flag_d
|
|
||||||
|
|
||||||
set -q fish_prompt_pwd_dir_length
|
|
||||||
or set -l fish_prompt_pwd_dir_length 1
|
|
||||||
|
|
||||||
set -l fulldirs 0
|
|
||||||
set -ql _flag_D
|
|
||||||
and set -l fish_prompt_pwd_full_dirs $_flag_D
|
|
||||||
|
|
||||||
set -q fish_prompt_pwd_full_dirs
|
|
||||||
or set -l fish_prompt_pwd_full_dirs 1
|
|
||||||
|
|
||||||
for path in $argv
|
|
||||||
# Replace $HOME with "~"
|
|
||||||
set -l realhome (string escape --style=regex -- ~)
|
|
||||||
set -l tmp (string replace -r '^'"$realhome"'($|/)' '~$1' $path)
|
|
||||||
|
|
||||||
if test "$fish_prompt_pwd_dir_length" -eq 0
|
|
||||||
echo $tmp
|
|
||||||
else
|
|
||||||
# Shorten to at most $fish_prompt_pwd_dir_length characters per directory
|
|
||||||
# with full-length-dirs components left at full length.
|
|
||||||
set -l full
|
|
||||||
if test $fish_prompt_pwd_full_dirs -gt 0
|
|
||||||
set -l all (string split -m (math $fish_prompt_pwd_full_dirs - 1) -r / $tmp)
|
|
||||||
set tmp $all[1]
|
|
||||||
set full $all[2..]
|
|
||||||
else if test $fish_prompt_pwd_full_dirs -eq 0
|
|
||||||
# 0 means not even the last component is kept
|
|
||||||
string replace -ar '(\.?[^/]{'"$fish_prompt_pwd_dir_length"'})[^/]*' '$1' $tmp
|
|
||||||
continue
|
|
||||||
end
|
|
||||||
|
|
||||||
string join / -- (string replace -ar -- '(\.?[^/]{'"$fish_prompt_pwd_dir_length"'})[^/]*/' '$1/' $tmp) $full
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
Reference in New Issue
Block a user