This commit is contained in:
soraefir
2026-06-05 04:14:08 +02:00
parent 1590a1cf31
commit c2cd4e42c1
12 changed files with 359 additions and 230 deletions

View File

@@ -1,4 +1,12 @@
{ config, lib, ... }: {
{ config, lib, pkgs, ... }:
let
restartEwwBar = monitor: pkgs.writeShellScript "restart-eww-bar-after-kanshi-${toString monitor}" ''
sleep 1
${lib.getExe pkgs.eww} close bar || true
${lib.getExe pkgs.eww} open bar --screen ${toString monitor}
'';
in {
config = lib.mkIf (config.usercfg.wm == "Wayland") {
services.kanshi = {
@@ -7,6 +15,7 @@
settings = [
{
profile.name = "tower_0";
profile.exec = [ "${restartEwwBar 1}" ];
profile.outputs = [
{
criteria = "AOC 24E1W1 GNSKCHA086899";
@@ -28,6 +37,7 @@
}
{
profile.name = "tower_1";
profile.exec = [ "${restartEwwBar 1}" ];
profile.outputs = [
{
criteria = "AOC 24E1W1 GNSKCHA086899";
@@ -57,6 +67,7 @@
}
{
profile.name = "laptop_0";
profile.exec = [ "${restartEwwBar 0}" ];
profile.outputs = [{
criteria = "LG Display 0x060A Unknown";
mode = "1920x1080@60.020";
@@ -67,6 +78,7 @@
}
{
profile.name = "laptop_1";
profile.exec = [ "${restartEwwBar 1}" ];
profile.outputs = [
{
criteria = "CEX CX133 0x00000001";
@@ -86,6 +98,7 @@
}
{
profile.name = "laptop_2";
profile.exec = [ "${restartEwwBar 1}" ];
profile.outputs = [
{
criteria = "AOC 16G3 1DDP7HA000348";