Comments (6)
I'll try detecting several mostly used emulators, and save the first found one's name to ~/.config/nwg-launchers/nwggrid/term
txt file for further use. The user will be able to replace it with their preferred terminal.
from nwg-launchers.
will do tonight.
from nwg-launchers.
It turns out that there's a much better way to check the command availability, which I was unaware of (stupid me!). Now we can check any terminal we want.
from nwg-launchers.
It's unsupported, at least for now. TBH I know no universal method to check the default terminal emulator. Ideas?
from nwg-launchers.
There is none...
This a big hole in freedesktop sepcifications of .desktop files.
This (among many other such threads) was the state of setting and finding terminal application:
https://xdg.freedesktop.narkive.com/bL3IsaJQ/spec-to-define-the-default-terminal#post11
How gnome does the finding is just cancerous
https://gitlab.gnome.org/GNOME/glib/-/blob/master/gio/gdesktopappinfo.c#L2548
My simple solution (though not universal or "adhering to [nonexistent] standards"): add it as a option in the config file.
Something like - terminal_exec_command: "alacritty -e "
, which will run - alacritty -e "{command from Exec=}"
Because the current "solution" that everyone uses is to add the above alacritty -e
to the start of the Exec=
command.
This was it is atleast centralized and easily configurable.
Freedesktop specifications are a swiss cheese block, this one is just another hole.
from nwg-launchers.
I've added a function to detect the installed terminal emulator. It loops though 6 <terminal> -v
commands, until one of them returns exit code 0, and saves the terminal name to the ~/.config/nwg-launchers/nwggrid/term
file. In case it doesn't happen, the xterm
name is being saved, regardless of whether it is installed or not. In both cases users may edit the term
file content to use their favorite terminal emulator.
If you know any other terminal emulator with a command, which returns 0 exit code and terminates, it may be added to the list. AFAIK st
, sakura
and gnome-terminal
have no such command (st
and sakura
return 1).
If you'd like to test changes, please build from the term
branch.
from nwg-launchers.
Related Issues (20)
- Icons do not break nicely if the requested size is bigger than maximum
- nwggrid broken with multiple displays HOT 8
- Helpful hint for FreeBSD & minimalist DE users. HOT 2
- slow launch time :[ HOT 12
- nwgbar: Better Shorcuts HOT 1
- nwgbar: Class Styling HOT 4
- nwggrid: Add Categories HOT 4
- Graphics glitches in the current git version HOT 2
- screenshots not available (return 404)
- Error when launching programs located in home directory HOT 2
- nwgbar fails to start with default config: -gtk-icon-style is not recognized HOT 3
- version mismatch
- nwggrid does not stick to consistent icon theme HOT 4
- nwggrid: sending signal should hide the window if it's currently visible
- nwggrid: grid.conf is not being found if it's not present in the topmost config directory
- Use emoji in category names by default HOT 1
- "nwggrid-server -no-categories" fails with json exception HOT 1
- Enable setting icon size and column width in JSON config HOT 2
- Set background color via style.css HOT 5
- Can't search by keyword in grid
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nwg-launchers.