Add i3 container marking modi script
This commit is contained in:
parent
3bde1292fc
commit
19d9d02b47
@ -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;
|
||||
}
|
||||
|
13
.config/rofi/i3_mark_container.py
Executable file
13
.config/rofi/i3_mark_container.py
Executable file
@ -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]}")
|
Loading…
Reference in New Issue
Block a user