Skip to content

Instantly share code, notes, and snippets.

@moddedBear
Created April 19, 2023 00:39
Show Gist options
  • Select an option

  • Save moddedBear/943c6be8337c07cb224267e188a43f4f to your computer and use it in GitHub Desktop.

Select an option

Save moddedBear/943c6be8337c07cb224267e188a43f4f to your computer and use it in GitHub Desktop.
A small bash script to switch between open windows in Hyprland using the tofi menu.
#!/usr/bin/env bash
hyprctl clients -j | jq -r '.[] | [ .title, .class, .pid ] | join(" | ")' |
tofi --prompt-text="window: " |
awk '{print $NF}' | {
read -r id
hyprctl dispatch focuswindow pid:$id;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment