mirror of
https://github.com/labwc/labwc.git
synced 2026-04-12 08:21:13 -04:00
Option to show full app_id in window switcher
It is now possible to specify whether to show full application identifier or the trimmed variant in window switcher OSD.
This commit is contained in:
parent
266690091f
commit
7906b98a3c
5 changed files with 14 additions and 3 deletions
|
|
@ -134,7 +134,7 @@ this is for compatibility with Openbox.
|
|||
|
||||
## WINDOW SWITCHER
|
||||
|
||||
*<windowSwitcher show="" preview="" outlines="">*
|
||||
*<windowSwitcher show="" preview="" outlines="" full_app_id="">*
|
||||
*show* [yes|no] Draw the OnScreenDisplay when switching between
|
||||
windows. Default is yes.
|
||||
|
||||
|
|
@ -144,6 +144,10 @@ this is for compatibility with Openbox.
|
|||
*outlines* [yes|no] Draw an outline around the selected window when
|
||||
switching between windows. Default is yes.
|
||||
|
||||
*full_app_id* [yes|no] Display full application identifier instead of trimmed
|
||||
variant. Trimming removes the first two nodes of 'org.' strings. Default is
|
||||
no.
|
||||
|
||||
*<windowSwitcher><fields><field content="" width="%">*
|
||||
Define window switcher fields.
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
Just as for window-rules, 'identifier' relates to app_id for native Wayland
|
||||
windows and WM_CLASS for XWayland clients.
|
||||
-->
|
||||
<windowSwitcher show="yes" preview="yes" outlines="yes">
|
||||
<windowSwitcher show="yes" preview="yes" outlines="yes" full_app_id="no">
|
||||
<fields>
|
||||
<field content="type" width="25%" />
|
||||
<field content="identifier" width="25%" />
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ struct rcxml {
|
|||
bool show;
|
||||
bool preview;
|
||||
bool outlines;
|
||||
bool full_app_id;
|
||||
struct wl_list fields; /* struct window_switcher_field.link */
|
||||
} window_switcher;
|
||||
|
||||
|
|
|
|||
|
|
@ -755,13 +755,15 @@ entry(xmlNode *node, char *nodename, char *content)
|
|||
} else if (!strcasecmp(nodename, "topMaximize.snapping")) {
|
||||
set_bool(content, &rc.snap_top_maximize);
|
||||
|
||||
/* <windowSwitcher show="" preview="" outlines="" /> */
|
||||
/* <windowSwitcher show="" preview="" outlines="" full_app_id="" /> */
|
||||
} else if (!strcasecmp(nodename, "show.windowSwitcher")) {
|
||||
set_bool(content, &rc.window_switcher.show);
|
||||
} else if (!strcasecmp(nodename, "preview.windowSwitcher")) {
|
||||
set_bool(content, &rc.window_switcher.preview);
|
||||
} else if (!strcasecmp(nodename, "outlines.windowSwitcher")) {
|
||||
set_bool(content, &rc.window_switcher.outlines);
|
||||
} else if (!strcasecmp(nodename, "full_app_id.windowSwitcher")) {
|
||||
set_bool(content, &rc.window_switcher.full_app_id);
|
||||
|
||||
/* Remove this long term - just a friendly warning for now */
|
||||
} else if (strstr(nodename, "windowswitcher.core")) {
|
||||
|
|
@ -976,6 +978,7 @@ rcxml_init(void)
|
|||
rc.window_switcher.show = true;
|
||||
rc.window_switcher.preview = true;
|
||||
rc.window_switcher.outlines = true;
|
||||
rc.window_switcher.full_app_id = false;
|
||||
|
||||
rc.resize_indicator = LAB_RESIZE_INDICATOR_NEVER;
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,9 @@ get_formatted_app_id(struct view *view)
|
|||
if (!s) {
|
||||
return NULL;
|
||||
}
|
||||
if (rc.window_switcher.full_app_id) {
|
||||
return s;
|
||||
}
|
||||
/* remove the first two nodes of 'org.' strings */
|
||||
if (!strncmp(s, "org.", 4)) {
|
||||
char *p = s + 4;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue