commit e81eb63ab0858075cf1de4dd1472a7b91755d8f1
parent f22daa1b80a9606373001a4111932ff352e7a5e4
Author: grouse <bdmfegys@duck.com>
Date: Thu, 7 Mar 2024 16:45:40 -0500
Merge branch 'main' of git.tetraonini.online:grouse/birdwm
Diffstat:
4 files changed, 29 insertions(+), 73 deletions(-)
diff --git a/README b/README
@@ -1,63 +0,0 @@
-birdwm - dynamic window manager for birds
-============================
- _ _ _
-| |__ (_)_ __ __| |_ ___ __ ___
-| '_ \| | '__/ _` \ \ /\ / / '_ ` _ \
-| |_) | | | | (_| |\ V V /| | | | | |
-|_.__/|_|_| \__,_| \_/\_/ |_| |_| |_|
-
-This is my dwm fork.
-It includes my slstatus configs and it depends on some of my scripts included in my dotfiles.
-
-For more info see https://git.tetraonini.online/grouse/dotfiles
-Might not be consistently up so maybe fork it yourself.
-
-birdwm is an extremely fast, small, and dynamic window manager for birds.
-
-
-Requirements
-------------
-In order to build birdwm you need the Xlib header files.
-
-
-Installation
-------------
-Edit config.mk to match your local setup (birdwm is installed into
-the /usr/local namespace by default).
-
-Afterwards enter the following command to build and install birdwm (if
-necessary as root):
-
- make clean install
-
-
-Running birdwm
------------
-Add the following line to your .xinitrc to start birdwm using startx:
-
- exec dwm
-
-In order to connect birdwm to a specific display, make sure that
-the DISPLAY environment variable is set correctly, e.g.:
-
- DISPLAY=foo.bar:1 exec dwm
-
-(This will start birdwm on display :1 of the host foo.bar.)
-
-In order to display status info in the bar, you can do something
-like this in your .xinitrc:
-
- while xsetroot -name "`date` `uptime | sed 's/.*,//'`"
- do
- sleep 1
- done &
- exec dwm
-
-
-Configuration
--------------
-The configuration of birdwm is done by creating a custom config.h
-and (re)compiling the source code.
-The autostart script should be in $HOME/.dwm/autostart.sh
-The programs and commands executed from that script should be placed there
-Have a great day.
diff --git a/README.md b/README.md
@@ -0,0 +1,18 @@
+# Birdwm, dwm for birds!
+
+## Patches and features
+
+- Reads [xresources](https://dwm.suckless.org/patches/xresources/) colors/variables (i.e. works with `pywal`, etc.).
+- scratchpad: Accessible with <kbd>mod+y</kbd>.
+- [uselessgaps](https://dwm.suckless.org/patches/uselessgap/): Adds useless gaps around windows, except in monocle mode.
+- [alpha](https://dwm.suckless.org/patches/alpha/): Allows birdwm to have translucent bars, with opaque text.
+
+## Installation for birds on linux distros
+
+```bash
+git clone https://git.tetraonini.online/grouse/birddwm
+cd birdwm
+sudo make install
+```
+
+<!-- There is also a `PKGBUILD` usable on distributions with pacman. Run `makepkg -si` instead of `sudo make install`. -->
diff --git a/config.def.h b/config.def.h
@@ -37,11 +37,11 @@ char upgradescript[] = "upgrader"; /* upgrade script */
char musicterm[] = "vimpc"; /* tui music player scratchpad */
char termtop[] = "htop"; /* htop scratchpad */
-static const char *spcmd1[] = {"birdterm", "-n", "spterm", "-g", "144x41", }; /* regular terminal scratchpad */
-static const char *spcmd2[] = {"birdterm", "-n", "spfm", "-g", "144x41", "-e", termfm, }; /* file manager scratchpad */
-static const char *spcmd3[] = {"birdterm", "-n", "upgrader", "-g", "144x41", "-e", upgradescript, }; /* upgrade script, change if your script is named differently */
-static const char *spcmd4[] = {"birdterm", "-n", "musicterm", "-g", "144x41", "-e", musicterm, };
-static const char *spcmd5[] = {"birdterm", "-n", "termtop", "-g", "144x41", "-e", termtop, };
+static const char *spcmd1[] = {"birdterm", "-n", "spterm", "-g", "144x41", }; /* regular terminal scratchpad */
+static const char *spcmd2[] = {"birdterm", "-n", "spfm", "-g", "144x41", "-e", termfm, }; /* file manager scratchpad */
+static const char *spcmd3[] = {"birdterm", "-n", "upgrader", "-g", "144x41", "-e", upgradescript, }; /* upgrade script, change if your script is named differently */
+static const char *spcmd4[] = {"birdterm", "-n", "musicterm", "-g", "144x41", "-e", musicterm, };
+static const char *spcmd5[] = {"birdterm", "-n", "termtop", "-g", "144x41", "-e", termtop, };
static Sp scratchpads[] = {
/* name cmd */
{"spterm", spcmd1},
@@ -117,7 +117,7 @@ static const Layout layouts[] = {
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
-#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
+//#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
diff --git a/extras/restarter b/extras/restarter
@@ -1,12 +1,13 @@
#!/bin/sh
#case "$(printf "Get IP\nShutdown\nRestart\nKill DWM\nRestart slstatus\nRestart picom\nRestart dunst" | dmenu -i)" in
case "$(printf "Get IP\nRestart slstatus\nRestart picom\nRestart dunst" | dmenu -i)" in
- "Get IP") dunstify $(curl ifconfig.co ifconfig.co/city ifconfig.co/country);;
+ "Get IP") dunstify $(curl ifconfig.co ifconfig.co/city);;
+ # restart X programs
+ "Restart picom") { [ -z $(pgrep picom) ] && pkill picom ;} || picom ;;
+ "Restart slstatus") { [ -z $(pgrep slstatus) ] && pkill slstatus ;} || slstatus;;
+ "Restart dunst") { [ -z $(pgrep dunst) ] && pkill dunst ;} || dunst ;;
# "Shutdown") shutdown now;;
# "Restart") reboot ;;
# "Restart DWM") pkill dwm && sudo --askpass systemctl restart ly;;
- "Restart picom") [ -z $(pgrep picom) ] && pkill picom || picom;;
- "Restart slstatus") [ -z $(pgrep slstatus) ] && pkill slstatus || slstatus;;
- "Restart dunst") [ -z $(pgrep dunst) ] && pkill dunst || dunst;;
*) exit 1 ;;
esac