Fix bugs with rofi workspace modes
This commit is contained in:
parent
0c4ce3e936
commit
84c8f5097d
|
@ -1,6 +1,6 @@
|
||||||
configuration {
|
configuration {
|
||||||
cycle: false;
|
cycle: false;
|
||||||
modi: "drun,run,window:~/.config/rofi/window.sh,workspace:~/.config/rofi/workspace.sh";
|
modi: "drun,run,workspace:~/.config/rofi/workspace.sh,workspacemove:~/.config/rofi/workspacemove.sh";
|
||||||
font: "JetBrainsMono Nerd Font 14";
|
font: "JetBrainsMono Nerd Font 14";
|
||||||
location: 0;
|
location: 0;
|
||||||
terminal: "alacritty";
|
terminal: "alacritty";
|
||||||
|
@ -11,8 +11,8 @@ configuration {
|
||||||
drun-display-format: "{name}";
|
drun-display-format: "{name}";
|
||||||
display-drun: " Apps ";
|
display-drun: " Apps ";
|
||||||
display-run: " Run ";
|
display-run: " Run ";
|
||||||
display-window: " Window ";
|
|
||||||
display-workspace: " Workspace ";
|
display-workspace: " Workspace ";
|
||||||
|
display-workspacemove: " Move to Workspace ";
|
||||||
}
|
}
|
||||||
|
|
||||||
@theme "tokyonight"
|
@theme "tokyonight"
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
if [ $# -ne 0 ]; then
|
|
||||||
id=$(echo "$@" | cut -d ' ' -f1)
|
|
||||||
swaymsg "[con_id=$id]" focus
|
|
||||||
|
|
||||||
# Hack to get around weird bug
|
|
||||||
pkill rofi
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
swaymsg -t get_tree |
|
|
||||||
jq -r '.nodes[].nodes[] | if .nodes then [recurse(.nodes[])] else [] end + .floating_nodes |
|
|
||||||
.[] | select(.nodes==[]) | ((.id | tostring) + " " + .name)'
|
|
|
@ -1,12 +1,8 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
if [ $# -ne 0 ]; then
|
if [ $# -ne 0 ]; then
|
||||||
swaymsg workspace "$@"
|
swaymsg workspace "$@" > /dev/null
|
||||||
|
else
|
||||||
# Hack to get around weird bug
|
swaymsg -t get_workspaces |
|
||||||
pkill rofi
|
jq -r 'map(.name) + ["10:browser","20:terminal","30:code","40:files","50:discord","60:settings"] | unique | .[]'
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
swaymsg -t get_workspaces |
|
|
||||||
jq -r '.[].name'
|
|
||||||
|
|
8
home-manager/wayland/rofi/workspacemove.sh
Executable file
8
home-manager/wayland/rofi/workspacemove.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ $# -ne 0 ]; then
|
||||||
|
swaymsg move container to workspace "$@" > /dev/null
|
||||||
|
else
|
||||||
|
swaymsg -t get_workspaces |
|
||||||
|
jq -r 'map(.name) + ["10:browser","20:terminal","30:code","40:files","50:discord","60:settings"] | unique | .[]'
|
||||||
|
fi
|
|
@ -76,8 +76,8 @@ in {
|
||||||
filename = ''~/Pictures/$(date +%Y-%m-%d_%H-%M-%S).png'';
|
filename = ''~/Pictures/$(date +%Y-%m-%d_%H-%M-%S).png'';
|
||||||
in pkgs.lib.mkOptionDefault {
|
in pkgs.lib.mkOptionDefault {
|
||||||
"${modifier}+Shift+d" = "exec rofi -show run -config ~/.config/rofi/noicons.rasi";
|
"${modifier}+Shift+d" = "exec rofi -show run -config ~/.config/rofi/noicons.rasi";
|
||||||
"${modifier}+w" = "exec rofi -show window -config ~/.config/rofi/noicons.rasi";
|
"${modifier}+w" = "exec rofi -show workspace -config ~/.config/rofi/noicons.rasi";
|
||||||
"${modifier}+Shift+w" = "exec rofi -show workspace -config ~/.config/rofi/noicons.rasi";
|
"${modifier}+Shift+w" = "exec rofi -show workspacemove -config ~/.config/rofi/noicons.rasi";
|
||||||
|
|
||||||
"${modifier}+t" = "layout tabbed";
|
"${modifier}+t" = "layout tabbed";
|
||||||
"${modifier}+Shift+m" = "exec swaylock";
|
"${modifier}+Shift+m" = "exec swaylock";
|
||||||
|
|
Loading…
Reference in a new issue