Compare commits

...

3 commits

Author SHA1 Message Date
5dff1db3db
river: Add monocle mapping if running filtile layout
When using filtile layout it also gives the option of using 'monocle'
mode which is similar to fullscreen in that it only shows one window at
a time (which also occupies the full screen, except for the statusbar)
but you can cycle between the windows shown as you would usually between
the different views in a tag. You can imagine the windows 'stacked' on
top of each other and cycling which one is on top or on the bottom.

Toggled with `Mod+Shift+F`, shifting up from fullscreen mode.

TODO: Ideally, it would be accompanied by an indicator in the statusbar
but I have no time to create one currently. Without one, it is sometimes
hard to remember that other windows exist on the tag after a while.
2024-09-16 20:33:17 +02:00
19bafa910e
river: Improve floating mode mappings
Simplify the system of mappings in floating:

- HJKL for moving a floating window around.
- C-HJKL for quickly snapping to screen edges (as before)
- Mod-HJKL for resizing the floating window.
- Mod-Shift-HJKL for changing the tag's setting:
  - HL to change size ratio of main/side pane
  - JK to change amount of windows in main pane
2024-09-16 20:29:55 +02:00
1cc47ac7df
river: Add passhthrough mode to disable river keys
`super+F11` enters passthrough mode (displayed on waybar) which disables
all normal keybinds that river listens to and - surprise - passes them
through to whatever application is running. The same binding exits the
mode.
2024-09-16 20:11:56 +02:00

View file

@ -124,6 +124,12 @@ riverctl map normal $mod+Control L snap right
# Mod+F to toggle fullscreen
riverctl map normal $mod F toggle-fullscreen
# if we are running filtile we also have access to monocle mode
if [ "$layout" = "filtile" ]; then
riverctl map normal $mod+Shift F spawn "riverctl send-layout-cmd $layout monocle"
fi
riverctl map normal $mod+Shift v toggle-float
# shellcheck disable=SC2016
# Make all connected outputs show the desktop and no windows at all
@ -132,8 +138,6 @@ riverctl map normal $mod+Shift M spawn 'for i in $(wlopm | wc -l); do riverctl s
riverctl map normal $mod+Shift F10 spawn "riverctl send-layout-cmd $layout '--tags all --output all view-padding 0'"
riverctl map normal $mod F10 spawn "riverctl send-layout-cmd $layout '--tags all --output all view-padding 6'"
# toggle float
riverctl map normal $mod+Shift v toggle-float
# Mod + Left Mouse Button to move views
riverctl map-pointer normal $mod BTN_LEFT move-view
# Mod + Right Mouse Button to resize views
@ -143,24 +147,39 @@ riverctl map-pointer normal $mod BTN_RIGHT resize-view
riverctl declare-mode interact_float
riverctl map normal $modemod R enter-mode interact_float
riverctl map interact_float $modemod R enter-mode normal
# resize views on screen
riverctl map interact_float $mod H resize horizontal -100
riverctl map interact_float $mod J resize vertical 100
riverctl map interact_float $mod K resize vertical -100
riverctl map interact_float $mod L resize horizontal 100
riverctl map interact_float None Escape enter-mode normal
# toggle float
riverctl map interact_float $mod+Shift v toggle-float
# move views around screen
riverctl map interact_float $mod+Shift H move left 100
riverctl map interact_float $mod+Shift J move down 100
riverctl map interact_float $mod+Shift K move up 100
riverctl map interact_float $mod+Shift L move right 100
riverctl map -repeat interact_float None H move left 100
riverctl map -repeat interact_float None J move down 100
riverctl map -repeat interact_float None K move up 100
riverctl map -repeat interact_float None L move right 100
# resize views on screen
riverctl map -repeat interact_float $mod H resize horizontal -100
riverctl map -repeat interact_float $mod J resize vertical 100
riverctl map -repeat interact_float $mod K resize vertical -100
riverctl map -repeat interact_float $mod L resize horizontal 100
# decrease/increase the main ratio of layout
riverctl map interact_float None H send-layout-cmd $layout "main-ratio -0.05"
riverctl map interact_float None L send-layout-cmd $layout "main-ratio +0.05"
riverctl map interact_float $mod+Shift H send-layout-cmd $layout "main-ratio -0.05"
riverctl map interact_float $mod+Shift L send-layout-cmd $layout "main-ratio +0.05"
# increment/decrement the main layout
riverctl map interact_float None J send-layout-cmd $layout "main-count +1"
riverctl map interact_float None K send-layout-cmd $layout "main-count -1"
riverctl map interact_float $mod+Shift J send-layout-cmd $layout "main-count +1"
riverctl map interact_float $mod+Shift K send-layout-cmd $layout "main-count -1"
# snap views to screen edges
riverctl map interact_float $mod+Control H snap left
riverctl map interact_float $mod+Control J snap down
riverctl map interact_float $mod+Control K snap up
riverctl map interact_float $mod+Control L snap right
### End resize and moving mode
## Passthrough mode which disables all other mappings and only retains the single
# mapping to return to normal mode. Useful for some full screen applications
# which should capture everything, or for testing nested wayland compositors.
riverctl declare-mode passthrough
riverctl map normal $mod F11 enter-mode passthrough
riverctl map passthrough $mod F11 enter-mode normal
# focus the next/previous output
riverctl map normal $mod Period focus-output next
riverctl map normal $mod Comma focus-output previous
@ -217,9 +236,9 @@ done
# The scratchpad will live on an unused tag. Which tags are used depends on your
# config, but rivers default uses the first 9 tags.
scratch_tag=$((1 << 20))
# Toggle the scratchpad with Super+P
# Toggle showing the scratchpad
riverctl map normal $mod grave toggle-focused-tags ${scratch_tag}
# Send windows to the scratchpad with Super+Shift+P
# Send windows to the scratchpad
riverctl map normal $mod+Shift grave set-view-tags ${scratch_tag}
# Set spawn tagmask to ensure new windows don't have the scratchpad tag unless
# explicitly set.