manager/files/river/init
Dan Anglin 2402833b1a
feat: a new home manager
This commit updates the scope of this project to manage the files and
directories within my home directory. The Makefile and helper bash
scripts are now replaced with mage targets so that the home directory is
now managed with Mage. The state of the home directory is managed using
a JSON configuration for each machine host. The manager is a set of mage
targets to manage various aspects of the home directory. At the moment
the manager can:

- ensure specified directories are present within the home directory.
- ensure application configuration files are up-to-date and have the
  correct symlinks within the user's home configuration directory.
- manages the user's bash profile (a.k.a bashrc) file.

Other notable changes:

- The X11 xinitrc is removed because it is not currently used and won't
  be used for the forseeable future as we slowly move to Wayland.
- All bashrc configurations are now defined in one file and is now fully
  managed by the manager.
- The dunst configuration is currently removed but will make a comeback.
- The ansible configuration is removed as it is no longer used.
- The logrotate configuration is updated and now generated from a
  template.
- Added configuration for the foot terminal.
- Added configuration for the River window manager.
2024-09-12 16:35:06 +01:00

77 lines
3.1 KiB
Bash
Executable file

#!/usr/bin/env bash
# Set the background and border colours
riverctl background-color 0x15161e
riverctl border-color-focused 0xbb9af7 # Magenta
riverctl border-color-unfocused 0x444444 # Grey
# Super+Shift+T to spawn an instance of foot
riverctl map normal Super+Shift T spawn foot
# Super+Shift+B to spawn an instance of firefox
riverctl map normal Super+Shift B spawn firefox
# Super+Shift+Q to exit river
riverctl map normal Super+Shift Q exit
# Super+C to close the focused view
riverctl map normal Super C close
# Super+H to shift the focus to the previous view in the layout stack
# Super+L to shift the focus to the next view in the layout stack
riverctl map normal Super H focus-view previous
riverctl map normal Super L focus-view next
# Super+Shift+H to swap the focused view with the previous view in the layout stack
# Super+Shift+L to swap the focused view with the next view in the layout stack
riverctl map normal Super+Shift H swap previous
riverctl map normal Super+Shift L swap next
# Super+Period to focus the next output
# Super+Comma to focus the previous output
riverctl map normal Super Period focus-output next
riverctl map normal Super Comma focus-output previous
# Super+Shift+Period to send the focused view to the next output
# Super+Shift+Comma to send the focused view to the previous output
riverctl map normal Super+Shift Period send-to-output next
riverctl map normal Super+Shift Comma send-to-output previous
# Super+Return to bump the focused view to the top of the layout stack
riverctl map normal Super Return zoom
# Super+J to increase the main ratio of rivertile(1)
# Super+K to decrease the main ratio of rivertile(1)
riverctl map normal Super J send-layout-cmd rivertile "main-ratio +0.05"
riverctl map normal Super K send-layout-cmd rivertile "main-ratio -0.05"
# Super+Shift+J to increment the main count of rivertile(1)
# Super+Shift+K to decrement the main count of rivertile(1)
riverctl map normal Super+Shift J send-layout-cmd rivertile "main-count +1"
riverctl map normal Super+Shift K send-layout-cmd rivertile "main-count -1"
# Super+Alt+{H,J,K,L} to move views
riverctl map normal Super+Alt H move left 100
riverctl map normal Super+Alt J move down 100
riverctl map normal Super+Alt K move up 100
riverctl map normal Super+Alt L move right 100
# Super+Alt+Control+{H,J,K,L} to snap views to screen edges
riverctl map normal Super+Alt+Control H snap left
riverctl map normal Super+Alt+Control J snap down
riverctl map normal Super+Alt+Control K snap up
riverctl map normal Super+Alt+Control L snap right
# Super+Alt+Shift+{H,J,K,L} to resize views
riverctl map normal Super+Alt+Shift H resize horizontal -100
riverctl map normal Super+Alt+Shift J resize vertical 100
riverctl map normal Super+Alt+Shift K resize vertical -100
riverctl map normal Super+Alt+Shift L resize horizontal 100
# Configure the keyboard layout
riverctl keyboard-layout gb
# Set the default layout generator to be rivertile and start it.
# River will send the process group of the init executable SIGTERM on exit.
riverctl default-layout rivertile
rivertile -view-padding 6 -outer-padding 6 &