2024-07-12 00:35:34 +02:00
# ssdd: Simple Shutdown Dialog for Openbox
2024-06-28 16:23:05 +02:00
2024-09-13 01:49:48 +02:00
A simple Shutdown Dialog for Openbox written in C using GTK 4
2024-06-28 16:35:27 +02:00
![Project Screenshot ](ssdd.png )
2024-06-28 16:30:52 +02:00
2024-08-09 23:15:28 +02:00
![Settings screenshot ](ssdd-settings.png )
2024-09-13 01:49:48 +02:00
![Settings screenshot ](ssdd-about.png )
**Simple Shutdown Dialog (ssdd)** is a simple yet stylish shutdown dialog for Openbox, crafted in C using GTK 4.
2024-06-28 16:30:52 +02:00
2024-07-11 23:29:09 +02:00
## Why ssdd?
2024-06-30 12:57:34 +02:00
2024-07-11 23:29:09 +02:00
As a long-time Openbox enthusiast, I've always found the default exit dialog a bit lackluster. Modern systems deserve a more refined shutdown experience. While there are other options out there, I figured one more wouldn't hurt, right?
2024-06-28 16:30:52 +02:00
2024-07-11 23:29:09 +02:00
Inspired by the elegant `ssd` from Sawfish, I decided to create my own tailored solution for Openbox. This way, you can avoid the hassle of installing extra dependencies and enjoy a sleek shutdown dialog that complements your Openbox setup.
2024-06-28 16:30:52 +02:00
2024-07-11 23:29:09 +02:00
## Features
2024-06-28 16:30:52 +02:00
2024-09-13 01:49:48 +02:00
- **Clean and Intuitive Interface:** ssdd presents clear options for Logout, Reboot, Shutdown, Switch User, Suspend, Hibernate, Settings, and Exit.
- **Configurable Commands:** Easily customize the commands executed for each action via the settings dialog.
- **Lightweight and Efficient:** Designed to be fast and resource-friendly, perfectly suited for Openbox's minimalist philosophy.
- **Modern GTK 4 Interface:** Built with GTK 4 for a modern look and feel.
2024-07-05 11:55:09 +02:00
2024-07-11 23:29:09 +02:00
## Dependencies and Compilation
2024-07-05 11:55:09 +02:00
2024-07-11 23:29:09 +02:00
ssdd requires:
2024-07-05 11:55:09 +02:00
2024-09-13 01:49:48 +02:00
* GTK 4 development libraries
2024-07-11 23:29:09 +02:00
* Glib 2 development libraries
* gcc or clang
2024-07-05 11:55:09 +02:00
2024-07-11 23:29:09 +02:00
### Easy Compilation
Edit the `Makefile` or use the following commands:
2024-06-28 16:40:48 +02:00
2024-06-28 16:30:52 +02:00
```shell
2024-07-11 23:29:09 +02:00
% make all # Compile
% sudo make install # Install to /usr/local
2024-08-09 23:02:46 +02:00
% sudo make install PREFIX=/usr # Install to /usr
2024-06-28 16:30:52 +02:00
```
2024-07-11 23:29:09 +02:00
### Manual compilation
2024-07-12 08:08:54 +02:00
First generate the resources.
```bash
% glib-compile-resources resources.gresource.xml --generate-source --target=resources.c
% glib-compile-resources resources.gresource.xml --generate-header --target=resources.h
```
```bash
2024-07-11 23:29:09 +02:00
# Using GCC:
2024-09-13 01:49:48 +02:00
% gcc ssdd.c resources.c -o ssdd `pkg-config --cflags --libs gtk4`
2024-07-11 23:29:09 +02:00
# Using Clang:
2024-09-13 01:49:48 +02:00
% clang ssdd.c resources.c -o ssdd `pkg-config --cflags --libs gtk4`
2024-06-28 16:40:48 +02:00
```
2024-07-11 23:29:09 +02:00
Place the `ssdd` binary in your `$PATH` (e.g., `~/bin` ).
2024-06-28 16:30:52 +02:00
2024-07-11 23:29:09 +02:00
### Integrate with Openbox
2024-06-28 16:30:52 +02:00
2024-07-11 23:29:09 +02:00
1. Edit your Openbox menu:
2024-06-28 16:30:52 +02:00
2024-07-12 08:08:54 +02:00
```bash
2024-07-11 23:29:09 +02:00
% sudo nvim /etc/xdg/openbox/menu.xml
```
2024-06-28 16:32:19 +02:00
2024-07-11 23:29:09 +02:00
2. Replace the default Exit entry with:
```xml
< item label = "Log Out" > < action name = "Execute" > < execute > ssdd< / execute > < / action > < / item >
```
3. Reconfigure Openbox:
2024-07-12 08:08:54 +02:00
```bash
2024-07-11 23:29:09 +02:00
% openbox --reconfigure
```
2024-06-28 16:30:52 +02:00
2024-07-11 23:29:09 +02:00
### Contributing
2024-06-28 16:32:19 +02:00
2024-07-11 23:29:09 +02:00
Contributions are welcome! Feel free to open issues or submit pull requests.
2024-09-13 01:49:48 +02:00