mirror of
https://codeberg.org/tmayoff/.dotfiles.git
synced 2025-12-06 08:48:34 -05:00
Updated swaylock, swayidle, hibernation
This commit is contained in:
parent
6dad46a01e
commit
76b9aac30d
2 changed files with 89 additions and 13 deletions
|
|
@ -1,29 +1,86 @@
|
||||||
{...}: let
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
mod = "Mod4";
|
mod = "Mod4";
|
||||||
term = "kitty";
|
term = "kitty";
|
||||||
|
menu = "rofi -combi-modi window,drun,ssh -show combi -show-icons";
|
||||||
|
|
||||||
|
image = pkgs.fetchurl {
|
||||||
|
url = "https://www.pixelstalk.net/wp-content/uploads/image11/Get-Glittery-blue-4K-wallpaper-with-a-calm-cool-sparkle.jpg";
|
||||||
|
sha256 = "sha256-inZkyQsiF+aqgj2IK2AKN9STYLJBzG+QQCzw/X7cdcw=";
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./rofi.nix
|
./rofi.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
programs.swaylock = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.swaylock-effects;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
image = "${image}";
|
||||||
|
effect-blur = "30x3";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.swayidle = {
|
||||||
|
enable = true;
|
||||||
|
extraArgs = ["-w"];
|
||||||
|
events = [
|
||||||
|
{
|
||||||
|
event = "before-sleep";
|
||||||
|
command = "${lib.getExe pkgs.swaylock-effects} -f";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
event = "lock";
|
||||||
|
command = "${lib.getExe pkgs.swaylock-effects} -f";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
timeouts = [
|
||||||
|
{
|
||||||
|
timeout = 300;
|
||||||
|
command = "${lib.getExe pkgs.swaylock-effects} -f";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 305;
|
||||||
|
command = ''${pkgs.sway}/bin/swaymsg "output * dpms off"'';
|
||||||
|
resumeCommand = ''${pkgs.sway}/bin/swaymsg "output * dpms on"'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 600;
|
||||||
|
command = ''systemctl suspend'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 1200;
|
||||||
|
command = ''systemctl hibernate'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.flameshot = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
General = {
|
||||||
|
# disabledTrayIcon = true;
|
||||||
|
showStartupLaunchMessage = false;
|
||||||
|
uiColor = "#24273a";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
wayland.windowManager.sway = {
|
wayland.windowManager.sway = {
|
||||||
enable = true;
|
enable = true;
|
||||||
checkConfig = true;
|
checkConfig = true;
|
||||||
config = rec {
|
config = rec {
|
||||||
output."*" = {
|
output."*" = {
|
||||||
scale = "1";
|
scale = "1";
|
||||||
# bg = "${image} fill";
|
background = "${image} fill";
|
||||||
};
|
};
|
||||||
|
|
||||||
startup = [
|
startup = [];
|
||||||
### Idle configuration
|
|
||||||
# This will lock your screen after 300 seconds of inactivity, then turn off
|
|
||||||
# your displays after another 300 seconds, and turn your screens back on when
|
|
||||||
# resumed. It will also lock your screen before your computer goes to sleep.
|
|
||||||
{command = "swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg \"output * power off\"' resume 'swaymsg \"output * power on\"' before-sleep 'swaylock -f -c 000000'";}
|
|
||||||
];
|
|
||||||
|
|
||||||
menu = "rofi -combi-modi window,drun,ssh -show combi -show-icons";
|
|
||||||
|
|
||||||
# Home row direction keys, like vim
|
# Home row direction keys, like vim
|
||||||
up = "k";
|
up = "k";
|
||||||
|
|
@ -120,6 +177,8 @@ in {
|
||||||
|
|
||||||
# Make the current focus fullscreen
|
# Make the current focus fullscreen
|
||||||
"${mod}+f" = "fullscreen";
|
"${mod}+f" = "fullscreen";
|
||||||
|
|
||||||
|
"Print" = "exec flameshot gui";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Drag floating windows by holding down $mod and left mouse button.
|
# Drag floating windows by holding down $mod and left mouse button.
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,23 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot = {
|
||||||
|
enable = true;
|
||||||
|
configurationLimit = 5;
|
||||||
|
};
|
||||||
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
boot.plymouth = {
|
||||||
|
enable = true;
|
||||||
|
themePackages = [pkgs.catppuccin-plymouth];
|
||||||
|
theme = "catppuccin-macchiato";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Nix options
|
||||||
|
nix.optimise.automatic = true;
|
||||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||||
|
nix.trustedUsers = ["tyler" "@wheel"];
|
||||||
|
|
||||||
networking.hostName = "wash"; # Define your hostname.
|
networking.hostName = "wash"; # Define your hostname.
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
@ -117,14 +130,18 @@
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# unstable.bitwarden-desktop
|
# unstable.bitwarden-desktop
|
||||||
sqlite
|
sqlite
|
||||||
vscode
|
vscode.fhs
|
||||||
lm_sensors
|
lm_sensors
|
||||||
|
|
||||||
|
pre-commit
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
nerdfonts
|
nerdfonts
|
||||||
];
|
];
|
||||||
|
|
||||||
|
programs.nix-ld.enable = true;
|
||||||
|
|
||||||
# Install firefox.
|
# Install firefox.
|
||||||
programs.firefox.enable = true;
|
programs.firefox.enable = true;
|
||||||
programs.fish.enable = true;
|
programs.fish.enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue