#!/bin/bash # test we are root if [ "$(id -u)" != "0" ]; then echo "run as root now exitting" exit 1 fi export CFLAGS="-mtune=generic -Os -pipe" export CXXFLAGS="-mtune=generic -Os -pipe" export LDFLAGS="-Wl,-O1" P=dmenu V=4.9 SRC=$P-$V USER=`cat /etc/sysconfig/tcuser` LIST="compiletc submitqc libX11-dev libXft-dev libXinerama-dev " for Z in $LIST do su -c "tce-load -i $Z" $USER done cd /tmp su -c "/usr/local/bin/wget -nc --no-check-certificate \ https://dl.suckless.org/tools/$SRC.tar.gz " $USER mkdir $P tar xvf $SRC*gz cd $SRC # fix some pathways for TC sed 's|X11R6/include|local/include/X11|' -i config.mk sed 's|X11R6/lib|local/lib|' -i config.mk sed 's|include/freetype2|local/include/freetype2|' -i config.mk make -j5 # seconds make install # make install reveals install pathways cd /tmp # main ###### mkdir -p $P/usr/local/share/doc/$P cp $SRC/LICENSE $P/usr/local/share/doc/$P/ mkdir -p $P/usr/local/bin mv /usr/local/bin/$P* $P/usr/local/bin mv /usr/local/bin/stest $P/usr/local/bin strip --strip-unneeded $P/usr/local/bin/$P strip --strip-unneeded $P/usr/local/bin/stest # doc ###### mkdir -p $P-doc/usr/local/share/man/man1 mv /usr/local/share/man/man1/$P* $P-doc/usr/local/share/man/man1/ mv /usr/local/share/man/man1/stest* $P-doc/usr/local/share/man/man1/ # TCZ them ####### LIST="$P $P-doc" for Z in $LIST do mksquashfs $Z $Z.tcz md5sum $Z.tcz > $Z.tcz.md5.txt cd $Z find usr -not -type d > /tmp/$Z.tcz.list sed 's|usr|/usr|g' -i /tmp/$Z.tcz.list cd /tmp done ls -hal echo 'Title: dmenu-doc.tcz Description: docs for dmenu Version: 4.9 Author: Hiltjo Posthuma Original-site: https://tools.suckless.org/dmenu/ Copying-policy: MIT/X Consortium Size: 4.0K Extension_by: aus9 Tags: launcher menu Comments: man pages one for dmenu. Change-log: 2018/07/26 Original 4.8 on 9x Current: 2020/06/28 -> v 4.9 on 11x ' > $P-doc.tcz.info cat >> $P.tcz.info <<'EOF' Title: dmenu.tcz Description: Dynamic Menu Launcher for X or Sway Version: 4.9 Author: Hiltjo Posthuma Original-site: https://tools.suckless.org/dmenu/ Copying-policy: MIT/X Consortium Size: 20K Extension_by: aus9 Tags: launcher menu Comments: A tool that can search executables on X (or Sway) Then attempts to launch the highlighted entry when you press the Enter key. Search is not a fuzzy but exact. How to run on X (tested on openbox) ############### $ dmenu_run For a large font $ dmenu_run -fn sans-20 Search bar will appear at top of your monitor Use arrow keys with numlock OFF to navigate to your target command or type more letters If you pressed enter, you are attempting to launch the highlighted item and dmenu closes. Be aware not all commands are meant to be run without parameters - options etc If you change your mind press the Escape key. While dmenu is active, you lose kb combos. If your search input is for a non-executable (eg) "lll" you lose all hits and if you forget to Escape and press enter you are launching a missing executable called 'lll" and will get a not found error. How to run on Sway ################## Press keys logo (and) d to start dmenu Follow above for the rest. Possible Glitches ################# On fvwm, dmenu may cover any open app that is at the top of your monitor. So to close an app, you may have to either launch an app or press escape, while dmenu active. You can safely ignore any msg about /home/tc/.cache/dmenu_run: No such file or directory ^ that file is created, its a list of executables Change-log: 2018/07/26 Original 4.8 on 9x Current: 2020/06/28 -> v 4.9 on 11x EOF echo 'man-db.tcz ' > $P-doc.tcz.dep submitqc --libs