girara issueshttps://git.pwmt.org/pwmt/girara/-/issues2024-03-02T17:23:14+01:00https://git.pwmt.org/pwmt/girara/-/issues/21Invalid font weight mapping between Pango and CSS2024-03-02T17:23:14+01:00Ghost UserInvalid font weight mapping between Pango and CSSHi, I noticed that when using custom font weights in zathura, the following error is triggered:
```plaintext
error: Unable to load CSS: <data>:7:15unknown value for property
```
This corresponds to the `@font-weight@` property being se...Hi, I noticed that when using custom font weights in zathura, the following error is triggered:
```plaintext
error: Unable to load CSS: <data>:7:15unknown value for property
```
This corresponds to the `@font-weight@` property being set in girara.
I have tracked down the issue to https://git.pwmt.org/pwmt/girara/-/blob/develop/girara/session.c#L103: where the font weight is retrieved as a numeric value from pango and mapped to a CSS value string. It seems however that many of the mappings are not valid, when compared the documented GTK values: https://docs.gtk.org/gtk3/css-properties.html#font-properties
The fix is quite simple, though I see two ways to implement it;
- Update the mapping to the correct documented values
- Remove the mapping, and simply convert the weight value retrieved to a string, as the GTK CSS parser also accepts this.
I've implemented the second method on my local system and it does indeed resolve the issue, however pango can theoretically return a weight value of 1000 (ultraheavy), which is not documented as valid in GTK.https://git.pwmt.org/pwmt/girara/-/issues/20selecting text displays the selected text in the status bar, which can insane...2024-01-13T19:20:37+01:00Vincent Lefèvreselecting text displays the selected text in the status bar, which can insanely increase the window widthWhen I select text in a PDF document, the whole selected text is displayed in the status bar, and the zathura window width is increased to make this text completely visible in the status bar. If much text is selected (several lines / par...When I select text in a PDF document, the whole selected text is displayed in the status bar, and the zathura window width is increased to make this text completely visible in the status bar. If much text is selected (several lines / paragraphs), this can give insane window widths (several times larger than the screen width), such as 30521 pixels, making the X server quite unresponsive.
I also reported this issue as [Debian bug 1060314](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1060314).https://git.pwmt.org/pwmt/girara/-/issues/19Selecting text resizes the window2024-01-13T19:20:45+01:00peachey2k2Selecting text resizes the windowWhenever I select a piece of text, it forcefully resizes the window vertically to fit that text in the bottom line where it says `Copied selected text to selection clipboard: {text}`. When it happens, the window can't be shrunken to a sm...Whenever I select a piece of text, it forcefully resizes the window vertically to fit that text in the bottom line where it says `Copied selected text to selection clipboard: {text}`. When it happens, the window can't be shrunken to a smaller size until I hit the escape key, which hides that bottom line. This happens even when the window is maximized and in fullscreen.
zathura --version output:
```
>> zathura --version
Gtk-Message: 15:09:09.790: Failed to load module "colorreload-gtk-module"
Gtk-Message: 15:09:09.791: Failed to load module "window-decorations-gtk-module"
zathura 0.5.4
girara 0.4.1 (runtime: 0.4.1)
(plugin) pdf-poppler (0.3.2) (/usr/lib/zathura/libpdf-poppler.so)
```
DE: Xfce 4.18
Video recording demonstrating the issue:
![untitled](/uploads/2149bc37e77c085bf6e2f4666d9d6882/untitled.mp4)https://git.pwmt.org/pwmt/girara/-/issues/17Test crash with GLib 2.762023-03-22T16:40:48+01:00Jan TojnarTest crash with GLib 2.76After updating to GLib 2.76.0, datastructures test crashes:
```
2/6 datastructures FAIL 0.18s exit status 1
>>> LD_LIBRARY_PATH=/build/girara-0.3.9/build/ MALLOC_PERTURB_=174 /build/girara-0.3.9/build/tests/test_d...After updating to GLib 2.76.0, datastructures test crashes:
```
2/6 datastructures FAIL 0.18s exit status 1
>>> LD_LIBRARY_PATH=/build/girara-0.3.9/build/ MALLOC_PERTURB_=174 /build/girara-0.3.9/build/tests/test_datastructures
✀
stdout:
Running suite(s): Datastructures
91%: Checks: 12, Failures: 0, Errors: 1
../tests/test_datastructures.c:238:E:node_basics:test_datastructures_node:0: (after this point) Received signal 11 (Segmentation fault)
stderr:
debug: ../tests/test_datastructures.c:370: critical_print(): expected glib critical: girara_list_merge: assertion 'list != NULL' failed
debug: ../tests/test_datastructures.c:370: critical_print(): expected glib critical: girara_list_merge: assertion 'list != NULL' failed
debug: ../tests/test_datastructures.c:370: critical_print(): expected glib critical: girara_list_find: assertion 'list != NULL && compare != NULL' failed
debug: ../tests/test_datastructures.c:370: critical_print(): expected glib critical: girara_list_find: assertion 'list != NULL && compare != NULL' failed
debug: ../tests/test_datastructures.c:370: critical_print(): expected glib critical: girara_list_find: assertion 'list != NULL && compare != NULL' failed
debug: ../tests/test_datastructures.c:370: critical_print(): expected glib critical: girara_list_find: assertion 'list != NULL && compare != NULL' failed
0# (anonymous namespace)::segabort_handler(int) in /nix/store/22j72lfbx73y61xv3phyisz9nkkbjk4x-libsegfault-unstable-2022-11-13/lib/libsegfault.so
1# 0x00007FFFF723DBF0 in /nix/store/8bmp6r3a0xfha3wj36phlc47clh9w81l-glibc-2.35-224/lib/libc.so.6
2# girara_node_free.localalias at ../girara/datastructures.c:461
3# test_datastructures_node_fn at ../tests/test_datastructures.c:264
4# srunner_run_tagged in /nix/store/mj9cq5rdhivvjqyjcaam7klwvzkpl8lr-check-0.15.2/lib/libcheck.so.0
5# run_suite at ../tests/tests.c:12
6# __libc_start_call_main in /nix/store/8bmp6r3a0xfha3wj36phlc47clh9w81l-glibc-2.35-224/lib/libc.so.6
7# __libc_start_main_impl in /nix/store/8bmp6r3a0xfha3wj36phlc47clh9w81l-glibc-2.35-224/lib/libc.so.6
8# _start in /build/girara-0.3.9/build/tests/test_datastructures
```https://git.pwmt.org/pwmt/girara/-/issues/16URL for documentation is broken2022-05-04T19:36:14+02:00gimpleURL for documentation is brokenWas looking at the site earlier and just browsing around, noticed that the URL linking to documentation for Girara isn't working at the moment, throws me a 404 error when I try to visit it.
The link in question is to https://pwmt.org/pr...Was looking at the site earlier and just browsing around, noticed that the URL linking to documentation for Girara isn't working at the moment, throws me a 404 error when I try to visit it.
The link in question is to https://pwmt.org/projects/girara/doxygen - it's the one followed from on the main Girara project page, seen here: ![brave_avaiGe77kZ](/uploads/6e9055f26c026f06ba53eab1e141ab41/brave_avaiGe77kZ.png)
Apologies in advance if this isn't the appropriate place to mention this, I didn't want to bother anyone with an e-mail.https://git.pwmt.org/pwmt/girara/-/issues/15zathurarc not loading if a line contains only spaces2022-02-13T19:13:28+01:00japm48zathurarc not loading if a line contains only spacesIf any line in `zathurarc` contains only spaces, the config line-by-line loading is immediately stopped with no error message (this could be the reason for similar bugs where the config file is mysteriously not loading). At least this is...If any line in `zathurarc` contains only spaces, the config line-by-line loading is immediately stopped with no error message (this could be the reason for similar bugs where the config file is mysteriously not loading). At least this is true for the first line.
It took me quite a while to pinpoint this, I had to recompile in debug mode and use GDB.
Apparently, the culprit is the function `g_shell_parse_argv` in Glib, which is called from girara in `config.c` (function `config_parse`).
It returns false when the line is non-empty and contains spaces. I guess it fails because it expects a valid "argv" string.
As Glib is already a dependency, I would suggest using `g_strstrip`.https://git.pwmt.org/pwmt/girara/-/issues/14input bar color (inputbar-bg) is not shown correctly2023-04-10T01:07:21+02:00Robert Smithinput bar color (inputbar-bg) is not shown correctlyI noticed that changing the background color of the input bar is not being rendered correctly:
![screenshot-210227-1712-20](/uploads/5ff95abdfc44eb58f48c259e51b054a1/screenshot-210227-1712-20.png)
![screenshot-210227-1720-51](/uploads/9...I noticed that changing the background color of the input bar is not being rendered correctly:
![screenshot-210227-1712-20](/uploads/5ff95abdfc44eb58f48c259e51b054a1/screenshot-210227-1712-20.png)
![screenshot-210227-1720-51](/uploads/92546550770e69d962c3b75f93a4657e/screenshot-210227-1720-51.png)
In the previous screenshot, I'm using a (horrible) red color for the text and background:
```
set inputbar-bg "#FF2525"
set inputbar-fg "#FF2525"
```
As you can see, the text changes as expected and even what seems to be the input bar's borders. However, the background of the actual input field is not changing as expected. Please let me know if I'm missing something.
```
Linux 5.4.0-66-generic #74~18.04.2-Ubuntu SMP
libgtk-3-0:amd 3.22.30-1ubu
zathura 0.4.7
girara 0.3.5 (runtime: 0.3.5)
```
zathurarc
```
# Zathura configuration file
# See man `man zathurarc'
# Open document in fit-width mode by default
set adjust-open "best-fit"
# One page per row by default
set pages-per-row 1
#stop at page boundries
set scroll-page-aware "true"
set scroll-full-overlap 0.01
set scroll-step 100
#zoom settings
set zoom-min 10
# zathurarc-dark
set default-bg "#FFFFFF" #00
set default-fg "#202020" #01
set statusbar-fg "#FFFFFF" #04
set statusbar-bg "#202020" #01
set inputbar-bg "#FF2525"
set inputbar-fg "#FF2525"
set notification-error-bg "#AC4142" #08
set notification-error-fg "#151515" #00
set notification-warning-bg "#AC4142" #08
set notification-warning-fg "#151515" #00
set highlight-color "#F4BF75" #0A
set highlight-active-color "#6A9FB5" #0D
set completion-highlight-fg "#151515" #02
set completion-highlight-bg "#90A959" #0C
set completion-bg "#303030" #02
set completion-fg "#E0E0E0" #0C
set notification-bg "#90A959" #0B
set notification-fg "#151515" #00
set recolor "true"
set recolor-lightcolor "#000000" #00
set recolor-darkcolor "#E0E0E0" #06
set recolor-reverse-video "true"
set recolor-keephue "true"
#set render-loading "false"
set scroll-step 50
unmap f
map f toggle_fullscreen
map [fullscreen] f toggle_fullscreen
#set font "Nimbus Sans L:style=Regular"
set font "inconsolata 17"
set guioptions "none"
set selection-clipboard clipboard
set selection-notification false
```https://git.pwmt.org/pwmt/girara/-/issues/11Confusing behavior while setting font2021-07-14T17:17:23+02:00JinConfusing behavior while setting fontCurrently on version `0.4.6` the right way to set font is by
```
:set font "foo"
```
The syntax is flexible. For example, setting `foo` to either `"Inconsolata regular 12"` or `"Inconsolata 12"` or just `"12"` work. However, for new us...Currently on version `0.4.6` the right way to set font is by
```
:set font "foo"
```
The syntax is flexible. For example, setting `foo` to either `"Inconsolata regular 12"` or `"Inconsolata 12"` or just `"12"` work. However, for new users it's tempting to change font by trying
```
:set font "Inconsolata"
```
Then by *default* `zathura` set font size to extremely small. So small for the users to misunderstand. I first thought that the status bar disappears. Then after a few fiddling I figured out that it just "sank". And then I realize that it actually set the font size to a micro level.
**EDIT** Setting `:set font "12"` is actually not OK as it disables showing the box why selecting words.
# What can be changed
1. A better doc for setting fonts
2. Set font to size 14 if user did not specify. Give a hint message.
3. Fix the bug after `:set font 12`
https://git.pwmt.org/pwmt/girara/-/issues/10unable to build girara on ubuntu 18.04.32020-04-21T13:03:45+02:00muraliunable to build girara on ubuntu 18.04.3when i tried to build girara, it failed.
I am attaching log file for reference.
[build.log](/uploads/2f389a11621ef2ef9b54493d066694f1/build.log)when i tried to build girara, it failed.
I am attaching log file for reference.
[build.log](/uploads/2f389a11621ef2ef9b54493d066694f1/build.log)https://git.pwmt.org/pwmt/girara/-/issues/9Support for non-english keyboards2023-01-15T16:05:30+01:00Pavel StepanovSupport for non-english keyboardsI've been using Zathura for quite a long time now. Lack of support of Russian, in my case, is a little bit disappointing. It is said in zathura issue #693 that girara "fails to handle non-ascii keys". I tried using Emacs for viewing pdfs...I've been using Zathura for quite a long time now. Lack of support of Russian, in my case, is a little bit disappointing. It is said in zathura issue #693 that girara "fails to handle non-ascii keys". I tried using Emacs for viewing pdfs but zathura is what I'm now used to.
So I added Russian symbols to callbacks.c where numpad keys are mapped to numbers row keys (line 42 and further):
```
switch (*keyval) {
...
case GDK_KEY_KP_9:
*keyval = GDK_KEY_9;
break;
case GDK_KEY_Cyrillic_shorti:
*keyval = GDK_KEY_q;
break;
case GDK_KEY_Cyrillic_SHORTI:
*keyval = GDK_KEY_Q;
break;
...
}
```
It actually seems to work just like in Vim, where the letters work fine, but some punctuation marks have to be used based on active keyboard layout. I think this can also work with umlauts and other symbols not present on english keyboards. Would love to see something like this implemented.https://git.pwmt.org/pwmt/girara/-/issues/8Mouse zooming broken with Girara 0.3.32020-05-01T18:53:26+02:00Richard MörbitzMouse zooming broken with Girara 0.3.3I'm using Arch Linux with Xorg.
The 0.3.3 update of Girara changed the mouse zooming (holding CTRL and scrolling) experience in Zathura.
Previously scrolling upwards zoomed in and scrolling downwards zoomed out; the whole process was ve...I'm using Arch Linux with Xorg.
The 0.3.3 update of Girara changed the mouse zooming (holding CTRL and scrolling) experience in Zathura.
Previously scrolling upwards zoomed in and scrolling downwards zoomed out; the whole process was very smooth.
Since the update the directions are inverted and zooming has only very few steps, so it's basically unusable.
Zooming with keyboard commands in Zathura was unaffected by the update.
The commit that broke mouse zooming is 87d52a4a36515468c14ca7ccc4296bbb81aba1eb.
I understand that Wayland users had an issue with the old behavior (cf. #4), but breaking the setup for Xorg users is not an option in my point of view.
Furthermore, it doesn't help that the `smooth-scroll` option was removed in c4594beb8d205cf2635e1ba2e7c55196c3fc5b18, so I can't even switch back to the old behavior by adapting my config.https://git.pwmt.org/pwmt/girara/-/issues/5Segmentation fault with (admittedly stupid) key mapping2019-04-26T19:52:29+02:00Dominik SchrempfSegmentation fault with (admittedly stupid) key mappingLet me first say that zathura is amazing and that I don't know how many times I entered "PDF viewer for Linux" into Google or DuckDuckGo before finding zathura :).
In my configuration, I was trying to map the key "j" in presentation mod...Let me first say that zathura is amazing and that I don't know how many times I entered "PDF viewer for Linux" into Google or DuckDuckGo before finding zathura :).
In my configuration, I was trying to map the key "j" in presentation mode to scroll forward one page. I already managed to do this via
map [presentation] j scroll full-down
On my way there, I tried the following line
map [presentation] j feedkeys "J"
which leads to a segmentation fault when "j" is pressed in presentation mode. I admit this key mapping is stupid, because "J" is only used in fullscreen mode, but still, I thought that a segmentation fault should be reported.
Thanks!https://git.pwmt.org/pwmt/girara/-/issues/4Touchpad scrolling not working on Wayland2020-05-01T18:54:36+02:00Marko KorhonenTouchpad scrolling not working on WaylandI'm running Gnome on Wayland and touchpad scrolling doesn't seem to be working. Tested on Gnome with Xorg and it works fine. I can provide more information, I just don't know what is needed.I'm running Gnome on Wayland and touchpad scrolling doesn't seem to be working. Tested on Gnome with Xorg and it works fine. I can provide more information, I just don't know what is needed.https://git.pwmt.org/pwmt/girara/-/issues/3Setting statusbar-h-padding or statusbar-v-padding has no effect2018-10-06T10:39:30+02:00Jonathan ReeveSetting statusbar-h-padding or statusbar-v-padding has no effectRunning commands like `:set statusbar-h-padding 30` or `:set statusbar-v-padding 30` have no effect. Changing these settings in zathurarc also have no effect.
Version info:
```
zathura 0.4.0
girara 0.3.0 (runtime: 0.3.0)
(plugin) djv...Running commands like `:set statusbar-h-padding 30` or `:set statusbar-v-padding 30` have no effect. Changing these settings in zathurarc also have no effect.
Version info:
```
zathura 0.4.0
girara 0.3.0 (runtime: 0.3.0)
(plugin) djvu (0.2.8) (/nix/store/b75pyhs07dl7r6prpaa3bvz19ywh4hmn-zathura-djvu-0.2.8/lib/zathura/libdjvu.so)
(plugin) ps (0.2.6) (/nix/store/32335lf2c9imwdiwn9zz19wbzc25jz2p-zathura-ps-0.2.6/lib/zathura/libps.so)
(plugin) pdf-mupdf (0.3.3) (/nix/store/4nqzjjykimw3xi1cnk3i9j3pbqz3azgr-zathura-pdf-mupdf-0.3.3/lib/zathura/libpdf-mupdf.so)
```
(I'm on NixOS if that helps, but I've confirmed this behaviour with others on IRC.)https://git.pwmt.org/pwmt/girara/-/issues/2Allow empty lists in girara_list_foreach2020-05-01T18:55:54+02:00Robin KrahlAllow empty lists in girara_list_foreachCurrently, `girara_list_foreach` asserts that the list is not empty (`list->start` in [`datastructures.c:382`](https://git.pwmt.org/pwmt/girara/blob/master/girara/datastructures.c#L382)). Yet a for-each operation on an empty list should ...Currently, `girara_list_foreach` asserts that the list is not empty (`list->start` in [`datastructures.c:382`](https://git.pwmt.org/pwmt/girara/blob/master/girara/datastructures.c#L382)). Yet a for-each operation on an empty list should just do nothing, not cause a critical error. (Similar to the `GIRARA_LIST_FOREACH` macro, which allows an empty list.)
For example, [zathura commit 5baa31b83d8c5fe5767394bbbd3084eff55bc5f4](https://git.pwmt.org/pwmt/zathura/commit/5baa31b83d8c5fe5767394bbbd3084eff55bc5f4) introduces a call to `girara_list_foreach` with a possibly empty list in `plain_save_jumplist`, causing a failed assertion every time a file is closed.
Suggested fix:
```diff
diff --git a/girara/datastructures.c b/girara/datastructures.c
index fc21330..78e6659 100644
--- a/girara/datastructures.c
+++ b/girara/datastructures.c
@@ -379,9 +379,10 @@ girara_list_sort(girara_list_t* list, girara_compare_function_t compare)
void
girara_list_foreach(girara_list_t* list, girara_list_callback_t callback, void* data)
{
- g_return_if_fail(list && list->start && callback);
+ g_return_if_fail(list && callback);
- g_list_foreach(list->start, callback, data);
+ if (list->start)
+ g_list_foreach(list->start, callback, data);
}
static void
```https://git.pwmt.org/pwmt/girara/-/issues/1girara test suite fails with new glib2021-07-22T22:03:25+02:00Timo Teräsgirara test suite fails with new glib```
make[1]: Entering directory '/home/tteras/aports/community/girara/src/girara-0.2.7/tests'
Running suite(s): Utils
85%: Checks: 14, Failures: 2, Errors: 0
test_utils.c:78:F:home_directory:test_home_directory_set_HOME:0: Home directory...```
make[1]: Entering directory '/home/tteras/aports/community/girara/src/girara-0.2.7/tests'
Running suite(s): Utils
85%: Checks: 14, Failures: 2, Errors: 0
test_utils.c:78:F:home_directory:test_home_directory_set_HOME:0: Home directory is not the same
test_utils.c:145:F:xdg_path:test_xdg_path:0: Output is not the same (got: /home/test/.config, expected: /home/tteras/.config)
```
Seems the test suite is unsetting, and setting $HOME and doing glib API calls in between.
glib has changed to fetch $HOME once and use the cached value after initial fetch. See: https://git.gnome.org/browse/glib/commit/glib/gutils.c?id=cfafad5aefeeab1a4ee208cefa15e01d31932611