initial release
This commit is contained in:
1 parent
96ab3df34e
commit
9876e39216
57 files changed
+5301
-1
No files matched your search
@@ -0,0 +1,102 @@
|
||||
# ~/.config/fish/config.fish
|
||||
# Breeze-Dark-Farbschema für fish
|
||||
|
||||
# ---------- PATH ----------
|
||||
# opencode
|
||||
if test -d "$HOME/.opencode/bin"; and not contains -- "$HOME/.opencode/bin" $PATH
|
||||
set -gx PATH "$HOME/.opencode/bin" $PATH
|
||||
end
|
||||
|
||||
# Node.js (nvm)
|
||||
# Standardversion aus ~/.nvm/alias/default ableiten, damit der Pfad auch
|
||||
# nach einem nvm-Versionswechsel stimmt ("26", "v26.13.0", "lts/*").
|
||||
set -gx NVM_DIR "$HOME/.nvm"
|
||||
if test -d "$HOME/.nvm/versions/node"
|
||||
set -l nvm_alias
|
||||
if test -f "$HOME/.nvm/alias/default"
|
||||
set nvm_alias (string trim < "$HOME/.nvm/alias/default")
|
||||
end
|
||||
# Verschachtelte Aliase wie lts/* -> lts/lithium -> v26.13.0 auflösen
|
||||
for i in 1 2 3
|
||||
test -n "$nvm_alias"; or break
|
||||
test -f "$HOME/.nvm/alias/$nvm_alias"; or break
|
||||
set nvm_alias (string trim < "$HOME/.nvm/alias/$nvm_alias")
|
||||
end
|
||||
|
||||
set -l nvm_matches
|
||||
if test -n "$nvm_alias"
|
||||
for d in "$HOME"/.nvm/versions/node/v$nvm_alias.* "$HOME"/.nvm/versions/node/$nvm_alias
|
||||
test -x "$d/bin/node"; and set -a nvm_matches $d
|
||||
end
|
||||
end
|
||||
# Ohne auflösbaren Alias: neueste installierte Version nehmen
|
||||
if test (count $nvm_matches) -eq 0
|
||||
for d in "$HOME"/.nvm/versions/node/*/
|
||||
test -x "$d/bin/node"; and set -a nvm_matches (string trim -r -c / -- $d)
|
||||
end
|
||||
end
|
||||
|
||||
if test (count $nvm_matches) -gt 0
|
||||
set -l nvm_bin (printf '%s\n' $nvm_matches | sort -V | tail -n 1)/bin
|
||||
if not contains -- "$nvm_bin" $PATH
|
||||
set -gx PATH "$nvm_bin" $PATH
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Eigene Skripte
|
||||
if test -d "$HOME/.local/bin"; and not contains -- "$HOME/.local/bin" $PATH
|
||||
set -gx PATH "$HOME/.local/bin" $PATH
|
||||
end
|
||||
|
||||
# Flatpak-Programme (z. B. org.mozilla.firefox)
|
||||
for dir in /var/lib/flatpak/exports/bin "$HOME/.local/share/flatpak/exports/bin"
|
||||
if test -d "$dir"; and not contains -- "$dir" $PATH
|
||||
set -gx PATH $PATH "$dir"
|
||||
end
|
||||
end
|
||||
|
||||
# Systemwerkzeuge aus sbin (z. B. gparted, adduser, halt, blkid)
|
||||
for dir in /usr/local/sbin /usr/sbin /sbin
|
||||
if test -d "$dir"; and not contains -- "$dir" $PATH
|
||||
set -gx PATH $PATH "$dir"
|
||||
end
|
||||
end
|
||||
|
||||
# ---------- X11 / XWayland ----------
|
||||
# SSH-Sitzungen haben kein DISPLAY. labwc stellt XWayland auf :0 bereit,
|
||||
# damit X11-Programme (als Benutzer) auf dem Desktop erscheinen.
|
||||
# Für als root gestartete X11-Programme reicht DISPLAY nicht; GParted
|
||||
# nutzt stattdessen die Wayland-Anzeige (siehe /usr/sbin/gparted).
|
||||
if not set -q DISPLAY; and test -S /tmp/.X11-unix/X0
|
||||
set -gx DISPLAY :0
|
||||
end
|
||||
|
||||
if status is-interactive
|
||||
set -gx EDITOR nano
|
||||
set -gx VISUAL nano
|
||||
set -gx PAGER less
|
||||
set -gx MANPAGER 'less -R'
|
||||
set -gx TERMINAL kitty
|
||||
|
||||
# Pfadanzeige im Prompt: vollständig, aber mit ~ abgekürzt
|
||||
set -g fish_prompt_pwd_dir_length 0
|
||||
|
||||
# Farben stehen in ~/.config/fish/conf.d/10-theme.fish
|
||||
# (wird vom Desktop-Theme hell/dunkel gesetzt)
|
||||
|
||||
# ---------- Abkürzungen ----------
|
||||
abbr -a ls 'ls --color=auto'
|
||||
abbr -a ll 'ls -lah --color=auto'
|
||||
abbr -a la 'ls -A --color=auto'
|
||||
abbr -a lt 'ls -lah --color=auto --sort=time'
|
||||
abbr -a .. 'cd ..'
|
||||
abbr -a ... 'cd ../..'
|
||||
abbr -a c clear
|
||||
abbr -a df 'df -h'
|
||||
abbr -a free 'free -h'
|
||||
abbr -a ff fastfetch
|
||||
abbr -a files thunar
|
||||
abbr -a reload 'pkill -HUP -x labwc'
|
||||
abbr -a session session-menu
|
||||
end
|
||||
@@ -0,0 +1,12 @@
|
||||
function fish_greeting
|
||||
if status is-login
|
||||
set_color $theme_muted
|
||||
echo " Willkommen, $USER."
|
||||
echo " Desktop starten: "
|
||||
set_color $theme_accent
|
||||
echo -n " startlabwc"
|
||||
set_color $theme_muted
|
||||
echo " (nur auf der lokalen Konsole)"
|
||||
set_color normal
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,36 @@
|
||||
function fish_prompt
|
||||
set -l last_status $status
|
||||
set -l normal (set_color $theme_normal)
|
||||
set -l dim (set_color $theme_muted)
|
||||
set -l accent (set_color $theme_accent)
|
||||
set -l red (set_color $theme_danger)
|
||||
set -l green (set_color $theme_success)
|
||||
|
||||
# Erste Zeile: ╭─ [user@host] ~/pfad on branch
|
||||
echo -n "$dim╭─$normal"
|
||||
|
||||
if set -q SSH_CONNECTION
|
||||
echo -n " $dim$USER@"(prompt_hostname)"$normal"
|
||||
end
|
||||
|
||||
echo -n " $accent"(prompt_pwd)$normal
|
||||
|
||||
if command -q git
|
||||
set -l branch (command git symbolic-ref --short HEAD 2>/dev/null)
|
||||
if test -z "$branch"
|
||||
set branch (command git rev-parse --short HEAD 2>/dev/null)
|
||||
end
|
||||
if test -n "$branch"
|
||||
echo -n " $dim"on"$normal $green$branch$normal"
|
||||
end
|
||||
end
|
||||
|
||||
echo
|
||||
|
||||
# Zweite Zeile: ╰─❯
|
||||
if test $last_status -ne 0
|
||||
echo -n "$dim╰─$red❯$normal "
|
||||
else
|
||||
echo -n "$dim╰─$accent❯$normal "
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,4 @@
|
||||
function fish_right_prompt
|
||||
set -l dim (set_color $theme_muted)
|
||||
echo -n "$dim"(date '+%H:%M')" "(set_color normal)
|
||||
end
|
||||
@@ -0,0 +1,24 @@
|
||||
function startlabwc --description 'Startet labwc auf der lokalen Konsole'
|
||||
if set -q WAYLAND_DISPLAY
|
||||
set_color $theme_danger
|
||||
echo "Wayland läuft bereits (WAYLAND_DISPLAY=$WAYLAND_DISPLAY)."
|
||||
set_color normal
|
||||
return 1
|
||||
end
|
||||
|
||||
# QEMU/bochs-drm: kein OpenGL, keine Hardware-Cursor
|
||||
set -lx WLR_RENDERER pixman
|
||||
set -lx WLR_NO_HARDWARE_CURSORS 1
|
||||
set -lx XKB_DEFAULT_LAYOUT de
|
||||
set -lx XDG_SESSION_TYPE wayland
|
||||
|
||||
set_color $theme_muted
|
||||
echo "Starte labwc (pixman, Software-Rendering) ..."
|
||||
set_color normal
|
||||
|
||||
if command -q dbus-run-session
|
||||
exec dbus-run-session -- labwc
|
||||
else
|
||||
exec labwc
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user