mirror of https://github.com/davatorium/rofi.git
Compare commits
6 Commits
df53294cbe
...
c3be2bd034
Author | SHA1 | Date |
---|---|---|
lbonn | c3be2bd034 | |
Dave Davenport | c95b24e44e | |
ortango | 5b9939b287 | |
Dave Davenport | 9b6e70b365 | |
martinsifrar | 4f098751cd | |
lbonn | 4c668b0068 |
|
@ -209,8 +209,6 @@ typedef enum {
|
|||
WM_DO_NOT_CHANGE_CURRENT_DESKTOP = 1,
|
||||
/** PANGO WORKSPACE NAMES */
|
||||
WM_PANGO_WORKSPACE_NAMES = 2,
|
||||
/** Root window offset (for bspwm) */
|
||||
WM_ROOT_WINDOW_OFFSET = 4,
|
||||
} WindowManagerQuirk;
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
## Recursive file browser
|
||||
|
||||
An experimental file browser is introduced in this version. This recursively scans through the
|
||||
users home directory (this is configurable) to find files.
|
||||
Its designed to be asynchronous and very fast.
|
||||
An experimental file browser is introduced in this version.
|
||||
This recursively scans through the users home directory (this is configurable) to find files.
|
||||
It is designed to be asynchronous and very fast.
|
||||
|
||||
The following settings can be configured:
|
||||
|
||||
‘‘‘css
|
||||
```css
|
||||
configuration {
|
||||
recursivebrowser {
|
||||
/** Directory the file browser starts in. */
|
||||
|
@ -21,17 +21,18 @@ configuration {
|
|||
command: "xdg‐open";
|
||||
}
|
||||
}
|
||||
‘‘‘
|
||||
```
|
||||
|
||||
|
||||
## Copy to clipboard support
|
||||
|
||||
Add support to copy current selected item to clipboard.
|
||||
The added `control-c` binding copies the current selection to the clipboard.
|
||||
THIS ONLY WORKS WITH CLIPBOARD MANAGER!!! Once rofi is closes, the data is
|
||||
|
||||
**THIS ONLY WORKS WITH CLIPBOARD MANAGER!!!** Once rofi is closed, the data is
|
||||
gone!
|
||||
|
||||
## entry box history
|
||||
|
||||
## Entry box history
|
||||
|
||||
You can now recall and move through previous queries by using
|
||||
`kb-entry-history-up` or 'kb-entry-history-down` keys. (`Control-Up`,
|
||||
|
@ -39,28 +40,71 @@ You can now recall and move through previous queries by using
|
|||
|
||||
The following settings can be configured:
|
||||
|
||||
‘‘‘css
|
||||
```css
|
||||
configuration {
|
||||
entry {
|
||||
max‐history: 30;
|
||||
}
|
||||
}
|
||||
‘‘‘
|
||||
|
||||
```
|
||||
|
||||
## Fix calc
|
||||
|
||||
There was a non-parsable grammar in the 'calc' part of the language.
|
||||
The % operator (modulo) overloaded with percent and could leave to statements
|
||||
having multiple valid but contradicting interpretations. To resolve this the modulo
|
||||
operator is now `modulo`. Including in this patch several smaller issues with the
|
||||
parser where fixed.
|
||||
having multiple valid but contradicting interpretations.
|
||||
To resolve this the modulo operator is now `modulo`.
|
||||
|
||||
## Text outline
|
||||
Several smaller issues with the parser were also fixed in this patch.
|
||||
|
||||
## Text and cursor outline
|
||||
|
||||
Three new properties were added to textbox widgets to control text outline:
|
||||
|
||||
* `text-outline` boolean to enable outlines
|
||||
* `text-outline-width` to control size
|
||||
* `text-outline-color` to control color
|
||||
|
||||
![Outlines](./text-outline.png)
|
||||
|
||||
Outlines can also be added to cursors, via similarly named
|
||||
properties (`cursor-outline-*`).
|
||||
|
||||
## Dependencies and packaging
|
||||
|
||||
In this version, we have bumped the minimal required versions of some
|
||||
dependencies to keep up with bugs and deprecations while staying compatible
|
||||
with long-term supported distributions.
|
||||
|
||||
* glib: 2.72 or newer
|
||||
* meson: 0.59.0 or newer
|
||||
|
||||
This roughly corresponds to Ubuntu 22.04 Jammy and Debian Bookworm.
|
||||
|
||||
Generated man pages were removed from the git repository and now require
|
||||
`pandoc` to build instead of `go-md2man`. If you compile from git, you
|
||||
will now need to install `pandoc` to get the man pages.
|
||||
|
||||
Release tarballs still contain the files and can be installed without
|
||||
additional tool.
|
||||
|
||||
## Other smaller changes
|
||||
|
||||
* new `.rasinc` extension for theme fragments included from other theme files
|
||||
* `-ellipsize-mode` mode option in dmenu mode can be set to `start`, `middle` or `end`
|
||||
to control how long entries are ellipsized
|
||||
* `-list-keybindings` to print a summary of configured bindings
|
||||
* `-window-prefer-icon-theme` to force precedence of theme icons over applications'
|
||||
custom ones (#1702)
|
||||
* `-placeholder-markup` to enable pango markup when rendering placeholder text (#1690)
|
||||
* `urgent` and `active` flags can be controlled for each row in dmenu and script
|
||||
modes
|
||||
* Fixing window coordinates for non-reparting window manager. (Thanks to Ortango #1969)
|
||||
* Fix failing decode of animated gif files. (Thanks to martinsifrar #1975)
|
||||
|
||||
## Website
|
||||
|
||||
The current documentation is now also available on online at:
|
||||
The current documentation is now also available online at:
|
||||
[https://davatorium.github.io/rofi/](https://davatorium.github.io/rofi/)
|
||||
|
||||
# Thanks to
|
||||
|
@ -80,12 +124,14 @@ Special thanks goes to:
|
|||
* Gutyina Gergő
|
||||
* Jasper Lievisse Adriaanse
|
||||
* Jorge
|
||||
* martinsifrar
|
||||
* Martin Weinelt
|
||||
* Morgane Glidic
|
||||
* Naïm Favier
|
||||
* Nikita Zlobin
|
||||
* nomoo
|
||||
* notuxic
|
||||
* Ortango
|
||||
* Rasmus Steinke
|
||||
* Tim Pope
|
||||
* TonCherAmi
|
||||
|
@ -97,6 +143,45 @@ Apologies if I mistyped or missed anybody.
|
|||
|
||||
# Changelog
|
||||
|
||||
* [xcb] Add border_width to window coordinates (#1969)
|
||||
* [IconFetcher] Don't check for extension for image file
|
||||
* [IconFetcher] Fix failing decode of animated GIFs. (#1975)
|
||||
* [Doc] Fix typos, thx to @Nickwiz
|
||||
* [Run] Don't re-quote history items.
|
||||
* [Modes] Remove dead code in mode implems (#1960)
|
||||
* [View] Work around GThreadPool 1 pointer bug.
|
||||
* Also fix typo in icon fetcher.
|
||||
* [Github] Bump checkout to v4
|
||||
* [Doc] Switch to pandoc and remove generated files (#1955)
|
||||
* [Build] Add missing dist files from libnkutils
|
||||
* [IconFetcher] Don't free on removal from thread-pool
|
||||
* Add an item-free method to the thread-pool
|
||||
* [Window] write code so clang-check does not complain about leak.
|
||||
* [script|dmenu] Add option to make row permanent. (#1952)
|
||||
* [run] fix missing doxygen and add explanation.
|
||||
* [Run] When passing raw entry, pass it unquoted to history (#1951)
|
||||
* Replace deprecated g_memdup by g_memdup2
|
||||
* Bump glib version to 2.72
|
||||
* [Build] Bump minimal meson version to 0.59.0 (#1947)
|
||||
* Fix compiler warnings in window mode.
|
||||
* Fix some compiler warnings.
|
||||
* [RUN] shell escape command before processing it further.
|
||||
* [DRun] Drun read url field from cache.
|
||||
* [Build] Reduce amount of warnings (#1944)
|
||||
* [View] Don't use xcb surface to render to png, but create surface.
|
||||
* [Box] When estimating height, set correct width on children (#1943)
|
||||
* [ThreadPool] Sort items in the queue based on priority
|
||||
* [Doc] Fix broken ``` guards.
|
||||
* [Doc] Remove reddit link from config.yml.
|
||||
* [Doc] Clarify in build instructions what release to use.
|
||||
* Add extra documentation issue template.
|
||||
* Fix typo in dynamic_themes.md (#1941)
|
||||
* [DOC] Add explanation to PATTERN of brackets (#1933)
|
||||
* [Doc] Update manpage to clarify meta property.
|
||||
* [View] On mode switch force refilter instead of queuing. (#1928)
|
||||
* [View] Allow float delay (#1926)
|
||||
* [View] Always forward motion to the grabbed widget first.
|
||||
* [IconFetcher] If last step fails to load icon, don't error out make warning
|
||||
* [Script] Update theme property clarification a bit.
|
||||
* [Script] Add clarification to theme property.
|
||||
* [Dmenu][Script] Add 'display' row option to override whats displayed.
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
|
@ -354,6 +354,7 @@ static void rofi_icon_fetcher_worker(thread_state *sdata,
|
|||
}
|
||||
cairo_surface_t *icon_surf = NULL;
|
||||
|
||||
#if 0 // unsure why added in past?
|
||||
const char *suf = strrchr(icon_path, '.');
|
||||
if (suf == NULL) {
|
||||
sentry->query_done = TRUE;
|
||||
|
@ -361,10 +362,22 @@ static void rofi_icon_fetcher_worker(thread_state *sdata,
|
|||
rofi_view_reload();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
GError *error = NULL;
|
||||
GdkPixbuf *pb = gdk_pixbuf_new_from_file_at_scale(
|
||||
icon_path, sentry->wsize, sentry->hsize, TRUE, &error);
|
||||
|
||||
/*
|
||||
* The GIF codec throws GDK_PIXBUF_ERROR_INCOMPLETE_ANIMATION if it's closed
|
||||
* without decoding all the frames. Since gdk_pixbuf_new_from_file_at_scale
|
||||
* only decodes the first frame, this specific error needs to be ignored.
|
||||
*/
|
||||
if (error != NULL && g_error_matches(error, GDK_PIXBUF_ERROR,
|
||||
GDK_PIXBUF_ERROR_INCOMPLETE_ANIMATION)) {
|
||||
g_clear_error(&error);
|
||||
}
|
||||
|
||||
if (error != NULL) {
|
||||
g_warning("Failed to load image: |%s| %d %d %s (%p)", icon_path,
|
||||
sentry->wsize, sentry->hsize, error->message, (void *)pb);
|
||||
|
|
61
source/xcb.c
61
source/xcb.c
|
@ -881,37 +881,38 @@ static int monitor_active_from_id_focused(int mon_id, workarea *mon) {
|
|||
free(tree_reply);
|
||||
return retv;
|
||||
}
|
||||
xcb_translate_coordinates_cookie_t ct = xcb_translate_coordinates(
|
||||
xcb->connection, tree_reply->parent, r->root, r->x, r->y);
|
||||
xcb_translate_coordinates_reply_t *t =
|
||||
xcb_translate_coordinates_reply(xcb->connection, ct, NULL);
|
||||
if (t) {
|
||||
if (mon_id == -2) {
|
||||
// place the menu above the window
|
||||
// if some window is focused, place menu above window, else fall
|
||||
// back to selected monitor.
|
||||
mon->x = t->dst_x - r->x;
|
||||
mon->y = t->dst_y - r->y;
|
||||
mon->w = r->width;
|
||||
mon->h = r->height;
|
||||
retv = TRUE;
|
||||
if ((current_window_manager & WM_ROOT_WINDOW_OFFSET) ==
|
||||
WM_ROOT_WINDOW_OFFSET) {
|
||||
mon->x += r->x;
|
||||
mon->y += r->y;
|
||||
}
|
||||
g_debug("mon pos: %d %d %d-%d", mon->x, mon->y, mon->w, mon->h);
|
||||
} else if (mon_id == -4) {
|
||||
g_debug("Find monitor at location: %d %d", t->dst_x, t->dst_y);
|
||||
monitor_dimensions(t->dst_x, t->dst_y, mon);
|
||||
g_debug("Monitor found pos: %d %d %d-%d", mon->x, mon->y, mon->w, mon->h);
|
||||
retv = TRUE;
|
||||
if (tree_reply->parent != r->root) {
|
||||
xcb_translate_coordinates_cookie_t ct = xcb_translate_coordinates(
|
||||
xcb->connection, tree_reply->parent, r->root, r->x, r->y);
|
||||
xcb_translate_coordinates_reply_t *t =
|
||||
xcb_translate_coordinates_reply(xcb->connection, ct, NULL);
|
||||
if (t) {
|
||||
r->x = t->dst_x;
|
||||
r->y = t->dst_y;
|
||||
free(t);
|
||||
} else {
|
||||
g_debug("Failed to get translate position of active window, falling back "
|
||||
"to mouse location (-5).");
|
||||
free(r);
|
||||
free(tree_reply);
|
||||
return retv;
|
||||
}
|
||||
free(t);
|
||||
} else {
|
||||
g_debug("Failed to get translate position of active window, falling back "
|
||||
"to mouse location (-5).");
|
||||
}
|
||||
if (mon_id == -2) {
|
||||
// place the menu above the window
|
||||
// if some window is focused, place menu above window, else fall
|
||||
// back to selected monitor.
|
||||
mon->x = r->x + r->border_width;
|
||||
mon->y = r->y + r->border_width;
|
||||
mon->w = r->width;
|
||||
mon->h = r->height;
|
||||
retv = TRUE;
|
||||
} else if (mon_id == -4) {
|
||||
g_debug("Find monitor at location: %d %d", r->x, r->y);
|
||||
monitor_dimensions(r->x, r->y, mon);
|
||||
retv = TRUE;
|
||||
}
|
||||
g_debug("mon pos: %d %d %d-%d", mon->x, mon->y, mon->w, mon->h);
|
||||
free(r);
|
||||
free(tree_reply);
|
||||
return retv;
|
||||
|
@ -1642,8 +1643,6 @@ static void x11_helper_discover_window_manager(void) {
|
|||
if (g_strcmp0(str, "i3") == 0) {
|
||||
current_window_manager =
|
||||
WM_DO_NOT_CHANGE_CURRENT_DESKTOP | WM_PANGO_WORKSPACE_NAMES;
|
||||
} else if (g_strcmp0(str, "bspwm") == 0) {
|
||||
current_window_manager = WM_ROOT_WINDOW_OFFSET;
|
||||
}
|
||||
g_free(str);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue