diff --git a/.config/rofi/config.rasi b/.config/rofi/config.rasi index 2acecab..10587b0 100644 --- a/.config/rofi/config.rasi +++ b/.config/rofi/config.rasi @@ -1,5 +1,5 @@ configuration { - modi: "drun,run,sworkspace:~/.config/rofi/i3_switch_workspace.py,mworkspace:~/.config/rofi/i3_move_to_workspace.py,window,monitor:~/.config/rofi/i3_monitor_layout.sh"; + modi: "drun,run,sworkspace:~/.config/rofi/i3_switch_workspace.py,mworkspace:~/.config/rofi/i3_move_to_workspace.py,window,monitor:~/.config/rofi/i3_monitor_layout.sh,mark:~/.config/rofi/i3_mark_container.py"; show-icons: true; sidebar-mode: true; } diff --git a/.config/rofi/i3_mark_container.py b/.config/rofi/i3_mark_container.py new file mode 100755 index 0000000..7e7bb4c --- /dev/null +++ b/.config/rofi/i3_mark_container.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 + +import sys + +import i3ipc + +i3 = i3ipc.Connection() + +if len(sys.argv) == 1: + focused = i3.get_tree().find_focused() + print("\n".join(focused.marks)) +else: + i3.command(f"mark --toggle --add {sys.argv[1]}")