Remove pregeneration, move example configs to contrib
This commit is contained in:
parent
f56e6ded09
commit
40db49ec23
@ -21,7 +21,7 @@ Lastly, make sure you're not executing a bunch of stuff from your WM's config. F
|
||||
|
||||
## Configuration
|
||||
|
||||
On first run and when invoked with `firestarter -g`, Firestarter will generate a series of configuration files in `~/.config/firestarter`. These files consist of several lines that look somewhat like the following:
|
||||
In the `contrib` directory of this repository is a series of example configuration files. These files consist of several lines that look somewhat like the following:
|
||||
|
||||
```bash
|
||||
#.fsdefaults
|
||||
|
3
contrib/example-configs/audio-daemon
Normal file
3
contrib/example-configs/audio-daemon
Normal file
@ -0,0 +1,3 @@
|
||||
#.fsdefaults
|
||||
command -v pulseaudio
|
||||
pulseaudio
|
13
contrib/example-configs/bar
Normal file
13
contrib/example-configs/bar
Normal file
@ -0,0 +1,13 @@
|
||||
#.fsdefaults
|
||||
command -v polybar && [ -r "~/.config/polybar/launch.sh" ]
|
||||
"~/.config/polybar/launch.sh"
|
||||
command -v tint2
|
||||
tint2
|
||||
command -v lxpanel
|
||||
lxpanel
|
||||
command -v lxqt-panel
|
||||
lxqt-panel
|
||||
command -v mate-panel
|
||||
mate-panel
|
||||
command -v xfce4-panel
|
||||
xfce4-panel
|
5
contrib/example-configs/blue-light-filter
Normal file
5
contrib/example-configs/blue-light-filter
Normal file
@ -0,0 +1,5 @@
|
||||
#.fsdefaults
|
||||
command -v redshift-gtk
|
||||
redshift-gtk
|
||||
command -v redshift
|
||||
redshift
|
9
contrib/example-configs/compositor
Normal file
9
contrib/example-configs/compositor
Normal file
@ -0,0 +1,9 @@
|
||||
#.fsdefaults
|
||||
[ -z "$DISPLAY" ]
|
||||
:
|
||||
command -v unagi
|
||||
unagi
|
||||
command -v compton
|
||||
compton
|
||||
command -v xcompmgr
|
||||
xcompmgr
|
7
contrib/example-configs/hotkey-daemon
Normal file
7
contrib/example-configs/hotkey-daemon
Normal file
@ -0,0 +1,7 @@
|
||||
#.fsdefaults
|
||||
[ -z "$DISPLAY" ]
|
||||
:
|
||||
command -v sxhkd
|
||||
sxhkd
|
||||
command -v lxqt-globalkeysd
|
||||
lxqt-globalkeysd
|
3
contrib/example-configs/network-daemon
Normal file
3
contrib/example-configs/network-daemon
Normal file
@ -0,0 +1,3 @@
|
||||
#.fsdefaults
|
||||
command -v nm-applet
|
||||
nm-applet
|
7
contrib/example-configs/notification-daemon
Normal file
7
contrib/example-configs/notification-daemon
Normal file
@ -0,0 +1,7 @@
|
||||
#.fsdefaults
|
||||
[ -z "$DISPLAY" ]
|
||||
:
|
||||
command -v dunst
|
||||
dunst
|
||||
command -v lxqt-notificationd
|
||||
notificationd
|
42
contrib/example-configs/polkit-agent
Normal file
42
contrib/example-configs/polkit-agent
Normal file
@ -0,0 +1,42 @@
|
||||
#.fsdefaults
|
||||
command -v lxqt-policykit-agent
|
||||
lxqt-policykit-agent
|
||||
command -v lxpolkit
|
||||
lxpolkit
|
||||
command -v mate-polkit
|
||||
mate-polkit
|
||||
command -v polkit-efl-authentication-agent-1
|
||||
polkit-efl-authentication-agent-1
|
||||
[ -x "/usr/lib/ts-polkitagent" ]
|
||||
/usr/lib/ts-polkitagent
|
||||
[ -x "/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1" ]
|
||||
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
|
||||
[ -x "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1" ]
|
||||
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
# Debian locations
|
||||
# On generation time, your architecture is filled in here
|
||||
[ -x "/usr/lib/$(uname -m)-linux-gnu/polkit-mate/polkit-mate-authentication-agent-1" ]
|
||||
"/usr/lib/$(uname -m)-linux-gnu/polkit-mate/polkit-mate-authentication-agent-1"
|
||||
[ -x "/usr/lib/$(uname -m)-linux-gnu/libexec/polkit-kde-authentication-agent-1" ]
|
||||
"/usr/lib/$(uname -m)-linux-gnu/libexec/polkit-kde-authentication-agent-1"
|
||||
# OpenSuSE locations
|
||||
[ -x "/usr/lib/polkit-mate/polkit-mate-authentication-agent-1" ]
|
||||
"/usr/lib/polkit-mate/polkit-mate-authentication-agent-1"
|
||||
[ -x "/usr/lib/polkit-kde-authentication-agent-1" ]
|
||||
"/usr/lib/polkit-kde-authentication-agent-1"
|
||||
# Arch locations
|
||||
[ -x "/usr/lib/mate-polkit/polkit-mate-authentication-agent-1" ]
|
||||
/usr/lib/mate-polkit/polkit-mate-authentication-agent-1
|
||||
[ -x "/usr/lib/polkit-kde-authentication-agent-1" ]
|
||||
/usr/lib/polkit-kde-authentication-agent-1
|
||||
# Fedora locations
|
||||
[ -x "/usr/libexec/xfce-polkit" ]
|
||||
/usr/libexec/xfce-polkit
|
||||
[ -x "/usr/libexec/lxqt-policykit-agent" ]
|
||||
/usr/libexec/lxqt-policykit-agent
|
||||
[ -x "/usr/libexec/polkit-mate-authentication-agent-1" ]
|
||||
/usr/libexec/polkit-mate-authentication-agent-1
|
||||
[ -x "/usr/libexec/kf5/polkit-kde-authentication-agent-1" ]
|
||||
/usr/libexec/kf5/polkit-kde-authentication-agent-1
|
||||
[ -x "/usr/libexec/polkit-gnome-authentication-agent-1" ]
|
||||
/usr/libexec/polkit-gnome-authentication-agent-1
|
15
contrib/example-configs/power-daemon
Normal file
15
contrib/example-configs/power-daemon
Normal file
@ -0,0 +1,15 @@
|
||||
#.fsdefaults
|
||||
command -v batterymon
|
||||
batterymon
|
||||
command -v cbatticon
|
||||
cbatticon
|
||||
command -v lxqt-powermangement
|
||||
lxqt-powermanagement
|
||||
command -v xfce4-power-manager
|
||||
xfce4-power-manager
|
||||
command -v mate-power-manager
|
||||
mate-power-manager
|
||||
[ -x "/usr/lib/$(uname -m)-linux-gnu/libexec/org_kde_powerdevil" ]
|
||||
/usr/lib/$(uname -m)-linux-gnu/libexec/org_kde_powerdevil
|
||||
command -v gnome-power-manager
|
||||
gnome-power-manager
|
3
contrib/example-configs/runner
Normal file
3
contrib/example-configs/runner
Normal file
@ -0,0 +1,3 @@
|
||||
#.fsdefaults
|
||||
command -v krunner
|
||||
krunner
|
13
contrib/example-configs/settings-daemon
Normal file
13
contrib/example-configs/settings-daemon
Normal file
@ -0,0 +1,13 @@
|
||||
#.fsdefaults
|
||||
command -v xsettingsd
|
||||
xsettingsd
|
||||
command -v xsettings-kde
|
||||
xsettingskde
|
||||
command -v lxsettings-daemon
|
||||
lxsettings-daemon
|
||||
command -v xfsettingsd
|
||||
xfsettingsd
|
||||
command -v mate-settings-daemon
|
||||
mate-settings-daemon
|
||||
command -v gnome-settings-daemon
|
||||
gnome-settings-daemon
|
7
contrib/example-configs/stat-glances
Normal file
7
contrib/example-configs/stat-glances
Normal file
@ -0,0 +1,7 @@
|
||||
#.fsdefaults
|
||||
[ -z "$DISPLAY" ]
|
||||
:
|
||||
# Note: the dumb sleep hack is because Conky crashes with window_type override if the WM hasn't loaded yet
|
||||
# This gives the WM ample time to load up
|
||||
command -v conky && [ -r "${XDG_CONFIG_HOME:-~/.config}/conky/conky.conf" ]
|
||||
sleep 5 && conky
|
7
contrib/example-configs/wallpaper
Normal file
7
contrib/example-configs/wallpaper
Normal file
@ -0,0 +1,7 @@
|
||||
#.fsdefaults
|
||||
[ -z "$DISPLAY" ]
|
||||
:
|
||||
command -v feh && [ -r "~/.fehbg" ]
|
||||
~/.fehbg
|
||||
command -v nitrogen
|
||||
nitrogen --restore
|
63
contrib/example-configs/wm
Normal file
63
contrib/example-configs/wm
Normal file
@ -0,0 +1,63 @@
|
||||
#.fsdefaults
|
||||
[ -z "$DISPLAY" ]
|
||||
:
|
||||
command -v 2bwm
|
||||
2bwm
|
||||
command -v aewm
|
||||
aewm
|
||||
command -v awesome
|
||||
awesome
|
||||
command -v bspwm
|
||||
bspwm
|
||||
command -v catwm
|
||||
catwm
|
||||
command -v cwm
|
||||
cwm
|
||||
command -v dwm
|
||||
dwm
|
||||
command -v evilwm
|
||||
evilwm
|
||||
command -v exwm
|
||||
exwm
|
||||
command -v fluxbox
|
||||
fluxbox
|
||||
command -v flwm
|
||||
flwm
|
||||
command -v fvwm
|
||||
fvwm
|
||||
command -v herbstluftwm
|
||||
herbstluftwm
|
||||
command -v i3
|
||||
i3
|
||||
command -v icewm
|
||||
icewm
|
||||
command -v jbwm
|
||||
jbwm
|
||||
command -v jwm
|
||||
jwm
|
||||
command -v lwm
|
||||
lwm
|
||||
command -v openbox
|
||||
openbox
|
||||
command -v pawm
|
||||
pawm
|
||||
command -v ratpoison
|
||||
ratpoison
|
||||
command -v twm
|
||||
twm
|
||||
command -v windowmaker
|
||||
windowmaker
|
||||
command -v wmii
|
||||
wmii
|
||||
command -v xmonad
|
||||
xmonad
|
||||
command -v xfwm4
|
||||
xfwm4
|
||||
command -v metacity
|
||||
metacity
|
||||
command -v mutter
|
||||
mutter
|
||||
command -v kwin
|
||||
kwin
|
||||
command -v tinywm
|
||||
tinywm
|
263
firestarter
263
firestarter
@ -15,7 +15,6 @@ declare -r _sessionid="$(< /proc/self/sessionid)"
|
||||
declare _optconfigdir="${XDG_CONFIG_HOME:-$HOME/.config}/${_name}"
|
||||
declare _optdryrun
|
||||
declare _optlogdir="$_optconfigdir/logs"
|
||||
declare _optpregen
|
||||
declare -i _opthelp
|
||||
declare -i _optverbose
|
||||
# Working variables
|
||||
@ -97,250 +96,6 @@ gettarget() {
|
||||
done < "$1"
|
||||
return 2
|
||||
}
|
||||
genconfigs() {
|
||||
log "Creating default config setup in \"$_optconfigdir\""
|
||||
log "See firestarter -h for more information"
|
||||
# Audio daemon
|
||||
cat << EOF > "$_optconfigdir/audio-daemon"
|
||||
#.fsdefaults
|
||||
command -v pulseaudio
|
||||
pulseaudio
|
||||
EOF
|
||||
# Information bars
|
||||
cat << EOF > "$_optconfigdir/bar"
|
||||
#.fsdefaults
|
||||
command -v polybar && [ -r "~/.config/polybar/launch.sh" ]
|
||||
"~/.config/polybar/launch.sh"
|
||||
command -v tint2
|
||||
tint2
|
||||
command -v lxpanel
|
||||
lxpanel
|
||||
command -v lxqt-panel
|
||||
lxqt-panel
|
||||
command -v mate-panel
|
||||
mate-panel
|
||||
command -v xfce4-panel
|
||||
xfce4-panel
|
||||
EOF
|
||||
# Blue light filter
|
||||
cat << EOF > "$_optconfigdir/blue-light-filter"
|
||||
#.fsdefaults
|
||||
command -v redshift-gtk
|
||||
redshift-gtk
|
||||
command -v redshift
|
||||
redshift
|
||||
EOF
|
||||
# Compositor
|
||||
cat << EOF > "$_optconfigdir/compositor"
|
||||
#.fsdefaults
|
||||
[ -z "\$DISPLAY" ]
|
||||
:
|
||||
command -v unagi
|
||||
unagi
|
||||
command -v compton
|
||||
compton
|
||||
command -v xcompmgr
|
||||
xcompmgr
|
||||
EOF
|
||||
# Polkit authentication agents
|
||||
cat << EOF > "$_optconfigdir/polkit-agent"
|
||||
#.fsdefaults
|
||||
command -v lxqt-policykit-agent
|
||||
lxqt-policykit-agent
|
||||
command -v lxpolkit
|
||||
lxpolkit
|
||||
command -v mate-polkit
|
||||
mate-polkit
|
||||
command -v polkit-efl-authentication-agent-1
|
||||
polkit-efl-authentication-agent-1
|
||||
[ -x "/usr/lib/ts-polkitagent" ]
|
||||
/usr/lib/ts-polkitagent
|
||||
[ -x "/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1" ]
|
||||
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
|
||||
[ -x "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1" ]
|
||||
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
# Debian locations
|
||||
# On generation time, your architecture is filled in here
|
||||
[ -x "/usr/lib/\$(uname -m)-linux-gnu/polkit-mate/polkit-mate-authentication-agent-1" ]
|
||||
"/usr/lib/\$(uname -m)-linux-gnu/polkit-mate/polkit-mate-authentication-agent-1"
|
||||
[ -x "/usr/lib/\$(uname -m)-linux-gnu/libexec/polkit-kde-authentication-agent-1" ]
|
||||
"/usr/lib/\$(uname -m)-linux-gnu/libexec/polkit-kde-authentication-agent-1"
|
||||
# OpenSuSE locations
|
||||
[ -x "/usr/lib/polkit-mate/polkit-mate-authentication-agent-1" ]
|
||||
"/usr/lib/polkit-mate/polkit-mate-authentication-agent-1"
|
||||
[ -x "/usr/lib/polkit-kde-authentication-agent-1" ]
|
||||
"/usr/lib/polkit-kde-authentication-agent-1"
|
||||
# Arch locations
|
||||
[ -x "/usr/lib/mate-polkit/polkit-mate-authentication-agent-1" ]
|
||||
/usr/lib/mate-polkit/polkit-mate-authentication-agent-1
|
||||
[ -x "/usr/lib/polkit-kde-authentication-agent-1" ]
|
||||
/usr/lib/polkit-kde-authentication-agent-1
|
||||
# Fedora locations
|
||||
[ -x "/usr/libexec/xfce-polkit" ]
|
||||
/usr/libexec/xfce-polkit
|
||||
[ -x "/usr/libexec/lxqt-policykit-agent" ]
|
||||
/usr/libexec/lxqt-policykit-agent
|
||||
[ -x "/usr/libexec/polkit-mate-authentication-agent-1" ]
|
||||
/usr/libexec/polkit-mate-authentication-agent-1
|
||||
[ -x "/usr/libexec/kf5/polkit-kde-authentication-agent-1" ]
|
||||
/usr/libexec/kf5/polkit-kde-authentication-agent-1
|
||||
[ -x "/usr/libexec/polkit-gnome-authentication-agent-1" ]
|
||||
/usr/libexec/polkit-gnome-authentication-agent-1
|
||||
EOF
|
||||
# Hotkey daemon
|
||||
cat << EOF > "$_optconfigdir/hotkey-daemon"
|
||||
#.fsdefaults
|
||||
[ -z "\$DISPLAY" ]
|
||||
:
|
||||
command -v sxhkd
|
||||
sxhkd
|
||||
command -v lxqt-globalkeysd
|
||||
lxqt-globalkeysd
|
||||
EOF
|
||||
# Network daemon
|
||||
cat << EOF > "$_optconfigdir/network-daemon"
|
||||
#.fsdefaults
|
||||
command -v nm-applet
|
||||
nm-applet
|
||||
EOF
|
||||
# Notification daemon
|
||||
cat << EOF > "$_optconfigdir/notification-daemon"
|
||||
#.fsdefaults
|
||||
[ -z "\$DISPLAY" ]
|
||||
:
|
||||
command -v dunst
|
||||
dunst
|
||||
command -v lxqt-notificationd
|
||||
notificationd
|
||||
EOF
|
||||
# Power daemons
|
||||
cat << EOF > "$_optconfigdir/power-daemon"
|
||||
#.fsdefaults
|
||||
command -v batterymon
|
||||
batterymon
|
||||
command -v cbatticon
|
||||
cbatticon
|
||||
command -v lxqt-powermangement
|
||||
lxqt-powermanagement
|
||||
command -v xfce4-power-manager
|
||||
xfce4-power-manager
|
||||
command -v mate-power-manager
|
||||
mate-power-manager
|
||||
[ -x "/usr/lib/\$(uname -m)-linux-gnu/libexec/org_kde_powerdevil" ]
|
||||
/usr/lib/\$(uname -m)-linux-gnu/libexec/org_kde_powerdevil
|
||||
command -v gnome-power-manager
|
||||
gnome-power-manager
|
||||
EOF
|
||||
# Runners
|
||||
# Note that rofi is not a daemon and is not included here
|
||||
cat << EOF > "$_optconfigdir/runner"
|
||||
#.fsdefaults
|
||||
command -v krunner
|
||||
krunner
|
||||
EOF
|
||||
# Settings daemons
|
||||
cat << EOF > "$_optconfigdir/settings-daemon"
|
||||
#.fsdefaults
|
||||
command -v xsettingsd
|
||||
xsettingsd
|
||||
command -v xsettings-kde
|
||||
xsettingskde
|
||||
command -v lxsettings-daemon
|
||||
lxsettings-daemon
|
||||
command -v xfsettingsd
|
||||
xfsettingsd
|
||||
command -v mate-settings-daemon
|
||||
mate-settings-daemon
|
||||
command -v gnome-settings-daemon
|
||||
gnome-settings-daemon
|
||||
EOF
|
||||
# System statistics glances
|
||||
cat << EOF > "$_optconfigdir/stat-glances"
|
||||
#.fsdefaults
|
||||
[ -z "\$DISPLAY" ]
|
||||
:
|
||||
# Note: the dumb sleep hack is because Conky crashes with window_type override if the WM hasn't loaded yet
|
||||
# This gives the WM ample time to load up
|
||||
command -v conky && [ -r "\${XDG_CONFIG_HOME:-~/.config}/conky/conky.conf" ]
|
||||
sleep 5 && conky
|
||||
EOF
|
||||
# Wallpaper setters
|
||||
cat << EOF > "$_optconfigdir/wallpaper"
|
||||
#.fsdefaults
|
||||
[ -z "\$DISPLAY" ]
|
||||
:
|
||||
command -v feh && [ -r "~/.fehbg" ]
|
||||
~/.fehbg
|
||||
command -v nitrogen
|
||||
nitrogen --restore
|
||||
EOF
|
||||
# Window managers
|
||||
cat << EOF > "$_optconfigdir/wm"
|
||||
#.fsdefaults
|
||||
[ -z "\$DISPLAY" ]
|
||||
:
|
||||
command -v 2bwm
|
||||
2bwm
|
||||
command -v aewm
|
||||
aewm
|
||||
command -v awesome
|
||||
awesome
|
||||
command -v bspwm
|
||||
bspwm
|
||||
command -v catwm
|
||||
catwm
|
||||
command -v cwm
|
||||
cwm
|
||||
command -v dwm
|
||||
dwm
|
||||
command -v evilwm
|
||||
evilwm
|
||||
command -v exwm
|
||||
exwm
|
||||
command -v fluxbox
|
||||
fluxbox
|
||||
command -v flwm
|
||||
flwm
|
||||
command -v fvwm
|
||||
fvwm
|
||||
command -v herbstluftwm
|
||||
herbstluftwm
|
||||
command -v i3
|
||||
i3
|
||||
command -v icewm
|
||||
icewm
|
||||
command -v jbwm
|
||||
jbwm
|
||||
command -v jwm
|
||||
jwm
|
||||
command -v lwm
|
||||
lwm
|
||||
command -v openbox
|
||||
openbox
|
||||
command -v pawm
|
||||
pawm
|
||||
command -v ratpoison
|
||||
ratpoison
|
||||
command -v twm
|
||||
twm
|
||||
command -v windowmaker
|
||||
windowmaker
|
||||
command -v wmii
|
||||
wmii
|
||||
command -v xmonad
|
||||
xmonad
|
||||
command -v xfwm4
|
||||
xfwm4
|
||||
command -v metacity
|
||||
metacity
|
||||
command -v mutter
|
||||
mutter
|
||||
command -v kwin
|
||||
kwin
|
||||
command -v tinywm
|
||||
tinywm
|
||||
EOF
|
||||
}
|
||||
step_preexecute() {
|
||||
# Special things that can't use simple configuration files
|
||||
[ -n "$_optdryrun" ] && return 0
|
||||
@ -428,10 +183,7 @@ step_execute() {
|
||||
fi
|
||||
for file in "$_optconfigdir"/*; do
|
||||
if ! [ -e "$file" ]; then
|
||||
log "No configuration files found; generating defaults"
|
||||
genconfigs
|
||||
step_execute
|
||||
return
|
||||
error "No configuration files found" 70
|
||||
fi
|
||||
# Skip our logs directory
|
||||
[ "$_optlogdir" == "$file" ] && continue
|
||||
@ -529,7 +281,6 @@ Usage: $_name [OPTION]...
|
||||
|
||||
-d Perform a dry run; print what programs would have been
|
||||
executed instead of doing so
|
||||
-g Regenerate default configs. This will clobber
|
||||
-h Print this help text
|
||||
-v Print more status messages. Stacks
|
||||
|
||||
@ -548,14 +299,11 @@ main() {
|
||||
# Parse out arguments
|
||||
while [ -n "$1" ]; do
|
||||
# Parse out flags
|
||||
while getopts ":dghv" opt; do
|
||||
while getopts ":dhv" opt; do
|
||||
case $opt in
|
||||
d)
|
||||
_optdryrun=1
|
||||
;;
|
||||
g)
|
||||
_optpregen=1
|
||||
;;
|
||||
h)
|
||||
_opthelp=1
|
||||
;;
|
||||
@ -580,13 +328,8 @@ main() {
|
||||
done
|
||||
# Early hook for help
|
||||
[ -n "$_opthelp" ] && printhelp && exit 0
|
||||
# Early hook for generating configs
|
||||
if [ -n "$_optpregen" ]; then
|
||||
genconfigs
|
||||
exit $?
|
||||
fi
|
||||
# Ensure our running environment is sane and that we're not about to nest
|
||||
if [ -z "$_optdryrun" ] && [ -z "$_optpregen" ]; then
|
||||
if [ -z "$_optdryrun" ]; then
|
||||
for pid in $(pgrep firestarter); do
|
||||
# Skip invalid PIDs
|
||||
! [ -d "$/proc/$pid" ] && continue
|
||||
|
Loading…
Reference in New Issue
Block a user