Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird behaviour with movefocus and cyclenext #9051

Open
3 of 6 tasks
Aniruddha-Upadhya-K opened this issue Jan 13, 2025 · 0 comments
Open
3 of 6 tasks

Weird behaviour with movefocus and cyclenext #9051

Aniruddha-Upadhya-K opened this issue Jan 13, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@Aniruddha-Upadhya-K
Copy link

Already reported ? *

  • I have searched the existing open and closed issues.

Regression?

I don't know, I started using Hyprland only recently

System Info and Hyprland Version

System/Version info
  • OS: NixOS 25.05.20250108.bffc22e (Warbler) x86_64
  • WM: Hyprland (Wayland)
Hyprland 0.46.2 built from branch v0.46.2-b at commit 0bd541f2fd902dbfa04c3ea2ccf679395e316887  (version: bump to 0.46.2).
Date: 2024-12-19
Tag: v0.46.2, commits: 0bd541f2fd902dbfa04c3ea2ccf679395e316887
built against:
 aquamarine 0.5.1
 hyprlang 0.6.0
 hyprutils 0.3.0
 hyprcursor 0.1.11
 hyprgraphics 0.1.1


flags set:
debug


System Information:
System name: Linux
Node name: nixos
Release: 6.6.69
Version: #1-NixOS SMP PREEMPT_DYNAMIC Thu Jan  2 09:32:11 UTC 2025


GPU information:
03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Picasso/Raven 2 [Radeon Vega Series / Radeon Vega Mobile Series] [1002:15d8] (rev c4) (prog-if 00 [VGA controller])


os-release: ANSI_COLOR="0;38;2;126;186;228"
BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
BUILD_ID="25.05.20250108.bffc22e"
CPE_NAME="cpe:/o:nixos:nixos:25.05"
DEFAULT_HOSTNAME=nixos
DOCUMENTATION_URL="https://nixos.org/learn.html"
HOME_URL="https://nixos.org/"
ID=nixos
ID_LIKE=""
IMAGE_ID=""
IMAGE_VERSION=""
LOGO="nix-snowflake"
NAME=NixOS
PRETTY_NAME="NixOS 25.05 (Warbler)"
SUPPORT_URL="https://nixos.org/community.html"
VARIANT=""
VARIANT_ID=""
VENDOR_NAME=NixOS
VENDOR_URL="https://nixos.org/"
VERSION="25.05 (Warbler)"
VERSION_CODENAME=warbler
VERSION_ID="25.05"


plugins:

Description

Hi, I'm new to hyprland, and writing bash scripts from ground up. I wanted something like this.

  • If I am in tiling mode (not fullscreen) then I want to move through windows with movefocus {l,r,u,d} to move left, right, up, down with respect to current active window.
  • But when I am in fullscreen (maximise: fullsceen, 1) then I want to move through windows as cyclenext which loops to all the windows in sequence, with same keybinds as before.

So I tried to write my own script for this as I did not find any references, and this is what I came up with:

if ! hyprctl -j activeworkspace | jq $ARGS.hasfullscreen; then
    case "$1" in 
        left|down)
            hyprctl dispatch cyclenext prev
            ;;
        right|up)
            hyprctl dispatch cyclenext
            ;;
   esac
else
    case "$1" in
        left) 
            hyprctl dispatch movefocus l
            ;;
        right) 
            hyprctl dispatch movefocus r
            ;;
        up) 
            hyprctl dispatch movefocus u
            ;;
        down) 
            hyprctl dispatch movefocus d
            ;;
    esac
fi
exit 0

and assigning my keybind as

bind = $mainMod, H, exec, hyprland-extend left
bind = $mainMod, L, exec, hyprland-extend right
bind = $mainMod, K, exec, hyprland-extend up
bind = $mainMod, J, exec, hyprland-extend down

But the outcome is hyprland-extend left behaves differently than hyprland-extend down in fullscreen, even though both should run same command, hyprctl dispatch cyclenext prev. But looks like hyprland-extend left is running hyprctl dispatch movefocus l even in fullscreen mode.

How to reproduce

  1. run above script with left flag in fullscreen mode

Attach not paste

  • I understand that all text files must be attached, and not pasted directly. If not respected, this issue will likely get closed as spam

Checklist of files to include below

  • Hyprland config - hyprctl systeminfo -c (always include)
  • Crash report (always include in case of crash)
  • Video (always include in case of a visual bug)
  • Logs (might contain useful info such as errors)

Additional info & File uploads

hyprland_config_dump.txt

@Aniruddha-Upadhya-K Aniruddha-Upadhya-K added the bug Something isn't working label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant