Add some snippy scripts for foxtrot quick switching between performance modes
This commit is contained in:
parent
9cc15d53fa
commit
c007790ecf
3 changed files with 22 additions and 1 deletions
19
flake.nix
19
flake.nix
|
@ -390,6 +390,7 @@
|
|||
hardware.nixosModules.framework-13-7040-amd
|
||||
|
||||
common
|
||||
kde-connect
|
||||
password-manager
|
||||
graphical-workstation
|
||||
laptop
|
||||
|
@ -418,6 +419,24 @@
|
|||
modprobe -v mt7921e
|
||||
'';
|
||||
})
|
||||
(writeShellApplication
|
||||
{
|
||||
name = "perfmode";
|
||||
# we use command -v $cmd here because we only want to invoke these calls _if_ the related package is installed on the system
|
||||
# otherwise, they will likely have no effect anyways
|
||||
text = ''
|
||||
command -v powerprofilesctl &>/dev/null && set -x && powerprofilesctl set performance && set +x
|
||||
command -v swaymsg &>/dev/null && set -x && swaymsg output eDP-1 mode 2880x1920@60Hz && set +x
|
||||
'';
|
||||
})
|
||||
(writeShellApplication
|
||||
{
|
||||
name = "battmode";
|
||||
text = ''
|
||||
command -v powerprofilesctl &>/dev/null && set -x && powerprofilesctl set power-saver && set +x
|
||||
command -v swaymsg &>/dev/null && set -x && swaymsg output eDP-1 mode 2880x1920@120Hz && set +x
|
||||
'';
|
||||
})
|
||||
];
|
||||
})
|
||||
];
|
||||
|
|
|
@ -119,6 +119,8 @@
|
|||
};
|
||||
|
||||
startup = [
|
||||
{command = "kdeconnect-indicator";}
|
||||
{command = "mako";}
|
||||
{
|
||||
command = "swaybg -i $HOME/.wallpaper";
|
||||
}
|
||||
|
@ -151,7 +153,6 @@
|
|||
"timeout 600 'swaymsg \"output * dpms off\"' resume 'swaymsg \"output * dpms on\" & maybe-good-morning &'"
|
||||
];
|
||||
}
|
||||
{command = "mako";}
|
||||
# {command = "firefox";}
|
||||
# {command = "wezterm";}
|
||||
];
|
||||
|
|
|
@ -633,6 +633,7 @@
|
|||
programs.kdeconnect.enable = true;
|
||||
|
||||
/*
|
||||
# handled by enabling
|
||||
networking.firewall = {
|
||||
allowedTCPPortRanges = [ { from = 1714; to = 1764; } ];
|
||||
allowedUDPPortRanges = [ { from = 1714; to = 1764; } ];
|
||||
|
|
Loading…
Reference in a new issue