Skip to content

nwg-panel 0.9.23

Compare
Choose a tag to compare
@nwg-piotr nwg-piotr released this 10 Feb 00:08
· 283 commits to master since this release
964fbad

Added Common settings -> 'Run programs through compositor" check button. When checked, makes the panel run programs through either swaymsg exec <cmd> or hyprctl dispatch exec <cmd>. Turned on by default, makes us sure that runned processed are detached from the panel.

image

On compositors other than sway or Hyprland, the command will be executed the old way.

def cmd_through_compositor(cmd):
    cs_file = os.path.join(get_config_dir(), "common-settings.json")
    common_settings = load_json(cs_file)
    if "run-through-compositor" not in common_settings or common_settings["run-through-compositor"] :
        if os.getenv("SWAYSOCK"):
            cmd = f"swaymsg exec '{cmd}'"
        elif os.getenv("HYPRLAND_INSTANCE_SIGNATURE"):
            cmd = f"hyprctl dispatch exec '{cmd}'"
    return cmd