Advertisement
Guest User

Untitled

a guest
Jan 19th, 2022
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.84 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. riverctl spawn "dbus-update-activation-environment SEATD_SOCK DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"
  4.  
  5. #-- defaults
  6. mod='Mod4'
  7. touchpad='2:7:SynPS/2_Synaptics_TouchPad'
  8. nipple='2:10:TPPS/2_Elan_TrackPoint'
  9. dev=
  10.  
  11. m() { riverctl map normal $mod $@; }
  12. ms() { riverctl map normal $mod+Shift $@; }
  13. mc() { riverctl map normal $mod+Control $@; }
  14. ma() { riverctl map normal $mod+Mod1 $@; }
  15. msc() { riverctl map normal $mod+Shift+Control $@; }
  16. msa() { riverctl map normal $mod+Shift+Mod1 $@; }
  17.  
  18. t() { riverctl map normal $mod $1 spawn "tilers $2"; }
  19. ts() { riverctl map normal $mod+Shift $1 spawn "tilers $2"; }
  20. tc() { riverctl map normal $mod+Control $1 spawn "tilers $2"; }
  21.  
  22. input() { riverctl input $dev "$@"; }
  23.  
  24. run_shot() { riverctl map shot $mod $@; }
  25.  
  26. riverctl focus-follows-cursor normal
  27. riverctl default-layout rivertile
  28. riverctl attach-mode bottom
  29. riverctl xcursor-theme 'McMojave Cursors'
  30.  
  31. riverctl declare-mode shot
  32. riverctl declare-mode stacktile
  33.  
  34. #-- inputs
  35. riverctl set-repeat 40 300
  36.  
  37. dev=$touchpad
  38. input pointer-accel 0.7
  39. input accel-profile adaptive
  40. input disable-while-type enabled
  41. input natural-scroll enabled
  42. input tap enabled
  43. input tap-button-map left-right-middle
  44. input middle-emulation enabled
  45.  
  46. dev=$nipple
  47. input pointer-accel 0.7
  48.  
  49. #-- mappings
  50. m Return spawn foot
  51. m D spawn bemenu-run
  52. ms D spawn passmenu
  53.  
  54. msc Q exit
  55. m Q close
  56. ms R spawn "~/.config/river/init"
  57.  
  58. m J focus-view next
  59. m K focus-view previous
  60. ms J swap next
  61. ms K swap previous
  62.  
  63. m F toggle-float
  64. ms F toggle-fullscreen
  65.  
  66. ma H move left 100
  67. ma J move down 100
  68. ma K move up 100
  69. ma L move right 100
  70.  
  71. msa H snap left
  72. msa J snap down
  73. msa K snap up
  74. msa L snap right
  75.  
  76. ms S enter-mode shot
  77. run_shot F spawn "screenshot -f"
  78. run_shot S spawn "screenshot -s"
  79.  
  80. #-- tilers
  81. # ratios
  82. t U u
  83. ts U U
  84. t I i
  85. ts I I
  86.  
  87. # counts
  88. t N n
  89. ts N N
  90. t M m
  91. ts M M
  92.  
  93. # locations
  94. tc H H
  95. tc J J
  96. tc K K
  97. tc L L
  98.  
  99. #-- mouse
  100. riverctl map-pointer normal $mod BTN_LEFT move-view
  101. riverctl map-pointer normal $mod BTN_RIGHT resize-view
  102.  
  103. # map it to acpi cmon...
  104. for mode in normal locked; do
  105. riverctl map $mode None XF86AudioRaiseVolume spawn 'volume +5'
  106. riverctl map $mode None XF86AudioLowerVolume spawn 'volume -5'
  107. riverctl map $mode None XF86AudioMute spawn 'volume -m'
  108. done
  109.  
  110. #-- tags
  111. for i in $(seq 1 9); do
  112. tags=$((1 << ($i - 1)))
  113. # focus tag
  114. m $i set-focused-tags $tags
  115. # set tag to focused view
  116. ms $i set-view-tags $tags
  117. # toggle focus of tag
  118. mc $i toggle-focused-tags $tags
  119. # toggle tag of focused view
  120. msc $i toggle-view-tags $tags
  121. done
  122.  
  123. # show all tags/move to all tags
  124. all_tags=$(((1 << 32) - 1))
  125. m 0 set-focused-tags $all_tags
  126. ms 0 set-view-tags $all_tags
  127.  
  128. #-- default layout(errr)
  129. riverctl spawn 'rivertile -view-padding 6 -outer-padding 6'
  130.  
  131. #-- start progams
  132. riverctl spawn 'autostart'
  133.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement