Skip to content

Latest commit

 

History

History
154 lines (118 loc) · 3.24 KB

File metadata and controls

154 lines (118 loc) · 3.24 KB

Up

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.

Table of Contents

Export

Export the current running directory of the script.

export SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"

Down Script

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-down

Software Auto load

Auto loads software necessary for the theme to function.

Xorg Display

if [ -f ~/display.sh ]; then
  ~/display.sh
fi

Feh Background

if [ -f ~/.fehbg ]; then
  ~/.fehbg
elif [ -x "$(command -v feh)" ]; then
  feh --bg-scale $SCRIPTPATH/backgrounds/ign_outer_space.png
fi

Pywal Theme

if [ -x "$(command -v wal)" ]; then
  wal --theme base16-nord
fi

Sxhkd

if [ -x "$(command -v sxhkd)" ]; then
  sxhkd -c  $SCRIPTPATH/sxhkd/sxhkdrc &
fi

Network Manager Applet

if [ -x "$(command -v nm-applet)" ]; then
  nm-applet &
fi

CopyQ

if [ -x "$(command -v copyq)" ]; then
  copyq &
fi

Flameshot

if [ -x "$(command -v flameshot)" ]; then
  flameshot &> /dev/null &
fi

Picom

if [ -x "$(command -v picom)" ]; then
  picom --config "$SCRIPTPATH"/picom/picom.conf &> /dev/null &
fi

Dunst

if [ -x "$(command -v dunst)" ]; then
  dunst -config "$SCRIPTPATH"/dunst/dunstrc &> /dev/null &
fi

StreamDeck

if [ -x "$(command -v streamdeck)" ]; then
  streamdeck --no-ui &> /dev/null &
fi

Load

Sends the theme.toml to the leftwm command pipe.

echo "LoadTheme $SCRIPTPATH/theme.toml" > $XDG_RUNTIME_DIR/leftwm/command-0.pipe

Polybar

Loops 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