adb + dpms off

This commit is contained in:
Cyryl Płotnicki 2019-07-26 12:41:26 +01:00
parent 94ca9fb55c
commit 064ce12f19
3 changed files with 9 additions and 4 deletions

View file

@ -1,11 +1,15 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
set -o pipefail
export PRIMARY_DISPLAY="$(xrandr | awk '/ primary/{print $1}')" export PRIMARY_DISPLAY="$(xrandr | awk '/ primary/{print $1}')"
xset s off
xset -dpms
xidlehook \ xidlehook \
--not-when-fullscreen \ --not-when-fullscreen \
--not-when-audio \ --not-when-audio \
--timer normal 180 'xrandr --output "$PRIMARY_DISPLAY" --brightness .1' 'xrandr --output "$PRIMARY_DISPLAY" --brightness 1' \ --timer normal 180 'xrandr --output "$PRIMARY_DISPLAY" --brightness .1' 'xrandr --output "$PRIMARY_DISPLAY" --brightness 1' \
--timer primary 10 'xrandr --output "$PRIMARY_DISPLAY" --brightness 1; physlock -d' '' \
--timer normal 600 'systemctl suspend' '' --timer normal 600 'systemctl suspend' ''

View file

@ -27,14 +27,14 @@ in
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
wget git gnupg curl tmux python36Packages.glances vim htop atop firefox home-manager alacritty pciutils wget git gnupg curl tmux python36Packages.glances vim htop atop firefox home-manager alacritty pciutils powertop
]; ];
i18n.defaultLocale = "en_GB.UTF-8"; i18n.defaultLocale = "en_GB.UTF-8";
users.users.cyryl = { users.users.cyryl = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "video" "scanner" "lp" "docker" "vboxusers"]; extraGroups = [ "wheel" "networkmanager" "video" "scanner" "lp" "docker" "vboxusers" "adbusers" ];
packages = with pkgs; [ packages = with pkgs; [
unstable.pypi2nix etesync-dav unstable.hopper unstable.pypi2nix etesync-dav unstable.hopper
]; ];
@ -42,6 +42,7 @@ in
}; };
programs.light.enable = true; programs.light.enable = true;
programs.adb.enable = true;
virtualisation.docker = { virtualisation.docker = {
enable = true; enable = true;

View file

@ -18,7 +18,7 @@ in
keepass fontconfig nodejs rustup gcc gdb keepass fontconfig nodejs rustup gcc gdb
binutils xclip pkgconfig veracrypt gitAndTools.diff-so-fancy binutils xclip pkgconfig veracrypt gitAndTools.diff-so-fancy
openjdk11 gimp restic glxinfo discord openjdk11 gimp restic glxinfo discord
unstable.notable unstable.notable jq
nodejs-10_x hugo mercurial terraform libreoffice nodejs-10_x hugo mercurial terraform libreoffice
unzip tor-browser-bundle-bin aria vlc unzip tor-browser-bundle-bin aria vlc
jetbrains.goland jetbrains.clion jetbrains.goland jetbrains.clion