berry icon indicating copy to clipboard operation
berry copied to clipboard

`berryc send_to_workspace 0` sends to workspace 1

Open jgarte opened this issue 3 years ago • 3 comments

berryc send_to_workspace 0 sends to workspace 1.

Is this the intended functionality?

It feels like everything is off by 1 which is a bit confusing.

I have the following in my sxhkdrc:

super + shift + {0-9}
    berryc send_to_workspace {0-9}

jgarte avatar Mar 27 '22 18:03 jgarte

What is the command in your sxhkdrc to switch workspace?

JLErvin avatar Mar 27 '22 23:03 JLErvin

@JLErvin

Here's the whole sxhkdrc that I'm using with berry:

###

super + Return
	sakura

super + d
	dmenu_run

# make sxhkd reload its configuration files:
super + Escape
	pkill -USR1 -x sxhkd

### berry hotkeys

super + {h, j, k, l}
    berryc window_move {-50 0, 0 50, 0 -50, 50 0}

super + shift +  {h, j, k, l}
    berryc window_resize {-50 0, 0 50, 0 -50, 50 0}

super + {1-9}
    berryc switch_workspace {0-9}

super + shift + {0-9}
    berryc send_to_workspace {0-9}

super + m
    berryc window_monocle

super + f
    berryc fullscreen

super +  p
    berryc snap_right

super + o 
    berryc snap_left

super + n
    berryc toggle_decorations

super + Tab
    berryc cycle_focus

super + q
    berryc window_close

super + c
    berryc window_center

~button1
    berryc pointer_focus

jgarte avatar Mar 28 '22 17:03 jgarte

You seem to have an off-by-one bug in your configuration. Consider the following two mappings:

super + {1-9}
    berryc switch_workspace {0-9}

super + shift + {0-9}
    berryc send_to_workspace {0-9}

super+1 would switch to workspace 0, whereas super+shift+1 would send the window to workspace 1. You should modify these mappings such that they line up.

JLErvin avatar Mar 28 '22 19:03 JLErvin