Begin adding modules

This commit is contained in:
Candifloss 2026-07-21 13:03:44 +05:30
parent b6639286b0
commit 8059050aa9
3 changed files with 36 additions and 0 deletions

8
conf.d/80_modules.fish Normal file
View File

@ -0,0 +1,8 @@
# List of modules to load
set -g FISH_MODULES \
login_x11
for module in $FISH_MODULES
fish_enable_module $module
end

View File

@ -0,0 +1,21 @@
function fish_enable_module
set -l module $argv[1]
set -l dir $__fish_sysconf_dir/modules/$module
test -d $dir
or return 1
if test -d $dir/functions
set -ga fish_function_path $dir/functions
end
if test -d $dir/completions
set -ga fish_complete_path $dir/completions
end
if test -d $dir/conf.d
for file in (path sort $dir/conf.d/*.fish)
source $file
end
end
end

View File

@ -0,0 +1,7 @@
# Start X automatically on tty1.
if status is-login
and test -z "$DISPLAY"
and test "$XDG_VTNR" = 1
exec startx
end