Advertisement
Guest User

Untitled

a guest
Apr 16th, 2023
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.72 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3.  
  4.  
  5. # MY CONFIGS
  6. # Natural scroll
  7. riverctl input pointer-1452-627-bcm5974 natural-scroll enabled
  8.  
  9.  
  10.  
  11. # DEFAULT CONFIGS
  12.  
  13. # This is the example configuration file for river.
  14. #
  15. # If you wish to edit this, you will probably want to copy it to
  16. # $XDG_CONFIG_HOME/river/init or $HOME/.config/river/init first.
  17. #
  18. # See the river(1), riverctl(1), and rivertile(1) man pages for complete
  19. # documentation.
  20.  
  21. # Note: the "Super" modifier is also known as Logo, GUI, Windows, Mod4, etc.
  22.  
  23. # Super+Shift+Return to start an instance of foot (https://codeberg.org/dnkl/foot)
  24. riverctl map normal Super+Shift Return spawn foot
  25.  
  26. # Super+Q to close the focused view
  27. riverctl map normal Super Q close
  28.  
  29. # Super+Shift+E to exit river
  30. riverctl map normal Super+Shift E exit
  31.  
  32. # Super+J and Super+K to focus the next/previous view in the layout stack
  33. riverctl map normal Super J focus-view next
  34. riverctl map normal Super K focus-view previous
  35.  
  36. # Super+Shift+J and Super+Shift+K to swap the focused view with the next/previous
  37. # view in the layout stack
  38. riverctl map normal Super+Shift J swap next
  39. riverctl map normal Super+Shift K swap previous
  40.  
  41. # Super+Period and Super+Comma to focus the next/previous output
  42. riverctl map normal Super Period focus-output next
  43. riverctl map normal Super Comma focus-output previous
  44.  
  45. # Super+Shift+{Period,Comma} to send the focused view to the next/previous output
  46. riverctl map normal Super+Shift Period send-to-output next
  47. riverctl map normal Super+Shift Comma send-to-output previous
  48.  
  49. # Super+Return to bump the focused view to the top of the layout stack
  50. riverctl map normal Super Return zoom
  51.  
  52. # Super+H and Super+L to decrease/increase the main ratio of rivertile(1)
  53. riverctl map normal Super H send-layout-cmd rivertile "main-ratio -0.05"
  54. riverctl map normal Super L send-layout-cmd rivertile "main-ratio +0.05"
  55.  
  56. # Super+Shift+H and Super+Shift+L to increment/decrement the main count of rivertile(1)
  57. riverctl map normal Super+Shift H send-layout-cmd rivertile "main-count +1"
  58. riverctl map normal Super+Shift L send-layout-cmd rivertile "main-count -1"
  59.  
  60. # Super+Alt+{H,J,K,L} to move views
  61. riverctl map normal Super+Alt H move left 100
  62. riverctl map normal Super+Alt J move down 100
  63. riverctl map normal Super+Alt K move up 100
  64. riverctl map normal Super+Alt L move right 100
  65.  
  66. # Super+Alt+Control+{H,J,K,L} to snap views to screen edges
  67. riverctl map normal Super+Alt+Control H snap left
  68. riverctl map normal Super+Alt+Control J snap down
  69. riverctl map normal Super+Alt+Control K snap up
  70. riverctl map normal Super+Alt+Control L snap right
  71.  
  72. # Super+Alt+Shift+{H,J,K,L} to resize views
  73. riverctl map normal Super+Alt+Shift H resize horizontal -100
  74. riverctl map normal Super+Alt+Shift J resize vertical 100
  75. riverctl map normal Super+Alt+Shift K resize vertical -100
  76. riverctl map normal Super+Alt+Shift L resize horizontal 100
  77.  
  78. # Super + Left Mouse Button to move views
  79. riverctl map-pointer normal Super BTN_LEFT move-view
  80.  
  81. # Super + Right Mouse Button to resize views
  82. riverctl map-pointer normal Super BTN_RIGHT resize-view
  83.  
  84. # Super + Middle Mouse Button to toggle float
  85. riverctl map-pointer normal Super BTN_MIDDLE toggle-float
  86.  
  87. for i in $(seq 1 9)
  88. do
  89. tags=$((1 << ($i - 1)))
  90.  
  91. # Super+[1-9] to focus tag [0-8]
  92. riverctl map normal Super $i set-focused-tags $tags
  93.  
  94. # Super+Shift+[1-9] to tag focused view with tag [0-8]
  95. riverctl map normal Super+Shift $i set-view-tags $tags
  96.  
  97. # Super+Ctrl+[1-9] to toggle focus of tag [0-8]
  98. riverctl map normal Super+Control $i toggle-focused-tags $tags
  99.  
  100. # Super+Shift+Ctrl+[1-9] to toggle tag [0-8] of focused view
  101. riverctl map normal Super+Shift+Control $i toggle-view-tags $tags
  102. done
  103.  
  104. # Super+0 to focus all tags
  105. # Super+Shift+0 to tag focused view with all tags
  106. all_tags=$(((1 << 32) - 1))
  107. riverctl map normal Super 0 set-focused-tags $all_tags
  108. riverctl map normal Super+Shift 0 set-view-tags $all_tags
  109.  
  110. # Super+Space to toggle float
  111. riverctl map normal Super Space toggle-float
  112.  
  113. # Super+F to toggle fullscreen
  114. riverctl map normal Super F toggle-fullscreen
  115.  
  116. # Super+{Up,Right,Down,Left} to change layout orientation
  117. riverctl map normal Super Up send-layout-cmd rivertile "main-location top"
  118. riverctl map normal Super Right send-layout-cmd rivertile "main-location right"
  119. riverctl map normal Super Down send-layout-cmd rivertile "main-location bottom"
  120. riverctl map normal Super Left send-layout-cmd rivertile "main-location left"
  121.  
  122. # Declare a passthrough mode. This mode has only a single mapping to return to
  123. # normal mode. This makes it useful for testing a nested wayland compositor
  124. riverctl declare-mode passthrough
  125.  
  126. # Super+F11 to enter passthrough mode
  127. riverctl map normal Super F11 enter-mode passthrough
  128.  
  129. # Super+F11 to return to normal mode
  130. riverctl map passthrough Super F11 enter-mode normal
  131.  
  132. # Various media key mapping examples for both normal and locked mode which do
  133. # not have a modifier
  134. for mode in normal locked
  135. do
  136. # Eject the optical drive (well if you still have one that is)
  137. riverctl map $mode None XF86Eject spawn 'eject -T'
  138.  
  139. # Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer)
  140. riverctl map $mode None XF86AudioRaiseVolume spawn 'pamixer -i 5'
  141. riverctl map $mode None XF86AudioLowerVolume spawn 'pamixer -d 5'
  142. riverctl map $mode None XF86AudioMute spawn 'pamixer --toggle-mute'
  143.  
  144. # Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl)
  145. riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause'
  146. riverctl map $mode None XF86AudioPlay spawn 'playerctl play-pause'
  147. riverctl map $mode None XF86AudioPrev spawn 'playerctl previous'
  148. riverctl map $mode None XF86AudioNext spawn 'playerctl next'
  149.  
  150. # Control screen backlight brightness with light (https://github.com/haikarainen/light)
  151. riverctl map $mode None XF86MonBrightnessUp spawn 'light -A 5'
  152. riverctl map $mode None XF86MonBrightnessDown spawn 'light -U 5'
  153. done
  154.  
  155. # Set background and border color
  156. riverctl background-color 0x002b36
  157. riverctl border-color-focused 0x93a1a1
  158. riverctl border-color-unfocused 0x586e75
  159.  
  160. # Set keyboard repeat rate
  161. riverctl set-repeat 50 300
  162.  
  163. # Make certain views start floating
  164. riverctl float-filter-add app-id float
  165. riverctl float-filter-add title "popup title with spaces"
  166.  
  167. # Set app-ids and titles of views which should use client side decorations
  168. riverctl csd-filter-add app-id "gedit"
  169.  
  170. # Set the default layout generator to be rivertile and start it.
  171. # River will send the process group of the init executable SIGTERM on exit.
  172. riverctl default-layout rivertile
  173. rivertile -view-padding 6 -outer-padding 6 &
  174.  
  175.  
  176.  
  177. # AFTER RIVER
  178. kanshi
  179. swaybg -i /home/alex/.config/swaybg/bg2.jpg
  180.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement