Configuration files
1#!/bin/sh
2
3USE_BSP=0
4if [ -e "$(which river-bsp-layout)" ]; then
5 USE_BSP=1
6fi
7MAIN_MOD=Super
8
9riverctl map normal $MAIN_MOD+Shift Return spawn ghostty
10riverctl map normal $MAIN_MOD+Shift B spawn epiphany
11riverctl map normal $MAIN_MOD+Shift E spawn emacs
12riverctl map normal $MAIN_MOD Space spawn 'tofi-drun | xargs -I % riverctl spawn %'
13
14riverctl map normal $MAIN_MOD Q close
15
16riverctl map normal $MAIN_MOD+Shift+Control Q exit
17
18riverctl map normal $MAIN_MOD H focus-view left
19riverctl map normal $MAIN_MOD J focus-view next
20riverctl map normal $MAIN_MOD K focus-view previous
21riverctl map normal $MAIN_MOD L focus-view right
22
23riverctl map normal $MAIN_MOD+Shift H swap left
24riverctl map normal $MAIN_MOD+Shift J swap next
25riverctl map normal $MAIN_MOD+Shift K swap previous
26riverctl map normal $MAIN_MOD+Shift L swap right
27
28riverctl map normal $MAIN_MOD+Shift+Control K zoom
29
30riverctl map normal $MAIN_MOD Period focus-output next
31riverctl map normal $MAIN_MOD Comma focus-output previous
32
33riverctl map normal $MAIN_MOD+Shift Period send-to-output next
34riverctl map normal $MAIN_MOD+Shift Comma send-to-output previous
35
36riverctl map normal $MAIN_MOD Return zoom
37
38if [ $USE_BSP -eq 1 ]; then
39 riverctl map normal $MAIN_MOD Up send-layout-cmd bsp-layout "--dec-hsplit 0.05"
40 riverctl map normal $MAIN_MOD Down send-layout-cmd bsp-layout "--inc-hsplit 0.05"
41 riverctl map normal $MAIN_MOD Left send-layout-cmd bsp-layout "--dec-vsplit 0.05"
42 riverctl map normal $MAIN_MOD Right send-layout-cmd bsp-layout "--inc-vsplit 0.05"
43 riverctl map normal $MAIN_MOD+Shift Up send-layout-cmd bsp-layout "--start-vsplit"
44 riverctl map normal $MAIN_MOD+Shift Right send-layout-cmd bsp-layout "--start-hsplit"
45 riverctl map normal $MAIN_MOD+Shift Left send-layout-cmd bsp-layout "--reverse"
46else
47 riverctl map normal $MAIN_MOD Left send-layout-cmd rivertile "main-ratio -0.05"
48 riverctl map normal $MAIN_MOD Right send-layout-cmd rivertile "main-ratio +0.05"
49fi
50
51riverctl map-pointer normal $MAIN_MOD BTN_LEFT move-view
52
53riverctl map-pointer normal $MAIN_MOD BTN_RIGHT resize-view
54
55riverctl map-pointer normal $MAIN_MOD BTN_MIDDLE toggle-float
56
57for i in $(seq 1 9); do
58 tags=$((1 << ($i - 1)))
59
60 riverctl map normal $MAIN_MOD $i set-focused-tags $tags
61 riverctl map normal $MAIN_MOD+Shift $i set-view-tags $tags
62 riverctl map normal $MAIN_MOD+Control $i toggle-focused-tags $tags
63 riverctl map normal $MAIN_MOD+Shift+Control $i toggle-view-tags $tags
64done
65
66riverctl map normal $MAIN_MOD+Shift F toggle-float
67
68riverctl map normal $MAIN_MOD F toggle-fullscreen
69
70riverctl background-color 0x16161d
71riverctl border-color-unfocused 0x54546D
72riverctl border-color-focused 0xE46876
73riverctl border-width 5
74
75riverctl set-repeat 50 300
76
77riverctl rule-add -app-id 'float*' float
78riverctl rule-add ssd
79
80riverctl focus-follows-cursor normal
81riverctl default-attach-mode below
82
83if [ $USE_BSP -eq 1 ]; then
84 riverctl default-layout bsp-layout
85 river-bsp-layout --inner-gap 7 --outer-gap 18 --split-perc 0.5 &
86else
87 riverctl default-layout rivertile
88 rivertile -view-padding 6 -outer-padding 6 &
89fi
90
91swaybg -m fill -i $(cat ~/.current_wallpaper) &
92riverctl spawn i3bar-river
93riverctl spawn mako