diff --git a/README.MD b/README.MD index 8689942..c2a9c80 100644 --- a/README.MD +++ b/README.MD @@ -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 diff --git a/kanshi/config b/kanshi/config new file mode 100644 index 0000000..47ee638 --- /dev/null +++ b/kanshi/config @@ -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 + } +} diff --git a/river/init.lua b/river/init.lua index 22a9c75..72bc72e 100755 --- a/river/init.lua +++ b/river/init.lua @@ -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