quake-term, transparent-cava
This commit is contained in:
parent
1dd2d5c4b5
commit
ed28769d9b
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Author: Daniel Napora <napcok@gmail.com>
|
||||
# "Show-Hide" terminal wrapper for terminator for use with keybind eg. super + enter.
|
||||
# "Show-Hide" terminal wrapper for terminator for use with keybind eg. C-~ or F12.
|
||||
# Depenging on actual state it will start, show or hide terminal window.
|
||||
|
||||
GEOMETRY_FILE="$HOME/.config/mabox/.quake-term"
|
||||
@ -12,7 +12,7 @@ ID=$(wmctrl -x -l | grep ${NAME} | awk '{print $1}' | head -n 1)
|
||||
if [ -z "${ID}" ]; then
|
||||
if [ -f "$GEOMETRY_FILE" ]; then
|
||||
POS=$(head -n 1 $GEOMETRY_FILE)
|
||||
terminator -T ${NAME} -b --geometry "$POS"
|
||||
terminator -T ${NAME} -b --geometry "$POS" -i utilities-terminal
|
||||
else
|
||||
TOP=$(wmctrl -d|grep "*"|awk '{print $8}'|cut -d',' -f2)
|
||||
LEFT=$[$(wmctrl -d|grep "*"|awk '{print $4}'|cut -d'x' -f1)/8]
|
||||
@ -28,21 +28,17 @@ else
|
||||
else
|
||||
xdotool windowactivate ${ID_DEC}
|
||||
fi
|
||||
eval $(xdotool getwindowgeometry --shell $(xdotool search --name $NAME))
|
||||
echo "${WIDTH}x${HEIGHT}+${X}+${Y}" > $GEOMETRY_FILE
|
||||
fi
|
||||
}
|
||||
|
||||
__save() {
|
||||
eval $(xdotool getwindowgeometry --shell $(xdotool getactivewindow))
|
||||
echo "${WIDTH}x${HEIGHT}+${X}+${Y}" > $GEOMETRY_FILE
|
||||
|
||||
}
|
||||
__reset() {
|
||||
rm -f $GEOMETRY_FILE
|
||||
rm "$GEOMETRY_FILE"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
save) __save;;
|
||||
reset) __reset;;
|
||||
reset) __reset;;
|
||||
*) __run;;
|
||||
esac
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
#: Usage: transparent-cava (height in pixels) (width full or halt)
|
||||
#: Usage: transparent-cava (height in pixels) (width full or half)
|
||||
#: example transparent-cava 100 full
|
||||
#: default is 200px height and half width
|
||||
|
||||
@ -42,4 +42,4 @@ else
|
||||
:
|
||||
fi
|
||||
|
||||
terminator -b -g "${CONFIG_FILE}" -T cavatransparent --geometry "${WIDTH}x${CAVA_HEIGHT}+${LEFT}+${TOP}"
|
||||
terminator -b -g "${CONFIG_FILE}" -T cavatransparent --geometry "${WIDTH}x${CAVA_HEIGHT}+${LEFT}+${TOP}" -i amarok_playcount
|
||||
|
Loading…
Reference in New Issue
Block a user