From 66f588309963546731077a9f1e8420cdc7543c62 Mon Sep 17 00:00:00 2001 From: epochryphon Date: Sun, 15 Nov 2026 23:00:52 +0100 Subject: [PATCH] Upload files to ".jwm" --- .jwm/gen-menu.py | 86 +++++++++++++++++++++++ .jwm/menu | 179 +++++++++++++++++++++++++++++++++++++++++++++++ .jwm/startup | 5 ++ 3 files changed, 270 insertions(+) create mode 100644 .jwm/gen-menu.py create mode 100644 .jwm/menu create mode 100644 .jwm/startup diff --git a/.jwm/gen-menu.py b/.jwm/gen-menu.py new file mode 100644 index 0000000..b6c9e6a --- /dev/null +++ b/.jwm/gen-menu.py @@ -0,0 +1,86 @@ +#!/usr/bin/env python3 +"""Generate a JWM menu fragment from freedesktop .desktop files.""" +import os, re, shutil +from xml.sax.saxutils import escape, quoteattr + +DIRS = [ + "/usr/share/applications", + "/usr/local/share/applications", + os.path.expanduser("~/.local/share/applications"), +] + +# (Categories key, menu label, menu icon) — first match wins +CATEGORIES = [ + ("Network", "Network", "applications-internet"), + ("Development", "Development", "applications-development"), + ("Education", "Education", "applications-science"), + ("Game", "Games", "applications-games"), + ("Graphics", "Graphics", "applications-graphics"), + ("AudioVideo", "Multimedia", "applications-multimedia"), + ("Office", "Office", "applications-office"), + ("Science", "Science", "applications-science"), + ("Settings", "Settings", "preferences-desktop"), + ("System", "System", "applications-system"), + ("Utility", "Accessories", "applications-accessories"), +] +FALLBACK = ("Other", "applications-other") + +def read_entry(path): + e, section = {}, "" + with open(path, encoding="utf-8", errors="replace") as f: + for line in f: + line = line.strip() + if line.startswith("["): + section = line + elif section == "[Desktop Entry]" and "=" in line and not line.startswith("#"): + k, v = line.split("=", 1) + e.setdefault(k.strip(), v.strip()) + return e + +def main(): + files = {} + for d in DIRS: # later dirs override earlier ones + if os.path.isdir(d): + for fn in sorted(os.listdir(d)): + if fn.endswith(".desktop"): + files[fn] = os.path.join(d, fn) + + buckets = {} + for fn, path in files.items(): + try: + e = read_entry(path) + except OSError: + continue + if e.get("Type", "Application") != "Application": continue + if e.get("NoDisplay", "").lower() == "true": continue + if e.get("Hidden", "").lower() == "true": continue + cmd = e.get("Exec", "") + if not cmd: continue + if e.get("TryExec") and not shutil.which(e["TryExec"]): continue + cmd = re.sub(r"%[fFuUdDnNickvm]", "", cmd).strip() # strip field codes + if e.get("Terminal", "").lower() == "true": + cmd = "xterm -e " + cmd + name = e.get("Name") or fn[:-8] + icon = e.get("Icon", "") + cats = e.get("Categories", "").split(";") + label, micon = FALLBACK + for key, lab, ic in CATEGORIES: + if key in cats: + label, micon = lab, ic + break + buckets.setdefault((label, micon), []).append((name, icon, cmd)) + + print("") + for key in [(lab, ic) for _, lab, ic in CATEGORIES] + [FALLBACK]: + items = buckets.get(key) + if not items: continue + label, micon = key + print("" % (quoteattr(label), quoteattr(micon))) + for name, icon, cmd in sorted(items, key=lambda t: t[0].lower()): + print(" %s" + % (quoteattr(name), quoteattr(icon), escape(cmd))) + print("") + print("") + +if __name__ == "__main__": + main() diff --git a/.jwm/menu b/.jwm/menu new file mode 100644 index 0000000..cc00c6b --- /dev/null +++ b/.jwm/menu @@ -0,0 +1,179 @@ + + + abrowser + /usr/bin/brave-browser-stable + ettercap-pkexec -G + icedove + jami + liferea + /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=media-downloader com.markopejic.downloader + pidgin + protonvpn-app + vinagre + /opt/Signal/signal-desktop + transmission-gtk + wireshark + zenmap + pkexec /usr/bin/zenmap + + + gnome-boxes + godot3 -p + /usr/bin/groovyConsole + hotspot + /usr/bin/idle + /usr/bin/idle-python3.12 + kate -b + xterm -e monodoc-http + xterm -e ocaml + sysprof + umbrello5 + + + 3Dc + sol + gnome-chess + liquidwar + gnome-mahjongg + mgba-qt + gnome-mines + gnome-sudoku + + + blender + color-picker + simple-scan + evince + gimp-2.10 + /usr/bin/display-im6.q16 -nostdin + inkscape + krita + libreoffice --draw + mate-color-select + xterm -e R + viewnior + + + brasero + cheese + /usr/bin/devede + ghb + k3b + kdenlive + lmms + makemkv + mpv --player-operation-mode=pseudo-gui -- + obs + rhythmbox + mate-volume-control + /usr/bin/vlc --started-from-file + xfburn + zynaddsubfx -I alsa -O alsa + zynaddsubfx -I jack -O jack + zynaddsubfx -I jack -O jack-multi + zynaddsubfx -I OSS -O OSS + + + atril + foliate + gnumeric --name org.gnumeric.gnumeric + libreoffice + libreoffice --calc + libreoffice --impress + libreoffice --writer + mate-dictionary + + + mate-about-me + /usr/bin/trisquel-app-install + nm-connection-editor + mate-appearance-properties + mate-at-properties + blueman-adapters + blueman-manager + caja-actions-config-tool + mate-control-center + gnome-disks + mate-display-properties + /usr/bin/caja-file-management-properties + guake -p + ibus-setup + /usr/bin/ayatana-settings + im-config + mate-keyboard-properties + mate-keybinding-properties + /usr/bin/gnome-language-selector + lightdm-gtk-greeter-settings-pkexec + mozo + mate-tweak + mate-user-admin + mate-mouse-properties + mate-network-properties + onboard-settings + /usr/bin/policytool + seahorse + mate-file-share-properties + plank --preferences + mate-notification-properties + mate-power-preferences + mate-default-applications-properties + system-config-printer + mate-screensaver-preferences + software-properties-gtk + /usr/bin/update-manager + mate-session-properties + usb-creator-gtk + synaptic-pkexec + mate-time-admin + mate-window-properties + + + /usr/bin/trisquel-app-install + backintime-qt + /usr/bin/backintime-qt_polkit + xterm -e btop + /usr/bin/caja --no-desktop --browser + dconf-editor + gdebi-gtk + guake + lstopo + mate-system-log + xterm -e su-to-root -c '/usr/sbin/lynis audit system --no-colors' + mate-disk-image-mounter + mate-disk-usage-analyzer + mate-system-monitor + mate-terminal + mate-power-statistics + gnome-power-statistics + + + gucharmap + engrampa + yelp + mate-calc + mate-font-viewer + mate-search-tool + onboard + pdfarranger + picom + pluma + redshift-gtk + xzoom -mag 3 -geometry 320x240 + orca --replace + synapse + mate-screenshot --interactive + xterm -e info + xterm -e vim + + + "/home/epochryphon/BurpSuite/BurpSuite" + "/home/epochryphon/BurpSuite/BurpSuite" + /usr/bin/caja + /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=/app/bin/run.sh --file-forwarding io.freetubeapp.FreeTube @@u @@ + /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=/app/bin/run.sh --file-forwarding io.freetubeapp.FreeTube @@u @@ + yelp help:mate-user-guide + "/opt/zaproxy/zap.sh" + zap.sh + zap.sh + + diff --git a/.jwm/startup b/.jwm/startup new file mode 100644 index 0000000..8c1114b --- /dev/null +++ b/.jwm/startup @@ -0,0 +1,5 @@ +#!/bin/sh +# JWM autostart — launched by at login. +# Add any other background apps here. +pgrep -f guake >/dev/null 2>&1 || guake & +pgrep -f synapse >/dev/null 2>&1 || synapse -s &