Compare commits
No commits in common. "ee9607e72ce56786d2fbcfd920248608badb7ce1" and "5dac0577b5ead5fcc49731b9de64b4e03afa3de7" have entirely different histories.
ee9607e72c
...
5dac0577b5
37
scripts/tabb
37
scripts/tabb
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# tabb for tabbed by Alexis.
|
# tabb for tabbed by Alexis.
|
||||||
|
tabbed_id=$(tabbed -d -c)
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
tabbed_id=$(tabbed -d -c)
|
|
||||||
while true; do
|
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..."
|
||||||
|
@ -30,43 +31,25 @@ main() {
|
||||||
xdotool windowreparent "$wid" "$tabbed_id"
|
xdotool windowreparent "$wid" "$tabbed_id"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [[ $automode = "false" ]]; then
|
if [ "$automode" = false ]; then
|
||||||
break
|
exit 0
|
||||||
# exit
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
helpfunct(){
|
case $flag in
|
||||||
echo "tabb - Handler script for suckless tabbed"
|
-e )
|
||||||
echo ""
|
|
||||||
echo "by Alexis Jhon Gaspar (lucss21a) (c) 2023-2024"
|
|
||||||
echo ""
|
|
||||||
echo "Options:"
|
|
||||||
echo ""
|
|
||||||
echo "-e: Turn on auto-reparenting on all windows (default)"
|
|
||||||
echo "-d: Turn on auto-reprenting only on existing windows"
|
|
||||||
echo "-h: Show this message"
|
|
||||||
}
|
|
||||||
while getopts "edh" opt; do
|
|
||||||
case $opt in
|
|
||||||
e )
|
|
||||||
automode=true
|
automode=true
|
||||||
main
|
main
|
||||||
;;
|
;;
|
||||||
d )
|
-d )
|
||||||
|
|
||||||
automode=false
|
automode=false
|
||||||
main
|
main
|
||||||
;;
|
;;
|
||||||
h )
|
|
||||||
helpfunct
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
done
|
|
||||||
if [ $OPTIND -eq 1 ]; then
|
if [ $OPTIND -eq 1 ]; then
|
||||||
shift $((OPTIND-1))
|
automode=false
|
||||||
echo "No arguments passed, turning auto-reparenting on ALL windows..."
|
|
||||||
automode=true
|
|
||||||
main
|
main
|
||||||
fi
|
fi
|
||||||
|
shift $((OPTIND-1))
|
||||||
|
|
|
@ -45,8 +45,6 @@ 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.
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1 KiB |
Loading…
Reference in a new issue