diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-20 10:11:42 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-20 10:11:42 +0200 |
| commit | 7deece04759c0efd2cca73d4af96479b343c2ae4 (patch) | |
| tree | 672d95cfa285b38ec4aaa67cf752039fd64755fd | |
| parent | cfa751fc97893276abfa7b518265835d788af374 (diff) | |
| download | sb-builder-7deece04759c0efd2cca73d4af96479b343c2ae4.tar.gz sb-builder-7deece04759c0efd2cca73d4af96479b343c2ae4.zip | |
Add a .desktop entry, linked by install.sh
Exec=sb-builder relies on ~/bin being on the session PATH, as for the
other launchers there. setDesktopFileName lets Wayland compositors match
the window to the entry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| -rw-r--r-- | README.md | 2 | ||||
| -rwxr-xr-x | install.sh | 7 | ||||
| -rw-r--r-- | sb-builder.desktop | 9 | ||||
| -rw-r--r-- | sb_builder/__main__.py | 1 |
4 files changed, 16 insertions, 3 deletions
@@ -19,7 +19,7 @@ Work in progress. See `docs/superpowers/specs/` for the design. ## Install - ./install.sh # ~/bin/sb-builder -> this repo, GUI config if missing + ./install.sh # ~/bin/sb-builder and menu entry -> this repo, GUI config if missing ./install.sh --remote # helper to the VM, its config if missing (asks first) `BINDIR` changes the launcher directory, `SBB_TARGET` the ssh destination for @@ -15,7 +15,8 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# ./install.sh symlink the launcher into ~/bin (BINDIR overrides), +# ./install.sh symlink the launcher into ~/bin (BINDIR overrides) and +# the .desktop entry into ~/.local/share/applications, # create the GUI config from the example if missing # ./install.sh --remote deploy remote/sbb-remote to the VM (SBB_TARGET, # default buildsystem) and create its config if missing @@ -39,7 +40,9 @@ fi bindir=${BINDIR:-$HOME/bin} cfgdir=${XDG_CONFIG_HOME:-$HOME/.config}/sb-builder -mkdir -p "$bindir" "$cfgdir" +appdir=${XDG_DATA_HOME:-$HOME/.local/share}/applications +mkdir -p "$bindir" "$cfgdir" "$appdir" ln -sfn "$here/sb-builder" "$bindir/sb-builder" +ln -sfn "$here/sb-builder.desktop" "$appdir/sb-builder.desktop" [[ -e $cfgdir/config.toml ]] || cp "$here/config.example.toml" "$cfgdir/config.toml" echo "installed $bindir/sb-builder -> $here/sb-builder, config in $cfgdir/config.toml" diff --git a/sb-builder.desktop b/sb-builder.desktop new file mode 100644 index 0000000..0704973 --- /dev/null +++ b/sb-builder.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Type=Application +Name=sb-builder +GenericName=SlackBuild Builder +Comment=Drive the SlackBuild tooling on the build VM +Exec=sb-builder +Icon=package-x-generic +Terminal=false +Categories=Development; diff --git a/sb_builder/__main__.py b/sb_builder/__main__.py index ae8e89a..7571bd6 100644 --- a/sb_builder/__main__.py +++ b/sb_builder/__main__.py @@ -31,6 +31,7 @@ def main(): sys.excepthook = traceback.print_exception app = QApplication(sys.argv) app.setApplicationName("sb-builder") + app.setDesktopFileName("sb-builder") # Wayland: match sb-builder.desktop cfg, err = config.load() w = MainWindow(cfg, Remote(cfg)) w.resize(1100, 700) |
