Fix idle
This commit is contained in:
parent
af72c94d8a
commit
ce92349ce5
4 changed files with 82 additions and 149 deletions
104
flake.lock
104
flake.lock
|
@ -239,40 +239,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lowdown-src": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1598695561,
|
|
||||||
"narHash": "sha256-gyH/5j+h/nWw0W8AcR2WKvNBUsiQ7QuxqSJNXAwV+8E=",
|
|
||||||
"owner": "kristapsdz",
|
|
||||||
"repo": "lowdown",
|
|
||||||
"rev": "1705b4a26fbf065d9574dce47a94e8c7c79e052f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "kristapsdz",
|
|
||||||
"repo": "lowdown",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nix": {
|
|
||||||
"inputs": {
|
|
||||||
"lowdown-src": "lowdown-src",
|
|
||||||
"nixpkgs": "nixpkgs_7"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1609520816,
|
|
||||||
"narHash": "sha256-IGO7tfJXsv9u2wpW76VCzOsHYapRZqH9pHGVsoffPrI=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nix",
|
|
||||||
"rev": "8a2ce0f455da32bc20978e68c0aad9efb4560abc",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"id": "nix",
|
|
||||||
"type": "indirect"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nix-colors": {
|
"nix-colors": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"base16-schemes": "base16-schemes",
|
"base16-schemes": "base16-schemes",
|
||||||
|
@ -451,37 +417,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_7": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1602702596,
|
|
||||||
"narHash": "sha256-fqJ4UgOb4ZUnCDIapDb4gCrtAah5Rnr2/At3IzMitig=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "ad0d20345219790533ebe06571f82ed6b034db31",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"id": "nixpkgs",
|
|
||||||
"ref": "nixos-20.09-small",
|
|
||||||
"type": "indirect"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_8": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1692447944,
|
|
||||||
"narHash": "sha256-fkJGNjEmTPvqBs215EQU4r9ivecV5Qge5cF/QDLVn3U=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "d680ded26da5cf104dd2735a51e88d2d8f487b4d",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"api-lyte-dev": "api-lyte-dev",
|
"api-lyte-dev": "api-lyte-dev",
|
||||||
|
@ -493,8 +428,7 @@
|
||||||
"nix-colors": "nix-colors",
|
"nix-colors": "nix-colors",
|
||||||
"nixpkgs-stable": "nixpkgs-stable",
|
"nixpkgs-stable": "nixpkgs-stable",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix"
|
||||||
"ssbm": "ssbm"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
|
@ -522,22 +456,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"slippi-desktop": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1696044044,
|
|
||||||
"narHash": "sha256-LdQHjYIQ/5FyTBq1hY2pFB8zrUF4Z26JvwTAXT0GH9w=",
|
|
||||||
"owner": "project-slippi",
|
|
||||||
"repo": "slippi-desktop-app",
|
|
||||||
"rev": "f3d4cc0993af6bde9b0809079871fa7b4fdc7fcd",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "project-slippi",
|
|
||||||
"repo": "slippi-desktop-app",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sops-nix": {
|
"sops-nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_6",
|
"nixpkgs": "nixpkgs_6",
|
||||||
|
@ -557,26 +475,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ssbm": {
|
|
||||||
"inputs": {
|
|
||||||
"nix": "nix",
|
|
||||||
"nixpkgs": "nixpkgs_8",
|
|
||||||
"slippi-desktop": "slippi-desktop"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1692992594,
|
|
||||||
"narHash": "sha256-FpX1bOgMKgOBPHpWLtWmnaN7Tk50i6EKlPi/Xe2O3qM=",
|
|
||||||
"owner": "djanatyn",
|
|
||||||
"repo": "ssbm-nix",
|
|
||||||
"rev": "87f2565474ab7e75ed6eee0fdce52162a4b7ed0c",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "djanatyn",
|
|
||||||
"repo": "ssbm-nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"systems": {
|
"systems": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
|
|
|
@ -9,11 +9,11 @@
|
||||||
hardware.url = "github:nixos/nixos-hardware";
|
hardware.url = "github:nixos/nixos-hardware";
|
||||||
hyprland.url = "github:hyprwm/Hyprland";
|
hyprland.url = "github:hyprwm/Hyprland";
|
||||||
nix-colors.url = "github:misterio77/nix-colors";
|
nix-colors.url = "github:misterio77/nix-colors";
|
||||||
ssbm.url = "github:djanatyn/ssbm-nix";
|
|
||||||
|
|
||||||
# TODO: do I really need this in the root of my flake if _only_ beefcake uses it?
|
|
||||||
api-lyte-dev.url = "git+ssh://gitea@git.lyte.dev/lytedev/api.lyte.dev.git";
|
api-lyte-dev.url = "git+ssh://gitea@git.lyte.dev/lytedev/api.lyte.dev.git";
|
||||||
|
|
||||||
|
# TODO: ssbm.url = "github:djanatyn/ssbm-nix";
|
||||||
|
|
||||||
# need to bump ishiiruka upstream I think
|
# need to bump ishiiruka upstream I think
|
||||||
# slippi-desktop.url = "github:project-slippi/slippi-desktop-app";
|
# slippi-desktop.url = "github:project-slippi/slippi-desktop-app";
|
||||||
# slippi-desktop.flake = false;
|
# slippi-desktop.flake = false;
|
||||||
|
|
121
home/linux.nix
121
home/linux.nix
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
home.pointerCursor = {
|
home.pointerCursor = {
|
||||||
|
@ -19,57 +20,70 @@
|
||||||
font = "Symbols Nerd Font 12,IosevkaLyteTerm 12";
|
font = "Symbols Nerd Font 12,IosevkaLyteTerm 12";
|
||||||
# TODO: config
|
# TODO: config
|
||||||
|
|
||||||
backgroundColor = base01;
|
backgroundColor = "#${base01}";
|
||||||
textColor = base05;
|
textColor = "#${base05}";
|
||||||
borderColor = base0C;
|
borderColor = "#${base0C}";
|
||||||
progressColor = base0A;
|
progressColor = "#${base0A}";
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
[urgency=high]
|
[urgency=high]
|
||||||
border-color=#${base0F}
|
border-color=#${base0F}
|
||||||
|
[urgency=high]
|
||||||
background-color=#${base03}
|
background-color=#${base03}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
swayidle = {
|
# this doesn't work due to weird quoting bugs AFAICT
|
||||||
enable = true;
|
# swayidle = let
|
||||||
|
# bins = rec {
|
||||||
|
# swaylock = builtins.trace "${pkgs.swaylock}/bin/swaylock" "${pkgs.swaylock}/bin/swaylock";
|
||||||
|
# swaymsg = "${pkgs.sway}/bin/swaymsg";
|
||||||
|
# notify-send = "${swaymsg} exec -- ${pkgs.libnotify}/bin/notify-send";
|
||||||
|
# };
|
||||||
|
# in (with bins; {
|
||||||
|
# enable = true;
|
||||||
|
|
||||||
events = [
|
# events = [
|
||||||
{
|
# {
|
||||||
event = "before-sleep";
|
# event = "before-sleep";
|
||||||
command = "${pkgs.swaylock}/bin/swaylock";
|
# command = swaylock;
|
||||||
}
|
# }
|
||||||
];
|
# ];
|
||||||
|
|
||||||
timeouts = [
|
# timeouts = [
|
||||||
{
|
# {
|
||||||
timeout = 330;
|
# timeout = 5;
|
||||||
command = "notify-send \"Idling in 300 seconds\"";
|
# command = "${notify-send} \\\"Idling in 300 seconds\\\"";
|
||||||
resumeCommand = "notify-send \"Idling cancelled.\"";
|
# resumeCommand = "${notify-send} \\\"Idling cancelled.\\\"";
|
||||||
}
|
# }
|
||||||
{
|
# {
|
||||||
timeout = 540;
|
# # timeout = 540;
|
||||||
command = "notify-send \"Idling in 90 seconds\"";
|
# timeout = 6;
|
||||||
}
|
# command = "${notify-send} 'Idling in 90 seconds'";
|
||||||
{
|
# }
|
||||||
timeout = 570;
|
# {
|
||||||
command = "notify-send \"Idling in 60 seconds\"";
|
# # timeout = 570;
|
||||||
}
|
# timeout = 7;
|
||||||
{
|
# command = "${notify-send} 'Idling in 60 seconds'";
|
||||||
timeout = 600;
|
# }
|
||||||
command = "notify-send \"Idling in 30 seconds...\"";
|
# {
|
||||||
}
|
# # timeout = 600;
|
||||||
{
|
# timeout = 8;
|
||||||
timeout = 630;
|
# command = "${notify-send} 'Idling in 30 seconds...'";
|
||||||
command = "swaylock -f";
|
# }
|
||||||
}
|
# {
|
||||||
{
|
# # timeout = 630;
|
||||||
timeout = 660;
|
# timeout = 9;
|
||||||
command = "swaymsg \"output * dpms off\"";
|
# command = "${swaylock} -f";
|
||||||
resumeCommand = "swaymsg \"output * dpms on\" & maybe-good-morning &";
|
# }
|
||||||
}
|
# {
|
||||||
];
|
# # timeout = 660;
|
||||||
};
|
# timeout = 10;
|
||||||
|
# command = "${swaymsg} 'output * dpms off'";
|
||||||
|
# resumeCommand = "${swaymsg} 'output * dpms on' & ${swaymsg} exec -- maybe-good-morning &";
|
||||||
|
# }
|
||||||
|
# ];
|
||||||
|
# });
|
||||||
};
|
};
|
||||||
|
|
||||||
wayland.windowManager.sway = {
|
wayland.windowManager.sway = {
|
||||||
|
@ -135,8 +149,29 @@
|
||||||
always = true;
|
always = true;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
command = "systemctl --user restart swayidle";
|
command = lib.concatStringsSep " " [
|
||||||
always = true;
|
"swayidle -w"
|
||||||
|
"timeout 300 'notify-send \"Idling in 300 seconds\"'"
|
||||||
|
"resume 'notify-send \"Idling cancelled.\"'"
|
||||||
|
"timeout 480 'notify-send \"Idling in 120 seconds\"'"
|
||||||
|
"timeout 510 'notify-send \"Idling in 90 seconds\"'"
|
||||||
|
"timeout 540 'notify-send \"Idling in 60 seconds!\"'"
|
||||||
|
"timeout 570 'notify-send \"Idling in 30 seconds!\"'"
|
||||||
|
"timeout 590 'notify-send \"Idling in 10 seconds!\"'"
|
||||||
|
"timeout 591 'notify-send \"Idling in 9 seconds!\"'"
|
||||||
|
"timeout 592 'notify-send \"Idling in 8 seconds!\"'"
|
||||||
|
"timeout 593 'notify-send \"Idling in 7 seconds!\"'"
|
||||||
|
"timeout 594 'notify-send \"Idling in 6 seconds!\"'"
|
||||||
|
"timeout 595 'notify-send \"Idling in 5 seconds!\"'"
|
||||||
|
"timeout 596 'notify-send \"Idling in 4 seconds!\"'"
|
||||||
|
"timeout 597 'notify-send \"Idling in 3 seconds!\"'"
|
||||||
|
"timeout 598 'notify-send \"Idling in 2 seconds!\"'"
|
||||||
|
"timeout 599 'notify-send \"Idling in 1 second!\"'"
|
||||||
|
"timeout 600 'swaylock -f'"
|
||||||
|
"timeout 600 'swaymsg \"output * dpms off\"'"
|
||||||
|
"resume 'swaymsg \"output * dpms on\" & maybe-good-morning &'"
|
||||||
|
"before-sleep 'swaylock'"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
{command = "firefox";}
|
{command = "firefox";}
|
||||||
{command = "kitty --single-instance";}
|
{command = "kitty --single-instance";}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
]
|
]
|
||||||
++ (with outputs.nixosModules; [
|
++ (with outputs.nixosModules; [
|
||||||
# If you want to use modules your own flake exports (from modules/nixos):
|
# If you want to use modules your own flake exports (from modules/nixos):
|
||||||
melee
|
# melee
|
||||||
amd
|
amd
|
||||||
desktop-usage
|
desktop-usage
|
||||||
podman
|
podman
|
||||||
|
|
Loading…
Reference in a new issue