In your .config
folder you have to create 'emptty' file or in your home folder you have to create .emptty
file.
This variant allows to treat your script in similar way as your .xinitrc
, however this is common to both Xorg and Wayland. The magic option is Selection=true
or Selection=auto
. You can define your own environmental variables and keep the possibility to select any desktop.
As it is mentioned in README, no .profile
scripts are sourced by default. However following scripts contains few examples, how it could be done inside emptty
file.
#!/bin/sh
Selection=true
xrandr --output eDP1 --mode 1920x1080
xrdb -merge ~/.Xresources
# source /etc/profile does not have any effect
. /etc/profile
. ~/.bashrc
export BROWSER=firefox
export EDITOR=vim
exec dbus-launch $@
#!/bin/sh
Selection=true
LoginShell=/bin/bash --login
# /etc/profile is sourced by using non-interactive shell
exec dbus-launch $@
Emptty supports simplified fish support, if shebang is set to fish, properties could be set in its basic way.
#!/bin/fish
set Selection true
set LoginShell /bin/fish --login
exec dbus-launch $argv
In your .config folder you have to create 'emptty' file or in your home folder you have to create .emptty
file. If environment
is not defined, it assumes xorg.
Name=Custom Optional Name
Exec=/usr/bin/openbox-session
Environment=xorg
Name=Custom Optional Name
Exec=/usr/bin/sway
Environment=wayland
In your .config folder you have to create 'emptty' file or in your home folder you have to create .emptty
file. This file needs to have execution permission (chmod +x ~/.config/emptty
or chmod +x ~/.emptty
).
#!/bin/sh
Environment=xorg
# source /etc/profile does not have any effect
. /etc/profile
. ~/.bashrc
exec dbus-launch i3
In your home folder you have to create .xinitrc
file. This file needs to have execution permission (chmod +x ~/.xinitrc
).
#!/bin/sh
. ~/.xprofile
xrdb -merge ~/.Xresources
xmodmap ~/.Xmodmap
exec dbus-launch $@
Create folder custom-sessions as super user
$ mkdir -p ~/.config/emptty-custom-sessions/
Create folder custom-sessions as super user
$ sudo mkdir -p /etc/emptty/custom-sessions
In these folders you can paste your desktop files. If environment
is not defined, it assumes xorg.
sowm.desktop
Name=sowm
Exec=/usr/bin/sowm
Environment=xorg
sway.desktop
Name=My custom Sway
Exec=/usr/bin/sway
Environment=wayland