Skip to content

Commit

Permalink
Merge branch 'davatorium:next' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
giomatfois62 committed Feb 11, 2024
2 parents 059f748 + 13c2a61 commit e243304
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 11 deletions.
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ contact_links:
- name: discussion forum
url: https://github.com/davatorium/rofi/discussions
about: Please ask and answer questions here.
- name: Rofi subreddit
url: https://www.reddit.com/r/qtools/
about: Please ask and answer questions here.
- name: Rofi IRC channel
url: https://web.libera.chat/?channels=#rofi
about: Please ask and answer question in real time here.
81 changes: 81 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Documentation Bug Report
description: Report a problem in Rofi Documentation
labels: [Documentation]
title: "[Doc] "
body:

- type: markdown
attributes:
value: |
First read the
[guidelines](https://github.com/DaveDavenport/rofi/blob/next/.github/CONTRIBUTING.md)!
This is not optional for any report. People must be able to understand
the full context of the report when reading it, at any time.
If you feel like you “it is simple and requires no explanation”, please
consider you’re wrong and still fill the full report. Any report
missing required informations will be labeled as “Incomplete Report -
Please follow the guidelines” and will be closed. If you ask a
question, enter dummy information in required fields to get passed the
checks or in general completely ignore the guidelines, the issue will
be closed and locked as spam.
If you are unsure, please use the
[discussion](https://github.com/davatorium/rofi/discussions) forum
first. It is easy to upgrade a question to an issue in github.
**Please do not submit reports related to wayland, see
[here](https://github.com/DaveDavenport/rofi/wiki/Wayland) for more
information.**
- type: input
attributes:
label: "Rofi version (rofi -v)"
placeholder: "Version: 1.7.5"
validations:
required: true
- type: input
attributes:
label: "URL"
description: "Please provide a link to the relevant documentation."
placeholder: "link to page on https://davatorium.github.io/rofi/ or file on https://github.com/davatorium/rofi/"
validations:
required: true

- type: textarea
attributes:
label: "Explain the issue with the documentation, please be verbose."
placeholder: |
* What am I trying to achieve
..
* What instructions are unclear, wrong or missing
..
* Suggestions for improving the current documentation
..
validations:
required: true
- type: textarea
attributes:
label: "Optional fixed text"
description: "Suggested new and or improved text for documentation."
validations:
required: false
- type: checkboxes
id: wayland
attributes:
label: Using wayland display server protocol
description: I have checked and confirm that my issue is not related to running rofi using wayland as display server protocol. See [here](https://github.com/DaveDavenport/rofi/wiki/Wayland) for more information.
options:
- label: "No, my documentation issue is not about running rofi using the wayland display server protocol"
required: true
- type: checkboxes
id: latestversion
attributes:
label: I've checked if the issue exists in the latest stable release
description: I confirm that I verified the issue still exists in the latest stable release.
options:
- label: "Yes, I have checked the problem exists in the latest stable version"
required: false



19 changes: 12 additions & 7 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ On debian based systems, the developer packages are in the form of:

## Install from a release

When downloading from the github release page, make sure to grab the archive
`rofi-{version}.tar.[g|x]z`. The auto-attached files `source code (zip|tar.gz)`
by github do not contain a valid release. It misses a setup build system and
includes irrelevant files.

### Autotools

Create a build directory and enter it:
Expand Down Expand Up @@ -252,19 +257,19 @@ For more information see the rofi-debugging(5) manpage.

```bash
apt install rofi
````
```

### Fedora

```bash
dnf install rofi
````
```

### ArchLinux

```bash
pacman -S rofi
````
```

### Gentoo

Expand All @@ -273,13 +278,13 @@ enable ~arch to get the latest release:

```bash
echo 'x11-misc/rofi ~amd64' >> /etc/portage/package.accept_keywords
````
```

for amd64 or:

```bash
echo 'x11-misc/rofi ~x86' >> /etc/portage/package.accept_keywords
````
```

for i386.

Expand All @@ -291,13 +296,13 @@ On both openSUSE Leap and openSUSE Tumbleweed rofi can be installed using:

```bash
sudo zypper install rofi
````
```

### FreeBSD

```bash
sudo pkg install rofi
````
```

### macOS

Expand Down
1 change: 1 addition & 0 deletions include/rofi-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ typedef struct rofi_int_matcher_t {
*/
typedef struct _thread_state {
void (*callback)(struct _thread_state *t, gpointer data);
int priority;
} thread_state;

extern GThreadPool *tpool;
Expand Down
2 changes: 1 addition & 1 deletion mkdocs/docs/guides/DynamicThemes/dynamic_themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ These will be merged into the theme on load:
Now if we run it:

```bash
REVIEW=true rofi -theme fullscreen-preview.rasi -show filebrowser
PREVIEW=true rofi -theme fullscreen-preview.rasi -show filebrowser
```

It looks like this:
Expand Down
2 changes: 2 additions & 0 deletions source/rofi-icon-fetcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,7 @@ uint32_t rofi_icon_fetcher_query_advanced(const char *name, const int wsize,

// Push into fetching queue.
sentry->state.callback = rofi_icon_fetcher_worker;
sentry->state.priority = G_PRIORITY_LOW;
g_thread_pool_push(tpool, sentry, NULL);

return sentry->uid;
Expand Down Expand Up @@ -805,6 +806,7 @@ uint32_t rofi_icon_fetcher_query(const char *name, const int size) {

// Push into fetching queue.
sentry->state.callback = rofi_icon_fetcher_worker;
sentry->state.priority = G_PRIORITY_LOW;
g_thread_pool_push(tpool, sentry, NULL);

return sentry->uid;
Expand Down
11 changes: 11 additions & 0 deletions source/view.c
Original file line number Diff line number Diff line change
Expand Up @@ -1444,6 +1444,7 @@ static gboolean rofi_view_refilter_real(RofiViewState *state) {
states[i].plen = plen;
states[i].pattern = pattern;
states[i].st.callback = filter_elements;
states[i].st.priority = G_PRIORITY_HIGH;
if (i > 0) {
g_thread_pool_push(tpool, &states[i], NULL);
}
Expand Down Expand Up @@ -2624,6 +2625,15 @@ void rofi_view_cleanup() {

input_history_save();
}

static int rofi_thread_workers_sort(gconstpointer a,gconstpointer b, gpointer data G_GNUC_UNUSED)
{
thread_state *tsa = (thread_state *)a;
thread_state *tsb = (thread_state *)b;
// lower number is lower priority.. a is sorted above is a > b.
return tsa->priority-tsb->priority;
}

void rofi_view_workers_initialize(void) {
TICK_N("Setup Threadpool, start");
if (config.threads == 0) {
Expand All @@ -2649,6 +2659,7 @@ void rofi_view_workers_initialize(void) {
g_error_free(error);
exit(EXIT_FAILURE);
}
g_thread_pool_set_sort_function(tpool, rofi_thread_workers_sort, NULL);
TICK_N("Setup Threadpool, done");
}
void rofi_view_workers_finalize(void) {
Expand Down

0 comments on commit e243304

Please sign in to comment.