Commit Graph

1722 Commits

Author SHA1 Message Date
Sheldon Lee
8ed3417a0d Added configuration option.
this is so it works with commit 138b405f0c
2021-12-21 22:49:10 +08:00
Sheldon Lee
8c144824cb Merge remote-tracking branch 'suckless/master' 2021-12-21 22:12:26 +08:00
Sheldon Lee
409a9dfcfa Adapted center first now works with Pertag. 2021-12-21 21:54:13 +08:00
Sheldon Lee
4a8274e7b0 Pointer warps only on monitor change. 2021-12-21 17:04:42 +08:00
Sheldon Lee
27666c8a81 Applied cursorwarp patch for multimonitor. 2021-12-21 16:44:08 +08:00
Chris Down
8657affa2a 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-19 16:16:30 +01:00
Sheldon Lee
86099dc671 Color changes. 2021-12-11 02:57:20 +08:00
Sheldon Lee
a88bcadf53 Applied pertag patch. 2021-11-20 17:05:14 +08:00
Sheldon Lee
ccb185455c Updated appearance. 2021-11-17 18:30:38 +08:00
sheldonmlee
ca11036e83 Updated rules. 2021-11-09 01:41:58 +08:00
sheldonmlee
f18f8bb346 Updated rofi command. 2021-11-04 02:27:04 +08:00
sheldonmlee
7c60b0a79c Add toggle for first window centering. 2021-10-23 19:29:45 +08:00
sheldonmlee
1a9dc79b92 Added patches that have been applied. 2021-10-22 04:01:43 +08:00
sheldonmlee
483b8be753 Added center patch, along with own modifications.
Tiled layout now horizontally centers windows with iscentered rule, if
it is the only window.
2021-10-22 03:59:38 +08:00
sheldonmlee
396367b271 Changed bindings and updated rules. 2021-09-11 22:32:04 +08:00
Hiltjo Posthuma
a786211d6c Revert "Improve speed of drw_text when provided with large strings"
This reverts commit 716233534b.

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-08-20 23:09:48 +02:00
Miles Alan
716233534b 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-08-09 18:25:19 +02:00
Quentin Rameau
138b405f0c 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-14 11:26:37 +02:00
sheldonmlee
38abd88af0 Merge branch 'master' of github.com:sheldonmlee/dwm 2021-07-13 16:36:11 +08:00
sheldonmlee
0408655223 Added rule for lutris. 2021-07-13 16:35:56 +08:00
Sheldon Lee
d702fa7877 Changed window class name for firefox rule. 2021-07-13 15:03:59 +08:00
Sheldon Lee
7737b001e6 Fixed syntax error. 2021-07-13 15:03:18 +08:00
sheldonmlee
2f0b477545 Added gaming mode.
This disables dwm's handling of modifier combos, so you can use them in
game without conflict.
2021-07-07 20:35:50 +08:00
sheldonmlee
1b5d39f394 Updated bindings. 2021-05-23 20:48:31 +08:00
sheldonmlee
07279cd4d3 Added toggle layout functionality. 2021-05-23 14:00:10 +08:00
sheldonmlee
1560fd35ca Added/changed keybinds for scripts, layouts and slock.
Added keybind for slock.
Added keybind for all.sh script.
Changed monocle layout keybind to toggle.
Added keybind for Centered Master layout.
2021-05-23 13:57:22 +08:00
sheldonmlee
f664f84e42 Added centered master layout patch. 2021-05-17 17:27:51 +08:00
sheldonmlee
efbd9a57cd Changed "tag all" keybind. 2021-05-16 22:36:38 +08:00
Chris Down
67d76bdc68 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-03-29 19:16:27 +02:00
sheldonmlee
9494dbdbeb Changed font for rofi command. 2021-03-22 14:58:15 +08:00
sheldonmlee
a2ef6d4ad1 Added rules for Unreal Engine. 2021-03-02 20:00:04 +08:00
sheldonmlee
fb2f5cfd77 Bound screenshot key. 2021-02-18 22:30:11 +08:00
sheldonmlee
f2aa477991 Changed autostart script path. 2021-02-18 22:29:33 +08:00
sheldonmlee
00fa39aa16 Added autostart patch and changed path. 2021-02-18 21:45:04 +08:00
sheldonmlee
3493048508 Applied patch 'dwm-fixborders-6.2.diff'. 2021-02-18 21:30:32 +08:00
sheldonmlee
1516ccab62 Added config.h 2021-02-18 21:09:17 +08:00
sheldonmlee
d7797770d9 renamed README.md 2021-02-18 21:09:00 +08: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
Hiltjo Posthuma
b69c870a30 pledge: add rpath promise for the ugly Xft font fallback 2018-06-02 17:15:42 +02:00
Hiltjo Posthuma
e78b4a9207 Makefile: just show the compiler output
Don't be fancy and just show the actual output so debugging is simpler.
2018-06-02 17:10:28 +02:00
Klemens Nanni
3cd4023fb3 Do not strip at link stage
Building with debug symbols is worthless unless LDFLAGS are manually
adjusted as well.
2018-06-02 16:56:10 +02:00
Klemens Nanni
f40f86fa87 Pledge on OpenBSD 2018-05-25 11:49:30 +02:00