Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grahfmusic/window-manager-scripts
Window Manager Scripts (Desktop Environment)
https://github.com/grahfmusic/window-manager-scripts
Last synced: 4 days ago
JSON representation
Window Manager Scripts (Desktop Environment)
- Host: GitHub
- URL: https://github.com/grahfmusic/window-manager-scripts
- Owner: grahfmusic
- Created: 2024-05-16T13:57:37.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-16T16:18:41.000Z (8 months ago)
- Last Synced: 2024-11-11T23:15:36.235Z (2 months ago)
- Language: Python
- Size: 96.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Window Manager Scripts (for Hyprland)
The applications/scripts in this repo are designed for Hyprland in mind, any external application is noted in the below README.## Mako Sudo Checker v1.0.0
### Overview**Mako Sudo Checker** is a Python script designed to monitor the presence of active `sudo` processes and send urgent desktop notifications when a sudo password is required. This tool is particularly useful for system administrators and developers who need to be promptly alerted to sudo activities on their system. This script is designed with Hyprland and Mako in mind.
### Features
- Monitors for active `sudo` processes.
- Sends an urgent desktop notification using `notify-send` when a sudo password is required.
- Dismisses existing notifications before sending a new one.
- Clears the terminal screen for updated notifications.### Requirements
- Python 3
- `pidof` command
- `makoctl` for notification management
- `notify-send` for sending desktop notifications### Usage
1. Make the script executable:
```sh
chmod +x mako_sudo_checker.py
```2. Run the script:
```sh
./mako_sudo_checker.py
```The script will continuously monitor for `sudo` processes and send notifications as configured.
## Adding to Startup
To ensure the script runs at startup, add it to your window manager or desktop environment's startup script. This script is designed with Hyprland and Mako in mind, but it can be adapted for other environments.
For example, in Hyprland, you might add the following line to your `hyprland.conf`:
```sh
exec --no-startup-id /path/to/mako_sudo_checker.py
```Adjust the path to point to the location of your `mako_sudo_checker.py` script.
## Customization
To customize the notification icon, ensure your desired icon image is named `siren.png` and placed in the same directory as the script. You can also modify the notification message within the `send_urgent_notification` function.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---
Feel free to modify the content to better suit your specific repository and requirements.