Skip to content

Commit bbef0a9

Browse files
committed
fix: install edge cases, add fish/portal/gtk configs
1 parent adab472 commit bbef0a9

7 files changed

Lines changed: 211 additions & 47 deletions

File tree

configs/environment.d/gtk.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
GTK_THEME=Adwaita-dark
2+
QT_QPA_PLATFORMTHEME=qt5ct

configs/fish/conf.d/fnm.fish

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# fnm (Fast Node Manager) initialization
2+
set FNM_PATH "$HOME/.local/share/fnm"
3+
if [ -d "$FNM_PATH" ]
4+
set PATH "$FNM_PATH" $PATH
5+
fnm env --use-on-cd --shell fish | source
6+
end

configs/fish/config.fish

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,20 @@ if status is-interactive
1717
clear
1818
end
1919

20-
# Add ~/bin to PATH
20+
# Add paths
2121
fish_add_path ~/bin
2222

23+
# ============================================================================
24+
# TOOL INTEGRATIONS
25+
# ============================================================================
26+
27+
# Zoxide integration (smart directory jumping)
28+
if command -q zoxide
29+
zoxide init fish | source
30+
end
31+
32+
# Note: fnm is initialized via conf.d/fnm.fish
33+
2334
# ============================================================================
2435
# TERMINAL FILE MANAGER
2536
# ============================================================================
@@ -36,17 +47,3 @@ function fm
3647
end
3748
rm -f "$tmp"
3849
end
39-
40-
# ============================================================================
41-
# TOOL INTEGRATIONS
42-
# ============================================================================
43-
44-
# Zoxide integration (smart directory jumping)
45-
if command -q zoxide
46-
zoxide init fish | source
47-
end
48-
49-
# fnm (Fast Node Manager) integration
50-
if command -q fnm
51-
fnm env --use-on-cd --shell fish | source
52-
end
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
function fish_prompt --description 'Write out the prompt'
2+
set -l last_pipestatus $pipestatus
3+
set -lx __fish_last_status $status # Export for __fish_print_pipestatus.
4+
set -l normal (set_color normal)
5+
set -q fish_color_status
6+
or set -g fish_color_status red
7+
8+
# Color the prompt differently when we're root
9+
set -l color_cwd $fish_color_cwd
10+
set -l suffix '>'
11+
if functions -q fish_is_root_user; and fish_is_root_user
12+
if set -q fish_color_cwd_root
13+
set color_cwd $fish_color_cwd_root
14+
end
15+
set suffix '#'
16+
end
17+
18+
# Write pipestatus
19+
# If the status was carried over (if no command is issued or if `set` leaves the status untouched), don't bold it.
20+
set -l bold_flag --bold
21+
set -q __fish_prompt_status_generation; or set -g __fish_prompt_status_generation $status_generation
22+
if test $__fish_prompt_status_generation = $status_generation
23+
set bold_flag
24+
end
25+
set __fish_prompt_status_generation $status_generation
26+
set -l status_color (set_color $fish_color_status)
27+
set -l statusb_color (set_color $bold_flag $fish_color_status)
28+
set -l prompt_status (__fish_print_pipestatus "[" "]" "|" "$status_color" "$statusb_color" $last_pipestatus)
29+
30+
echo -n -s (prompt_login)' ' (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) $normal " "$prompt_status $suffix " "
31+
end
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[preferred]
2+
default=gtk

configs/xprofile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ if command -v gnome-keyring-daemon >/dev/null 2>&1; then
1313
export SSH_AUTH_SOCK
1414
fi
1515

16-
# Export keyring to D-Bus so browsers and apps can access it
16+
# Set desktop environment for xdg-desktop-portal (enables dark mode detection in browsers)
17+
export XDG_CURRENT_DESKTOP=i3
18+
19+
# Export environment to D-Bus and systemd so portals and apps can access it
1720
if command -v dbus-update-activation-environment >/dev/null 2>&1; then
18-
dbus-update-activation-environment --systemd DISPLAY XAUTHORITY SSH_AUTH_SOCK 2>/dev/null || true
21+
dbus-update-activation-environment --systemd DISPLAY XAUTHORITY SSH_AUTH_SOCK XDG_CURRENT_DESKTOP 2>/dev/null || true
1922
fi
2023

2124
# Auto-detect network interfaces for polybar (handles USB adapters changing ports)

0 commit comments

Comments
 (0)