diff options
| author | czjstmax <jstmaxlol@disroot.org> | 2026-05-16 17:13:57 +0200 |
|---|---|---|
| committer | czjstmax <jstmaxlol@disroot.org> | 2026-05-16 17:13:57 +0200 |
| commit | fcd2c8c3de5778632f023d95ba55d9a9067ae2f2 (patch) | |
| tree | 56c3ab3bc89fa5e798cea122a163a840458d474e /cfg | |
| parent | 882d198df77701a16e94f6c6f3766f299abbaced (diff) | |
new prompt
Signed-off-by: czjstmax <jstmaxlol@disroot.org>
Diffstat (limited to 'cfg')
| -rw-r--r-- | cfg/fish/config.fish | 38 | ||||
| -rw-r--r-- | cfg/fish/fish_prompt.fish | 41 | ||||
| -rw-r--r-- | cfg/fish/fish_prompt.fish.old | 25 | ||||
| -rw-r--r-- | cfg/fish/fish_right_prompt.fish.old | 32 |
4 files changed, 107 insertions, 29 deletions
diff --git a/cfg/fish/config.fish b/cfg/fish/config.fish index 0181e17..33d182a 100644 --- a/cfg/fish/config.fish +++ b/cfg/fish/config.fish @@ -1,6 +1,5 @@ # ~/.config/fish/config.fish if status is-interactive - # ENVIRONMENT VARIABLES set -x EDITOR nvim set -x VISUAL nvim @@ -20,25 +19,22 @@ if status is-interactive keychain id_ed25519 keychain D9B423C43C7416D7 source ~/.keychain/(hostname)-fish - - #set -gx SSH_AUTH_SOCK (gpgconf --list-dirs agent-ssh-socket) - - function fuck -d "correct your previous console command" - set -l fucked_up_command $history[1] - env TF_SHELL=fish TF_ALIAS=fuck PYTHONIOENCODING=utf-8 thefuck $fucked_up_command THEFUCK_ARGUMENT_PLACEHOLDER $argv | read -l unfucked_command - if [ "$unfucked_command" != "" ] - eval $unfucked_command - builtin history delete --exact --case-sensitive -- $fucked_up_command - builtin history merge - end - end # ALIASES alias v nvim alias b bat - alias s sudo + alias p paru + alias s 'sudo -E' + alias mt 'sudo -E mount' + alias umt 'sudo -E umount' alias ff fastfetch + alias newb newsboat + alias l 'lsd -lah' + alias ll 'lsd -ah' + alias uvolt 'sudo intel-undervolt' + alias uvoltrc 'sudo -E nvim /etc/intel-undervolt.conf' alias nf nfetch + alias lsb 'lsblk -fap' alias lg lazygit alias irs irssi alias irc irs @@ -93,8 +89,6 @@ if status is-interactive alias svcs "systemctl list-units --type=service --state=running" alias wlanPwrSaveOn "sudo -E iw dev wlan0 set power_save on" alias wlanPwrSaveOff "sudo -E iw dev wlan0 set power_save off" - alias cpuPwrSaveOn "sudo -E cpupower frequency-set -g powersave" - alias cpuPwrSaveOff "sudo -E cpupower frequency-set -g performance" # sudo systemctl * { alias starts "sudo -E systemctl start" alias ustarts "systemctl --user start" @@ -121,8 +115,6 @@ if status is-interactive alias uedits "systemctl --user edit" # } alias tsf "tailscale funnel" - alias finf "cpupower frequency-info" - alias fset "sudo cpupower frequency-set -u" alias xcp "xclip -selection clipboard" alias tmx tmux alias bye "systemctl poweroff" @@ -146,6 +138,16 @@ if status is-interactive alias detach-sign 'gpg --detach-sign' alias cacafire_term 'DISPLAY= cacafire' alias startkmx 'sudo kmscon --login --no-switchvt --drm --mouse --hwaccel --xkb-layout=us --font-name=Iosevka --font-size=16 --xkb-options=caps:escape,compose:ralt --font-antialiasing=full --vt' + alias montemp 'watch -n1 "sensors && echo && cat /sys/class/thermal/thermal_zone*/temp"' + function fuck -d "correct your previous console command" + set -l fucked_up_command $history[1] + env TF_SHELL=fish TF_ALIAS=fuck PYTHONIOENCODING=utf-8 thefuck $fucked_up_command THEFUCK_ARGUMENT_PLACEHOLDER $argv | read -l unfucked_command + if [ "$unfucked_command" != "" ] + eval $unfucked_command + builtin history delete --exact --case-sensitive -- $fucked_up_command + builtin history merge + end + end end diff --git a/cfg/fish/fish_prompt.fish b/cfg/fish/fish_prompt.fish index 916e276..b14256f 100644 --- a/cfg/fish/fish_prompt.fish +++ b/cfg/fish/fish_prompt.fish @@ -5,21 +5,40 @@ function fish_prompt if test "$cwd" = "$home" # if in ~ - echo -e (set_color white)"╭"(set_color red)"("(set_color white)"$user" \ - (set_color red)"⮞"(set_color white)"⮞"(set_color red)"⮞" \ - (set_color white)"~"(set_color red)")"(set_color red)"\n╰"(set_color normal)"⮞ " - # ╭(max⮞⮞⮞~) - # ╰⮞ + echo -e (set_color white)"("(set_color red)"$user"(set_color white)" at "(set_color red)"~"(set_color white)")\n" \ + (set_color white)"λ "(set_color normal) + # max at ~ + # λ else if string match -q "$home/*" $cwd set -l relative (string replace "$home/" "~/" $cwd) + set -l parts (string split "/" $relative) + set -l colored "" + + for p in $parts + if test -n "$p" + set colored $colored(set_color white)$p(set_color red)"/" + end + end + + set colored (string trim -r -c "/" $colored) + # if in a ~ subdir - echo -e (set_color white)"╭"(set_color red)"("(set_color white)"$user" \ - (set_color red)"⮞"(set_color white)"⮞"(set_color red)"⮞" \ - (set_color white)$relative(set_color red)")"(set_color red)"\n╰"(set_color normal)"⮞ " + echo -e (set_color white)"("(set_color red)"$user"(set_color white)" at "(set_color red)"$colored"(set_color white)")\n" \ + (set_color white)"λ "(set_color normal) else + set -l parts (string split "/" $cwd) + set -l colored "" + + for p in $parts + if test -n "$p" + set colored $colored(set_color white)$p(set_color red)"/" + end + end + + set colored (string trim -r -c "/" $colored) + set colored (set_color red)"#"$colored # if in any other dir - echo -e (set_color white)"╭"(set_color red)"("(set_color white)"$user" \ - (set_color red)"⮞"(set_color white)"⮞"(set_color red)"⮞" \ - (set_color white)$cwd(set_color red)")"(set_color red)"\n╰"(set_color normal)"⮞ " + echo -e (set_color white)"("(set_color red)"$user"(set_color white)" at "(set_color red)"$colored"(set_color white)")\n" \ + (set_color white)"λ "(set_color normal) end end diff --git a/cfg/fish/fish_prompt.fish.old b/cfg/fish/fish_prompt.fish.old new file mode 100644 index 0000000..916e276 --- /dev/null +++ b/cfg/fish/fish_prompt.fish.old @@ -0,0 +1,25 @@ +function fish_prompt + set -l user $USER + set -l cwd $PWD + set -l home $HOME + + if test "$cwd" = "$home" + # if in ~ + echo -e (set_color white)"╭"(set_color red)"("(set_color white)"$user" \ + (set_color red)"⮞"(set_color white)"⮞"(set_color red)"⮞" \ + (set_color white)"~"(set_color red)")"(set_color red)"\n╰"(set_color normal)"⮞ " + # ╭(max⮞⮞⮞~) + # ╰⮞ + else if string match -q "$home/*" $cwd + set -l relative (string replace "$home/" "~/" $cwd) + # if in a ~ subdir + echo -e (set_color white)"╭"(set_color red)"("(set_color white)"$user" \ + (set_color red)"⮞"(set_color white)"⮞"(set_color red)"⮞" \ + (set_color white)$relative(set_color red)")"(set_color red)"\n╰"(set_color normal)"⮞ " + else + # if in any other dir + echo -e (set_color white)"╭"(set_color red)"("(set_color white)"$user" \ + (set_color red)"⮞"(set_color white)"⮞"(set_color red)"⮞" \ + (set_color white)$cwd(set_color red)")"(set_color red)"\n╰"(set_color normal)"⮞ " + end +end diff --git a/cfg/fish/fish_right_prompt.fish.old b/cfg/fish/fish_right_prompt.fish.old new file mode 100644 index 0000000..df41686 --- /dev/null +++ b/cfg/fish/fish_right_prompt.fish.old @@ -0,0 +1,32 @@ +function fish_right_prompt + set last_status $status + + # check for which color to use + if test $last_status -eq 0 + set color white + else + set color red + end + + # set inverse color + if test $color = "white" + set colorInverse red + else + set color white + end + + # set date in dt + #set dt $(date '+%Y-%m-%d') + + # set battery capacity in bat + set bat $(cat /sys/class/power_supply/BAT0/capacity) + + # move up a line + echo -e "\e[1A" + # print prompt + echo -e (set_color $colorInverse)"( "(set_color $color)"stat.$last_status"(set_color $colorInverse)" | " \ + (set_color $color)"bat.$bat%"(set_color $colorInverse) " )" + #(set_color $color)"$dt"(set_color $colorInverse)" )" + # go back one line so the user doesn't overwrite fish_prompt + echo -e "\e[1B" +end |