quake-term, transparent-cava
This commit is contained in:
parent
1dd2d5c4b5
commit
ed28769d9b
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Author: Daniel Napora <napcok@gmail.com>
|
# 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.
|
# Depenging on actual state it will start, show or hide terminal window.
|
||||||
|
|
||||||
GEOMETRY_FILE="$HOME/.config/mabox/.quake-term"
|
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 [ -z "${ID}" ]; then
|
||||||
if [ -f "$GEOMETRY_FILE" ]; then
|
if [ -f "$GEOMETRY_FILE" ]; then
|
||||||
POS=$(head -n 1 $GEOMETRY_FILE)
|
POS=$(head -n 1 $GEOMETRY_FILE)
|
||||||
terminator -T ${NAME} -b --geometry "$POS"
|
terminator -T ${NAME} -b --geometry "$POS" -i utilities-terminal
|
||||||
else
|
else
|
||||||
TOP=$(wmctrl -d|grep "*"|awk '{print $8}'|cut -d',' -f2)
|
TOP=$(wmctrl -d|grep "*"|awk '{print $8}'|cut -d',' -f2)
|
||||||
LEFT=$[$(wmctrl -d|grep "*"|awk '{print $4}'|cut -d'x' -f1)/8]
|
LEFT=$[$(wmctrl -d|grep "*"|awk '{print $4}'|cut -d'x' -f1)/8]
|
||||||
@ -28,20 +28,16 @@ else
|
|||||||
else
|
else
|
||||||
xdotool windowactivate ${ID_DEC}
|
xdotool windowactivate ${ID_DEC}
|
||||||
fi
|
fi
|
||||||
|
eval $(xdotool getwindowgeometry --shell $(xdotool search --name $NAME))
|
||||||
|
echo "${WIDTH}x${HEIGHT}+${X}+${Y}" > $GEOMETRY_FILE
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
__save() {
|
|
||||||
eval $(xdotool getwindowgeometry --shell $(xdotool getactivewindow))
|
|
||||||
echo "${WIDTH}x${HEIGHT}+${X}+${Y}" > $GEOMETRY_FILE
|
|
||||||
|
|
||||||
}
|
|
||||||
__reset() {
|
__reset() {
|
||||||
rm -f $GEOMETRY_FILE
|
rm "$GEOMETRY_FILE"
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
save) __save;;
|
|
||||||
reset) __reset;;
|
reset) __reset;;
|
||||||
*) __run;;
|
*) __run;;
|
||||||
esac
|
esac
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/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
|
#: example transparent-cava 100 full
|
||||||
#: default is 200px height and half width
|
#: default is 200px height and half width
|
||||||
|
|
||||||
@ -42,4 +42,4 @@ else
|
|||||||
:
|
:
|
||||||
fi
|
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