Compare commits

...

3 Commits

Author SHA1 Message Date
John Mertz d8c1953947 Fix `tofi` paths and arguments 2023-11-17 13:21:49 -07:00
John Mertz 9a73102ab5 Fix last_display path, update toggle targets
No longer necessary to restart mako
2023-11-17 13:19:08 -07:00
John Mertz 5e556193ca Prevent mako notifications from appearing during idle 2023-11-17 13:18:06 -07:00
4 changed files with 8 additions and 8 deletions

View File

@ -108,10 +108,12 @@ elif [[ $1 == "unfade" ]]; then
elif [[ $1 == "dim" ]]; then
if [[ $IDLEMODE -gt 1 ]]; then
# I don't currently have any dimable monitors, so fade was created instead
makoctl set-mode away
echo $($HOME/scripts/thinkpad/blc.pl %) >$BLFILE
$HOME/scripts/thinkpad/blc.pl = 1 &>-
fi
elif [[ $1 == "undim" ]]; then
makoctl set-mode default
$HOME/scripts/thinkpad/blc.pl = $(cat $BLFILE) &>-
elif [[ $1 == "lock" ]]; then
if [[ $IDLEMODE -gt 2 ]]; then

View File

@ -1,11 +1,9 @@
#!/bin/bash
CURRENT=`cat /home/jpm/.config/last_display`
CURRENT=`cat /home/jpm/.spool/last_display`
if [ "$CURRENT" == "detached" ]; then
/home/jpm/scripts/sway/displays.pl TV
if [ "$CURRENT" == "x13" ]; then
/home/jpm/scripts/sway/displays.pl Both
else
/home/jpm/scripts/sway/displays.pl detached
/home/jpm/scripts/sway/displays.pl x13
fi
pkill mako
mako &

View File

@ -1,4 +1,4 @@
#!/bin/bash
HEIGHT=$(swaymsg -t get_outputs | tr '\n' ' ' | sed -e 's/ */ /g' | sed -e 's/\(.*"focused": [a-z]*\),/\1\n/' | less | grep '"focused": true' | sed -e 's/.*"rect": {[^}]*"height": \([0-9]*\).*/\1/')
tofi-drun --prompt-text "$ " --height $HEIGHT --config ${HOME}/.dotfiles/tofi/sidebar.toml
${HOME}/.local/bin/tofi-drun --prompt-text "Run: " --height $HEIGHT --config ${HOME}/.dotfiles/tofi/sidebar.toml

View File

@ -26,4 +26,4 @@ cd $1
HEIGHT=$(swaymsg -t get_outputs | tr '\n' ' ' | sed -e 's/ */ /g' | sed -e 's/\(.*"focused": [a-z]*\),/\1\n/' | less | grep '"focused": true' | sed -e 's/.*"rect": {[^}]*"height": \([0-9]*\).*/\1/')
exec "./$(find ./ -executable -type f | sed -E 's/\.\///' | tofi --prompt-text 'Power: ' --height $HEIGHT --config ${HOME}/.dotfiles/tofi/sidebar.toml)" 2>/dev/null
exec "./$(find ./ -executable -type f | sed -E 's/\.\///' | ${HOME}/.local/bin/tofi --prompt-text 'Power: ' --height $HEIGHT --config ${HOME}/.dotfiles/tofi/sidebar.toml)" 2>/dev/null