HUGE changes to codebase

This commit is contained in:
speediegq 2022-09-21 19:49:54 +02:00
parent 0e517db3f9
commit 5c4233db46
33 changed files with 250 additions and 386 deletions

View file

@ -46,6 +46,7 @@ dist: clean
install: all
touch drw.o speedwm.o util.o
mkdir -p ${DESTDIR}${PREFIX}/bin
mkdir -p ${DESTDIR}${PREFIX}/share/speedwm
[ -f speedwm-msg ] && cp -f speedwm speedwm-msg ${DESTDIR}${PREFIX}/bin || :
[ -f docs/options.def.h ] || cp -f options.h docs/options.def.h || :
[ -f docs/options.def.mk ] || cp -f options.mk docs/options.def.mk || :
@ -53,16 +54,21 @@ install: all
[ -f docs/toggle.def.mk ] || cp -f toggle.mk docs/toggle.def.mk || :
[ -f docs/keybinds.def.h ] || cp -f keybinds.h docs/keybinds.def.h || :
[ -f speedwm-msg ] && chmod 755 ${DESTDIR}${PREFIX}/bin/speedwm-msg || :
chmod 755 ${DESTDIR}${PREFIX}/bin/speedwm
cp -f docs/bindlist ${DESTDIR}${PREFIX}/share/speedwm-bindlist
cp -f docs/deplist ${DESTDIR}${PREFIX}/share/speedwm-deplist
cp -f docs/about ${DESTDIR}${PREFIX}/share/speedwm-about
cp -f docs/about2 ${DESTDIR}${PREFIX}/share/speedwm-about-2
cp -f docs/about3 ${DESTDIR}${PREFIX}/share/speedwm-about-3
cp -f docs/about4 ${DESTDIR}${PREFIX}/share/speedwm-about-4
cp -f docs/about5 ${DESTDIR}${PREFIX}/share/speedwm-about-5
cp -f docs/example.Xresources ${DESTDIR}${PREFIX}/share/speedwm-xresources
cp -f docs/example.fsignal ${DESTDIR}${PREFIX}/share/speedwm-fsignal
cp -f docs/keybinds ${DESTDIR}${PREFIX}/share/speedwm/keybinds
cp -f docs/dependencies ${DESTDIR}${PREFIX}/share/speedwm/dependencies
cp -f docs/doc-01 ${DESTDIR}${PREFIX}/share/speedwm/doc-01
cp -f docs/doc-02 ${DESTDIR}${PREFIX}/share/speedwm/doc-02
cp -f docs/doc-03 ${DESTDIR}${PREFIX}/share/speedwm/doc-03
cp -f docs/doc-04 ${DESTDIR}${PREFIX}/share/speedwm/doc-04
cp -f docs/doc-05 ${DESTDIR}${PREFIX}/share/speedwm/doc-05
cp -f docs/doc-06 ${DESTDIR}${PREFIX}/share/speedwm/doc-06
cp -f docs/doc-07 ${DESTDIR}${PREFIX}/share/speedwm/doc-07
cp -f docs/doc-08 ${DESTDIR}${PREFIX}/share/speedwm/doc-08
cp -f docs/doc-09 ${DESTDIR}${PREFIX}/share/speedwm/doc-09
cp -f docs/doc-10 ${DESTDIR}${PREFIX}/share/speedwm/doc-10
cp -f docs/doc-11 ${DESTDIR}${PREFIX}/share/speedwm/doc-11
cp -f docs/example.Xresources ${DESTDIR}${PREFIX}/share/speedwm/example.Xresources
cp -f docs/example.fsignal ${DESTDIR}${PREFIX}/share/speedwm/example.fsignal
cp -f scripts/speedwm-help ${DESTDIR}${PREFIX}/bin ; chmod +x ${DESTDIR}${PREFIX}/bin/speedwm-help
cp -f scripts/speedwm-shutdown ${DESTDIR}${PREFIX}/bin ; chmod +x ${DESTDIR}${PREFIX}/bin/speedwm-shutdown
cp -f scripts/speedwm-winnav ${DESTDIR}${PREFIX}/bin ; chmod +x ${DESTDIR}${PREFIX}/bin/speedwm-winnav
@ -80,15 +86,16 @@ install: all
cp -f status ${DESTDIR}${PREFIX}/bin ; chmod +x ${DESTDIR}${PREFIX}/bin/status
chmod +x ./scripts/speedwm-compatcheck
chmod +x ./scripts/speedwm-dm
chmod 755 ${DESTDIR}${PREFIX}/bin/speedwm
mkdir -p /usr/share
echo "${DESTDIR}${PREFIX}/bin/" > /usr/share/speedwm-bindir
echo "${DESTDIR}${PREFIX}/bin/" > /usr/share/speedwm/bindir
./scripts/speedwm-compatcheck
./scripts/speedwm-dm
[ -f speedwm.png ] && cp -f speedwm.png ${DESTDIR}${PREFIX}/share/pixmaps/speedwm.png || :
rm -f drw.o speedwm.o util.o speedwm speedwm-msg ; echo "Installed speedwm to ${DESTDIR}${PREFIX}/bin"
uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/speedwm \
rm -rf ${DESTDIR}${PREFIX}/bin/speedwm \
${DESTDIR}${PREFIX}/bin/speedwm-utils \
${DESTDIR}${PREFIX}/bin/speedwm-audioctrl \
${DESTDIR}${PREFIX}/bin/speedwm-winnav \
@ -104,15 +111,7 @@ uninstall:
${DESTDIR}${PREFIX}/bin/speedwm-dfmpeg \
${DESTDIR}${PREFIX}/bin/speedwm-msg \
${DESTDIR}${PREFIX}/bin/status \
${DESTDIR}${PREFIX}/share/speedwm-bindlist \
${DESTDIR}${PREFIX}/share/speedwm-deplist \
${DESTDIR}${PREFIX}/share/speedwm-about \
${DESTDIR}${PREFIX}/share/speedwm-about-2 \
${DESTDIR}${PREFIX}/share/speedwm-about-3 \
${DESTDIR}${PREFIX}/share/speedwm-about-4 \
${DESTDIR}${PREFIX}/share/speedwm-about-5 \
${DESTDIR}${PREFIX}/share/speedwm-xresources \
${DESTDIR}${PREFIX}/share/speedwm-fsignal \
${DESTDIR}${PREFIX}/share/speedwm \
docs:
chmod +x scripts/speedwm-help

154
README.md
View file

@ -1,8 +1,3 @@
https://speedie.gq/speedwm
 https://speedie.gq/donate
## What is speedwm?
speedwm is a window manager forked from suckless.org's dwm or dynamic window manager. It manages the user's open windows and tiles them according to a set layout (dynamic).
Just like dwm, speedwm also tries to be minimal but also has functionality and aesthetics as a goal. It is also much more minimal than other window managers like i3-gaps while offering many more features.
@ -48,7 +43,8 @@ The more commonly used layouts can be switched between using a quick keybind.
Do note that these may be disabled through the toggle.h header.
## Keybinds
Below is a list of all speedwm keybinds.
This is a full list of keybinds.
Please let me know if any keybinds are missing as these have been manually added.
### Applications
@ -199,7 +195,7 @@ Below is a list of all speedwm keybinds.
- Music button | Open your defined music player
- WLAN button | Disconnect from WLAN
-- Mouse --
### Mouse
These binds can be activated using your mouse
@ -217,7 +213,6 @@ Below is a list of all speedwm keybinds.
There are also keybinds for statuscmd, but you must implement it into your own status bar.
See mouse.h for more information.
## Dependencies
These are absolutely necessary, speedwm will NOT compile without them
- libxft-bgra (Can be installed through 'make <distro>-libxftfix')
@ -294,148 +289,17 @@ You can also configure it by editing '~/.config/speedwm-de/status/config'.
Please note that most status bars including the built in 'status' depends on xsetroot which must be installed. speedwm-compatcheck is going to tell you about this when compiling.
If you want to change status bar, edit options.h and set 'static char status' to your status bar binary (must be in $PATH).
Alternatively, you can also set speedwm.status: <statusbar> in .Xresources (See .Xresources and Pywal)
Alternatively, you can also set speedwm.status: <statusbar> in .Xresources (See .Xresources and Pywal).
## .Xresources and Pywal
This fork of speedwm has .Xresources support thanks to the .Xresources patch.
It also has pywal support (tool which grabs colors based on your wallpaper).
This fork of speedwm has .Xresources support thanks to the .Xresources patch. It also has pywal support (tool which grabs colors based on your wallpaper).
Colors reload automagically because of a reloadxresources function this build has combined with fsignal and a wallpaper script I wrote.
Therefore, if you want colors to reload instantly, you're unfortunately forced to use the bundled wallpaper script. But that's alright because it's pretty good.
If you want to use another script, you can open up speedwm-utils and select 'Reload .Xresources' to reload .Xresources.
Alternatively, you can write a script yourself (fsignal 31 reloads the colors)
Below is a list of all .Xresources values you can define. The .Xresources file should be placed in ~ or ~/.config by the user.
If it is not or you want it somewhere else, you can edit 'autostart.h' and 'make clean install'.
Colors can be reloaded on-the-fly using the built in wallpaper utility. In order to implement speedwm reloading support to your own wallpaper utility, run shell command (/bin/sh) 'speedwm_run -r' to reload colors automatically.
Note that the 'xrdb' dependency is required for both pywal and .Xresources support and 'xsetroot' is required for automatic reloading of colors, the built in status bar, and more so you should install this.
- speedwm.font: NotoSans-Regular:size=8:antialiasing=true
- speedwm.font2: fontawesome:size=8
- speedwm.font3: Noto Color Emoji:size=8
- speedwm.col_background: #222222
- speedwm.col_title: #222222
- speedwm.col_textnorm: #bbbbbb
- speedwm.col_textsel: #eeeeee
- speedwm.col_windowbordersel: #eeeeee
- speedwm.col_windowbordernorm: #000000
- speedwm.col_tag1: #333333
- speedwm.col_tag1_text: #eeeeee
- speedwm.col_tag2: #333333
- speedwm.col_tag2_text: #eeeeee
- speedwm.col_tag3: #333333
- speedwm.col_tag3_text: #eeeeee
- speedwm.col_tag4: #333333
- speedwm.col_tag4_text: #eeeeee
- speedwm.col_tag5: #333333
- speedwm.col_tag5_text: #eeeeee
- speedwm.col_tag6: #333333
- speedwm.col_tag6_text: #eeeeee
- speedwm.col_tag7: #333333
- speedwm.col_tag7_text: #eeeeee
- speedwm.col_tag8: #333333
- speedwm.col_tag8_text: #eeeeee
- speedwm.col_tag9: #333333
- speedwm.col_tag9_text: #eeeeee
- speedwm.col_layouttext: #000000
- speedwm.col_layoutbgnorm: #222222
- speedwm.col_layoutbgsel: #bbbbbb
- speedwm.col_status0: #131210
- speedwm.col_status1: #bf616a
- speedwm.col_status2: #A16F9D
- speedwm.col_status3: #68ABAA
- speedwm.col_status4: #A89F93
- speedwm.col_status5: #D3A99B
- speedwm.col_status6: #AFC9AC
- speedwm.col_status7: #eae1cb
- speedwm.col_status8: #a39d8e
- speedwm.col_status9: #6D5E8E
- speedwm.col_status10: #A16F9D
- speedwm.col_status11: #D3A99B
- speedwm.col_status12: #AFC9AC
- speedwm.col_status13: #eae1cb
- speedwm.col_status14: #6D5E8E
- speedwm.col_status15: #ffffff
- speedwm.borderpx: 1
- speedwm.snap: 20
- speedwm.hidebar: 1
- speedwm.resizehints: 0
- speedwm.mousemfact: 1
- speedwm.mfact: 0.50
- speedwm.lowestmfact: 0.05
- speedwm.startontag: 1
- speedwm.clicktofocus: 0
- speedwm.focusspawn: 0
- speedwm.enablegaps: 1
- speedwm.smartgaps: 0
- speedwm.smartgapsize: 0
- speedwm.gappih: 10
- speedwm.gappiv: 10
- speedwm.gappoh: 10
- speedwm.gappov: 10
- speedwm.attachdirection: 3
- speedwm.iconsize: 10
- speedwm.iconspacing: 5
- speedwm.shell: /bin/sh
- speedwm.status: status
- speedwm.defaultstatus:
- speedwm.refreshrules: 1
- speedwm.decorhints: 1
- speedwm.barpaddingv: 10
- speedwm.barpaddingh: 10
- speedwm.barheight: 5
- speedwm.centerfloating: 1
- speedwm.savefloat: 1
- speedwm.warpcursor: 1
- speedwm.pertag: 1
- speedwm.i3nmaster: 0
- speedwm.tagpreview: 1
- speedwm.tagpreviewpaddingv: 0
- speedwm.tagpreviewpaddingh: 0
- speedwm.mousepreview: 1
- speedwm.barpreview: 0
- speedwm.scalepreview: 4
- speedwm.monocleclientcount: 0
- speedwm.monoclecount: 0
- speedwm.monocleformat: [0/0]
- speedwm.statusallmons: 1
- speedwm.hidelayout: 0
- speedwm.hidetitle: 0
- speedwm.hidetitletext: 0
- speedwm.hidestatus: 0
- speedwm.hidestatustext: 0
- speedwm.hideicon: 0
- speedwm.hidetags: 0
- speedwm.hideemptytags: 1
- speedwm.hidesticky: 0
- speedwm.hidefloating: 0
- speedwm.leftlayout: 1
- speedwm.fadeinactive: 1
- speedwm.resetlayout: 1
- speedwm.resetmfact: 1
- speedwm.resetgaps: 1
- speedwm.wmclass: 1
- speedwm.stairpx: 20
- speedwm.stairdirection: 1
- speedwm.stairsamesize: 1
- speedwm.deckcount: 0
- speedwm.deckformat: [0]
- speedwm.roundedcorners: 0
- speedwm.cornerradius: 3
- speedwm.swallowclients: 1
- speedwm.swallowfloating: 1
- speedwm.movefullscreenmon: 0
- speedwm.lockfullscreen: 1
- speedwm.fullscreenhidebar: 1
- speedwm.underline: 0
- speedwm.underlineall: 0
- speedwm.underlinepad: 5
- speedwm.underlinestroke: 2
- speedwm.underlinevoffset: 0
- speedwm.forcevsplit: 1
- speedwm.floatscratchpad: 0
- speedwm.nmaster: 1
Below is a list of all .Xresources values you can define. The .Xresources file should be placed in ~ or ~/.config by the user.
If it is not or you want it somewhere else, you can edit 'autostart.h' and 'make clean install'.
## Fsignal
Thanks to the 'fsignal' patch available on suckless.org's website, we can easily write shell scripts to interact with dwm and therefore speedwm.
@ -509,6 +373,8 @@ Below is a list of all signums and what they do.
- 61 | Hide the scratchpad
- 62 | Remove the scratchpad
- 63 | Reset layout/mfact
- 64 | Reset nmaster
## Switching run launcher
Some users may prefer to use a different run launcher than dmenu.

View file

@ -1,49 +0,0 @@
-- speedwm --
https://speedie.gq/speedwm
 https://speedie.gq/donate
-- What is speedwm? --
speedwm is a window manager forked from suckless.org's dwm or dynamic window manager. It manages the user's open windows and tiles them according to a set layout (dynamic).
Just like dwm, speedwm also tries to be minimal but also has functionality and aesthetics as a goal. It is also much more minimal than other window managers like i3-gaps while offering many more features.
Tiling window managers (unlike floating window managers that you may be used to) tile windows based on a set layout making them easy to get productive on.
They also encourage the user to use their keyboard instead of the mouse so that the user doesn't have to move their hands much but there are mouse keybinds and more can be added.
-- Installation --
In order to install this build of speedwm, all dependencies must be installed.
You can see (Dependencies) for a list of all dependencies required to use this fork.
- git clone https://codeberg.org/speedie/speedwm
- cd speedwm
- make clean install
- If any warnings show up, fix it by installing the missing dependency.
- If a .xinitrc is used, add 'speedwm_run' to the end.
- NOTE: Your .xinitrc should ONLY contain 'speedwm_run'. speedwm will automatically start everything else. If not, edit autostart.h and 'make clean install'. If a .xinitrc is not used then you don't need to worry. A .desktop file is automatically created when you run 'make clean install'.
-- Layouts --
speedwm comes with the following layouts:
- Tile
- Monocle
- Grid
- Deck
- Centered Master
- Centered Floating Master
- Spiral
- Dwindle
- Three Column
- Bottom Stack
- Horizontal Bottom Stack
- Horizonal Grid
- Tatami
- Tilewide
- Stairs
- Tiling (5:4)
- Column
- Dynamic Grid
They can be switched between using a little menu (See Keybinds for more information) or by right clicking the Layout indicator.
The more commonly used layouts can be switched between using a quick keybind.
Do note that these may be disabled through the toggle.h header.

View file

@ -1,4 +0,0 @@
-- Keybinds --
Below is a list of all speedwm keybinds.

View file

@ -1,35 +0,0 @@
-- Switching run launcher --
Some users may prefer to use a different run launcher than dmenu.
Previously all scripts bundled would only run dmenu from $PATH but you can now switch run launcher very easily.
- Edit options.h and change RUN to your run launcher
- Add "export RUNLAUNCHER=<runlauncher>" to your .<shell>rc
Run launchers must support dmenu arguments because otherwise scripts are going to be incompatible.
It must also support the additional '-g' argument that the dmenu grid patch provides unless you modify the scripts bundled.
Keep in mind that if you use a different run launcher, it may not support Pywal/.Xresources.
-- What is up with /usr/share --
speedwm occasionally writes files to /usr/share. These files contain information about speedwm.
- The documentation you're reading when you press Ctrl+Alt+h is stored there (as separate files).
- speedwm-bindir is stored there which is a file that contains the path to the binaries on your system.
- speedwm-compositor is stored there which is a file that contains the defined compositor.
- speedwm-layouts is stored there which is a file that contains all available layouts.
These files are pretty important so it is recommended that you do not delete them.
If you do end up deleting them though, you can just make clean install on speedwm again.
-- Maintaining settings easily --
speedwm is a personal fork of dwm and will therefore likely have keybinds and other options you may not like. Because of this, I recommend that you use the patching system to manage your "custom" settings
speedwm has a patching system. It allows you to create a patch with your changes to options.h, options.mk, toggle.h and toggle.mk. To create a patch, simply make clean install once and then the docs folder will contain backups of your source code. If you perform changes to any of these four files, run make patch to create patches against the backups in docs and your modified files. Then once you're updating, do make patch_remove, git pull, make patch_install, and make clean install and all your settings will be there.
The only (obvious) problem with doing this is that eventually the backup files patches are being created against will be pretty old causing patches to no longer apply correctly. If this is the case you will need to create new patches and backups.
If this seems like more effort than it is worth, maintaining your own fork is always an option. This allows you to perform any options you want yourself. This however doesn't allow you to grab any updates so this should be your second choice.
-- Additional note on autostart --
If you wish to add autostart entries without recompiling, consider using $HOME/.config/speedwm-de/autostart.sh. This is a path added to autostart.h and you can fill it with anything you want.
Do note that it will NOT just run once. It will run every time you restart and start speedwm (signum 30 and 31 count as well).
To get around this, you may wrap stuff in a function in the script and have some way of checking if it has ran before. If it hasn't, call the function.
An alternative is to use the $HOME/.config/speedwm-de/autostart_once.sh path. This one is autostarted by speedwm_run and is therefore not hardcoded and not affected by speedwm restarting. Just like the previous autostart script, it does not exist so you need to create it.

8
docs/doc-01 Normal file
View file

@ -0,0 +1,8 @@
-- What is speedwm? --
speedwm is a window manager forked from suckless.org's dwm or dynamic window manager. It manages the user's open windows and tiles them according to a set layout (dynamic).
Just like dwm, speedwm also tries to be minimal but also has functionality and aesthetics as a goal. It is also much more minimal than other window managers like i3-gaps while offering many more features.
Tiling window managers (unlike floating window managers that you may be used to) tile windows based on a set layout making them easy to get productive on.
They also encourage the user to use their keyboard instead of the mouse so that the user doesn't have to move their hands much but there are mouse keybinds and more can be added.

11
docs/doc-02 Normal file
View file

@ -0,0 +1,11 @@
-- Installation --
In order to install this build of speedwm, all dependencies must be installed.
You can see (Dependencies) for a list of all dependencies required to use this fork.
- git clone https://codeberg.org/speedie/speedwm
- cd speedwm
- make clean install
- If any warnings show up, fix it by installing the missing dependency.
- If a .xinitrc is used, add 'speedwm_run' to the end.
- NOTE: Your .xinitrc should ONLY contain 'speedwm_run'. speedwm will automatically start everything else. If not, edit autostart.h and 'make clean install'. If a .xinitrc is not used then you don't need to worry. A .desktop file is automatically created when you run 'make clean install'.

26
docs/doc-03 Normal file
View file

@ -0,0 +1,26 @@
-- Layouts --
speedwm comes with the following layouts:
- Tile
- Monocle
- Grid
- Deck
- Centered Master
- Centered Floating Master
- Spiral
- Dwindle
- Three Column
- Bottom Stack
- Horizontal Bottom Stack
- Horizonal Grid
- Tatami
- Tilewide
- Stairs
- Tiling (5:4)
- Column
- Dynamic Grid
They can be switched between using a little menu (See Keybinds for more information) or by right clicking the Layout indicator.
The more commonly used layouts can be switched between using a quick keybind.
Do note that these may be disabled through the toggle.h header.

4
docs/doc-04 Normal file
View file

@ -0,0 +1,4 @@
-- Keybinds --
This is a full list of keybinds.
Please let me know if any keybinds are missing as these have been manually added.

View file

@ -24,20 +24,5 @@ You can also configure it by editing '~/.config/speedwm-de/status/config'.
Please note that most status bars including the built in 'status' depends on xsetroot which must be installed. speedwm-compatcheck is going to tell you about this when compiling.
If you want to change status bar, edit options.h and set 'static char status' to your status bar binary (must be in $PATH).
Alternatively, you can also set "speedwm.status: <statusbar>" in .Xresources (See .Xresources and Pywal)
-- .Xresources and Pywal --
This fork of speedwm has .Xresources support thanks to the .Xresources patch.
It also has pywal support (tool which grabs colors based on your wallpaper).
Colors reload automagically because of a reloadxresources function this build has combined with fsignal and a wallpaper script I wrote.
Therefore, if you want colors to reload instantly, you're unfortunately forced to use the bundled wallpaper script. But that's alright because it's pretty good.
If you want to use another script, you can open up speedwm-utils and select 'Reload .Xresources' to reload .Xresources.
Alternatively, you can write a script yourself (fsignal 31 reloads the colors)
Below is a list of all .Xresources values you can define. The .Xresources file should be placed in ~ or ~/.config by the user.
If it is not or you want it somewhere else, you can edit 'autostart.h' and 'make clean install'.
Note that the 'xrdb' dependency is required for both pywal and .Xresources support and 'xsetroot' is required for automatic reloading of colors, the built in status bar, and more so you should install this.
Alternatively, you can also set "speedwm.status: <statusbar>" in .Xresources (See .Xresources and Pywal).

10
docs/doc-06 Normal file
View file

@ -0,0 +1,10 @@
-- .Xresources and Pywal --
This fork of speedwm has .Xresources support thanks to the .Xresources patch. It also has pywal support (tool which grabs colors based on your wallpaper).
Colors can be reloaded on-the-fly using the built in wallpaper utility. In order to implement speedwm reloading support to your own wallpaper utility, run shell command (/bin/sh) 'speedwm_run -r' to reload colors automatically.
Note that the 'xrdb' dependency is required for both pywal and .Xresources support and 'xsetroot' is required for automatic reloading of colors, the built in status bar, and more so you should install this.
Below is a list of all .Xresources values you can define. The .Xresources file should be placed in ~ or ~/.config by the user.
If it is not or you want it somewhere else, you can edit 'autostart.h' and 'make clean install'.

View file

@ -1,4 +1,3 @@
-- Fsignal --
Thanks to the 'fsignal' patch available on suckless.org's website, we can easily write shell scripts to interact with dwm and therefore speedwm.
This is exactly what I did and speedwm-utils, speedwm-swal, speedwm-shutdown and more take advantage of it.

10
docs/doc-08 Normal file
View file

@ -0,0 +1,10 @@
-- Switching run launcher --
Some users may prefer to use a different run launcher than dmenu.
Previously all scripts bundled would only run dmenu from $PATH but you can now switch run launcher very easily.
- Edit options.h and change RUN to your run launcher
- Add "export RUNLAUNCHER=<runlauncher>" to your .<shell>rc
Run launchers must support dmenu arguments because otherwise scripts are going to be incompatible.
It must also support the additional '-g' argument that the dmenu grid patch provides unless you modify the scripts bundled.
Keep in mind that if you use a different run launcher, it may not support Pywal/.Xresources.

11
docs/doc-09 Normal file
View file

@ -0,0 +1,11 @@
-- What is up with /usr/share --
speedwm occasionally writes files to /usr/share. These files contain information about speedwm.
- The documentation you're reading when you press Ctrl+Alt+h is stored there (as separate files).
- speedwm-bindir is stored there which is a file that contains the path to the binaries on your system.
- speedwm-compositor is stored there which is a file that contains the defined compositor.
- speedwm-layouts is stored there which is a file that contains all available layouts.
These files are pretty important so it is recommended that you do not delete them.
If you do end up deleting them though, you can just make clean install on speedwm again.

7
docs/doc-10 Normal file
View file

@ -0,0 +1,7 @@
-- Maintaining settings easily --
speedwm is a personal fork of dwm and will therefore likely have keybinds and other options you may not like. Because of this, I recommend that you use the patching system to manage your "custom" settings
speedwm has a patching system. It allows you to create a patch with your changes to options.h, options.mk, toggle.h and toggle.mk. To create a patch, simply make clean install once and then the docs folder will contain backups of your source code. If you perform changes to any of these four files, run make patch to create patches against the backups in docs and your modified files. Then once you're updating, do make patch_remove, git pull, make patch_install, and make clean install and all your settings will be there.
The only (obvious) problem with doing this is that eventually the backup files patches are being created against will be pretty old causing patches to no longer apply correctly. If this is the case you will need to create new patches and backups.
If this seems like more effort than it is worth, maintaining your own fork is always an option. This allows you to perform any options you want yourself. This however doesn't allow you to grab any updates so this should be your second choice.

7
docs/doc-11 Normal file
View file

@ -0,0 +1,7 @@
-- Additional note on autostart --
If you wish to add autostart entries without recompiling, consider using $HOME/.config/speedwm-de/autostart.sh. This is a path added to autostart.h and you can fill it with anything you want.
Do note that it will NOT just run once. It will run every time you restart and start speedwm (signum 30 and 31 count as well).
To get around this, you may wrap stuff in a function in the script and have some way of checking if it has ran before. If it hasn't, call the function.
An alternative is to use the $HOME/.config/speedwm-de/autostart_once.sh path. This one is autostarted by speedwm_run and is therefore not hardcoded and not affected by speedwm restarting. Just like the previous autostart script, it does not exist so you need to create it.

View file

@ -1,64 +1,65 @@
- xsetroot -name "fsignal:1" | Switch to the Tiling layout
- xsetroot -name "fsignal:2" | Switch to the Floating layout
- xsetroot -name "fsignal:3" | Switch to the Monocle layout
- xsetroot -name "fsignal:4" | Switch to the Grid layout
- xsetroot -name "fsignal:5" | Switch to the Deck layout
- xsetroot -name "fsignal:6" | Switch to the Centered Master layout
- xsetroot -name "fsignal:7" | Switch to the Centered Floating Master layout
- xsetroot -name "fsignal:8" | Switch to the Fibonacci Spiral layout
- xsetroot -name "fsignal:9" | Switch to the Fibonacci Dwindle layout
- xsetroot -name "fsignal:10" | Switch to the Three Column layout
- xsetroot -name "fsignal:11" | Switch to the Bottom Stack Vertical layout
- xsetroot -name "fsignal:12" | Switch to the Bottom Stack Horizontal layout
- xsetroot -name "fsignal:13" | Switch to the Horizontal Grid layout
- xsetroot -name "fsignal:14" | Switch to the Tatami layout
- xsetroot -name "fsignal:15" | Switch to the Tilewide layout
- xsetroot -name "fsignal:16" | Switch to the Stairs layout
- xsetroot -name "fsignal:17" | Switch to the 5:4 tiling layout
- xsetroot -name "fsignal:18" | Switch to the Column layout
- xsetroot -name "fsignal:19" | Switch to the Dynamic Grid layout
- xsetroot -name "fsignal:20" | Switch to the next layout
- xsetroot -name "fsignal:21" | Switch to the previous layout
- xsetroot -name "fsignal:22" | Increase mfact by 0.05
- xsetroot -name "fsignal:23" | Decrease mfact by 0.05
- xsetroot -name "fsignal:24" | Toggle sticky
- xsetroot -name "fsignal:25" | Toggle the bar
- xsetroot -name "fsignal:26" | Toggle fullscreen
- xsetroot -name "fsignal:27" | Toggle floating
- xsetroot -name "fsignal:28" | Swap the current window with the next
- xsetroot -name "fsignal:29" | Reorganize tags (Reorder them)
- xsetroot -name "fsignal:30" | Shutdown speedwm
- xsetroot -name "fsignal:31" | Restart speedwm
- xsetroot -name "fsignal:32" | Show the focused window
- xsetroot -name "fsignal:33" | Hide the focused window
- xsetroot -name "fsignal:34" | Kill the focused window
- xsetroot -name "fsignal:35" | Rotate the stack up
- xsetroot -name "fsignal:36" | Rotate the stack down
- xsetroot -name "fsignal:37" | Increase number of clients in the master stack
- xsetroot -name "fsignal:38" | Decrease number of clients in the master stack
- xsetroot -name "fsignal:39" | Focus the Master client
- xsetroot -name "fsignal:40" | Switch focus between windows +1
- xsetroot -name "fsignal:41" | Switch focus between windows -1
- xsetroot -name "fsignal:42" | Switch focus between hidden windows +1
- xsetroot -name "fsignal:43" | Switch focus between hidden windows -1
- xsetroot -name "fsignal:44" | Toggle opacity for windows
- xsetroot -name "fsignal:45" | Increase cfact by 0.05
- xsetroot -name "fsignal:46" | Decrease cfact by 0.05
- xsetroot -name "fsignal:47" | Switch to the previous tag
- xsetroot -name "fsignal:48" | Switch to the next tag
- xsetroot -name "fsignal:49" | Reset gaps to the default size
- xsetroot -name "fsignal:50" | Toggle gaps
- xsetroot -name "fsignal:51" | Increase gaps by 1
- xsetroot -name "fsignal:52" | Decrease gaps by 1
- xsetroot -name "fsignal:53" | Increase inner gaps by 1
- xsetroot -name "fsignal:54" | Decrease inner gaps by 1
- xsetroot -name "fsignal:55" | Increase outer gaps by 1
- xsetroot -name "fsignal:56" | Decrease outer gaps by 1
- xsetroot -name "fsignal:57" | Kill all clients except focused
- xsetroot -name "fsignal:58" | Focus the next monitor
- xsetroot -name "fsignal:59" | Focus the previous monitor
- xsetroot -name "fsignal:60" | Show the scratchpad
- xsetroot -name "fsignal:61" | Hide the scratchpad
- xsetroot -name "fsignal:62" | Remove the scratchpad
- xsetroot -name "fsignal:63" | Reset layout/mfact
- 1 | Switch to the Tiling layout
- 2 | Switch to the Floating layout
- 3 | Switch to the Monocle layout
- 4 | Switch to the Grid layout
- 5 | Switch to the Deck layout
- 6 | Switch to the Centered Master layout
- 7 | Switch to the Centered Floating Master layout
- 8 | Switch to the Fibonacci Spiral layout
- 9 | Switch to the Fibonacci Dwindle layout
- 10 | Switch to the Three Column layout
- 11 | Switch to the Bottom Stack Vertical layout
- 12 | Switch to the Bottom Stack Horizontal layout
- 13 | Switch to the Horizontal Grid layout
- 14 | Switch to the Tatami layout
- 15 | Switch to the Tilewide layout
- 16 | Switch to the Stairs layout
- 17 | Switch to the 5:4 tiling layout
- 18 | Switch to the Column layout
- 19 | Switch to the Dynamic Grid layout
- 20 | Switch to the next layout
- 21 | Switch to the previous layout
- 22 | Increase mfact by 0.05
- 23 | Decrease mfact by 0.05
- 24 | Toggle sticky
- 25 | Toggle the bar
- 26 | Toggle fullscreen
- 27 | Toggle floating
- 28 | Swap the current window with the next
- 29 | Reorganize tags (Reorder them)
- 30 | Shutdown speedwm
- 31 | Restart speedwm
- 32 | Show the focused window
- 33 | Hide the focused window
- 34 | Kill the focused window
- 35 | Rotate the stack up
- 36 | Rotate the stack down
- 37 | Increase number of clients in the master stack
- 38 | Decrease number of clients in the master stack
- 39 | Focus the Master client
- 40 | Switch focus between windows +1
- 41 | Switch focus between windows -1
- 42 | Switch focus between hidden windows +1
- 43 | Switch focus between hidden windows -1
- 44 | Toggle opacity for windows
- 45 | Increase cfact by 0.05
- 46 | Decrease cfact by 0.05
- 47 | Switch to the previous tag
- 48 | Switch to the next tag
- 49 | Reset gaps to the default size
- 50 | Toggle gaps
- 51 | Increase gaps by 1
- 52 | Decrease gaps by 1
- 53 | Increase inner gaps by 1
- 54 | Decrease inner gaps by 1
- 55 | Increase outer gaps by 1
- 56 | Decrease outer gaps by 1
- 57 | Kill all clients except focused
- 58 | Focus the next monitor
- 59 | Focus the previous monitor
- 60 | Show the scratchpad
- 61 | Hide the scratchpad
- 62 | Remove the scratchpad
- 63 | Reset layout/mfact
- 64 | Reset nmaster

View file

@ -4,7 +4,7 @@
# Run speedwm-audioctrl -help for more information!
# License: GPLv3.
BINDIR=$(cat /usr/share/speedwm-bindir)
BINDIR=$(cat /usr/share/speedwm/bindir)
MUTE() {
# Mute for pulseaudio/pipewire

View file

@ -9,7 +9,7 @@ CHECK() {
"") RUNLAUNCHER=dmenu ;;
esac
BINDIR=$(cat /usr/share/speedwm-bindir) # Set binary directory to the contents of this file for NixOS support
BINDIR=$(cat /usr/share/speedwm/bindir) # Set binary directory to the contents of this file for NixOS support
}
HAVE_GRID="true"

View file

@ -2,7 +2,7 @@
# speedwm-compatcheck
# compatibility checker used by 'make' when compiling speedwm.
BINDIR=$(cat /usr/share/speedwm-bindir)
BINDIR=$(cat /usr/share/speedwm/bindir)
# Check if xrdb exists
if [ -e "${BINDIR}xrdb" ]; then

View file

@ -3,8 +3,8 @@
# This script handles the systray and other things necessary for keybinds.
# Set binary directory if not set already.
if [ -e "/usr/share/speedwm-bindir" ]; then
BINDIR=$(cat /usr/share/speedwm-bindir) # Set binary directory to the contents of this variable.
if [ -e "/usr/share/speedwm/bindir" ]; then
BINDIR=$(cat /usr/share/speedwm/bindir) # Set binary directory to the contents of this variable.
else
BINDIR="/usr/bin/"
fi

View file

@ -3,30 +3,36 @@
# Create a .desktop file for people who use display managers.
# Delete the topbar file
rm -f /usr/share/speedwm-topbar
rm -f /usr/share/speedwm/topbar
# Delete the padding file
rm -f /usr/share/speedwm-nopadding
rm -f /usr/share/speedwm/nopadding
# Make the directory for the .desktop file if it does not exist
mkdir -p /usr/share/xsessions
# Write the .desktop entry
printf "[Desktop Entry]\nEncoding=UTF-8\nName=speedwm\nComment=Dynamic window manager\nExec=/usr/bin/speedwm_run\nIcon=speedwm\nType=XSession" > /usr/share/xsessions/speedwm.desktop
printf "[Desktop Entry]\nEncoding=UTF-8\nName=speedwm\nComment=speedwm: speedie's window manager\nExec=/usr/bin/speedwm_run\nIcon=speedwm\nType=XSession" > /usr/share/xsessions/speedwm.desktop
# If the bar is on the top, touch /usr/share/speedwm-topbar
# If the bar is on the top, touch /usr/share/speedwm/topbar
TOPBAR=$(grep "barposition" options.h | grep "1" | awk '{ print $5 }')
# If we have no padding, touch /usr/share/speedwm/nopadding
PADDING=$(grep "barpaddingv" options.h | grep "0" | awk '{ print $5 }')
# Write the compositor to /usr/share/speedwm/compositor
COMPOSITOR=$(grep "define COMPOSITOR " options.h | awk '{ print $3 }' | sed 's/"//g')
echo $TOPBAR | grep "1" && touch /usr/share/speedwm-topbar
echo $PADDING | grep "0" && touch /usr/share/speedwm-nopadding
echo $COMPOSITOR > /usr/share/speedwm-compositor
echo $(pwd) > /usr/share/speedwm-sourcedir
sed "s/#define //g" toggle.h | grep LAYOUT | sed "s|/[*]|#|g" | sed "s|[*]/||g" | sed "s/ //g" | sed "s/1/=1/g" | sed "s/0/=0/g" | sed "s/#/ # /g" > /usr/share/speedwm-layouts
. /usr/share/speedwm-layouts
# Print all of it
echo $TOPBAR | grep "1" && touch /usr/share/speedwm/topbar
echo $PADDING | grep "0" && touch /usr/share/speedwm/nopadding
echo $COMPOSITOR > /usr/share/speedwm/compositor
echo $(pwd) > /usr/share/speedwm/sourcedir
sed "s/#define //g" toggle.h | grep LAYOUT | sed "s|/[*]|#|g; s|[*]/||g; s/ //g; s/1/=1/g; s/0/=0/g; s/#/ # /g" > /usr/share/speedwm/layouts
AVAILABLE_LAYOUTS="$(printf "$AVAILABLE_LAYOUTS ")"
. /usr/share/speedwm/layouts
AVAILABLE_LAYOUTS="$(printf "$AVAILABLE_LAYOUTS")"
# Tile
if [ "$LAYOUT_TILE" = "1" ]; then

View file

@ -11,26 +11,12 @@ fi
# Set documentation directory
if [ "$DOCDIR" = "" ]; then
DOCDIR=/usr/share
DOCDIR=/usr/share/speedwm
fi
# Set prefix
if [ "$USEPREFIX" != "false" ]; then
PREFIX="speedwm-"
ABOUT2="about-2"
ABOUT3="about-3"
ABOUT4="about-4"
ABOUT5="about-5"
XRESOURCES="xresources"
FSIGNAL="fsignal"
else
if [ "$PREFIX" = "" ]; then
PREFIX=""
ABOUT2="about2"
ABOUT3="about3"
ABOUT4="about4"
ABOUT5="about5"
XRESOURCES="example.Xresources"
FSIGNAL="example.fsignal"
fi
ARG1=$1
@ -48,7 +34,23 @@ case "$VIEWER" in
"-o") VIEWER="cat" ;;
esac
printf "${0}. Run '$0 -h' to see a list of arguments or to jump to a specific section.\n$(cat $DOCDIR/${PREFIX}about $DOCDIR/${PREFIX}$ABOUT2 $DOCDIR/${PREFIX}bindlist $DOCDIR/${PREFIX}deplist $DOCDIR/${PREFIX}$ABOUT3 $DOCDIR/${PREFIX}$XRESOURCES $DOCDIR/${PREFIX}$ABOUT4 $DOCDIR/${PREFIX}$FSIGNAL $DOCDIR/${PREFIX}$ABOUT5 | sed 's|xsetroot -name "fsignal:||g' | sed 's|"||g' | grep -v "!!")" > /tmp/${PREFIX}doc
printf "${0}. Run '$0 -h' to see a list of arguments or to jump to a specific section.\n\
$(cat \
$DOCDIR/${PREFIX}doc-01 \
$DOCDIR/${PREFIX}doc-02 \
$DOCDIR/${PREFIX}doc-03 \
$DOCDIR/${PREFIX}doc-04 \
$DOCDIR/${PREFIX}keybinds \
$DOCDIR/${PREFIX}dependencies \
$DOCDIR/${PREFIX}doc-05 \
$DOCDIR/${PREFIX}doc-06 \
$DOCDIR/${PREFIX}doc-07 \
$DOCDIR/${PREFIX}example.fsignal \
$DOCDIR/${PREFIX}doc-08 \
$DOCDIR/${PREFIX}doc-09 \
$DOCDIR/${PREFIX}doc-10 \
$DOCDIR/${PREFIX}doc-11 \
| sed 's|xsetroot -name "fsignal:||g; s|"||g' | grep -v "!!")" > /tmp/${PREFIX}doc
case "$ARG1" in
"-w") tail -n $(expr $(cat /tmp/${PREFIX}doc | wc -l) "-" 1) /tmp/${PREFIX}doc > ../readme ;;
@ -100,14 +102,14 @@ case "$ARG1" in
printf "\nYou need to $0 -whtml first." ; exit 1 ;;
"") $0 -h && exit 0 ;;
"-h") printf "speedwm help\n\nNo arguments to view this list of arguments.\n-h | View this list of arguments.\n-a | View everything.\n-1 | What is speedwm?\n-2 | List of all keybinds\n-3 | List of all dependencies\n-4 | .Xresources/Pywal information.\n-5 | Fsignal information\n-6 | Switching run launcher\n-7 | Installation\n-8 | Layouts\n-9| Important information.\n-w | Write documentation to ../readme\n-wmd | Write documentation (Markdown)\n-whtml | Write documentation (HTML) using markdown-to-html.\n-whtml-wtemplate | Combine template 1, output of -whtml and template 2 (from docs/) to create a full HTML document.\n\nIf second argument is -o, the requested output will be sent to stdout.\n-o can be replaced with a text editor or reader of your choice (such as less, vim, emacs, etc.)\n"; exit 0 ;;
"-1") sed "s|--|${COL2}--${COL1}|g" $DOCDIR/${PREFIX}about | head -n 10 > /tmp/stdout ; $VIEWER /tmp/stdout ;;
"-2") cat $DOCDIR/${PREFIX}$ABOUT2 $DOCDIR/${PREFIX}bindlist | sed "s|--|${COL2}--${COL1}|g" > /tmp/stdout ; $VIEWER /tmp/stdout ;;
"-3") sed "s|--|${COL2}--${COL1}|g" $DOCDIR/${PREFIX}deplist > /tmp/stdout ; $VIEWER /tmp/stdout ;;
"-4") cat $DOCDIR/${PREFIX}$ABOUT3 $DOCDIR/${PREFIX}$XRESOURCES | tail -n 59 | sed "s|--|${COL2}--${COL1}|g" | grep -v "!!" | grep -v "!!" > /tmp/stdout ; $VIEWER /tmp/stdout ;;
"-5") cat $DOCDIR/${PREFIX}$ABOUT4 $DOCDIR/${PREFIX}$FSIGNAL | sed "s|--|${COL2}--${COL1}|g" | sed 's|xsetroot -name "$FSIGNAL:||g' | sed 's|"||g' > /tmp/stdout ; $VIEWER /tmp/stdout ;;
"-6") sed "s|--|${COL2}--${COL1}|g" $DOCDIR/${PREFIX}$ABOUT5 > /tmp/stdout ; $VIEWER /tmp/stdout ;;
"-7") sed "s|--|${COL2}--${COL1}|g" $DOCDIR/${PREFIX}about | head -n 22 | tail -n 11 > /tmp/stdout ; $VIEWER /tmp/stdout ;;
"-8") sed "s|--|${COL2}--${COL1}|g" $DOCDIR/${PREFIX}about | tail -n 22 | head -n 19 > /tmp/stdout ; $VIEWER /tmp/stdout ;;
"-9") sed "s|--|${COL2}--${COL1}|g" $DOCDIR/${PREFIX}$ABOUT3 | head -n 24 > /tmp/stdout ; $VIEWER /tmp/stdout ;;
"-a") sed "s|--|${COL2}--${COL1}|g" /tmp/${PREFIX}doc > /tmp/stdout ; $VIEWER /tmp/stdout ;;
"-1") cat $DOCDIR/${PREFIX}doc-01 > /tmp/stdout ; $VIEWER /tmp/stdout ;;
"-2") cat $DOCDIR/${PREFIX}doc-04 $DOCDIR/${PREFIX}keybinds > /tmp/stdout ; $VIEWER /tmp/stdout ;;
"-3") cat $DOCDIR/${PREFIX}dependencies > /tmp/stdout ; $VIEWER /tmp/stdout ;;
"-4") cat $DOCDIR/${PREFIX}doc-06 $DOCDIR/${PREFIX}example.Xresources > /tmp/stdout ; $VIEWER /tmp/stdout ;;
"-5") cat $DOCDIR/${PREFIX}doc-07 $DOCDIR/${PREFIX}example.fsignal > /tmp/stdout ; $VIEWER /tmp/stdout ;;
"-6") cat $DOCDIR/${PREFIX}doc-08 > /tmp/stdout ; $VIEWER /tmp/stdout ;;
"-7") cat $DOCDIR/${PREFIX}doc-02 > /tmp/stdout ; $VIEWER /tmp/stdout ;;
"-8") cat $DOCDIR/${PREFIX}doc-03 > /tmp/stdout ; $VIEWER /tmp/stdout ;;
"-9") cat $DOCDIR/${PREFIX}doc-05 > /tmp/stdout ; $VIEWER /tmp/stdout ;;
"-a") cat /tmp/${PREFIX}doc > /tmp/stdout ; $VIEWER /tmp/stdout ;;
esac

View file

@ -7,7 +7,7 @@ case "$RUNLAUNCHER" in
"") RUNLAUNCHER=dmenu ;;
esac
BINDIR=$(cat /usr/share/speedwm-bindir)
BINDIR=$(cat /usr/share/speedwm/bindir)
command -v iwctl > /dev/null || exit 1

View file

@ -11,8 +11,8 @@ case "$RUNLAUNCHER" in
"") RUNLAUNCHER=dmenu ;;
esac
if [ -e "/usr/share/speedwm-bindir" ]; then
BINDIR=$(cat /usr/share/speedwm-bindir)
if [ -e "/usr/share/speedwm/bindir" ]; then
BINDIR=$(cat /usr/share/speedwm/bindir)
else
BINDIR="/usr/bin/"
fi

View file

@ -28,8 +28,8 @@ if [ "$HAVE_GRID" = "true" ]; then
GRIDARG="-g"
fi
if [ -e "/usr/share/speedwm-bindir" ]; then
BINDIR=$(cat /usr/share/speedwm-bindir)
if [ -e "/usr/share/speedwm/bindir" ]; then
BINDIR=$(cat /usr/share/speedwm/bindir)
else
BINDIR="/usr/bin/"
fi

View file

@ -115,7 +115,7 @@ SWAL_SOLIDCOLOR() {
}
# Binary directory
BINDIR=$(cat /usr/share/speedwm-bindir)
BINDIR=$(cat /usr/share/speedwm/bindir)
SWAL_OLDWALLPAPERDIR=$SWAL_WALLPAPERDIR
# Source things

View file

@ -24,7 +24,7 @@ if [ "$HAVE_GRID" = "true" ]; then
fi
VARS() {
BINDIR=$(cat /usr/share/speedwm-bindir)
BINDIR=$(cat /usr/share/speedwm/bindir)
}
VARS

View file

@ -23,7 +23,7 @@ if [ "$HAVE_GRID" = "true" ]; then
GRIDARG="-g"
fi
BINDIR=$(cat /usr/share/speedwm-bindir)
BINDIR=$(cat /usr/share/speedwm/bindir)
EMOJILIST()
{

View file

@ -43,7 +43,7 @@ case "$RUNLAUNCHER" in
"") RUNLAUNCHER=dmenu ;;
esac
BINDIR=$(cat /usr/share/speedwm-bindir)
BINDIR=$(cat /usr/share/speedwm/bindir)
DOTDIR=$HOME/.config/speedwm-de/winnav
POSITION="bottom" # top, bottom, center (your $RUNLAUNCHER must support center for this to work)

View file

@ -3,7 +3,7 @@
# External script which starts speedwm!
# https://speedie.gq/speedwm for instructions and usage!
BINDIR=$(cat /usr/share/speedwm-bindir)
BINDIR=$(cat /usr/share/speedwm/bindir)
ARGS=$1
# No second argument is supported