feat: free vscode and better xorg powersave

This commit is contained in:
2025-01-09 10:34:03 +01:00
parent 6189e52e4d
commit 1d68abb4c5
3 changed files with 79 additions and 61 deletions

View File

@@ -68,10 +68,27 @@ setxkbmap pl &
# xset s on & # xset s on &
# xset -dpms & # xset -dpms &
# xset s 900 & # xset s 900 &
xset +dpms & # Powersaving options
xset dpms 1200 1800 2100 & xset +dpms # Enable DPMS
xset s on & xset dpms 300 600 900 # Set DPMS timeouts (standby, suspend, off) in seconds
xset s 900 &
# Screen blanking
xset s on # Enable screen blanking
xset s 600 # Set screen blanking timeout to 10 minutes (600 seconds)
# Host-specific rules
if [ "$(hostname)" = "zion" ]; then
# Zion rules
xautolock -time 5 -locker "brightnessctl -s set 10" & # Set brightness to 10% after 5 minutes
xautolock -time 10 -locker "loginctl lock-session" & # Lock screen after 10 minutes
elif [ "$(hostname)" = "thor" ]; then
# Thor rules
xautolock -time 7.5 -locker "brightnessctl -s set 0" & # Set brightness to 0% after 7.5 minutes
xautolock -time 10 -locker "loginctl lock-session" & # Lock screen after 10 minutes
xautolock -time 12.5 -locker "xset dpms force off" & # Turn off display after 12.5 minutes
xautolock -time 15 -locker "systemctl suspend" & # Suspend after 15 minutes
xautolock -time 25 -locker "systemctl hibernate" & # Hibernate after 25 minutes
fi
# auths # auths
# /usr/lib/mate-polkit/polkit-mate-authentication-agent-1 & # /usr/lib/mate-polkit/polkit-mate-authentication-agent-1 &

View File

@@ -33,6 +33,7 @@
xorg.xinit xorg.xinit
xorg.xinput xorg.xinput
brightnessctl brightnessctl
xautolock
xclip xclip
# gnome.gnome-keyring # gnome.gnome-keyring
feh feh

View File

@@ -13,62 +13,62 @@
] ]
); );
extensions = with pkgs.vscode-extensions; [ # extensions = with pkgs.vscode-extensions; [
ms-python.python # ms-python.python
ms-python.debugpy # ms-python.debugpy
jnoortheen.nix-ide # jnoortheen.nix-ide
mkhl.direnv # mkhl.direnv
arrterian.nix-env-selector # arrterian.nix-env-selector
mvllow.rose-pine # mvllow.rose-pine
github.copilot # github.copilot
# github.copilot-chat # # github.copilot-chat
ms-vsliveshare.vsliveshare # ms-vsliveshare.vsliveshare
rust-lang.rust-analyzer # rust-lang.rust-analyzer
]; # ];
#
userSettings = { # userSettings = {
"editor.fontSize" = 16; # "editor.fontSize" = 16;
"editor.fontFamily" = "FiraCode Nerd Font"; # "editor.fontFamily" = "FiraCode Nerd Font";
"explorer.confirmDelete" = false; # "explorer.confirmDelete" = false;
"disable-hardware-acceleration" = true; # "disable-hardware-acceleration" = true;
"explorer.confirmDragAndDrop" = true; # "explorer.confirmDragAndDrop" = true;
"git.openRepositoryInParentFolders" = "never"; # "git.openRepositoryInParentFolders" = "never";
#
"[python]" = { # "[python]" = {
"editor.defaultFormatter" = "ms-python.black-formatter"; # "editor.defaultFormatter" = "ms-python.black-formatter";
"editor.formatOnSave" = true; # "editor.formatOnSave" = true;
}; # };
#
"nix.enableLanguageServer" = true; # "nix.enableLanguageServer" = true;
"nix.serverPath" = "${pkgs.nixd}/bin/nixd"; # "nix.serverPath" = "${pkgs.nixd}/bin/nixd";
"nix.serverSettings" = { # "nix.serverSettings" = {
"nixd" = { # "nixd" = {
"formatting" = { # "formatting" = {
"command" = ["${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt"]; # "command" = ["${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt"];
}; # };
"nixpkgs" = { # "nixpkgs" = {
"expr" = "import <nixpkgs> { }"; # "expr" = "import <nixpkgs> { }";
"options" = { # "options" = {
"nixos" = { # "nixos" = {
"expr" = ''(builtins.getFlake "/home/mike/.files").nixosConfigurations.zion.options''; # "expr" = ''(builtins.getFlake "/home/mike/.files").nixosConfigurations.zion.options'';
}; # };
}; # };
}; # };
}; # };
}; # };
#
"editor.formatOnSave" = true; # "editor.formatOnSave" = true;
#
"editor.fontLigatures" = true; # "editor.fontLigatures" = true;
"editor.formatOnPaste" = true; # "editor.formatOnPaste" = true;
"editor.minimap.enabled" = false; # "editor.minimap.enabled" = false;
#
# "symbols.hidesExplorerArrows" = false; # # "symbols.hidesExplorerArrows" = false;
#
"workbench.iconTheme" = "rose-pine-icons"; # "workbench.iconTheme" = "rose-pine-icons";
"workbench.colorTheme" = "Rosé Pine"; # "workbench.colorTheme" = "Rosé Pine";
"workbench.preferredDarkColorTheme" = "Rosé Pine"; # "workbench.preferredDarkColorTheme" = "Rosé Pine";
"workbench.preferredHighContrastColorTheme" = "Rosé Pine"; # "workbench.preferredHighContrastColorTheme" = "Rosé Pine";
}; # };
}; };
} }