Skip to content

Node.js script to cycle through open instances of the same app that is currently focused

Notifications You must be signed in to change notification settings

FullStackAlex/Hyprland-Same-App-Cycling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 

Repository files navigation

Hyprland Same App Cycling

A Node.js helper script for the Hyprland tiling manager which enables cycling through open instances of the same app that is currently focused via a defined key bind, similar to parts of the Gnome App Switcher functionality (Alt+Tab, Super+Tab and Super + <).

  • install node
sudo pacman -S node # on Arch
sudo apt-get install -y nodejs # on Debian/Ubuntu
  • download / copy the index.mjs script
  • check if /bin/node does exist on your machine or make shebang (first line in the index.mjs) point to your existing node binary / executable (check via $ which node)
  • add key binds in ~/.config/hypr/hyprland.conf that run the script:
binde = SUPER, X, exec, $HOME/.bin/cycle_clients_by_class.mjs
binde = SUPER SHIFT, X, exec, $HOME/.bin/cycle_clients_by_class.mjs --direction back 
binde = SUPER ALT, X, exec, $HOME/.bin/cycle_clients_by_class.mjs --fullscreen bordered
binde = SUPER ALT SHIFT, X, exec, $HOME/.bin/cycle_clients_by_class.mjs --direction back --fullscreen bordered

the script accepts two arguments: --direction and --fullscreen

--directions has the options back and forward (default)

--fullscreen has the options false (default), bordered (equal to hyprctl dispatch fullscreen 1) and borderless (equal to hyprctl dispatch fullscreen 0)

  • start cycling

Notes:

  • by default toggles fullscreen off in the workspace of the next client / window if the fullscreen window is not the next window
  • might be buggy in some edge cases didn't test for any situation. For basic usage, though, it works suprisangly flawless.

About

Node.js script to cycle through open instances of the same app that is currently focused

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published