Age | Commit message (Collapse) | Author |
|
Unlike in the man page, only one --entry-type is reasonable possible.
On using multiple --entry-types and a command offers multiple, duplicates are removed i3-dmenu-desktop.
See more at #5291
added --show-duplicates flag for this
|
|
Fixes broken test
|
|
Commit 70f23caa9a18afc146f696fdf7d2481e5f7f0101 introduced new issues.
Instead of distinguishing " and \, as that commit attempted,
let’s instead keep the level of escaping by escaping each backslash,
just like each double quote.
I tested this with:
# recommended way to quote $ and " in quoted arguments, not ambiguous
Exec=/tmp/logargs "hello \\$PWD \\"and\\" more"
# permitted way to quote $ and " in quoted arguments, but ambiguous
Exec=/tmp/logargs "hello \$PWD \"and\" more"
# permitted way to quote arguments, slightly unusual to quote first arg
Exec="/tmp/logargs" hey
# a complicated shell expression, not ambiguous
Exec=sh -c "if [ -n \\"\\$*\\" ]; then exec /tmp/logargs --alternate-editor= --display=\\"\\$DISPLAY\\" \\"\\$@\\"; else exec /tmp/logargs --alternate-editor= --create-frame; fi" placeholder %F
related to https://github.com/i3/i3/issues/4697 (electrum, original)
related to https://github.com/i3/i3/issues/5152 (phpstorm, breakage)
related to https://github.com/i3/i3/issues/5156 (emacsclient, breakage)
|
|
Signed-off-by: Sergio E. Nemirowski <sergio@outerface.net>
|
|
This is required when e.g. mpv is installed in the NixOS global system
environment *and* in the user environment.
Standalone reproducer:
mkdir -p test1/share/applications test2/share
ln -svf /usr/share/applications/i3.desktop test1/share/applications
ln -svf $PWD/test1/share/applications test2/share
export XDG_DATA_DIRS='test1/share:test2/share'
i3-dmenu-desktop
fixes #4522
|
|
Since 3a672bc, using follow or follow_fast, does not set
$File::Find::topdir, breaking our deduplication.
Fixes #4031
|
|
follow_fast is passed to find() in order to support this. Since we check
ourselves for duplicates, the fast option can be used.
Fixes #3973
|
|
The testcases will be updated automatically in a separate commit.
|
|
If a .desktop entry is being added to the list of Menu items by its "Name" field, it should not be added again by its command or filename.
If it is being added by its command, it should not be added again by its filename.
|
|
According to the Desktop Entry Specification
https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables
the executable name or path of the executable may be quoted. This is not
properly respected when i3-dmenu-desktop extracts the command name from
the Exec entry.
Examples of values that fail and what they currently result in:
- "bar" -> "bar"
- "foo/bar" -> bar"
- "foo foobar/bar" -> "foo
- "foo\sbar" -> "foo\sbar"
- foo\sbar -> foo\sbar
- "foo\\\\bar" -> "foo\\\\bar"
|
|
|
|
The script used to make these changes can be found at:
https://gist.github.com/Deiz/32322020f76d23e2bf8f
|
|
|
|
|
|
fixes #1316
|
|
This commit should not change functionality at all (famous last words).
|
|
The spec says:
“Implementations must take care not to expand field codes into multiple
arguments unless explicitly instructed by this specification. This means
that name fields, filenames and other replacements that can contain
spaces must be passed as a single argument to the executable program
after expansion.”
fixes #1240
|
|
fixes #1041
|
|
This allows you to enter e.g. "i3 layout stacking" (provided you don’t
have an i3 .desktop file)
|
|
|
|
fixes #984
|
|
|
|
We don’t currently support the icon argument, but entirely not handling
%i leads to e.g. “digikam” not starting.
|
|
In addition to 'name' and 'command', add a third entry type 'filename'
to list the filenames of the .desktop files (e.g., 'firefox.desktop'
would be display as 'firefox').
Command line option '--entry-type' can be specified multiple times.
fixes #930
|
|
|
|
|
|
fixes #891
|
|
(Thanks Tai-Lin Chu)
|
|
|
|
|