Switched to kanshi instead of wlr-randr
This commit is contained in:
parent
7081b35722
commit
b8057d0283
3 changed files with 23 additions and 37 deletions
|
|
@ -1,7 +1,7 @@
|
|||
# 2ndbeam's cringe config
|
||||
## Packages
|
||||
```
|
||||
$ sudo pacman -S river lua lua-posix wlr-randr \
|
||||
$ sudo pacman -S river lua lua-posix kanshi \
|
||||
waylock swaybg alacritty wofi \
|
||||
slurp grim wl-clipboard waybar \
|
||||
mpd mpc vimix-cursors fish
|
||||
|
|
|
|||
19
kanshi/config
Normal file
19
kanshi/config
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
profile single {
|
||||
output eDP-2 {
|
||||
mode 1920x1080
|
||||
position 0,0
|
||||
adaptive_sync on
|
||||
}
|
||||
}
|
||||
|
||||
profile multi {
|
||||
output eDP-2 {
|
||||
mode 1920x1080
|
||||
position 0,0
|
||||
adaptive_sync on
|
||||
}
|
||||
output HDMI-A-1 {
|
||||
mode 1920x1080
|
||||
position -1920,0
|
||||
}
|
||||
}
|
||||
|
|
@ -42,6 +42,9 @@ local startup_commands = {
|
|||
{
|
||||
'waybar'
|
||||
},
|
||||
{
|
||||
'kanshi'
|
||||
},
|
||||
-- Wallpaper
|
||||
{
|
||||
string.format("swaybg -o %s -i %s -o %s -i %s",
|
||||
|
|
@ -50,23 +53,6 @@ local startup_commands = {
|
|||
}
|
||||
}
|
||||
|
||||
local outputs = {
|
||||
[monitors.main] = {
|
||||
mode = '1920x1080',
|
||||
pos = '0,0',
|
||||
transform = 'normal',
|
||||
scale = '1.000000',
|
||||
preferred = true,
|
||||
},
|
||||
[monitors.external] = {
|
||||
mode = '1920x1080',
|
||||
pos = '-1920,0',
|
||||
transform = 'normal',
|
||||
scale = '1.000000',
|
||||
preferred = true,
|
||||
},
|
||||
}
|
||||
|
||||
local inputs = {
|
||||
[pointers.touchpad] = {
|
||||
['drag'] = 'enabled',
|
||||
|
|
@ -311,25 +297,6 @@ for _, cmd in ipairs(startup_commands) do
|
|||
os.execute(string.format([[riverctl spawn '%s']], concat(cmd, ' ')))
|
||||
end
|
||||
|
||||
-- Configure outputs
|
||||
local randr_cmd = 'wlr-randr'
|
||||
for output, options in pairs(outputs) do
|
||||
randr_cmd = randr_cmd .. ' --output ' .. output
|
||||
|
||||
for opt, value in pairs(options) do
|
||||
if opt ~= 'preferred' then
|
||||
randr_cmd = string.format(randr_cmd .. ' --%s %s', opt, value)
|
||||
end
|
||||
end
|
||||
|
||||
-- Ensure '--preferred' is the last argument for each monitor
|
||||
if options.preferred then
|
||||
randr_cmd = randr_cmd .. ' --preferred'
|
||||
end
|
||||
end
|
||||
os.execute(randr_cmd)
|
||||
os.execute(string.format("echo %s > ~/.config/river/wlr-randr", randr_cmd))
|
||||
|
||||
-- Configure input devices
|
||||
for device, options in pairs(inputs) do
|
||||
for key, val in pairs(options) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue