This file contains the configuration and readme for the up script of ColorSpace. The generated script “up” will automatically be called by leftwm whenever the theme is applied.
Export the current running directory of the script.
export SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"Checks if the down script was created by leftwm and executes the script and then removes it. It will then link the down script for this theme to the leftwm-theme down script.
if [ -f "/tmp/leftwm-theme-down" ]; then
/tmp/leftwm-theme-down
rm /tmp/leftwm-theme-down
fi
ln -s $SCRIPTPATH/down /tmp/leftwm-theme-downAuto loads software necessary for the theme to function.
if [ -f ~/display.sh ]; then
~/display.sh
fiif [ -f ~/.fehbg ]; then
~/.fehbg
elif [ -x "$(command -v feh)" ]; then
feh --bg-scale $SCRIPTPATH/backgrounds/ign_outer_space.png
fiif [ -x "$(command -v wal)" ]; then
wal --theme base16-nord
fiif [ -x "$(command -v sxhkd)" ]; then
sxhkd -c $SCRIPTPATH/sxhkd/sxhkdrc &
fiif [ -x "$(command -v nm-applet)" ]; then
nm-applet &
fiif [ -x "$(command -v copyq)" ]; then
copyq &
fiif [ -x "$(command -v flameshot)" ]; then
flameshot &> /dev/null &
fiif [ -x "$(command -v picom)" ]; then
picom --config "$SCRIPTPATH"/picom/picom.conf &> /dev/null &
fiif [ -x "$(command -v dunst)" ]; then
dunst -config "$SCRIPTPATH"/dunst/dunstrc &> /dev/null &
fiif [ -x "$(command -v streamdeck)" ]; then
streamdeck --no-ui &> /dev/null &
fiSends the theme.toml to the leftwm command pipe.
echo "LoadTheme $SCRIPTPATH/theme.toml" > $XDG_RUNTIME_DIR/leftwm/command-0.pipeLoops through each monitor and creates a polybar for the given monitor.
index=0
monitors=($(polybar -m | sed s/:.*//))
leftwm-state -q -n -t "$SCRIPTPATH"/leftwm/sizes.liquid | sed -r '/^\s*$/d' | while read -r width x y
do
barname="mainbar$index"
monitor=${monitors[index]} width=$(( width - 16 )) polybar -c "$SCRIPTPATH"/polybar/polybar.config $barname &> /dev/null &
let index=index+1
done