mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
removed wallpapers. moved to swaylock-fancy
This commit is contained in:
parent
2dbc1ac464
commit
640f5cb7a8
13 changed files with 287 additions and 416 deletions
|
|
@ -3,46 +3,16 @@
|
|||
with lib;
|
||||
|
||||
{
|
||||
imports = [ ./swayidle.nix ];
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
config =
|
||||
wayland.windowManager.sway.config = {
|
||||
output =
|
||||
let
|
||||
lockCommand = "swaylock -i VGA-1:${builtins.elemAt config.kw.wallpapers 0} -s fill";
|
||||
cfg = config.wayland.windowManager.sway.config;
|
||||
middle = {
|
||||
res = "1280x1024@75Hz";
|
||||
pos = "1920 0";
|
||||
};
|
||||
in
|
||||
{
|
||||
#startup = [{ command = "${pkgs.ckb-next}/bin/ckb-next -b"; }];
|
||||
|
||||
output =
|
||||
let
|
||||
middle = {
|
||||
res = "1280x1024@75Hz";
|
||||
pos = "1920 0";
|
||||
};
|
||||
in
|
||||
{
|
||||
"VGA-1" = middle;
|
||||
};
|
||||
|
||||
keybindings = {
|
||||
"${cfg.modifier}+x" = "exec ${lockCommand}";
|
||||
};
|
||||
|
||||
modes = {
|
||||
"System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown" =
|
||||
{
|
||||
"l" = "exec ${lockCommand}, mode default";
|
||||
"e" = "exec swaymsg exit, mode default";
|
||||
"s" = "exec systemctl suspend, mode default";
|
||||
"h" = "exec systemctl hibernate, mode default";
|
||||
"r" = "exec systemctl reboot, mode default";
|
||||
"Shift+s" = "exec systemctl shutdown, mode default";
|
||||
"Return" = "mode default";
|
||||
"Escape" = "mode default";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
"VGA-1" = middle;
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,24 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
systemd.user.services.swayidle = {
|
||||
Unit = {
|
||||
Description = "swayidle";
|
||||
Documentation = [ "man:swayidle(1)" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = ''
|
||||
${pkgs.swayidle}/bin/swayidle -w \
|
||||
timeout 300 '${pkgs.swaylock}/bin/swaylock -f -i VGA-1:${builtins.elemAt config.kw.wallpapers 0} \
|
||||
timeout 600 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"' \
|
||||
before-sleep '${pkgs.swaylock}/bin/swaylock -f -i VGA-1:${builtins.elemAt config.kw.wallpapers 0}'
|
||||
'';
|
||||
RestartSec = 3;
|
||||
Restart = "always";
|
||||
};
|
||||
Install = { WantedBy = [ "sway-session.target" ]; };
|
||||
};
|
||||
}
|
||||
|
|
@ -3,81 +3,53 @@
|
|||
with lib;
|
||||
|
||||
{
|
||||
imports = [ ./swayidle.nix ];
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
config =
|
||||
let
|
||||
lockCommand = "swaylock -i HDMI-A-1:${builtins.elemAt config.kw.wallpapers 0} -i DP-1:${builtins.elemAt config.kw.wallpapers 1} -i DVI-D-1:${builtins.elemAt config.kw.wallpapers 2} -s fill";
|
||||
cfg = config.wayland.windowManager.sway.config;
|
||||
config = {
|
||||
output = let
|
||||
left = {
|
||||
res = "1920x1080";
|
||||
pos = "0 0";
|
||||
};
|
||||
middle = {
|
||||
res = "1920x1200";
|
||||
pos = "1920 0";
|
||||
};
|
||||
right = {
|
||||
res = "1920x1080";
|
||||
pos = "3840 0";
|
||||
};
|
||||
in
|
||||
{
|
||||
#startup = [{ command = "${pkgs.ckb-next}/bin/ckb-next -b"; }];
|
||||
"DP-1" = right;
|
||||
"DVI-D-1" = middle;
|
||||
"HDMI-A-1" = left;
|
||||
};
|
||||
|
||||
output =
|
||||
let
|
||||
left = {
|
||||
res = "1920x1080";
|
||||
pos = "0 0";
|
||||
};
|
||||
middle = {
|
||||
res = "1920x1200";
|
||||
pos = "1920 0";
|
||||
};
|
||||
right = {
|
||||
res = "1920x1080";
|
||||
pos = "3840 0";
|
||||
};
|
||||
in
|
||||
{
|
||||
"DP-1" = right;
|
||||
"DVI-D-1" = middle;
|
||||
"HDMI-A-1" = left;
|
||||
};
|
||||
|
||||
keybindings = {
|
||||
"${cfg.modifier}+x" = "exec ${lockCommand}";
|
||||
input = {
|
||||
"5426:103:Razer_Razer_Naga_Trinity" = {
|
||||
accel_profile = "adaptive";
|
||||
pointer_accel = "-0.5";
|
||||
};
|
||||
|
||||
modes = {
|
||||
"System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown" =
|
||||
{
|
||||
"l" = "exec ${lockCommand}, mode default";
|
||||
"e" = "exec swaymsg exit, mode default";
|
||||
"s" = "exec systemctl suspend, mode default";
|
||||
"h" = "exec systemctl hibernate, mode default";
|
||||
"r" = "exec systemctl reboot, mode default";
|
||||
"Shift+s" = "exec systemctl shutdown, mode default";
|
||||
"Return" = "mode default";
|
||||
"Escape" = "mode default";
|
||||
};
|
||||
"5824:1503:screenstub-tablet" = { events = "disabled"; };
|
||||
"5824:1503:screenstub-mouse" = { events = "disabled"; };
|
||||
"5824:1503:screenstub-kbd" = { events = "disabled"; };
|
||||
"1386:215:Wacom_BambooPT_2FG_Small_Pen" = {
|
||||
map_to_output = "HDMI-A-1";
|
||||
};
|
||||
|
||||
input = {
|
||||
"5426:103:Razer_Razer_Naga_Trinity" = {
|
||||
accel_profile = "adaptive";
|
||||
pointer_accel = "-0.5";
|
||||
};
|
||||
"5824:1503:screenstub-tablet" = { events = "disabled"; };
|
||||
"5824:1503:screenstub-mouse" = { events = "disabled"; };
|
||||
"5824:1503:screenstub-kbd" = { events = "disabled"; };
|
||||
"1386:215:Wacom_BambooPT_2FG_Small_Pen" = {
|
||||
map_to_output = "HDMI-A-1";
|
||||
};
|
||||
"1386:215:Wacom_BambooPT_2FG_Small_Finger" = {
|
||||
natural_scroll = "enabled";
|
||||
middle_emulation = "enabled";
|
||||
tap = "enabled";
|
||||
dwt = "enabled";
|
||||
accel_profile = "flat";
|
||||
pointer_accel = "0.05";
|
||||
};
|
||||
"1386:215:Wacom_BambooPT_2FG_Small_Finger" = {
|
||||
natural_scroll = "enabled";
|
||||
middle_emulation = "enabled";
|
||||
tap = "enabled";
|
||||
dwt = "enabled";
|
||||
accel_profile = "flat";
|
||||
pointer_accel = "0.05";
|
||||
};
|
||||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
workspace "1" output "DP-1"
|
||||
workspace "11:F1" output "DVI-1"
|
||||
workspace "12:F2" output "HDMI-A-1"
|
||||
workspace "1" output "DP-1"
|
||||
workspace "11:F1" output "DVI-1"
|
||||
workspace "12:F2" output "HDMI-A-1"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
systemd.user.services.swayidle = {
|
||||
Unit = {
|
||||
Description = "swayidle";
|
||||
Documentation = [ "man:swayidle(1)" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = ''
|
||||
${pkgs.swayidle}/bin/swayidle -w \
|
||||
timeout 300 '${pkgs.swaylock}/bin/swaylock -f -i HDMI-A-1:${builtins.elemAt config.kw.wallpapers 0} -i DP-1:${builtins.elemAt config.kw.wallpapers 1} -i DVI-D-1:${builtins.elemAt config.kw.wallpapers 2}' \
|
||||
timeout 600 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"' \
|
||||
before-sleep '${pkgs.swaylock}/bin/swaylock -f -i HDMI-A-1:${builtins.elemAt config.kw.wallpapers 0} -i DP-1:${builtins.elemAt config.kw.wallpapers 1} -i DVI-D-1:${builtins.elemAt config.kw.wallpapers 2}'
|
||||
'';
|
||||
RestartSec = 3;
|
||||
Restart = "always";
|
||||
};
|
||||
Install = { WantedBy = [ "sway-session.target" ]; };
|
||||
};
|
||||
}
|
||||
|
|
@ -3,49 +3,23 @@
|
|||
with lib;
|
||||
|
||||
{
|
||||
imports = [ ./swayidle.nix ];
|
||||
|
||||
wayland.windowManager.sway.config =
|
||||
let
|
||||
lockCommand = "swaylock -i eDP-1:${builtins.elemAt config.kw.wallpapers 0} -s fill";
|
||||
cfg = config.wayland.windowManager.sway.config;
|
||||
wayland.windowManager.sway.config = {
|
||||
output = let
|
||||
laptop = {
|
||||
res = "1920x1080";
|
||||
pos = "0 0";
|
||||
};
|
||||
in
|
||||
{
|
||||
output =
|
||||
let
|
||||
laptop = {
|
||||
res = "1920x1080";
|
||||
pos = "0 0";
|
||||
};
|
||||
in
|
||||
{ "eDP-1" = laptop; };
|
||||
{ "eDP-1" = laptop; };
|
||||
|
||||
keybindings = {
|
||||
"${cfg.modifier}+x" = "exec ${lockCommand}";
|
||||
};
|
||||
|
||||
modes = {
|
||||
"System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown" =
|
||||
{
|
||||
"l" = "exec ${lockCommand}, mode default";
|
||||
"e" = "exec swaymsg exit, mode default";
|
||||
"s" = "exec systemctl suspend, mode default";
|
||||
"h" = "exec systemctl hibernate, mode default";
|
||||
"r" = "exec systemctl reboot, mode default";
|
||||
"Shift+s" = "exec systemctl shutdown, mode default";
|
||||
"Return" = "mode default";
|
||||
"Escape" = "mode default";
|
||||
};
|
||||
};
|
||||
|
||||
input = {
|
||||
"1739:33362:Synaptics_TM3336-002" = {
|
||||
dwt = "enabled";
|
||||
tap = "enabled";
|
||||
natural_scroll = "enabled";
|
||||
middle_emulation = "enabled";
|
||||
click_method = "clickfinger";
|
||||
};
|
||||
input = {
|
||||
"1739:33362:Synaptics_TM3336-002" = {
|
||||
dwt = "enabled";
|
||||
tap = "enabled";
|
||||
natural_scroll = "enabled";
|
||||
middle_emulation = "enabled";
|
||||
click_method = "clickfinger";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
systemd.user.services.swayidle = {
|
||||
Unit = {
|
||||
Description = "swayidle";
|
||||
Documentation = [ "man:swayidle(1)" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = ''
|
||||
${pkgs.swayidle}/bin/swayidle -w \
|
||||
timeout 300 '${pkgs.swaylock}/bin/swaylock -f -i eDP-1:${builtins.elemAt config.kw.wallpapers 0} \
|
||||
timeout 600 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"' \
|
||||
before-sleep '${pkgs.swaylock}/bin/swaylock -f -i eDP-1:${builtins.elemAt config.kw.wallpapers 0}'
|
||||
'';
|
||||
RestartSec = 3;
|
||||
Restart = "always";
|
||||
};
|
||||
Install = { WantedBy = [ "sway-session.target" ]; };
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue