#!/usr/bin/dash
+# slop wrapper that puts out a format readable by instantwm
+# looks different if you have compositing
if pgrep picom; then
slop --highlight -f x%xx%yx%wx%hx -b 3 -c 0.3203125,0.875,0.40234375,0.1
#!/bin/bash
# picom launcher that adapts to the environment
+
if [ -e /opt/instantos/potato ] || iconf -i potato; then
echo "no compositing for you, your pc is a potato"
exit
#!/bin/bash
# very subtle easter egg, turn up the volume and wear headphones to experience it
+
if ! [ -e ~/instantos/thomas.mp3 ]; then
pushd .
- cd ~/instantos/
+ cd ~/instantos/ || exit 1
wget -q thomasthetankengine.surge.sh/thomas.mp3
popd
fi
#!/bin/bash
-# symlink default applications
+# this program reads a list of default applications from iconf
+# and then symlinks them to the home config dir to be executed from there
[ -e ~/.config/instantos/default ] || mkdir -p ~/.config/instantos/default
cd ~/.config/instantos/default || exit
XDGBROWSER="$(xdg-settings get default-web-browser)"
-BROWSERLOCATION="$(grep -m 1 Exec </usr/share/applications/$XDGBROWSER | sed 's/Exec=*//g' | sed 's/[ ][^ ]*//')"
+BROWSERLOCATION="$(grep -m 1 Exec </usr/share/applications/"$XDGBROWSER" | sed 's/Exec=*//g' | sed 's/[ ][^ ]*//')"
# symlink browser
if [ -e "$BROWSERLOCATION" ]; then
ln -s "$BROWSERLOCATION" ./browser
fi
+# apply the default setting for an application type, fallback to $2
setprogram() {
[ -e "$1" ] && rm "$1"
- TEMPSETTING=$(iconf $1:$2)
+ TEMPSETTING=$(iconf "$1:$2")
echo "setting $1 to $TEMPSETTING"
- ln -s "$(which $TEMPSETTING)" ./$1
+ ln -s "$(which "$TEMPSETTING")" ./"$1"
}
setprogram terminal st
+setprogram browser firefox
setprogram filemanager nautilus
setprogram systemmonitor mate-system-monitor
setprogram appmenu appmenu