Commit Graph

1726 Commits

Author SHA1 Message Date
Santiago Lo Coco 6ee579628e Add 'patches' header 2022-03-11 10:43:03 -03:00
Santiago Lo Coco 1bca8e4470 Update README.md 2022-03-11 10:31:58 -03:00
Santiago Lo Coco 3812dea8a3 Update .gitignore 2022-03-11 09:28:08 -03:00
Santiago Lo Coco b73a0b1cf6 Remove patches folder 2022-03-11 09:25:18 -03:00
Santiago Lo Coco 4ee24decb9 Update patches 2022-03-11 09:24:38 -03:00
Santiago Lo Coco 926b86cf58 Update headers 2022-03-11 09:22:53 -03:00
Santiago Lo Coco 0976b97d38 Update hyperlinks 2022-03-11 09:21:20 -03:00
Santiago Lo Coco 9796037518 Use markdown 2022-03-11 09:20:10 -03:00
Santiago Lo Coco 406769659f Update README 2022-03-11 09:17:40 -03:00
Santiago Lo Coco d5afeb85e3 Update LICENSE 2022-03-11 09:04:16 -03:00
Hiltjo Posthuma c54bfe7fae bump version to 6.3 2022-03-09 10:41:08 -03:00
Santiago Lo Coco f5d14ac8d9 Remove more comments 2022-03-04 21:26:55 -03:00
Santiago Lo Coco f42963bb22 Add keybindings for desktop only (with #else directive) 2022-03-04 21:26:11 -03:00
Santiago Lo Coco 19c2871d21 Remove comments 2022-03-04 21:22:53 -03:00
Santiago Lo Coco 8ab4cb7c51 Add more shortcuts 2022-02-09 01:19:02 -03:00
Santiago Lo Coco 08fc615bbb Add backlight shortcuts 2022-02-07 21:53:46 -03:00
Santiago Lo Coco 0e4e016e43 Use LAPTOP flag 2022-01-27 04:08:40 +00:00
Santiago Lo Coco 239e1bef6c Add LAPTOP flag 2022-01-27 04:08:14 +00:00
Chris Down 73c7d3e95e drawbar: Don't expend effort drawing bar if it is occluded
I noticed that a non-trivial amount of dwm's work on my machine was from
drw_text, which seemed weird, because I have the bar disabled and we
only use drw_text as part of bar drawing.

Looking more closely, I realised that while we use m->showbar when
updating the monitor bar margins, but don't skip actually drawing the
bar if it is hidden. This patch skips drawing it entirely if that is the
case.

On my machine, this takes 10% of dwm's on-CPU time, primarily from
restack() and focus().

When the bar is toggled on again, the X server will generate an Expose
event, and we'll redraw the bar as normal as part of expose().
2021-12-21 23:55:01 -03:00
Hiltjo Posthuma 33a5e101df Revert "Improve speed of drw_text when provided with large strings"
This reverts commit 716233534b35f74dba5a46ade8f1a6f8cc72fea4.

It causes issues with truncation of characters when the text does not fit and
so on.  The patch should be reworked and properly tested.
2021-12-21 23:54:24 -03:00
Miles Alan cc4b72a07e Improve speed of drw_text when provided with large strings
Calculates len & ew in drw_font_getexts loop by incrementing instead of
decrementing; as such avoids proportional increase in time spent in loop
based on provided strings size.
2021-12-21 23:54:18 -03:00
Santiago Lo Coco 3414e8633b Add noisetorch keybinding 2021-12-21 23:51:16 -03:00
Santiago Lo Coco 7db9ff524e Add themes 2021-12-10 09:47:19 -03:00
Santiago Lo Coco ad25dc498d Add more FN keys 2021-11-09 23:57:57 -03:00
Santiago Lo Coco bce7f0db32 Add shiftview and some keybindings 2021-10-25 14:23:35 -03:00
Santiago Lo Coco dc2a1896bb Added scratchpads 2021-08-13 22:52:07 -03:00
Santiago Lo Coco 2146cdbf1e Added always center patch 2021-08-13 22:03:39 -03:00
Santiago Lo Coco 711e76c7c3 Added fullscreen toggle 2021-08-13 22:00:20 -03:00
Santiago Lo Coco 7bbebdf394 Added stacker and sticky patch 2021-08-13 21:43:20 -03:00
Santiago Lo Coco a9fb471295 Merge branch 'swallowupdate' 2021-08-13 20:04:42 -03:00
Santiago Lo Coco f12c0d3e48 Added new swallow patch 2021-08-13 19:41:44 -03:00
Santiago Lo Coco 1d172bbbda Removed *.o files 2021-08-13 18:54:46 -03:00
Santiago Lo Coco eef7dba264 Changed gaps width and added some SHCMDs 2021-08-13 18:53:10 -03:00
Santiago Lo Coco e6d1a05dac Added dwmblocks functionality 2021-08-07 12:09:49 -03:00
Santiago Lo Coco 116a7bb006 Added volume keys 2021-07-31 09:11:03 -03:00
Quentin Rameau 7b7e9ea212 Add a configuration option for fullscreen locking
Some people are annoyed to have this new behaviour forced for some
application which use fake fullscreen.
2021-07-29 10:47:08 -03:00
Chris Down a1da2267c4 Do not allow focus to drift from fullscreen client via focusstack()
It generally doesn't make much sense to allow focusstack() to navigate
away from the selected fullscreen client, as you can't even see which
client you're selecting behind it.

I have had this up for a while on the wiki as a separate patch[0], but
it seems reasonable to avoid this behaviour in dwm mainline, since I'm
struggling to think of any reason to navigate away from a fullscreen
client other than a mistake.

0: https://dwm.suckless.org/patches/alwaysfullscreen/
2021-07-29 10:44:18 -03:00
Santiago Lo Coco 0eab2f6793 Minor changes 2021-02-28 23:14:02 -03:00
Santiago Lo Coco 367fa26490 Changed README 2021-02-28 21:14:05 -03:00
Santiago Lo Coco b4eac1e0ee Added gaps, swallow and attachdirection! 2021-02-28 21:06:12 -03:00
Santiago Lo Coco 65fc1ef79e Minor changes 2020-11-19 11:23:06 -03:00
Ian Remmler 61bb8b2241 Fix x coordinate calculation in buttonpress. 2020-08-21 16:13:22 +02:00
Hiltjo Posthuma bb2e7222ba dwm.1: fix wrong text in man page 2020-07-08 18:05:50 +02:00
Alex Flierl f04cac6d6e Fix memory leaks in drw
The function drw_fontset_free in drw.c was never called.
2020-06-11 18:32:21 +02:00
bakkeby f09418bbb6 dwm crashes when opening 50+ clients (tile layout)
Many users new to dwm find themselves caught out by being kicked out to the login manager (dwm crashing) when they open 50+ clients for demonstration purposes. The number of clients reported varies depending on the resolution of the monitor.

The cause of this is due to how the default tile layout calculates the height of the next client based on the position of the previous client. Because clients have a minimum size the (ty) position can exceed that of the window height, resulting in (m->wh - ty) becoming negative. The negative height stored as an unsigned int results in a very large height ultimately resulting in dwm crashing.

This patch adds safeguards to prevent the ty and my positions from exceeding that of the window height.
2020-04-25 13:31:02 +02:00
Chris Down ed3ab6b4fc drawbar: Don't shadow sw global
This jarred me a bit while reading the code, since "sw" usually refers
to the global screen geometry, but in drawbar() only it refers to
text-related geometry. Renaming it makes it more obvious that these are
not related.
2020-04-22 20:33:39 +02:00
Chris Down f087d20e6e getatomprop: Add forward declaration
No functional changes, but for every other function we have a forward
declaration here. getatomprop should be no exception.
2020-04-22 20:33:26 +02:00
Chris Down a8e9513783 setmfact: Unify bounds for compile-time and runtime mfact
There are two places that mfact can be set:

- In the mfact global, which is defined at compile time and passed
  into m->mfact during monitor setup. No bounds checks are performed,
  but the comment alongside it says that valid values are [0.05..0.95]:

      static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */

- By setmfact, which adjusts m->mfact at runtime. It also does some
  minimum and maximum bounds checks, allowing [0.1..0.9]. Values outside
  of that range are ignored, and mfact is not adjusted.

These different thresholds mean that one cannot setmfact 0.95 or 0.05,
despite the comment above that lists the legal range for mfact.

Clarify this by enforcing the same bounds in setmfact at runtime as
those listed for mfact at compile time.
2020-04-20 17:56:41 +02:00
Hiltjo Posthuma c82db690cc config.mk: fix POSIX_C_SOURCE macro for feature test for snprintf()
The feature test was incorrect:
_POSIX_C_SOURCE=2

"The value 2 or greater additionally exposes definitions for POSIX.2-1992."
http://man7.org/linux/man-pages/man7/feature_test_macros.7.html

A higher value is needed (atleast 1995):
https://pubs.opengroup.org/onlinepubs/9699919799/functions/snprintf.html

FreeBSD feature test macro:
on
https://github.com/freebsd/freebsd/blob/master/include/stdio.h line 297

This was already fixed in dmenu.

This fixes a warning on FreeBSD, reported by Plasmoduck on IRC, thanks.
2020-04-03 15:36:32 +02:00
Anselm R Garbe cb3f58ad06 Prepare 6.2 release. 2019-02-02 04:50:42 -08:00