allow normal user to restart i3 from the commandline

This commit is contained in:
Cyryl Płotnicki 2021-06-27 13:05:29 +01:00
parent 22fea4c4c9
commit 478941e330
2 changed files with 5 additions and 17 deletions

View file

@ -6,6 +6,10 @@
programs.dconf.enable = true;
security.sudo.extraRules = [
{
users = [ "cyryl" ];
commands = [ { command = "${pkgs.i3}/bin/i3-msg"; options = [ "NOPASSWD" ]; } ];
}
{
users = [ "cyryl" ];
commands = [ { command = "${pkgs.intel-gpu-tools}/bin/intel_gpu_top"; options = [ "NOPASSWD" ]; } ];

View file

@ -6,7 +6,7 @@
enable = true;
executeAfter = [
"${pkgs.systemd}/bin/systemctl --user restart picom"
"${pkgs.systemd}/bin/systemctl --user restart kdeconnect-indicator kdeconnect network-manager-applet pasystray udiskie"
"${pkgs.i3}/bin/i3-msg restart"
];
rules = [
{
@ -36,22 +36,6 @@
"${pkgs.xorg.xrandr}/bin/xrandr --output eDP1 --primary"
];
}
{
name = "form3-docked";
outputs_connected = [ "eDP-1-1" "DP-1-1" ];
configure_single = "DP-1-1";
execute_after = [
"${pkgs.xorg.xrandr}/bin/xrandr --dpi 192"
];
}
{
name = "form3";
outputs_connected = [ "eDP-1-1" ];
configure_single = "eDP-1-1";
execute_after = [
"${pkgs.xorg.xrandr}/bin/xrandr --dpi 256"
];
}
];
};
}