Skip to content

Commit

Permalink
Configurable terminal program (#58)
Browse files Browse the repository at this point in the history
* Add the extension zip into the release

Signed-off-by: Roy Golan <[email protected]>

* Use font-variant normal for the container extra-info

Signed-off-by: Roy Golan <[email protected]>

* Support configuring the terminal program

The extension preferences has a new entry for the terminal program to
use for running the commands in a terminal.

The default value is "gnome-terminal --" which is the current behaviour.

Here are terminal values that were tested and worked:
"gnome-terminal --"
"ptyxis --"
"kitty"
"flatpak run com.gexperts.Tilix -e"
"flatpak run app.studiodev.Ptyxis --"

Signed-off-by: Roy Golan <[email protected]>

* ci: lint action update

- migrate to eslint 9
- migrate .eslint.yaml to eslint.config.mjs

Signed-off-by: Roy Golan <[email protected]>

* Lint fixes

Signed-off-by: Roy Golan <[email protected]>

* Fix Main.notify call to use 2 args

Signed-off-by: Roy Golan <[email protected]>

* Support gnome 47

Signed-off-by: Roy Golan <[email protected]>

---------

Signed-off-by: Roy Golan <[email protected]>
  • Loading branch information
rgolangh authored Oct 16, 2024
1 parent 0d76598 commit 4acc02c
Show file tree
Hide file tree
Showing 13 changed files with 401 additions and 348 deletions.
252 changes: 0 additions & 252 deletions .eslintrc.yaml

This file was deleted.

9 changes: 4 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
- run: npm init @eslint/config
- run: npm install eslint-plugin-jsdoc@latest --save-dev
- run: npx eslint *.js modules/*.js
- run: npm install
- run: npm run lint
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${GITHUB_REF#refs/tags/} --generate-notes
gh release create ${GITHUB_REF#refs/tags/} --generate-notes *${GITHUB_REF#refs/tags/}.zip
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ EXTRA_SOURCES = \
--extra-source=classic.css \
--extra-source=modules

build:
build: lint
gnome-extensions pack -f $(EXTRA_SOURCES) src/
mv [email protected] $(TARGET_FILE)

Expand All @@ -18,9 +18,12 @@ enable:
debug:
G_MESSAGES_DEBUG="GNOME Shell" dbus-run-session -- gnome-shell --nested --wayland

lint:
npm run lint

all: \
install \
enable

.PHONY: build debug enable install all
.PHONY: build debug enable install all lint

19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,25 @@ You can install this extension directly from the [GNOME Extensions page](https:/

Alternatively, enable it via Extensions -> Toggle 'Containers'.

## Preferences ⚙

- __*extra-info*__
Show information about the container, see the screenshot
- __*terminal*__
The terminal program to use when performing the `Show Logs`, `Watch Top`, `Open Shell`, and `Watch Statistics`

Tested values:
| value | notes |
| ----- | ----- |
|__*gnome-terminal --*__| default terminal program for all gnome version till 46, inclusive |
|__*ptyxis --*__| default terminal program for gnome version from 47 onward |
|__*kitty*__| no extra arguments needed |
|__*flatpak run app.studiodev.Ptyxis --*__| Some flatpak environments doesn't have podman on the path |
|__*flatpak run com.gexperts.Tilix -e*__| Some flatpak environments doesn't have podman on the path |

Note: The value for __*terminal*__ may not work for you. Please report any working value you have so in time we would have a proper list.
There is a system wide gsettings `org.gnome.desktop.default-applications.terminal exec` but depending on the value different args are needed, as seen from above.

## Development / Contributing 🤝

To contribute to the development of this extension:
Expand Down
Loading

0 comments on commit 4acc02c

Please sign in to comment.