feat[client]: add shikane
Some checks failed
Build and Deploy / build (push) Has been cancelled
Flake check / Check flake (push) Has been cancelled
Build and Deploy / deploy (push) Has been cancelled

This commit is contained in:
Leon Schwarzäugl 2026-02-23 01:02:44 +01:00
parent 694dd794f7
commit 91f4393800
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
34 changed files with 2182 additions and 1802 deletions

View file

@ -23,7 +23,7 @@
# laptop screen
output = {
criteria = config.swarselsystems.sharescreen;
mode = config.swarselsystems.highResolution;
mode = "${config.swarselsystems.highResolution}@165.000";
scale = 1.0;
};
}
@ -57,7 +57,7 @@
name = "lidopen";
exec = [
"${pkgs.swaybg}/bin/swaybg --output '${config.swarselsystems.sharescreen}' --image ${config.swarselsystems.wallpaper} --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/standwp.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/landscape/standwp.png --mode ${config.stylix.imageScalingMode}"
];
outputs = [
{
@ -82,7 +82,7 @@
in
{
name = "lidclosed";
exec = [ "${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/standwp.png --mode ${config.stylix.imageScalingMode}" ];
exec = [ "${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/landscape/standwp.png --mode ${config.stylix.imageScalingMode}" ];
outputs = [
{
criteria = config.swarselsystems.sharescreen;

View file

@ -101,7 +101,7 @@
tridactyl-native
# mako related
mako
# mako
libnotify
# general utilities

View file

@ -0,0 +1,77 @@
{ lib, config, confLib, ... }:
{
options.swarselmodules.shikane = lib.mkEnableOption "kanshi settings";
config = lib.mkIf config.swarselmodules.shikane {
systemd.user.services.shikane = confLib.overrideTarget "noctalia-shell.target";
services.shikane = {
enable = true;
settings =
let
homeMonitor = [
"m=PHL BDM3270"
"s=AU11806002320"
"v=Philips Consumer Electronics Company"
];
exec = [ "notify-send shikane \"Profile $SHIKANE_PROFILE_NAME has been applied\"" ];
in
{
profile = [
{
name = "internal-on";
inherit exec;
output = [
{
match = config.swarselsystems.sharescreen;
enable = true;
mode = "${config.swarselsystems.highResolution}@165.000";
scale = 1.0;
}
];
}
{
name = "home-internal-on";
inherit exec;
output = [
{
match = config.swarselsystems.sharescreen;
enable = true;
scale = 1.7;
position = "2560,0";
}
{
match = homeMonitor;
enable = true;
scale = 1.0;
mode = "2560x1440";
position = "0,0";
}
];
}
{
name = "home-internal-off";
inherit exec;
output = [
{
match = config.swarselsystems.sharescreen;
enable = false;
position = "2560,0";
}
{
match = homeMonitor;
scale = 1.0;
enable = true;
mode = "2560x1440";
position = "0,0";
}
];
}
];
};
};
};
}

View file

@ -394,36 +394,36 @@ in
swayfxSettings = config.swarselsystems.swayfxConfig;
in
"
# exec_always autotiling
# set $exit \"exit: [s]leep, [l]ock, [p]oweroff, [r]eboot, [u]ser logout\"
# exec_always autotiling
# set $exit \"exit: [s]leep, [l]ock, [p]oweroff, [r]eboot, [u]ser logout\"
# mode $exit {
# bindsym --to-code {
# s exec \"systemctl suspend\", mode \"default\"
# h exec \"systemctl hibernate\", mode \"default\"
# l exec \"swaylock --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2 --daemonize\", mode \"default\
# p exec \"systemctl poweroff\"
# r exec \"systemctl reboot\"
# u exec \"swaymsg exit\"
# mode $exit {
# bindsym --to-code {
# s exec \"systemctl suspend\", mode \"default\"
# h exec \"systemctl hibernate\", mode \"default\"
# l exec \"swaylock --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2 --daemonize\", mode \"default\
# p exec \"systemctl poweroff\"
# r exec \"systemctl reboot\"
# u exec \"swaymsg exit\"
# Return mode \"default\"
# Escape mode \"default\"
# ${modifier}+Escape mode \"default\"
# }
# }
# Return mode \"default\"
# Escape mode \"default\"
# ${modifier}+Escape mode \"default\"
# }
# }
exec systemctl --user import-environment
# exec swayidle -w
exec systemctl --user import-environment
# exec swayidle -w
seat * hide_cursor 2000
seat * hide_cursor 2000
exec_always kill -1 $(pidof kanshi)
exec_always kill -1 $(pidof kanshi)
bindswitch --locked lid:on exec kanshictl switch lidclosed
bindswitch --locked lid:off exec kanshictl switch lidopen
bindswitch --locked lid:on exec kanshictl switch lidclosed
bindswitch --locked lid:off exec kanshictl switch lidopen
${swayfxSettings}
";
${swayfxSettings}
";
};
};
}

View file

@ -22,12 +22,13 @@ in
# { timeout = 300; command = "${swaylock} -f"; }
{ timeout = 300; command = "${noctalia} lockScreen lock || ${swaylock} -f"; }
# { timeout = 600; command = ''${pkgs.sway}/bin/swaymsg "output * dpms off"; resumeCommand = "${pkgs.sway}/bin/swaymsg output * dpms on''; }
{ timeout = 600; command = "${noctalia} sessionMenu lockAndSuspend || ${suspend}"; }
# { timeout = 600; command = "${noctalia} sessionMenu lockAndSuspend || ${suspend}"; }
{ timeout = 600; command = "${suspend}"; }
];
events = {
# { event = "before-sleep"; command = "${lib.getExe pkgs.swaylock-effects} -f --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2"; }
# { event = "before-sleep"; command = "${noctalia} lockScreen lock || ${lib.getExe pkgs.swaylock-effects} -f --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2"; }
# { event = "after-resume"; command = "${swaylock} -f "; }
# before-sleep = "${swaylock} -f ";
before-sleep = "${noctalia} lockScreen lock || ${swaylock} -f ";
# lock = "${swaylock} -f ";
};
};

View file

@ -7,6 +7,7 @@
programs.niri = {
package = pkgs.niri-stable; # which package to use for niri validation
settings = {
gestures.hot-corners.enable = false;
debug = {
honor-xdg-activation-with-invalid-serial = [ ];
};
@ -16,7 +17,7 @@
};
prefer-no-csd = true;
layer-rules = [
{ matches = [{ namespace = "^notifications$"; }]; block-out-from = "screen-capture"; }
{ matches = [{ namespace = "^notificatioans$"; }]; block-out-from = "screen-capture"; }
{ matches = [{ namespace = "^wallpaper$"; }]; place-within-backdrop = true; }
{ matches = [{ namespace = "^noctalia-overview*"; }]; place-within-backdrop = true; }
];
@ -56,11 +57,11 @@
{ matches = [{ app-id = "^spotifytui$"; }]; open-floating = true; default-column-width = { proportion = 0.5; }; }
{ matches = [{ app-id = "^kittyterm$"; }]; open-floating = true; default-column-width = { proportion = 0.5; }; }
];
environment = {
environment = vars.waylandSessionVariables // {
DISPLAY = ":0";
QT_QPA_PLATFORM = lib.mkForce "wayland";
EDITOR = "emacsclient -c";
} // vars.waylandSessionVariables;
};
screenshot-path = "~/Pictures/Screenshots/screenshot_%Y-%m-%d-%H%M%S.png";
input = {
mod-key = "Super";
@ -104,17 +105,18 @@
};
binds = with config.lib.niri.actions; let
sh = spawn "sh" "-c";
resizer = "niri-resize";
resizer = "niri-resize & sleep 0.05";
in
{
"Mod+Shift+t".action = toggle-window-rule-opacity;
"Mod+m".action = focus-workspace-previous;
"Mod+Shift+Space".action = toggle-window-floating;
"Mod+Shift+f".action = fullscreen-window;
"Mod+q".action = sh "niri msg action close-window & ${resizer}";
"Mod+f".action = sh "${resizer} & firefox";
"Mod+q".action = sh "${resizer} && niri msg action close-window";
"Mod+f".action = sh "${resizer} && exec firefox";
# "Mod+Space".action = spawn "noctalia-shell" "ipc" "call" "launcher" "toggle";
"Mod+Space".action = sh "${resizer} & fuzzel";
"Mod+Space".action = sh "${resizer} && exec noctalia-shell ipc call launcher toggle";
# "Mod+Space".action = sh "${resizer} & exec fuzzel";
"Mod+z".action = spawn "noctalia-shell" "ipc" "call" "bar" "toggle";
"Mod+Shift+c".action = spawn "qalculate-gtk";
"Mod+Ctrl+p".action = spawn "1password" "--quick-acces";
@ -128,11 +130,11 @@
"Mod+Shift+s".action.screenshot-window = { write-to-disk = true; };
# "Mod+Shift+v".action = spawn "wf-recorder" "-g" "'$(slurp -f %o -or)'" "-f" "~/Videos/screenrecord_$(date +%Y-%m-%d-%H%M%S).mkv";
"Mod+e".action = sh "${resizer} & emacsclient -nquc -a emacs -e '(dashboard-open)'";
"Mod+c".action = sh "${resizer} & emacsclient -ce '(org-capture)'";
"Mod+t".action = sh "${resizer} & emacsclient -ce '(org-agenda)'";
"Mod+Shift+m".action = sh "${resizer} & emacsclient -ce '(mu4e)'";
"Mod+Shift+a".action = sh "${resizer} & emacsclient -ce '(swarsel/open-calendar)'";
"Mod+e".action = sh "${resizer} && exec emacsclient -nquc -a emacs -e '(dashboard-open)'";
"Mod+c".action = sh "${resizer} && exec emacsclient -ce '(org-capture)'";
"Mod+t".action = sh "${resizer} && exec emacsclient -ce '(org-agenda)'";
"Mod+Shift+m".action = sh "${resizer} && exec emacsclient -ce '(mu4e)'";
"Mod+Shift+a".action = sh "${resizer} && exec emacsclient -ce '(swarsel/open-calendar)'";
"Mod+a".action = spawn "swarselcheck-niri" "-s";
"Mod+x".action = spawn "swarselcheck-niri" "-k";
@ -148,8 +150,8 @@
"Mod+Right".action = focus-column-or-monitor-right;
"Mod+Down".action = focus-window-or-workspace-down;
"Mod+Up".action = focus-window-or-workspace-up;
"Mod+Shift+Left".action = move-column-left;
"Mod+Shift+Right".action = move-column-right;
"Mod+Shift+Left".action = move-column-left-or-to-monitor-left;
"Mod+Shift+Right".action = move-column-right-or-to-monitor-right;
"Mod+Shift+Down".action = move-window-down-or-to-workspace-down;
"Mod+Shift+Up".action = move-window-up-or-to-workspace-up;
# "Mod+Ctrl+Shift+c".action = "reload";
@ -157,7 +159,7 @@
# "Mod+Shift+e".action = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'";
# "Mod+r".action = "mode resize";
# "Mod+Return".action = "exec kitty";
"Mod+Return".action = sh "${resizer} & exec kitty -o confirm_os_window_close=0";
"Mod+Return".action = sh "${resizer} && exec kitty -o confirm_os_window_close=0";
"XF86AudioRaiseVolume".action = spawn "noctalia-shell" "ipc" "call" "volume" "increase";
"XF86AudioLowerVolume".action = spawn "noctalia-shell" "ipc" "call" "volume" "decrease";
"XF86AudioMute".action = spawn "noctalia-shell" "ipc" "call" "volume" "muteOutput";
@ -202,8 +204,8 @@
# { command = [ "nm-applet" ]; }
# { command = [ "niri" "msg" "action" "focus-workspace" "2" ]; }
# { command = [ "noctalia-shell" ]; }
{ command = [ "pkill mako" ]; }
{ command = [ "systemctl" "--user" "start" "noctalia-shell.target" ]; }
# { argv = [ "pkill" "mako" ]; }
{ argv = [ "systemctl" "--user" "restart" "noctalia-shell.target" "tray.target" ]; }
];
# workspaces = {
# "01-Main" = {

View file

@ -8,43 +8,27 @@
targets = {
noctalia-shell.Unit = {
After = [ "graphical-session.target" ];
Wants = [
"tray.target"
"noctalia-tray-pre.target"
];
};
tray = {
Unit = {
After = [ "noctalia-tray-pre.target" ];
After = [ "noctalia-init.service" ];
PartOf = [ "noctalia-shell.service" ];
};
Install.WantedBy = [ "noctalia-shell.target" ];
};
noctalia-tray-pre = {
Unit = {
After = [
"noctalia-init.service"
];
};
Install.WantedBy = [ "noctalia-shell.target" ];
};
};
services = {
noctalia-shell = confLib.overrideTarget "noctalia-shell.target";
noctalia-init = {
Unit = {
PartOf = [ "noctalia-tray-pre.target" ];
};
Service = {
Type = "oneshot";
ExecStartPre = "${pkgs.coreutils}/bin/sleep 5";
ExecStart = "-${pkgs.busybox}/bin/pkill mako";
ExecStart = "${pkgs.coreutils}/bin/sleep 15";
RemainAfterExit = true;
};
Install = {
WantedBy = [ "noctalia-tray-pre.target" ];
WantedBy = [ "noctalia-shell.target" ];
};
};
};
@ -72,7 +56,7 @@
marginHorizontal = 0;
frameThickness = 8;
frameRadius = 12;
outerCorners = true;
outerCorners = false;
hideOnOverview = false;
displayMode = "auto_hide";
autoHideDelay = 100;
@ -81,29 +65,54 @@
widgets = {
left = [
{
characterCount = 2;
characterCount = 4;
colorizeIcons = false;
emptyColor = "primary";
enableScrollWheel = false;
focusedColor = "secondary";
followFocusedScreen = false;
groupedBorderOpacity = 1;
hideUnoccupied = true;
hideUnoccupied = false;
iconScale = 0.5;
id = "Workspace";
labelMode = "none";
labelMode = "name";
occupiedColor = "primary";
pillSize = 0.4;
reverseScroll = false;
showApplications = true;
showBadge = true;
showLabelsOnlyWhenOccupied = true;
showLabelsOnlyWhenOccupied = false;
unfocusedIconsOpacity = 0.25;
}
{
defaultSettings = {
completedCount = 0;
count = 0;
current_page_id = 0;
isExpanded = false;
pages = [
{
id = 0;
name = "General";
}
];
priorityColors = {
high = "#f44336";
low = "#9e9e9e";
medium = "#2196f3";
};
showBackground = true;
showCompleted = true;
todos = [ ];
useCustomColors = false;
};
id = "plugin:todo";
}
];
center = [
{
colorizeIcons = false;
colorizeIcons = true;
hideMode = "hidden";
id = "ActiveWindow";
maxWidth = 145;
@ -134,6 +143,17 @@
id = "Volume";
middleClickCommand = "pavucontrol";
}
{
id = "NotificationHistory";
hideWhenZero = false;
showUnreadBadge = true;
}
{
id = "plugin:ba7043:github-feed";
}
{
id = "plugin:clipper";
}
{
displayMode = "onhover";
id = "Network";
@ -154,12 +174,6 @@
showNoctaliaPerformance = false;
showPowerProfiles = true;
}
{
id = "plugin:ba7043:github-feed";
}
{
id = "plugin:clipper";
}
{
colorName = "primary";
id = "SessionMenu";
@ -176,17 +190,17 @@
{
colorizeDistroLogo = false;
colorizeSystemIcon = "primary";
customIconPath = "";
customIconPath = "${self}/files/icons/swarsel.png";
enableColorization = true;
icon = "noctalia";
id = "ControlCenter";
useDistroLogo = true;
useDistroLogo = false;
}
];
};
};
general = {
avatarImage = "${self}/files/wallpaper/swarsel.png";
avatarImage = "${self}/files/icons/swarsel.png";
dimmerOpacity = 0.2;
showScreenCorners = false;
forceBlackScreenCorners = false;
@ -195,16 +209,16 @@
iRadiusRatio = 1;
boxRadiusRatio = 1;
screenRadiusRatio = 1;
animationSpeed = 1;
animationSpeed = 1.5;
animationDisabled = false;
compactLockScreen = true;
lockOnSuspend = true;
showSessionButtonsOnLockScreen = true;
showHibernateOnLockScreen = false;
enableShadows = true;
shadowDirection = "bottom_right";
shadowOffsetX = 2;
shadowOffsetY = 3;
shadowDirection = "center";
shadowOffsetX = 0;
shadowOffsetY = 0;
language = "";
allowPanelsOnScreenWithoutBar = true;
showChangelogOnStartup = true;
@ -260,17 +274,17 @@
wallpaper = {
enabled = true;
overviewEnabled = true;
directory = "${self}/files/wallpaper";
directory = "${self}/files/wallpaper/landscape";
monitorDirectories = [ ];
enableMultiMonitorDirectories = true;
showHiddenFiles = false;
viewMode = "single";
setWallpaperOnAllMonitors = true;
setWallpaperOnAllMonitors = false;
fillMode = "crop";
fillColor = "#000000";
useSolidColor = false;
solidColor = "#1a1a2e";
automationEnabled = false;
automationEnabled = true;
wallpaperChangeMode = "random";
randomIntervalSec = 300;
transitionDuration = 500;
@ -586,7 +600,7 @@
colorizationEnabled = true;
colorizationIcon = "Primary";
colorizationBadge = "Tertiary";
colorizationBadgeText = "Primary";
colorizationBadgeText = "None";
defaultTab = 1;
enableSystemNotifications = true;
notifyGitHubNotifications = true;

View file

@ -297,6 +297,84 @@ in
};
services = {
shikane = {
settings =
let
workRight = [
"m=HP Z32"
"s=CN41212T55"
"v=HP Inc."
];
workLeft = [
"m=HP 732pk"
"s=CNC4080YL5"
"v=HP Inc."
];
exec = [ "notify-send shikane \"Profile $SHIKANE_PROFILE_NAME has been applied\"" ];
in
{
profile = [
{
name = "work-internal-on";
inherit exec;
output = [
{
match = config.swarselsystems.sharescreen;
enable = true;
scale = 1.7;
position = "2560,0";
}
{
match = workRight;
enable = true;
scale = 1.0;
mode = "3840x2160@60Hz";
position = "-1280,0";
}
{
match = workLeft;
enable = true;
scale = 1.0;
transform = "270";
mode = "3840x2160@60Hz";
position = "-3440,-1050";
}
];
}
{
name = "work-internal-off";
inherit exec;
output = [
{
match = config.swarselsystems.sharescreen;
enable = false;
scale = 1.7;
position = "2560,0";
}
{
match = workRight;
enable = true;
scale = 1.0;
mode = "3840x2160@60Hz";
position = "-1280,0";
}
{
match = workLeft;
enable = true;
scale = 1.0;
transform = "270";
mode = "3840x2160@60Hz";
position = "-3440,-1050";
}
];
}
];
};
};
kanshi = {
settings = [
{
@ -338,8 +416,8 @@ in
name = "lidopen";
exec = [
"${pkgs.swaybg}/bin/swaybg --output '${config.swarselsystems.sharescreen}' --image ${config.swarselsystems.wallpaper} --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP Z32 CN41212T55' --image ${self}/files/wallpaper/botanicswp.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP 732pk CNC4080YL5' --image ${self}/files/wallpaper/op6wp.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP Z32 CN41212T55' --image ${self}/files/wallpaper/landscape/botanicswp.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP 732pk CNC4080YL5' --image ${self}/files/wallpaper/portrait/op6wp.png --mode ${config.stylix.imageScalingMode}"
];
outputs = [
{
@ -373,7 +451,7 @@ in
name = "lidopen";
exec = [
"${pkgs.swaybg}/bin/swaybg --output '${config.swarselsystems.sharescreen}' --image ${config.swarselsystems.wallpaper} --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/navidrome.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/services/navidrome.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.kanshare}/bin/kanshare ${config.swarselsystems.sharescreen} '${monitor}'"
];
outputs = [
@ -396,8 +474,8 @@ in
profile = {
name = "lidclosed";
exec = [
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP Z32 CN41212T55' --image ${self}/files/wallpaper/botanicswp.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP 732pk CNC4080YL5' --image ${self}/files/wallpaper/op6wp.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP Z32 CN41212T55' --image ${self}/files/wallpaper/landscape/botanicswp.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output 'HP Inc. HP 732pk CNC4080YL5' --image ${self}/files/wallpaper/portrait/op6wp.png --mode ${config.stylix.imageScalingMode}"
];
outputs = [
{
@ -428,7 +506,7 @@ in
{
name = "lidclosed";
exec = [
"${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/navidrome.png --mode ${config.stylix.imageScalingMode}"
"${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/services/navidrome.png --mode ${config.stylix.imageScalingMode}"
];
outputs = [
{