ssdd/README.md

81 lines
2.3 KiB
Markdown
Raw Normal View History

2024-07-12 00:35:34 +02:00
# ssdd: Simple Shutdown Dialog for Openbox
2024-06-28 16:23:05 +02:00
2024-06-28 16:35:27 +02:00
A simple Shutdown Dialog for Openbox written in C using GTK
![Project Screenshot](ssdd.png)
2024-06-28 16:30:52 +02:00
2024-07-12 00:35:34 +02:00
**Simple Shutdown Dialog (ssdd)** is a simple yet stylish shutdown dialog for Openbox, crafted in C using GTK.
2024-06-28 16:30:52 +02:00
## Why ssdd?
2024-06-30 12:57:34 +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
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
## Features
2024-06-28 16:30:52 +02:00
* **Clean and Intuitive Interface:** ssdd presents a clear choice between Shutdown, Reboot, Logout, and Exit options.
* **Clean and minimal code:** `ssdd` is built on a clean and minimal codebase, making it easy to maintain, understand, and extend.
* **Lightweight and Efficient:** ssdd is designed to be fast and resource-friendly, perfectly suited for Openbox's minimalist philosophy.
2024-07-05 11:55:09 +02:00
## Dependencies and Compilation
2024-07-05 11:55:09 +02:00
ssdd requires:
2024-07-05 11:55:09 +02:00
* GTK+ 3.0
* Glib 2 development libraries
* gcc or clang
2024-07-05 11:55:09 +02:00
### Easy Compilation
Edit the `Makefile` or use the following commands:
2024-06-28 16:30:52 +02:00
```shell
% make all # Compile
% sudo make install # Install to /usr/local
% sudo make install PREFIX=/usr # Install to /usr
2024-06-28 16:30:52 +02:00
```
### Manual compilation
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
# Using GCC:
% gcc ssdd.c resources.c -o ssdd `pkg-config --cflags --libs gtk+-3.0`
# Using Clang:
2024-06-30 12:02:56 +02:00
% clang ssdd.c resources.c -o ssdd `pkg-config --cflags --libs gtk+-3.0`
```
Place the `ssdd` binary in your `$PATH` (e.g., `~/bin`).
2024-06-28 16:30:52 +02:00
### Integrate with Openbox
2024-06-28 16:30:52 +02:00
1. Edit your Openbox menu:
2024-06-28 16:30:52 +02:00
```bash
% sudo nvim /etc/xdg/openbox/menu.xml
```
2024-06-28 16:32:19 +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:
```bash
% openbox --reconfigure
```
2024-06-28 16:30:52 +02:00
### Contributing
2024-06-28 16:32:19 +02:00
Contributions are welcome! Feel free to open issues or submit pull requests.