Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GTK4: Convert Geeqie to a GtkApplication 1 #1525

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions auto-complete/geeqie
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ file_types='@(3fr|ani|arw|avif|bmp|cr2|cr3|crw|cur|dds|djvu|dng|erf|gif|gqv|heic

actions='About AddMark0 AddMark1 AddMark2 AddMark3 AddMark4 AddMark5 AddMark6 AddMark7 AddMark8 AddMark9 AlterNone Animate Back ClearMarks CloseWindow ColorProfile0 ColorProfile1 ColorProfile2 ColorProfile3 ColorProfile4 ColorProfile5 ConnectZoom100 ConnectZoom200 ConnectZoom25 ConnectZoom300 ConnectZoom33 ConnectZoom400 ConnectZoom50 ConnectZoomFillHor ConnectZoomFillVert ConnectZoomFit ConnectZoomIn ConnectZoomOut Copy CopyImage CopyPath CopyPathUnquoted CropFourThree CropNone CropOneOne CropRectangle CropSixteenNine CropThreeTwo CutPath Delete DeleteWindow DrawRectangle Escape ExifRotate ExifWin FilterMark0 FilterMark1 FilterMark2 FilterMark3 FilterMark4 FilterMark5 FilterMark6 FilterMark7 FilterMark8 FilterMark9 FindDupes FirstImage FirstPage Flip FloatTools FolderTree Forward FullScreen Grayscale HelpChangeLog HelpContents HelpKbd HelpNotes HelpPdf HelpSearch HelpShortcuts HideBars HideSelectableToolbars HideTools HistogramChanB HistogramChanCycle HistogramChanG HistogramChanR HistogramChanRGB HistogramChanV HistogramModeCycle HistogramModeLin HistogramModeLog Home IgnoreAlpha ImageBack ImageForward ImageHistogram ImageOverlay ImageOverlayCycle IntMark0 IntMark1 IntMark2 IntMark3 IntMark4 IntMark5 IntMark6 IntMark7 IntMark8 IntMark9 KeywordAutocomplete LastImage LastPage LayoutConfig LogWindow Maintenance Mark0 Mark1 Mark2 Mark3 Mark4 Mark5 Mark6 Mark7 Mark8 Mark9 Mirror Move NewCollection NewFolder NewWindow NewWindowDefault NewWindowFromCurrent NextImage NextPage OpenArchive OpenCollection OpenRecent OpenWith OverUnderExposed PanView PermanentDelete Plugins Preferences PrevImage PrevPage Print Quit Rating0 Rating1 Rating2 Rating3 Rating4 Rating5 RatingM1 RectangularSelection Refresh Rename RenameWindow ResetMark0 ResetMark1 ResetMark2 ResetMark3 ResetMark4 ResetMark5 ResetMark6 ResetMark7 ResetMark8 ResetMark9 Rotate180 RotateCCW RotateCW SBar SBarSort SaveMetadata Search SearchAndRunCommand SelectAll SelectInvert SelectMark0 SelectMark1 SelectMark2 SelectMark3 SelectMark4 SelectMark5 SelectMark6 SelectMark7 SelectMark8 SelectMark9 SelectNone SetMark0 SetMark1 SetMark2 SetMark3 SetMark4 SetMark5 SetMark6 SetMark7 SetMark8 SetMark9 ShowFileFilter ShowInfoPixel ShowMarks SlideShow SlideShowFaster SlideShowPause SlideShowSlower SplitDownPane SplitHorizontal SplitNextPane SplitPaneSync SplitPreviousPane SplitQuad SplitSingle SplitTriple SplitUpPane SplitVertical StereoAuto StereoCross StereoCycle StereoOff StereoSBS Thumbnails ToggleMark0 ToggleMark1 ToggleMark2 ToggleMark3 ToggleMark4 ToggleMark5 ToggleMark6 ToggleMark7 ToggleMark8 ToggleMark9 UnselMark0 UnselMark1 UnselMark2 UnselMark3 UnselMark4 UnselMark5 UnselMark6 UnselMark7 UnselMark8 UnselMark9 Up UseColorProfiles UseImageProfile ViewIcons ViewInNewWindow ViewList WriteRotation WriteRotationKeepDate Zoom100 Zoom200 Zoom25 Zoom300 Zoom33 Zoom400 Zoom50 ZoomFillHor ZoomFillVert ZoomFit ZoomIn ZoomOut ZoomToRectangle'

options_basic='--blank --cache-maintenance= --disable-clutter --fullscreen --geometry= --help --list --new-instance --log-file= --remote --slideshow --with-tools --without-tools --version --show-log-window --debug= --grep='

options_remote='--action= --action-list --back --close-window --config-load= --cache-metadata --cache-render= --cache-render-recurse= --cache-render-shared= --cache-render-shared-recurse= --cache-shared= --cache-thumbs= --delay= --first --fullscreen --file= --File= --fullscreen-start --fullscreen-stop --geometry= --get-collection= --get-collection-list --get-destination= --get-file-info --get-filelist= --get-filelist-recurse= --get-rectangle --get-render-intent --get-selection --get-sidecars= --get-window-list --id= --last --list-add= --list-clear --lua= --new-window --next --pixel-info --print0 --PWD= --quit --raise --selection-add= --selection-clear --selection-remove= --slideshow --slideshow-recurse= --slideshow-start --slideshow-stop --tell --tools-hide --tools-show --view='
options='--action= --action-list --back --cache-metadata --cache-render= --cache-render-recurse= --cache-render-shared= --cache-render-shared-recurse= --cache-shared= --cache-thumbs= --close-window --config-load= --debug= --delay= --file= --File= --first --fullscreen --geometry= --get-collection= --get-collection-list --get-destination= --get-file-info --get-filelist= --get-filelist-recurse= --get-rectangle --get-render-intent --get-selection --get-sidecars= --get-window-list --grep= --id= --last --log-file= --lua= --new-window --next --pixel-info --print0 --quit --raise --selection-add= --selection-clear --selection-remove= --show-log-window --slideshow --slideshow-recurse= --tell --tools --view= --version'

_geeqie()
{
Expand Down Expand Up @@ -53,12 +51,7 @@ _geeqie()

if [[ $cur == -* ]]
then
if [[ $COMP_LINE == *"--remote "* ]]
then
COMPREPLY=($(compgen -W '$options_remote' -- "$cur"))
else
COMPREPLY=($(compgen -W '$options_basic' -- "$cur"))
fi
COMPREPLY=($(compgen -W '$options' -- "$cur"))

[[ ${COMPREPLY-} == *[=] ]] && compopt -o nospace
return
Expand Down
71 changes: 71 additions & 0 deletions auto-complete/geeqie-cache-maintenance
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# bash completion for geeqie-cache-maintenance -*- shell-script -*-

file_types='@(3fr|ani|arw|avif|bmp|cr2|cr3|crw|cur|dds|djvu|dng|erf|gif|gqv|heic|heif|ico|jp2|jpe|jpeg|jpg|jps|jxl|kdc|mef|mos|mpo|mrw|nef|orf|pbm|pdf|pef|pgm|png|pnm|ppm|psd|qif|qtif|raf|raw|rw2|scr|sr2|srf|svg|svgz|tga|tif|tiff|webp|xbm|xpm)'

actions='About AddMark0 AddMark1 AddMark2 AddMark3 AddMark4 AddMark5 AddMark6 AddMark7 AddMark8 AddMark9 AlterNone Animate Back ClearMarks CloseWindow ColorProfile0 ColorProfile1 ColorProfile2 ColorProfile3 ColorProfile4 ColorProfile5 ConnectZoom100 ConnectZoom200 ConnectZoom25 ConnectZoom300 ConnectZoom33 ConnectZoom400 ConnectZoom50 ConnectZoomFillHor ConnectZoomFillVert ConnectZoomFit ConnectZoomIn ConnectZoomOut Copy CopyImage CopyPath CopyPathUnquoted CropFourThree CropNone CropOneOne CropRectangle CropSixteenNine CropThreeTwo CutPath Delete DeleteWindow DrawRectangle Escape ExifRotate ExifWin FilterMark0 FilterMark1 FilterMark2 FilterMark3 FilterMark4 FilterMark5 FilterMark6 FilterMark7 FilterMark8 FilterMark9 FindDupes FirstImage FirstPage Flip FloatTools FolderTree Forward FullScreen Grayscale HelpChangeLog HelpContents HelpKbd HelpNotes HelpSearch HelpShortcuts HideBars HideSelectableToolbars HideTools HistogramChanB HistogramChanCycle HistogramChanG HistogramChanR HistogramChanRGB HistogramChanV HistogramModeCycle HistogramModeLin HistogramModeLog Home IgnoreAlpha ImageBack ImageForward ImageHistogram ImageOverlay ImageOverlayCycle IntMark0 IntMark1 IntMark2 IntMark3 IntMark4 IntMark5 IntMark6 IntMark7 IntMark8 IntMark9 KeywordAutocomplete LastImage LastPage LayoutConfig LogWindow Maintenance Mark0 Mark1 Mark2 Mark3 Mark4 Mark5 Mark6 Mark7 Mark8 Mark9 Mirror Move NewCollection NewFolder NewWindow NewWindowDefault NewWindowFromCurrent NextImage NextPage OpenArchive OpenCollection OpenRecent OpenWith OverUnderExposed PanView PermanentDelete Plugins Preferences PrevImage PrevPage Print Quit Rating0 Rating1 Rating2 Rating3 Rating4 Rating5 RatingM1 RectangularSelection Refresh Rename RenameWindow ResetMark0 ResetMark1 ResetMark2 ResetMark3 ResetMark4 ResetMark5 ResetMark6 ResetMark7 ResetMark8 ResetMark9 Rotate180 RotateCCW RotateCW SBar SBarSort SaveMetadata Search SearchAndRunCommand SelectAll SelectInvert SelectMark0 SelectMark1 SelectMark2 SelectMark3 SelectMark4 SelectMark5 SelectMark6 SelectMark7 SelectMark8 SelectMark9 SelectNone SetMark0 SetMark1 SetMark2 SetMark3 SetMark4 SetMark5 SetMark6 SetMark7 SetMark8 SetMark9 ShowFileFilter ShowInfoPixel ShowMarks SlideShow SlideShowFaster SlideShowPause SlideShowSlower SplitDownPane SplitHorizontal SplitNextPane SplitPaneSync SplitPreviousPane SplitQuad SplitSingle SplitTriple SplitUpPane SplitVertical StereoAuto StereoCross StereoCycle StereoOff StereoSBS Thumbnails ToggleMark0 ToggleMark1 ToggleMark2 ToggleMark3 ToggleMark4 ToggleMark5 ToggleMark6 ToggleMark7 ToggleMark8 ToggleMark9 UnselMark0 UnselMark1 UnselMark2 UnselMark3 UnselMark4 UnselMark5 UnselMark6 UnselMark7 UnselMark8 UnselMark9 Up UseColorProfiles UseImageProfile ViewIcons ViewInNewWindow ViewList WriteRotation WriteRotationKeepDate Zoom100 Zoom200 Zoom25 Zoom300 Zoom33 Zoom400 Zoom50 ZoomFillHor ZoomFillVert ZoomFit ZoomIn ZoomOut ZoomToRectangle'

options_basic='--blank --fullscreen --geometry= --help --help-all --help-gapplication --help-gtk --list --new-instance --log-file= --remote --slideshow --with-tools --without-tools --version --show-log-window --debug= --grep= --action= --action-list --back --close-window --config-load= --cache-metadata --cache-render= --cache-render-recurse= --cache-render-shared= --cache-render-shared-recurse= --cache-shared= --cache-thumbs= --delay= --first --fullscreen --file= --File= --fullscreen-start --fullscreen-stop --geometry= --get-collection= --get-collection-list --get-destination= --get-file-info --get-filelist= --get-filelist-recurse= --get-rectangle --get-render-intent --get-selection --get-sidecars= --get-window-list --id= --last --list-add= --list-clear --lua= --new-window --next --pixel-info --print0 --quit --raise --selection-add= --selection-clear --selection-remove= --slideshow --slideshow-recurse= --tell --tools --view='

options_remote='--action= --action-list --back --cache-metadata --cache-render= --cache-render-recurse= --cache-render-shared= --cache-render-shared-recurse= --cache-shared= --cache-thumbs= --close-window --config-load= --debug= --delay= --file= --File= --first --fullscreen --geometry= --get-collection= --get-collection-list --get-destination= --get-file-info --get-filelist= --get-filelist-recurse= --get-rectangle --get-render-intent --get-selection --get-sidecars= --get-window-list --grep --id= --last --log-file= --lua= --new-window --next --pixel-info --print0 --quit --raise --selection-add= --selection-clear --selection-remove= --show-log-window --slideshow --slideshow-recurse= --tell --tools --view= --version'

_geeqie-cache-maintenance()
{
local cur prev
_init_completion -s || return

case "$prev" in
--action)
COMPREPLY=($(compgen -W '$actions' -- "$cur"))
return
;;

--cache-maintenance | --cache-render | --cache-render-recurse | --cache-render-shared-recurse | --get-filelist | --get-filelist-recurse | --slideshow-recurse)
_filedir
return
;;

--cache-shared | --cache-thumbs)
COMPREPLY=($(compgen -W 'clean clear' -- "$cur"))
return
;;

--config-load)
_filedir xml
return
;;

--file | --File | --get-destination | --get-sidecars | --list-add | --selection-add | --selection-remove | --view)
_filedir $file_types
return
;;

--get-collection)
collection="$(find $HOME/.local/share/geeqie/collections/ -maxdepth 1 -name "*gqv" -exec basename {} \;)"
COMPREPLY=($(compgen -W '$collection' -- "$cur"))
return
;;

--lua)
_filedir lua
return
;;
esac

if [[ $cur == -* ]]
then
if [[ $COMP_LINE == *"MAINTAIN"* ]]
then
COMPREPLY=($(compgen -W '$options_maintenance' -- "$cur"))
else
COMPREPLY=($(compgen -W '$options_basic' -- "$cur"))
fi

[[ ${COMPREPLY-} == *[=] ]] && compopt -o nospace
return
fi

_filedir $file_types

} && complete -F _geeqie-cache-maintenance geeqie-cache-maintenance

# ex: filetype=sh
26 changes: 26 additions & 0 deletions doc/docbook/CommandLineOptions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,32 @@ can be used to modify this behavior on an individual basis e.g.</para>
</listitem>
</varlistentry>
</variablelist>

<para>All other command line parameters are used as plain files if they exist, or a URL or a folder.
The name of a collection, with or without either path or extension (.gqv) may be used.</para>

<para>If more than one folder is on the command line, only the last will be used.</para>
</refsect2>

<refsect2 id='if_more_than_one_file_is_on_the_command_'><title>If more than one file is on the command line:</title>

<para>If they are in the same folder, that folder will be opened and those files will be selected.
If they are not in the same folder, a new Collection containing those files will be opened.</para>

<para>To run Geeqie as a new instance, use:
GQ_NON_UNIQUE=1 geeqie
Normally a single set of configuration files is used for all instances.
However, the environment variables XDG_CONFIG_HOME, XDG_CACHE_HOME, XDG_DATA_HOME
can be used to modify this behavior on an individual basis e.g.
XDG_CONFIG_HOME=/tmp/a XDG_CACHE_HOME=/tmp/b GQ_NON_UNIQUE=1 geeqie</para>

<para>To disable Clutter use:
GQ_DISABLE_CLUTTER=1 geeqie</para>

<para>To run or stop Geeqie in cache maintenance (non-GUI) mode use:
GQ_CACHE_MAINTENANCE=1 geeqie <emphasis role='strong' remap='B'>--help</emphasis></para>

<para>User manual: https://www.geeqie.org/help/GuideIndex.html</para>
</refsect2>
</refsect1>

Expand Down
10 changes: 9 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,14 @@ i18n.merge_file(
install : true,
install_dir : join_paths(datadir, 'applications'))

i18n.merge_file(
input : 'org.geeqie.cache-maintenance.desktop.in',
output : 'org.geeqie.cache-maintenance.desktop',
type : 'desktop',
po_dir : podir,
install : true,
install_dir : join_paths(datadir, 'applications'))

i18n.merge_file(
input : 'org.geeqie.Geeqie.appdata.xml.in',
output : 'org.geeqie.Geeqie.appdata.xml',
Expand Down Expand Up @@ -717,7 +725,7 @@ if option.enabled()

should_fail = image_name.startswith('fail')
test_cmd = [image_test_py.full_path(), geeqie_exe.full_path(), image]
test('Image_ ' + image_name, isolate_test_sh, args: test_cmd, should_fail : should_fail, timeout: 100, suite: ['functional', 'image'])
test('Image_ ' + image_name, isolate_test_sh, args: test_cmd, should_fail : should_fail, timeout: 100, is_parallel : false, suite: ['functional', 'image'])
endforeach
summary({'Image tests' : ['Test runs:', true]}, section : 'Testing', bool_yn : true)
else
Expand Down
4 changes: 2 additions & 2 deletions org.geeqie.Geeqie.desktop.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Icon=geeqie
Type=Application
Terminal=false
# Startup notification disabled, since the remote -r switch may not open a new window...
#StartupNotify=false
#StartupWMClass=geeqie
StartupNotify=true
StartupWMClass=geeqie
NotShowIn=X-Geeqie;
Categories=Graphics;Viewer;
MimeType=application/x-navi-animation;image/bmp;image/x-bmp;image/x-MS-bmp;image/gif;image/x-icon;image/jpeg;image/png;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-tga;image/tiff;image/x-xbitmap;image/x-xpixmap;image/svg;image/svg+xml;image/x-png;image/xpm;image/x-ico;
Expand Down
15 changes: 15 additions & 0 deletions org.geeqie.cache-maintenance.desktop.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Desktop Entry]
Name=Geeqie Cache Maintenance
GenericName=Image Viewer
Comment=View and manage images
Exec=/bin/true
Icon=geeqie
Type=Application
Terminal=false
# Startup notification disabled, since the remote -r switch may not open a new window...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment still relevant?

StartupNotify=true
StartupWMClass=geeqie
NotShowIn=X-Geeqie;
Categories=Graphics;Viewer;
MimeType=application/x-navi-animation;image/bmp;image/x-bmp;image/x-MS-bmp;image/gif;image/x-icon;image/jpeg;image/png;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-tga;image/tiff;image/x-xbitmap;image/x-xpixmap;image/svg;image/svg+xml;image/x-png;image/xpm;image/x-ico;
Keywords=Picture;Slideshow;Graphics;
3 changes: 0 additions & 3 deletions scripts/generate-man-page.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ zooming, panning, thumbnails and sorting images into collections.

Generated for version:

[SEE ALSO]
Full documentation: https://www.geeqie.org/help/GuideIndex.html

[BUGS]
Please send bug reports and feedback to https://github.com/BestImageViewer/geeqie/issues

Expand Down
21 changes: 11 additions & 10 deletions scripts/image-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __str__(self) -> str:

def main(argv) -> int:
geeqie_exe = argv[1]
test_image_path = argv[2]
test_image_path = "--file=" + argv[2]

# All geeqie commands start with this.
geeqie_cmd_prefix = ["xvfb-run", "--auto-servernum", geeqie_exe]
Expand All @@ -88,35 +88,36 @@ def main(argv) -> int:
# signal to the geeqie process. See
# <https://unix.stackexchange.com/questions/291804/howto-terminate-xvfb-run-properly>.
# So we should modify or replace xvfb-run to allow us to kill an errant geeqie process.
geeqie_proc = subprocess.Popen(args=[*geeqie_cmd_prefix, test_image_path])
geeqie_proc = subprocess.Popen(args=[*geeqie_cmd_prefix, test_image_path], env=os.environ)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that this was probably while battling with dbus, but this is the default value, so should not be necessary (please correct me if you found otherwise, though)


# try/finally to ensure we clean up geeqie_proc
try:
start_time = time.monotonic()

# Wait up to MAX_GEEQIE_INIT_TIME_S for remote to initialize.
command_fifo_path = pathlib.Path(os.environ["XDG_CONFIG_HOME"], "geeqie/.command")
while not command_fifo_path.exists():
time.sleep(1)
if time.monotonic() - start_time > MAX_GEEQIE_INIT_TIME_S:
raise GeeqieTestError("init (before creating command fifo)", geeqie_proc)
# FIXME
# ~ command_fifo_path = pathlib.Path(os.environ["XDG_CONFIG_HOME"], "geeqie/layouts")
# ~ while not command_fifo_path.exists():
# ~ time.sleep(1)
# ~ if time.monotonic() - start_time > MAX_GEEQIE_INIT_TIME_S:
# ~ raise GeeqieTestError("init (before creating command fifo)", geeqie_proc)

# We make sure Geeqie can stay alive for 2 seconds after initialization.
time.sleep(2)
if geeqie_proc.poll() is not None:
raise GeeqieTestError("2-second post-init check", geeqie_proc)

file_info_result = subprocess.run(
args=[*geeqie_cmd_prefix, "--remote", "--get-file-info"],
capture_output=True, text=True, timeout=MAX_REMOTE_CMD_TIME_S)
args=[*geeqie_cmd_prefix, "--get-file-info"],
capture_output=True, text=True, timeout=MAX_REMOTE_CMD_TIME_S, env=os.environ)

# Check if Geeqie crashed (which would cause xvfb-run to terminate)
time.sleep(1)
if geeqie_proc.poll() is not None:
raise GeeqieTestError("remote command processing", geeqie_proc)

# Request shutdown
subprocess.run(args=[*geeqie_cmd_prefix, "--remote", "--quit"],
subprocess.run(args=[*geeqie_cmd_prefix, "--quit"],
timeout=MAX_REMOTE_CMD_TIME_S)

# If there's a timeout, or the exit code isn't zero, flag it.
Expand Down
12 changes: 11 additions & 1 deletion scripts/isolate-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
## $1 Test executable
##
##
## @FIXME It should be possible to use dbus-run-session, thus allowing
## is_parallel=true in meson.build for image tests

set -e

Expand Down Expand Up @@ -63,6 +65,13 @@ chmod 0700 "$XDG_RUNTIME_DIR"
cd
mkdir -p "$XDG_CONFIG_HOME"

# Primary and remote instances of GtkApplication communicate with dbus
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can take a look at this, but dbus-launch will be using the environment variables of the user running the test, which will break the isolation here.

That said, going by the manpage, you should be able to add dbus-launch on line 83, instead of running it in advance.

So env -i G_DEBUG="..." [...] XDG_RUNTIME_DIR="..." dbus-launch "$@"

From the docs:

       You may specify a program to be run; in this case, dbus-launch will
       launch a session bus instance, set the appropriate environment
       variables so the specified program can find the bus, and then execute
       the specified program, with the specified arguments. See below for
       examples.

dbus-launch

# Inhibit shellcheck warning SC2154 - var is referenced but not assigned
echo "${DBUS_SESSION_BUS_ADDRESS:-}"
echo "${DBUS_SESSION_BUS_PID:-}"

# This will automatically pass the command name and args in the expected order.
# And `set -e` (above) means that we'll automatically exit with the same return
# code as our sub-command.
Expand All @@ -71,4 +80,5 @@ mkdir -p "$XDG_CONFIG_HOME"
# G_DEBUG="fatal-warnings" will force an abort if a warning or
# critical error is encountered.
# https://docs.gtk.org/glib/running.html#environment-variables
env -i G_DEBUG="fatal-warnings" HOME="$HOME" XDG_CONFIG_HOME="$XDG_CONFIG_HOME" XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR" "$@"
env -i DBUS_SESSION_BUS_PID="$DBUS_SESSION_BUS_PID" DBUS_SESSION_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS" G_DEBUG="fatal-warnings" HOME="$HOME" XDG_CONFIG_HOME="$XDG_CONFIG_HOME" XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR" "$@"

Loading
Loading