Created
April 15, 2024 17:15
-
-
Save michaelmrose/c70a4ce33d949fb190c01ff2c72c4bb3 to your computer and use it in GitHub Desktop.
Revisions
-
michaelmrose created this gist
Apr 15, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ Create a new systemd service file: sudo nano /etc/systemd/system/brightness.service Add the following to the file: ================================ [Unit] Description=Set screen brightness After=multi-user.target [Service] Type=oneshot ExecStart=/usr/bin/brightnessctl set 50% [Install] WantedBy=multi-user.target ====================================== Reload Systemd to Recognize New Service Whenever you create a new service file or modify an existing one, you need to reload the systemd manager configuration to recognize and list the new service: sudo systemctl daemon-reload Enable and start the service: sudo systemctl enable brightness.service sudo systemctl start brightness.service