Begin adding modules
This commit is contained in:
parent
b6639286b0
commit
8059050aa9
8
conf.d/80_modules.fish
Normal file
8
conf.d/80_modules.fish
Normal 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
|
||||||
21
functions/fish_enable_module.fish
Normal file
21
functions/fish_enable_module.fish
Normal 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
|
||||||
7
modules/login_x11/conf.d/10_startx.fish
Normal file
7
modules/login_x11/conf.d/10_startx.fish
Normal 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
|
||||||
Loading…
x
Reference in New Issue
Block a user