[Hyprland,Eww] Refactors configs so that I can share more between Vega and Altair
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
hl.on("hyprland.start", function()
|
||||
hl.exec_cmd("nm-applet")
|
||||
-- hl.exec_cmd("sleep 2 && hyprpm reload -n")
|
||||
-- hl.exec_cmd("systemctl --user start hyprpolkitagent")
|
||||
hl.exec_cmd("gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'")
|
||||
hl.exec_cmd("gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'")
|
||||
hl.exec_cmd("wpaperd")
|
||||
hl.exec_cmd("sleep 2 && eww open-many primary-statusbar secondary-statusbar")
|
||||
hl.exec_cmd("xrandr --output DP-2 --primary")
|
||||
end)
|
||||
|
||||
@@ -84,25 +84,25 @@ hl.device({
|
||||
sensitivity = -0.200000,
|
||||
})
|
||||
|
||||
hl.monitor({
|
||||
output = "DP-2",
|
||||
mode = "3440x1440@164",
|
||||
position = "0x0",
|
||||
})
|
||||
hl.monitor({
|
||||
output = "DP-1",
|
||||
mode = "2560x1440",
|
||||
position = "-1440x-510",
|
||||
-- 0 -> normal (no transforms)
|
||||
-- 1 -> 90 degrees
|
||||
-- 2 -> 180 degrees
|
||||
-- 3 -> 270 degrees
|
||||
-- 4 -> flipped
|
||||
-- 5 -> flipped + 90 degrees
|
||||
-- 6 -> flipped + 180 degrees
|
||||
-- 7 -> flipped + 270 degrees
|
||||
transform = 1,
|
||||
})
|
||||
-- hl.monitor({
|
||||
-- output = "DP-2",
|
||||
-- mode = "3440x1440@164",
|
||||
-- position = "0x0",
|
||||
-- })
|
||||
-- hl.monitor({
|
||||
-- output = "DP-1",
|
||||
-- mode = "2560x1440",
|
||||
-- position = "-1440x-510",
|
||||
-- -- 0 -> normal (no transforms)
|
||||
-- -- 1 -> 90 degrees
|
||||
-- -- 2 -> 180 degrees
|
||||
-- -- 3 -> 270 degrees
|
||||
-- -- 4 -> flipped
|
||||
-- -- 5 -> flipped + 90 degrees
|
||||
-- -- 6 -> flipped + 180 degrees
|
||||
-- -- 7 -> flipped + 270 degrees
|
||||
-- transform = 1,
|
||||
-- })
|
||||
|
||||
for i = 1, 10 do
|
||||
hl.workspace_rule({ workspace = i, monitor = "DP-1", default_name = "L" .. tostring(i) })
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
../swaylock.nix
|
||||
./hypridle.nix
|
||||
../../options/monitors.nix
|
||||
];
|
||||
|
||||
xdg.configFile = {
|
||||
@@ -11,9 +18,27 @@
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
"hypr/base.lua" = {
|
||||
source = ./config/hyprland.lua;
|
||||
"hypr/monitors.lua" = {
|
||||
text = lib.concatStrings (
|
||||
lib.imap0 (
|
||||
idx:
|
||||
{ name, value }:
|
||||
let
|
||||
offset = idx * 10;
|
||||
in
|
||||
lib.concatMapStrings (
|
||||
i:
|
||||
let
|
||||
ws = offset + i;
|
||||
in
|
||||
''
|
||||
hl.workspace_rule({ workspace = ${toString ws}, monitor = "${name}", default_name = "${name}_${toString i}" })
|
||||
''
|
||||
) (lib.range 1 10)
|
||||
) (lib.attrsToList config.hardware.monitors)
|
||||
);
|
||||
};
|
||||
|
||||
"hypr/config" = {
|
||||
source = ./config;
|
||||
recursive = true;
|
||||
@@ -43,6 +68,7 @@
|
||||
];
|
||||
|
||||
extraConfig = ''
|
||||
require("monitors")
|
||||
require("config.hyprland")
|
||||
'';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user