Compare commits
3 commits
5dac0577b5
...
ee9607e72c
Author | SHA1 | Date | |
---|---|---|---|
Alexis Jhon Gaspar | ee9607e72c | ||
Alexis Jhon Gaspar | 48f0ec8cbd | ||
Alexis Jhon Gaspar | ae614ece1f |
55
scripts/tabb
55
scripts/tabb
|
@ -1,9 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# tabb for tabbed by Alexis.
|
# tabb for tabbed by Alexis.
|
||||||
tabbed_id=$(tabbed -d -c)
|
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
while true; do
|
tabbed_id=$(tabbed -d -c)
|
||||||
|
while true; do
|
||||||
if [[ ! $(pgrep -x "tabbed") ]]; then
|
if [[ ! $(pgrep -x "tabbed") ]]; then
|
||||||
echo "No Tabbed process found. Exiting..."
|
echo "No Tabbed process found. Exiting..."
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -31,25 +30,43 @@ main() {
|
||||||
xdotool windowreparent "$wid" "$tabbed_id"
|
xdotool windowreparent "$wid" "$tabbed_id"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ "$automode" = false ]; then
|
if [[ $automode = "false" ]]; then
|
||||||
exit 0
|
break
|
||||||
|
# exit
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
case $flag in
|
helpfunct(){
|
||||||
-e )
|
echo "tabb - Handler script for suckless tabbed"
|
||||||
automode=true
|
echo ""
|
||||||
main
|
echo "by Alexis Jhon Gaspar (lucss21a) (c) 2023-2024"
|
||||||
;;
|
echo ""
|
||||||
-d )
|
echo "Options:"
|
||||||
automode=false
|
echo ""
|
||||||
main
|
echo "-e: Turn on auto-reparenting on all windows (default)"
|
||||||
;;
|
echo "-d: Turn on auto-reprenting only on existing windows"
|
||||||
esac
|
echo "-h: Show this message"
|
||||||
|
}
|
||||||
|
while getopts "edh" opt; do
|
||||||
|
case $opt in
|
||||||
|
e )
|
||||||
|
automode=true
|
||||||
|
main
|
||||||
|
;;
|
||||||
|
d )
|
||||||
|
|
||||||
|
automode=false
|
||||||
|
main
|
||||||
|
;;
|
||||||
|
h )
|
||||||
|
helpfunct
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
if [ $OPTIND -eq 1 ]; then
|
if [ $OPTIND -eq 1 ]; then
|
||||||
automode=false
|
shift $((OPTIND-1))
|
||||||
main
|
echo "No arguments passed, turning auto-reparenting on ALL windows..."
|
||||||
|
automode=true
|
||||||
|
main
|
||||||
fi
|
fi
|
||||||
shift $((OPTIND-1))
|
|
||||||
|
|
|
@ -45,6 +45,8 @@ install: st
|
||||||
sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1
|
sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1
|
||||||
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1
|
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1
|
||||||
tic -sx st.info
|
tic -sx st.info
|
||||||
|
mkdir -p $(DESTDIR)$(PREFIX)/share/pixmaps
|
||||||
|
cp -f st.png $(DESTDIR)$(PREFIX)/share/pixmaps
|
||||||
mkdir -p $(DESTDIR)$(PREFIX)/share/applications # desktop-entry patch
|
mkdir -p $(DESTDIR)$(PREFIX)/share/applications # desktop-entry patch
|
||||||
test -f ${DESTDIR}${PREFIX}/share/applications/st.desktop || cp -n st.desktop $(DESTDIR)$(PREFIX)/share/applications # desktop-entry patch
|
test -f ${DESTDIR}${PREFIX}/share/applications/st.desktop || cp -n st.desktop $(DESTDIR)$(PREFIX)/share/applications # desktop-entry patch
|
||||||
@echo Please see the README file regarding the terminfo entry of st.
|
@echo Please see the README file regarding the terminfo entry of st.
|
||||||
|
|
BIN
st-flexipatch/st.png
Normal file
BIN
st-flexipatch/st.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1 KiB |
Loading…
Reference in a new issue