Something went wrong. Try again.
dotfiles
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041#!/bin/bash
FILEPATH="/tmp/screen.png"FILEPATH_LOCK="/tmp/lockscreen.png"IS_i3_RUNNING=falseIS_SWAY_RUNNING=false
#Check if i3 or sway are runningif [ $(ps -ef | grep i3 | grep -v grep | wc -l) -gt 1 ]; then IS_i3_RUNNING=trueelif [ $(ps -ef | grep sway | grep -v grep | wc -l) -gt 1 ]; then IS_SWAY_RUNNING=trueelse >&2 echo "Could not find i3 or sway running on the system"fi
#retrieve screenshotif $IS_i3_RUNNING; then import -window root $FILEPATHelif $IS_SWAY_RUNNING; then grim -t png $FILEPATHfi
if [ -z $XDG_CONFIG_HOME ]; then XDG_CONFIG_HOME=$HOME/.configfi
time $XDG_CONFIG_HOME/i3/scripts/fourier.py $FILEPATH $FILEPATH_LOCK
#mute all audioamixer -q sset Master,0 mute
#lock the screenif $IS_i3_RUNNING; then i3lock --image=$FILEPATH_LOCKelif $IS_SWAY_RUNNING; then swaylock --tiling --image $FILEPATH_LOCKfi
rm $FILEPATH