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
19.75k stars 839 forks source link

Rofi isn't closed when using hyprctl dispatch closewindow #7665

Closed FFFluoride closed 2 weeks ago

FFFluoride commented 2 weeks ago

Regression?

No

System Info and Version

System/Version info ```sh Hyprland, built from branch at commit 9e781040d9067c2711ec2e9f5b47b76ef70762b3 (props: bump version to 0.41.1). Date: Thu Jun 13 09:54:06 2024 Tag: v0.41.1, commits: 4818 flags: (if any) System Information: System name: Linux Node name: ffflaptop Release: 6.6.41-gentoo-dist Version: #1 SMP PREEMPT_DYNAMIC Sun Aug 18 23:25:23 BST 2024 GPU information: 06:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Renoir [Radeon Vega Series / Radeon Vega Mobile Series] [1002:1636] (rev d1) (prog-if 00 [VGA controller]) os-release: NAME=Gentoo ID=gentoo PRETTY_NAME="Gentoo Linux" ANSI_COLOR="1;32" HOME_URL="https://www.gentoo.org/" SUPPORT_URL="https://www.gentoo.org/support/" BUG_REPORT_URL="https://bugs.gentoo.org/" VERSION_ID="2.15" plugins: ======Config-Start====== Config File: /home/fffluoride/.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. # ####################################################################################### # This is an example Hyprland config file. # Refer to the wiki for more information. # https://wiki.hyprland.org/Configuring/Configuring-Hyprland/ # Please note not all available settings / options are set here. # For a full list, see the wiki # You can split this configuration into multiple files # Create your files separately and then link them to this file like this: # source = ~/.config/hypr/myColors.conf ################ ### MONITORS ### ################ # See https://wiki.hyprland.org/Configuring/Monitors/ monitor=, 1920x1080@60,auto,1 ################### ### MY PROGRAMS ### ################### # See https://wiki.hyprland.org/Configuring/Keywords/ # Set programs that you use $terminal = kitty $fileManager = dolphin $menu = wofi --show drun ################# ### AUTOSTART ### ################# # Autostart necessary processes (like notifications daemons, status bars, etc.) # Or execute your favorite apps at launch like this: # exec-once = $terminal # exec-once = nm-applet & # exec-once = waybar & hyprpaper & firefox exec-once = bash /home/fffluoride/scripts/bash/close_rofi_unfocused.bash exec-once = emacs --daemon # start emacs daemon ############################# ### ENVIRONMENT VARIABLES ### ############################# # See https://wiki.hyprland.org/Configuring/Environment-variables/ env = XCURSOR_SIZE,24 env = HYPRCURSOR_SIZE,24 ##################### ### LOOK AND FEEL ### ##################### # Refer to https://wiki.hyprland.xxg/Configuring/Variables/ # https://wiki.hyprland.org/Configuring/Variables/#general general { gaps_in = 12 gaps_out = 20 border_size = 1 # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg col.inactive_border = rgba(595959aa) # Set to true enable resizing windows by clicking and dragging on borders and gaps resize_on_border = false # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on allow_tearing = false layout = dwindle } # https://wiki.hyprland.org/Configuring/Variables/#decoration decoration { rounding = 2 # Change transparency of focused and unfocused windows active_opacity = 0.865 inactive_opacity = 0.75 drop_shadow = false shadow_range = 14 shadow_render_power = 3 col.shadow = rgba(1a1a1aee) # https://wiki.hyprland.org/Configuring/Variables/#blur blur { enabled = true size = 3 passes = 1 noise = 0.125 } } # https://wiki.hyprland.org/Configuring/Variables/#animations animations { enabled = true # 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 } # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more dwindle { pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below preserve_split = true # You probably want this } # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more master { new_is_master = true } # https://wiki.hyprland.org/Configuring/Variables/#misc misc { force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :( } ############# ### INPUT ### ############# # https://wiki.hyprland.org/Configuring/Variables/#input input { kb_layout = gb kb_variant = kb_model = kb_options = ctrl:nocaps kb_rules = repeat_delay = 175 follow_mouse = 1 sensitivity = -0.15 # -1.0 - 1.0, 0 means no modification. touchpad { natural_scroll = false } } # https://wiki.hyprland.org/Configuring/Variables/#gestures gestures { workspace_swipe = false } # Example per-device config # See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more device { name = epic-mouse-v1 sensitivity = -0.5 } # turn it on when prototyping I guess #disable_autoreload = true misc { enable_swallow = true middle_click_paste = false } opengl { # ask about this (less cpu usage) #force_introspection = 1 } # (these config doesn't work for some reason) # disable if game graphical glitches # direct_scanout = true # min_refresh_rate=60 # hide_on_key_press=true #################### ### KEYBINDINGSS ### #################### # See https://wiki.hyprland.org/Configuring/Keywords/ $mainMod = SUPER # Sets "Windows" key as main modifier # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod, T, exec, $terminal bind = $mainMod, Q, 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 bind = $mainMod, X, exec, [float] rofi -show # 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, movetoworkspace, 1 bind = $mainMod SHIFT, 2, movetoworkspace, 2 bind = $mainMod SHIFT, 3, movetoworkspace, 3 bind = $mainMod SHIFT, 4, movetoworkspace, 4 bind = $mainMod SHIFT, 5, movetoworkspace, 5 bind = $mainMod SHIFT, 6, movetoworkspace, 6 bind = $mainMod SHIFT, 7, movetoworkspace, 7 bind = $mainMod SHIFT, 8, movetoworkspace, 8 bind = $mainMod SHIFT, 9, movetoworkspace, 9 bind = $mainMod SHIFT, 0, movetoworkspace, 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, mouse_down, workspace, e+1 bind = $mainMod, mouse_up, workspace, e-1 # Move/resize windows with mainMod + LMB/RMB and dragging bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow ############################## ### WINDOWS AND WORKSPACES ### ############################## # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules # Example windowrule v1 # windowrule = float, ^(kitty)$ # Example windowrule v2 # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. # firefox has no transparency when focuses and less transparency overall windowrulev2 = opacity 1 override 1.2, class:firefox windowrulev2 = opacity 1 override 1.2, class:discord ======Config-End======== ```

Description

When I try to close rofi using: hyprctl dispatch closewindow address:<rofi's address> It doesn't work and just says ok in the terminal. Closing other windows this way such as kitty works.

How to reproduce

Crash reports, logs, images, videos

Here is the "post mortem" screenshot is attatched. file

romanstingler commented 2 weeks ago

image probably because rofi creates 2 windows it is called. No clue why, tell them. I use wofi. what works for me is hyprctl dispatch closewindow title:rofi

FFFluoride commented 2 weeks ago

What you did works for rofi as you ran it. But I ran it differently and have a config, I forgot to post those oops.

In my hyprland.conf I have: bind = $mainMod, X, exec, [float] rofi -show

My rofi config (it really only sets the modes) ``` configuration { modes: "drun,run"; /* font: "mono 12";*/ /* location: 0;*/ /* yoffset: 0;*/ /* xoffset: 0;*/ /* fixed-num-lines: true;*/ /* show-icons: false;*/ /* terminal: "rofi-sensible-terminal";*/ /* ssh-client: "ssh";*/ /* ssh-command: "{terminal} -e {ssh-client} {host} [-p {port}]";*/ /* run-command: "{cmd}";*/ /* run-list-command: "";*/ /* run-shell-command: "{terminal} -e {cmd}";*/ /* window-command: "wmctrl -i -R {window}";*/ /* window-match-fields: "all";*/ /* icon-theme: ;*/ /* drun-match-fields: "name,generic,exec,categories,keywords";*/ /* drun-categories: ;*/ /* drun-show-actions: false;*/ /* drun-display-format: "{name} [({generic})]";*/ /* drun-url-launcher: "xdg-open";*/ /* disable-history: false;*/ /* ignored-prefixes: "";*/ /* sort: false;*/ /* sorting-method: "normal";*/ /* case-sensitive: false;*/ /* cycle: true;*/ /* sidebar-mode: false;*/ /* hover-select: false;*/ /* eh: 1;*/ /* auto-select: false;*/ /* parse-hosts: false;*/ /* parse-known-hosts: true;*/ /* combi-modes: "window,run";*/ /* matching: "normal";*/ /* tokenize: true;*/ /* m: "-5";*/ /* filter: ;*/ /* dpi: -1;*/ /* threads: 0;*/ /* scroll-method: 0;*/ /* window-format: "{w} {c} {t}";*/ /* click-to-exit: true;*/ /* max-history-size: 25;*/ /* combi-hide-mode-prefix: false;*/ /* combi-display-format: "{mode} {text}";*/ /* matching-negate-char: '-' /* unsupported */;*/ /* cache-dir: ;*/ /* window-thumbnail: false;*/ /* drun-use-desktop-cache: false;*/ /* drun-reload-desktop-cache: false;*/ /* normalize-match: false;*/ /* steal-focus: false;*/ /* application-fallback-icon: ;*/ /* refilter-timeout-limit: 8192;*/ /* xserver-i300-workaround: false;*/ /* pid: "/run/user/1000/rofi.pid";*/ /* display-window: ;*/ /* display-windowcd: ;*/ /* display-run: ;*/ /* display-ssh: ;*/ /* display-drun: ;*/ /* display-combi: ;*/ /* display-keys: ;*/ /* display-filebrowser: ;*/ /* kb-primary-paste: "Control+V,Shift+Insert";*/ /* kb-secondary-paste: "Control+v,Insert";*/ /* kb-clear-line: "Control+w";*/ /* kb-move-front: "Control+a";*/ /* kb-move-end: "Control+e";*/ /* kb-move-word-back: "Alt+b,Control+Left";*/ /* kb-move-word-forward: "Alt+f,Control+Right";*/ /* kb-move-char-back: "Left,Control+b";*/ /* kb-move-char-forward: "Right,Control+f";*/ /* kb-remove-word-back: "Control+Alt+h,Control+BackSpace";*/ /* kb-remove-word-forward: "Control+Alt+d";*/ /* kb-remove-char-forward: "Delete,Control+d";*/ /* kb-remove-char-back: "BackSpace,Shift+BackSpace,Control+h";*/ /* kb-remove-to-eol: "Control+k";*/ /* kb-remove-to-sol: "Control+u";*/ /* kb-accept-entry: "Control+j,Control+m,Return,KP_Enter";*/ /* kb-accept-custom: "Control+Return";*/ /* kb-accept-custom-alt: "Control+Shift+Return";*/ /* kb-accept-alt: "Shift+Return";*/ /* kb-delete-entry: "Shift+Delete";*/ /* kb-mode-next: "Shift+Right,Control+Tab";*/ /* kb-mode-previous: "Shift+Left,Control+ISO_Left_Tab";*/ /* kb-mode-complete: "Control+l";*/ /* kb-row-left: "Control+Page_Up";*/ /* kb-row-right: "Control+Page_Down";*/ /* kb-row-up: "Up,Control+p";*/ /* kb-row-down: "Down,Control+n";*/ /* kb-row-tab: "";*/ /* kb-element-next: "Tab";*/ /* kb-element-prev: "ISO_Left_Tab";*/ /* kb-page-prev: "Page_Up";*/ /* kb-page-next: "Page_Down";*/ /* kb-row-first: "Home,KP_Home";*/ /* kb-row-last: "End,KP_End";*/ /* kb-row-select: "Control+space";*/ /* kb-screenshot: "Alt+S";*/ /* kb-ellipsize: "Alt+period";*/ /* kb-toggle-case-sensitivity: "grave,dead_grave";*/ /* kb-toggle-sort: "Alt+grave";*/ /* kb-cancel: "Escape,Control+g,Control+bracketleft";*/ /* kb-custom-1: "Alt+1";*/ /* kb-custom-2: "Alt+2";*/ /* kb-custom-3: "Alt+3";*/ /* kb-custom-4: "Alt+4";*/ /* kb-custom-5: "Alt+5";*/ /* kb-custom-6: "Alt+6";*/ /* kb-custom-7: "Alt+7";*/ /* kb-custom-8: "Alt+8";*/ /* kb-custom-9: "Alt+9";*/ /* kb-custom-10: "Alt+0";*/ /* kb-custom-11: "Alt+exclam";*/ /* kb-custom-12: "Alt+at";*/ /* kb-custom-13: "Alt+numbersign";*/ /* kb-custom-14: "Alt+dollar";*/ /* kb-custom-15: "Alt+percent";*/ /* kb-custom-16: "Alt+dead_circumflex";*/ /* kb-custom-17: "Alt+ampersand";*/ /* kb-custom-18: "Alt+asterisk";*/ /* kb-custom-19: "Alt+parenleft";*/ /* kb-select-1: "Super+1";*/ /* kb-select-2: "Super+2";*/ /* kb-select-3: "Super+3";*/ /* kb-select-4: "Super+4";*/ /* kb-select-5: "Super+5";*/ /* kb-select-6: "Super+6";*/ /* kb-select-7: "Super+7";*/ /* kb-select-8: "Super+8";*/ /* kb-select-9: "Super+9";*/ /* kb-select-10: "Super+0";*/ /* ml-row-left: "ScrollLeft";*/ /* ml-row-right: "ScrollRight";*/ /* ml-row-up: "ScrollUp";*/ /* ml-row-down: "ScrollDown";*/ /* me-select-entry: "MousePrimary";*/ /* me-accept-entry: "MouseDPrimary";*/ /* me-accept-custom: "Control+MouseDPrimary";*/ timeout { action: "kb-cancel"; delay: 0; } filebrowser { directories-first: true; sorting-method: "name"; } } ```
vaxerski commented 2 weeks ago

use the address then to target the right one

FFFluoride commented 2 weeks ago

When I run hyprctl clients I only get one address for Rofi though

vaxerski commented 2 weeks ago

there's nothing to do here from hyprland. if rofi opens a window, it should honor closewindow. If it's a layer, we don't really support telling layers to close themselves.

FFFluoride commented 2 weeks ago

Ok, thanks for the info, I'll open a bug report in the rofi repo later then.