Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yad
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav
yad
Commits
7b9ec512
Commit
7b9ec512
authored
Jun 18, 2024
by
Victor Ananjevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add --workdir option
parent
4af907f5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
0 deletions
+15
-0
yad.1
data/yad.1
+3
-0
uk.po
po/uk.po
+0
-0
main.c
src/main.c
+8
-0
option.c
src/option.c
+3
-0
yad.h
src/yad.h
+1
-0
No files found.
data/yad.1
View file @
7b9ec512
...
...
@@ -183,6 +183,9 @@ Use \fICMD\fP as uri handler. By default yad uses \fIopen-command\fP parameter f
.B \-\-f1-action=\fICMD\fP
Set the command running when F1 was pressed.
.TP
.B \-\-workdir=\fiPATH\fP
Set current working directory to \fIPATH\fP.
.TP
.B \-\-borders=\fINUM\fP
Set dialog window borders.
.TP
...
...
po/uk.po
View file @
7b9ec512
This diff is collapsed.
Click to expand it.
src/main.c
View file @
7b9ec512
...
...
@@ -780,6 +780,14 @@ main (gint argc, gchar ** argv)
}
yad_set_mode
();
/* set working directory */
if
(
options
.
data
.
workdir
)
{
if
(
g_chdir
(
options
.
data
.
workdir
)
!=
0
)
g_printerr
(
_
(
"Unable to change directory to %s: %s
\n
"
),
options
.
data
.
workdir
,
strerror
(
errno
));
}
/* check for current GDK backend */
#ifdef GDK_WINDOWING_X11
if
(
GDK_IS_X11_DISPLAY
(
gdk_display_get_default
()))
...
...
src/option.c
View file @
7b9ec512
...
...
@@ -147,6 +147,8 @@ static GOptionEntry general_options[] = {
N_
(
"Set URI handler"
),
N_
(
"CMD"
)
},
{
"f1-action"
,
0
,
0
,
G_OPTION_ARG_STRING
,
&
options
.
data
.
f1_action
,
N_
(
"Set command running when F1 was pressed"
),
N_
(
"CMD"
)
},
{
"workdir"
,
0
,
0
,
G_OPTION_ARG_STRING
,
&
options
.
data
.
workdir
,
N_
(
"Set working directory"
),
N_
(
"PATH"
)
},
/* window settings */
{
"sticky"
,
0
,
0
,
G_OPTION_ARG_NONE
,
&
options
.
data
.
sticky
,
N_
(
"Set window sticky"
),
NULL
},
...
...
@@ -1632,6 +1634,7 @@ yad_options_init (void)
options
.
data
.
uri_handler
=
OPEN_CMD
;
#endif
options
.
data
.
f1_action
=
NULL
;
options
.
data
.
workdir
=
NULL
;
/* Initialize window options */
options
.
data
.
sticky
=
FALSE
;
...
...
src/yad.h
View file @
7b9ec512
...
...
@@ -257,6 +257,7 @@ typedef struct {
gchar
*
interp
;
gchar
*
uri_handler
;
gchar
*
f1_action
;
gchar
*
workdir
;
/* window settings */
gboolean
sticky
;
gboolean
fixed
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment