hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
21.94k stars 914 forks source link

2 and more libreoffice documents don't open on startup properly #7526

Open fib-nm opened 3 months ago

fib-nm commented 3 months ago

Regression?

No

System Info and Version

System/Version info ```sh Hyprland, built from branch at commit 9a09eac79b85c846e3a865a9078a3f8ff65a9259 (props: bump version to 0.42.0). Date: Wed Aug 7 19:17:10 2024 Tag: v0.42.0, commits: 5069 flags: (if any) System Information: System name: Linux Node name: archlaptop Release: 6.10.6-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Mon, 19 Aug 2024 17:02:39 +0000 GPU information: 00:02.0 VGA compatible controller [0300]: Intel Corporation CometLake-H GT2 [UHD Graphics] [8086:9bc4] (rev 05) (prog-if 00 [VGA controller]) 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] [10de:2520] (rev a1) (prog-if 00 [VGA controller]) os-release: NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://archlinux.org/" DOCUMENTATION_URL="https://wiki.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues" PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" LOGO=archlinux-logo plugins: ======Config-Start====== Config File: /home/fib_nm/.config/hypr/hyprland.conf: Read Succeeded # ####################################################################################### # AUTOGENERATED HYPR CONFIG. # PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT, # OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS. # ####################################################################################### # # Please note not all available settings / options are set here. # For a full list, see the wiki # #autogenerated = 1 # remove this line to remove the warning # See https://wiki.hyprland.org/Configuring/Monitors/ monitor=,preferred,auto,1 # See https://wiki.hyprland.org/Configuring/Keywords/ for more # Set programs that you use $terminal = kitty $fileManager = dolphin $menu = wofi --show drun # Execute your favorite apps at launch exec-once = hyprpaper exec-once = waybar exec-once = [workspace 1 silent] $terminal exec-once = [workspace 1 silent] keepassxc exec-once = [workspace 2 silent] firefox exec-once = [workspace 3 silent] libreoffice --nologo Notes/commands.ods exec-once = [workspace 3 silent] libreoffice --nologo Notes/books.ods # Source a file (multi-file configs) # source = ~/.config/hypr/myColors.conf # Some default env vars. env = XCURSOR_SIZE,24 env = QT_QPA_PLATFORMTHEME,qt6ct # change to qt6ct if you have that # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { kb_layout = us,ru kb_variant = kb_model = kb_options = grp:alt_shift_toggle kb_rules = follow_mouse = 1 accel_profile = flat touchpad { natural_scroll = no } sensitivity = -0.3 # -1.0 to 1.0, 0 means no modification. } general { # See https://wiki.hyprland.org/Configuring/Variables/ for more gaps_in = 5 gaps_out = 20 border_size = 2 col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg col.inactive_border = rgba(595959aa) layout = dwindle # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on allow_tearing = false } decoration { # See https://wiki.hyprland.org/Configuring/Variables/ for more rounding = 10 blur { enabled = true size = 3 passes = 1 } drop_shadow = yes shadow_range = 4 shadow_render_power = 3 col.shadow = rgba(1a1a1aee) } animations { enabled = yes # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more bezier = myBezier, 0.05, 0.9, 0.1, 1.05 animation = windows, 1, 7, myBezier animation = windowsOut, 1, 7, default, popin 80% animation = border, 1, 10, default animation = borderangle, 1, 8, default animation = fade, 1, 7, default animation = workspaces, 1, 6, default } dwindle { # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below preserve_split = yes # you probably want this } master { # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more # new_is_master = true } gestures { # See https://wiki.hyprland.org/Configuring/Variables/ for more workspace_swipe = off } misc { # See https://wiki.hyprland.org/Configuring/Variables/ for more force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers } # Example per-device config # See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more device { } # Example windowrule v1 # windowrule = float, ^(kitty)$ # Example windowrule v2 # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. # windowrule = workspace 3 silent,(libreoffice-startcenter) # See https://wiki.hyprland.org/Configuring/Keywords/ for more $mainMod = SUPER # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod, Q, exec, $terminal bind = $mainMod, C, killactive, bind = $mainMod, M, exit, bind = $mainMod, E, exec, $fileManager bind = $mainMod, V, togglefloating, bind = $mainMod, R, exec, $menu bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, J, togglesplit, # dwindle # Move focus with mainMod + arrow keys bind = $mainMod, left, movefocus, l bind = $mainMod, right, movefocus, r bind = $mainMod, up, movefocus, u bind = $mainMod, down, movefocus, d # Switch workspaces with mainMod + [0-9] bind = $mainMod, 1, workspace, 1 bind = $mainMod, 2, workspace, 2 bind = $mainMod, 3, workspace, 3 bind = $mainMod, 4, workspace, 4 bind = $mainMod, 5, workspace, 5 bind = $mainMod, 6, workspace, 6 bind = $mainMod, 7, workspace, 7 bind = $mainMod, 8, workspace, 8 bind = $mainMod, 9, workspace, 9 bind = $mainMod, 0, workspace, 10 # Move active window to a workspace with mainMod + SHIFT + [0-9] bind = $mainMod SHIFT, 1, movetoworkspacesilent, 1 bind = $mainMod SHIFT, 2, movetoworkspacesilent, 2 bind = $mainMod SHIFT, 3, movetoworkspacesilent, 3 bind = $mainMod SHIFT, 4, movetoworkspacesilent, 4 bind = $mainMod SHIFT, 5, movetoworkspacesilent, 5 bind = $mainMod SHIFT, 6, movetoworkspacesilent, 6 bind = $mainMod SHIFT, 7, movetoworkspacesilent, 7 bind = $mainMod SHIFT, 8, movetoworkspacesilent, 8 bind = $mainMod SHIFT, 9, movetoworkspacesilent, 9 bind = $mainMod SHIFT, 0, movetoworkspacesilent, 10 # Example special workspace (scratchpad) bind = $mainMod, S, togglespecialworkspace, magic bind = $mainMod SHIFT, S, movetoworkspace, special:magic # Scroll through existing workspaces with mainMod + scroll bind = $mainMod, Tab, workspace, e+1 bind = $mainMod, grave, workspace, e-1 # Move/resize windows with mainMod + LMB/RMB and dragging bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow # Change volume binde=, F9, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+ binde=, F8, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%- bind =, F7, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle # Take screenshots # bind = , Print, exec, date_=$(date +%m.%d.%Y); time=$(date +%H:%M:%S); grim -g "$(slurp -d)" "$HOME/Pictures"/"$date_-$time-archlaptop.png"; wl-copy < ~/Pictures/"$date_-$time-archlaptop.png" bind = , Print, exec, date_=$(date +%m.%d.%Y); time=$(date +%H:%M:%S); grim "$HOME/Pictures/Screenshots"/"$date_-$time-archlaptop.png"; wl-copy < ~/Pictures/Screenshots/"$date_-$time-archlaptop.png" ======Config-End======== ```

Description

If I want to open 2 or more libreoffice documents on startup on any workspace i (i != 1), one of them will open on workspace i, and other will open on workspace 1.

For example, if I have following lines in my hyprland config file:

exec-once = [workspace 3 silent] libreoffice --nologo 1.ods
exec-once = [workspace 3 silent] libreoffice --nologo 2.ods

1.ods will start on workspace 1, and 2.ods will start on workspace 3, or 2.ods will start on workspace 1, and 1.ods will start on workspace 3.

Adding line

windowrule = workspace 3 silent,(libreoffice-startcenter)

does not change anything.

If you have more than two documents, like

exec-once = [workspace 3 silent] libreoffice --nologo 1.ods
exec-once = [workspace 3 silent] libreoffice --nologo 2.ods
exec-once = [workspace 3 silent] libreoffice --nologo 3.ods
exec-once = [workspace 3 silent] libreoffice --nologo 4.ods
exec-once = [workspace 3 silent] libreoffice --nologo 5.ods

one of them will open on workspace 3, and 4 other will open on workspace 1.

How to reproduce

First, create 2 or more libreoffice files:

touch 1.ods
touch 2.ods

Then add exec-once lines for these documents to hyprland config file:

exec-once = [workspace 3 silent] libreoffice --nologo 1.ods
exec-once = [workspace 3 silent] libreoffice --nologo 2.ods

Restart pc:

reboot

Crash reports, logs, images, videos

No response

romanstingler commented 3 months ago

Github you suck, how about a filter ?

fib-nm commented 3 months ago

@romanstingler hey, should I install the package they are linking? It just seems kinda wierd that several people are copy-pasting the same message

gulafaran commented 3 months ago

@romanstingler hey, should I install the package they are linking? It just seems kinda wierd that several people are copy-pasting the same message

dear god no, its bots spamming malware all over github.

fib-nm commented 3 months ago

@gulafaran Ok, thanks. I'll be aware of that in the future.

MightyPlaza commented 3 months ago

could this be caused by initial_workspace_tracking

fib-nm commented 3 months ago

could this be caused by initial_workspace_tracking

I set initial_workspace_tracking to 0,1 and 2 and rebooted for each value. Nothing changed.

fib-nm commented 2 months ago

IMPORTANT UPDATE! If you switch to workspace n before second document opens, it will open on workspace n.

So more precisely, the bug is: all libreoffice documents after the first one, open on the workspace that is used at the moment of their opening.

MightyPlaza commented 2 months ago

it's very likely libreoffice forks itself if an instance of it is already running (similar to firefox), so only the first exec rule will work you can check easily other exec rules don't work either that's how exec rules have always worked

normal window rules will still work if properly matched