2024-06-28 16:23:05 +02:00
# ssdd
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
## Why?
2024-06-28 17:02:35 +02:00
I just bought a new laptop and on my workstation I was using [ssd from Sawfish ](https://github.com/SawfishWM/ssd ) which I loved. I didn't want to go through all the steps of installing the necessary libraries and dependencies to get it to work, so I decided to create my own.
2024-06-28 16:30:52 +02:00
## Dependencies and compilation
2024-06-28 16:40:48 +02:00
This app requires GTK+ 3.0 development libraries and gcc or clang.
2024-06-28 16:30:52 +02:00
I am using this command to compile the program:
2024-06-28 16:40:48 +02:00
Using GCC:
2024-06-28 16:30:52 +02:00
```shell
2024-06-30 12:02:05 +02:00
% gcc ssdd.c resources.c -o ssdd `pkg-config --cflags --libs gtk+-3.0`
2024-06-28 16:30:52 +02:00
```
2024-06-28 16:40:48 +02:00
Using Clang:
```shell
2024-06-30 12:02:56 +02:00
% clang ssdd.c resources.c -o ssdd `pkg-config --cflags --libs gtk+-3.0`
2024-06-28 16:40:48 +02:00
```
2024-06-28 16:30:52 +02:00
This produces the binary `ssdd` which you can place in your $PATH.
## Configure Openbox to use it.
`% sudo nvim /etc/xdg/openbox/menu.xml`
Find the line with the standard Openbox Exit option and change it to
2024-06-28 16:32:19 +02:00
2024-06-28 17:00:23 +02:00
`<item label="Log Out"><action name="Execute"><execute>ssdd</execute></item>`
2024-06-28 16:30:52 +02:00
The reconfigure Openbox to use the new setting.
2024-06-28 16:32:19 +02:00
2024-06-28 16:30:52 +02:00
`% openbox --reconfigure`