Advertisement
Guest User

Untitled

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