Initial poop

This commit is contained in:
Lauren Toivanen 2025-01-24 05:13:48 +02:00 committed by root
commit ca6dab46f1
3280 changed files with 3759 additions and 0 deletions

View file

@ -0,0 +1,26 @@
# Autostarting apps
!!! note
My modified [Makefile](https://git.jakest.us/suckless/dwm/src/branch/jakefication/Makefile)
installs this file automagically.
Steps below should not be necessary.
If using a display manager make the session execute a script
(refer to [xsession](xsession.md)).
Same could be done with `startx` and `~/.xinitrc`.
My modified version provides my autostarting script
and installs it as `/usr/local/bin/startdwm`
The script could look something like
``` sh title="/usr/local/bin/startdwm"
#!/bin/sh
slstatus &
pasystray &
nm-applet &
exec dwm
```
You might also like the
[systray patch](https://dwm.suckless.org/patches/systray/)
as it just makes sense.

View file

@ -0,0 +1,55 @@
# Cheatsheet
My chosen modification key is ++win++/++super++.
Many functions have multiple shortcuts because every day is different.
I might have forgotten something but [`config.h`](https://git.jakest.us/suckless/dwm/src/branch/jakefication/config.h)
is pretty human-readable.
## Standard keys
| Key combination(s) | Action |
| --------------------------------------------------------- | --------------------------------- |
| ++win+d++<br>++win+space++<br>++alt+space++<br>++win+p++ | Drun |
| ++ctrl+alt+t++<br>++win+shift+enter++ | Terminal |
| ++alt+f4++<br>++win+q++ | Close window |
| ++win+up++<br>++win+down++ | Focuse next/previous window |
| ++win+enter++ | Swap window from/to master |
| ++win+left++<br>++win+right++ | Increase/Decrease master capacity |
| ++win+shift+left++<br>++win+shift+right++ | Resize master/stack |
| ++win+shift+q++ | Quit DWM |
## Workspaces and monitors
| Key combination | Action |
| -------------------- | --------------------------------- |
| `Win`+ `1-9` | Focus workspace |
| `Win`+ `Shift`+`1-9` | Move window to workspace |
| `Win`+`,/.` | Focus left/right monitor |
| `Win`+`Shift`+`,/.` | Move window to left/right monitor |
| `Win`+`0` | Show all workspaces |
| `Win`+`Shift`+`0` | Show window in all workspaces |
## Media controls
In addition to supporting standard volume and mediacontrols
following shortcuts have been configured. You know,
not every keyboard has these keys and it sucks!
| Hotkey | Action |
| ----------- | ---------- |
| ++win+f5++ | Previous |
| ++win+f6++ | Next |
| ++win+f7++ | Play/Pause |
| ++win+f8++ | Stop |
| ++win+f9++ | Mute |
| ++win+f10++ | Vol Down |
| ++win+f11++ | Vol Up |
## Floaty stuff
| Shortcut | Action |
| ------------------------------------------- | ---------------------- |
| ++win+shift+space++<br>++win++ + `Mouse3` | Toggle window floating |
| ++win++ + `Mouse1 Drag` | Move window |
| ++win++ + `Mouse2 Drag` | Resize window |

View file

@ -0,0 +1,33 @@
# Dependencies
Dmenu, slstatus, st and dwm itself are recommended to build yourself from sources. Other packages are installable from Debian-repositories (or whatever distro you are running, you probably know how to get them.)
## Building
- xorg-dev
## Standard functionality
- [dmenu](https://git.jakest.us/suckless/dmenu)
- [slstatus](https://git.jakest.us/suckless/slstatus)
- [st](https://git.jakest.us/suckless/st)
- [slock](https://git.jakest.us/suckless/slock)
- pactl (to control pulseaudio/pipewire, comes with pulseaudio-utils or pipewire-uitils or something, I don't know, just try to find out yourself if volumecontrol is not working)
- playerctl (to control media playback)
- dunst (to show notifications)
- nm-applet (network-manager-gnome)
## Screenshots
- imagemagick
- scrot
- xclip
- xdg-user-dirs
- create a directory `mkdir -p $(xdg-user-dir PICTURES)/scrot/`
- This will be automated at some point. Sorry in the meantime
## What I am supposed to do again?
Here, have a nice command to get dependencies (not dmenu/slstatus/st/dwm) from repositories on Debian: `sudo apt install xorg-dev playerctl imagemagick scrot xclip xdg-user-dirs dunst pulseaudio-utils pasystray pavucontrol network-manager-gnome`
Then dmenu, st, slstatus and dwm itself you pull using git, checkout branch jakefication (if you want the customized versions, otherwice you should maybe use the suckless upstream at https://git.suckless.org/ ) and build using `sudo make clean install` all one-by-one voíla

View file

@ -0,0 +1,7 @@
# DWM
dwm is a dynamic window manager for X.
[![Screenshot of a desktop running DWM with some windows](screenshot.png)](screenshot.png)
Check full official documentation at [https://dwm.suckless.org/](https://dwm.suckless.org/)

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 KiB

View file

@ -0,0 +1,61 @@
# XSession
!!! note
My modified Makefile installs DWM as a session automagically. I think.
Maybe check out the [Makefile](https://git.jakest.us/suckless/dwm/src/branch/jakefication/Makefile). Steps below should not be necessary.
You might want to add DWM as a session to start it conveniently from a display manager.
## .desktop file
For displaymanagers that parse these.
As root create a file like this:
``` desktop title="/usr/share/xsessions/dwm.desktop"
[Desktop Entry]
Encoding=UTF-8
Name=dwm
Comment=Dynamic window manager
Exec=dwm
Icon=dwm
Type=XSession
```
with these permissions
``` console
$ ls -l /usr/share/xsessions/dwm.desktop
-rw-r--r-- 1 root root 108 Jun 27 17:24 /usr/share/xsessions/dwm.desktop
```
## Execute a script
Optionally rather than executing dwm directly you could execute a shell script instead that writes stdout / stderr to a file for logging purposes. This also helps to [autostart](autostart.md) apps
So the .desktop file should be modified to have
`Exec=startdwm`
and you need a file with executable permissions
``` sh title="/usr/local/bin/startdwm"
#!/bin/sh
echo "$(date): Starting dwn" >> /path/to/logs/$(date +%Y-%m-%d_%H.dwm.log)
dwm >> /path/to/logs/$(date +%Y-%m-%d_%H.dwm.log) 2>&1
```
``` console
$ ls -l /usr/local/bin/startdwm
-rwxr-xr-x 1 root root 204 Sep 19 14:12 /usr/local/bin/startdwm
```
## Debian alternatives
For some displaymanagers, like XDM.
You may add your session with something like:
``` console
$ sudo update-alternatives --install /usr/bin/x-session-manager x-session-manager /usr/local/bin/startdwm 50
$ sudo update-alternatives --config x-session-manager
```
## Credits
Thank you u/bakkeby for providing some of this information on Reddit [https://www.reddit.com/r/suckless/comments/jj61py/comment/gaanvez/](https://www.reddit.com/r/suckless/comments/jj61py/comment/gaanvez/)

38
docs/suckless/index.md Normal file
View file

@ -0,0 +1,38 @@
# Suckless
Minimal tools that barely do their jobs, written in C, configured by modifying sources and recompiling.
Below is stuff and things copied from [suckless.org](https://suckless.org/) (2024-07-27) because an interesting read.
---
Quality software with a focus on simplicity, clarity, and frugality.
## Philosophy
We are the home of quality software such as [dwm](https://dwm.suckless.org), [dmenu](https://tools.suckless.org/dmenu), [st](https://st.suckless.org/) and plenty of other [tools](https://tools.suckless.org), with a focus on simplicity, clarity and frugality. Our philosophy is about keeping things simple, minimal and usable. We believe this should become the mainstream philosophy in the IT sector. Unfortunately, the tendency for complex, error-prone and slow software seems to be prevalent in the present-day software industry. We intend to prove the opposite with our software projects.
Our project focuses on advanced and experienced computer users. In contrast with the usual proprietary software world or many mainstream open source projects that focus more on average and non-technical end users, we think that experienced users are mostly ignored. This is particularly true for user interfaces, such as graphical environments on desktop computers, on mobile devices, and in so-called Web applications. We believe that the market of experienced users is growing continuously, with each user looking for more appropriate solutions for his/her work style.
Designing simple and elegant software is far more difficult than letting ad-hoc or over-ambitious features obscure the code over time. However one has to pay this price to achieve reliability and maintainability. Furthermore, minimalism results in reasonable and attainable goals. We strive to maintain minimalism and clarity to drive development to completion.
## Manifest
Many (open source) hackers are proud if they achieve large amounts of code, because they believe the more lines of code they've written, the more progress they have made. The more progress they have made, the more skilled they are. This is simply a delusion.
Most hackers actually don't care much about code quality. Thus, if they get something working which seems to solve a problem, they stick with it. If this kind of software development is applied to the same source code throughout its entire life-cycle, we're left with large amounts of code, a totally screwed code structure, and a flawed system design. This is because of a lack of conceptual clarity and integrity in the development process.
Code complexity is the mother of bloated, hard to use, and totally inconsistent software. With complex code, problems are solved in suboptimal ways, valuable resources are endlessly tied up, performance slows to a halt, and vulnerabilities become a commonplace. The only solution is to scrap the entire project and rewrite it from scratch.
The bad news: quality rewrites rarely happen, because hackers are proud of large amounts of code. They think they understand the complexity in the code, thus there's no need to rewrite it. They think of themselves as masterminds, understanding what others can never hope to grasp. To these types, complex software is the ideal.
Ingenious ideas are simple. Ingenious software is simple. Simplicity is the heart of the Unix philosophy. The more code lines you have removed, the more progress you have made. As the number of lines of code in your software shrinks, the more skilled you have become and the less your software sucks.
## Related links
- [The Duct Tape Programmer](http://www.joelonsoftware.com/items/2009/09/23.html)
- [Why should I have written ZeroMQ in C, not C++](http://www.250bpm.com/blog:4)
- [Best practices in application architecture: Use layers to decouple](http://geekandpoke.typepad.com/.a/6a00d8341d3df553ef014e5f920093970c-pi)
- [Facebook's code quality problem](http://www.darkcoding.net/software/facebooks-code-quality-problem/)
- [Minimal Viable Programs](http://joearms.github.io/published/2014-06-25-minimal-viable-program.html)
- [Why I Write Games in C](http://jonathanwhiting.com/writing/blog/games_in_c/)
- [Use of command-line tools for effective data processing](https://adamdrake.com/command-line-tools-can-be-235x-faster-than-your-hadoop-cluster.html)

View file

@ -0,0 +1,6 @@
# ST
st is a simple terminal implementation for X.
[![Screenshot of ST](screenshot.png)](screenshot.png)
Check full official documentation at [https://st.suckless.org/](https://st.suckless.org/)

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

View file

@ -0,0 +1,5 @@
# Troubleshooting
## Delete key not working
Edit `/etc/inputrc` or `~/.inputrc` to contain `set enable-keypad on`