aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/.local/bin/scripts/alert3
-rwxr-xr-xbin/.local/bin/scripts/backup.sh50
-rw-r--r--bin/.local/bin/scripts/bell.mp3bin0 -> 30856 bytes
-rwxr-xr-xbin/.local/bin/scripts/cht.sh13
-rwxr-xr-xbin/.local/bin/scripts/countdownbin0 -> 2639624 bytes
-rwxr-xr-xbin/.local/bin/scripts/daily.sh16
-rwxr-xr-xbin/.local/bin/scripts/directory_navigator34
-rwxr-xr-xbin/.local/bin/scripts/dired_selector10
-rwxr-xr-xbin/.local/bin/scripts/dmenuunicode18
-rw-r--r--bin/.local/bin/scripts/dzen2.sh31
-rw-r--r--bin/.local/bin/scripts/emacs-theme.el10
-rwxr-xr-xbin/.local/bin/scripts/emacs/emacs-daemon.sh121
-rw-r--r--bin/.local/bin/scripts/emacs/show-agenda.el16
-rwxr-xr-xbin/.local/bin/scripts/emacs/show-agenda.sh4
-rw-r--r--bin/.local/bin/scripts/emacs/youtube.el10
-rwxr-xr-xbin/.local/bin/scripts/maimpick14
-rw-r--r--bin/.local/bin/scripts/rss.py43
-rwxr-xr-xbin/.local/bin/scripts/school-video29
-rwxr-xr-xbin/.local/bin/scripts/scratch.sh21
-rwxr-xr-xbin/.local/bin/scripts/startpage.sh1
-rwxr-xr-xbin/.local/bin/scripts/status/battery.sh35
-rwxr-xr-xbin/.local/bin/scripts/status/brightness.sh57
-rwxr-xr-xbin/.local/bin/scripts/status/internet33
-rwxr-xr-xbin/.local/bin/scripts/status/mediaplayer149
-rwxr-xr-xbin/.local/bin/scripts/status/memory12
-rwxr-xr-xbin/.local/bin/scripts/status/player39
-rwxr-xr-xbin/.local/bin/scripts/status/volume39
-rwxr-xr-xbin/.local/bin/scripts/status/volume-pulseaudio180
-rwxr-xr-xbin/.local/bin/scripts/status/weather54
-rwxr-xr-xbin/.local/bin/scripts/theme-switch.sh98
-rwxr-xr-xbin/.local/bin/scripts/tmux-sessionizer26
-rwxr-xr-xbin/.local/bin/scripts/wallpaper.sh34
-rwxr-xr-xbin/.local/bin/scripts/webcam3
-rw-r--r--bin/.local/bin/scripts/youtube.py22
-rwxr-xr-xbin/.local/bin/scripts/youtube.sh25
-rw-r--r--dwm/.config/dunst/dunstrc437
-rw-r--r--dwm/Repositories/dmenu/LICENSE30
-rw-r--r--dwm/Repositories/dmenu/Makefile58
-rw-r--r--dwm/Repositories/dmenu/README24
-rw-r--r--dwm/Repositories/dmenu/arg.h49
-rw-r--r--dwm/Repositories/dmenu/config.def.h28
-rw-r--r--dwm/Repositories/dmenu/config.def.h.orig25
-rw-r--r--dwm/Repositories/dmenu/config.h29
-rw-r--r--dwm/Repositories/dmenu/config.mk32
-rwxr-xr-xdwm/Repositories/dmenu/dmenubin0 -> 43840 bytes
-rw-r--r--dwm/Repositories/dmenu/dmenu-border-20230512-0fe460d.diff36
-rw-r--r--dwm/Repositories/dmenu/dmenu-center-5.2.diff104
-rw-r--r--dwm/Repositories/dmenu/dmenu-lineheight-5.2.diff106
-rw-r--r--dwm/Repositories/dmenu/dmenu-xresources-4.9.diff126
-rw-r--r--dwm/Repositories/dmenu/dmenu.1197
-rw-r--r--dwm/Repositories/dmenu/dmenu.c886
-rw-r--r--dwm/Repositories/dmenu/dmenu.c.orig826
-rw-r--r--dwm/Repositories/dmenu/dmenu.obin0 -> 36400 bytes
-rwxr-xr-xdwm/Repositories/dmenu/dmenu_path13
-rwxr-xr-xdwm/Repositories/dmenu/dmenu_run2
-rw-r--r--dwm/Repositories/dmenu/drw.c451
-rw-r--r--dwm/Repositories/dmenu/drw.h58
-rw-r--r--dwm/Repositories/dmenu/drw.obin0 -> 10872 bytes
-rwxr-xr-xdwm/Repositories/dmenu/stestbin0 -> 16888 bytes
-rw-r--r--dwm/Repositories/dmenu/stest.190
-rw-r--r--dwm/Repositories/dmenu/stest.c109
-rw-r--r--dwm/Repositories/dmenu/stest.obin0 -> 4952 bytes
-rw-r--r--dwm/Repositories/dmenu/util.c36
-rw-r--r--dwm/Repositories/dmenu/util.h9
-rw-r--r--dwm/Repositories/dmenu/util.obin0 -> 2080 bytes
-rw-r--r--dwm/Repositories/dmenu/zen.h28
-rw-r--r--dwm/Repositories/luke-dwm/FUNDING.yml2
-rw-r--r--dwm/Repositories/luke-dwm/LICENSE38
-rw-r--r--dwm/Repositories/luke-dwm/Makefile50
-rw-r--r--dwm/Repositories/luke-dwm/PKGBUILD44
-rw-r--r--dwm/Repositories/luke-dwm/README.md36
-rw-r--r--dwm/Repositories/luke-dwm/config.h261
-rw-r--r--dwm/Repositories/luke-dwm/config.mk39
-rw-r--r--dwm/Repositories/luke-dwm/drw.c453
-rw-r--r--dwm/Repositories/luke-dwm/drw.h58
-rw-r--r--dwm/Repositories/luke-dwm/drw.obin0 -> 11008 bytes
-rwxr-xr-xdwm/Repositories/luke-dwm/dwmbin0 -> 89656 bytes
-rw-r--r--dwm/Repositories/luke-dwm/dwm.1213
-rw-r--r--dwm/Repositories/luke-dwm/dwm.c2686
-rw-r--r--dwm/Repositories/luke-dwm/dwm.obin0 -> 84560 bytes
-rw-r--r--dwm/Repositories/luke-dwm/larbs.mom362
-rw-r--r--dwm/Repositories/luke-dwm/shiftview.c65
-rw-r--r--dwm/Repositories/luke-dwm/transient.c42
-rw-r--r--dwm/Repositories/luke-dwm/util.c36
-rw-r--r--dwm/Repositories/luke-dwm/util.h8
-rw-r--r--dwm/Repositories/luke-dwm/util.obin0 -> 2080 bytes
-rw-r--r--dwm/Repositories/luke-dwm/vanitygaps.c550
-rw-r--r--dwm/Repositories/luke-dwmblocks/.gitignore53
-rw-r--r--dwm/Repositories/luke-dwmblocks/FUNDING.yml3
-rw-r--r--dwm/Repositories/luke-dwmblocks/LICENSE339
-rw-r--r--dwm/Repositories/luke-dwmblocks/Makefile19
-rw-r--r--dwm/Repositories/luke-dwmblocks/README.md44
-rw-r--r--dwm/Repositories/luke-dwmblocks/config.h47
-rw-r--r--dwm/Repositories/luke-dwmblocks/dwmblocks.c295
-rw-r--r--dwm/Repositories/luke-dwmblocks/patches/dwmblocks-statuscmd-fork.diff77
-rw-r--r--dwm/Repositories/luke-dwmblocks/patches/dwmblocks-statuscmd-signal.diff93
-rw-r--r--dwm/Repositories/st/FUNDING.yml2
-rw-r--r--dwm/Repositories/st/LICENSE34
-rw-r--r--dwm/Repositories/st/Makefile62
-rw-r--r--dwm/Repositories/st/PKGBUILD45
-rw-r--r--dwm/Repositories/st/README.md89
-rw-r--r--dwm/Repositories/st/Xdefaults128
-rw-r--r--dwm/Repositories/st/arg.h50
-rw-r--r--dwm/Repositories/st/boxdraw.c194
-rw-r--r--dwm/Repositories/st/boxdraw_data.h214
-rw-r--r--dwm/Repositories/st/config.h558
-rw-r--r--dwm/Repositories/st/config.mk37
-rw-r--r--dwm/Repositories/st/hb.c154
-rw-r--r--dwm/Repositories/st/hb.h7
-rwxr-xr-xdwm/Repositories/st/st-copyout13
-rwxr-xr-xdwm/Repositories/st/st-urlhandler19
-rw-r--r--dwm/Repositories/st/st.1193
-rw-r--r--dwm/Repositories/st/st.c2816
-rw-r--r--dwm/Repositories/st/st.h146
-rw-r--r--dwm/Repositories/st/st.info239
-rw-r--r--dwm/Repositories/st/win.h42
-rw-r--r--dwm/Repositories/st/x.c2366
-rw-r--r--fonts/iosevka-comfy/LICENSE.md135
-rw-r--r--fonts/iosevka-comfy/README.md177
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-bold.ttfbin0 -> 5453228 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-bolditalic.ttfbin0 -> 5916544 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-extrabold.ttfbin0 -> 5450172 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-extrabolditalic.ttfbin0 -> 5917588 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-italic.ttfbin0 -> 5917612 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-light.ttfbin0 -> 5449460 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-lightitalic.ttfbin0 -> 5953408 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-regular.ttfbin0 -> 5449148 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-semilight.ttfbin0 -> 5448908 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-semilightitalic.ttfbin0 -> 5921240 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-bold.ttfbin0 -> 8433396 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-bolditalic.ttfbin0 -> 9040840 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-extrabold.ttfbin0 -> 8613308 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-extrabolditalic.ttfbin0 -> 9192472 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-italic.ttfbin0 -> 8866876 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-light.ttfbin0 -> 8295104 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-lightitalic.ttfbin0 -> 9016796 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-regular.ttfbin0 -> 8280656 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-semilight.ttfbin0 -> 8342764 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-semilightitalic.ttfbin0 -> 8958592 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-bold.ttfbin0 -> 3213356 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-bolditalic.ttfbin0 -> 3377540 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-extrabold.ttfbin0 -> 3220264 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-extrabolditalic.ttfbin0 -> 3385012 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-italic.ttfbin0 -> 3390716 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-light.ttfbin0 -> 3253312 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-lightitalic.ttfbin0 -> 3405124 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-regular.ttfbin0 -> 3226312 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-semilight.ttfbin0 -> 3237452 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-semilightitalic.ttfbin0 -> 3397620 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-bold.ttfbin0 -> 4687228 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-bolditalic.ttfbin0 -> 4881956 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-extrabold.ttfbin0 -> 4707652 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-extrabolditalic.ttfbin0 -> 4899972 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-italic.ttfbin0 -> 4903564 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-light.ttfbin0 -> 4731060 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-lightitalic.ttfbin0 -> 4924652 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-regular.ttfbin0 -> 4722844 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-semilight.ttfbin0 -> 4704944 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-semilightitalic.ttfbin0 -> 4905860 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-bold.ttfbin0 -> 5522136 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-bolditalic.ttfbin0 -> 5953260 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-extrabold.ttfbin0 -> 5523136 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-extrabolditalic.ttfbin0 -> 5970544 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-italic.ttfbin0 -> 5956184 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-light.ttfbin0 -> 5484040 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-lightitalic.ttfbin0 -> 5976780 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-regular.ttfbin0 -> 5503892 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-semilight.ttfbin0 -> 5498896 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-semilightitalic.ttfbin0 -> 5949904 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-bold.ttfbin0 -> 8605512 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-bolditalic.ttfbin0 -> 9168368 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-extrabold.ttfbin0 -> 8740348 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-extrabolditalic.ttfbin0 -> 9329452 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-italic.ttfbin0 -> 8977944 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-light.ttfbin0 -> 8505588 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-lightitalic.ttfbin0 -> 9162580 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-regular.ttfbin0 -> 8434428 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-semilight.ttfbin0 -> 8476880 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-semilightitalic.ttfbin0 -> 9055116 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-bold.ttfbin0 -> 3252796 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-bolditalic.ttfbin0 -> 3396436 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-extrabold.ttfbin0 -> 3246908 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-extrabolditalic.ttfbin0 -> 3389488 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-italic.ttfbin0 -> 3411248 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-light.ttfbin0 -> 3263852 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-lightitalic.ttfbin0 -> 3405276 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-regular.ttfbin0 -> 3259224 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-semilight.ttfbin0 -> 3263580 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-semilightitalic.ttfbin0 -> 3412928 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-bold.ttfbin0 -> 4781040 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-bolditalic.ttfbin0 -> 4939764 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-extrabold.ttfbin0 -> 4787432 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-extrabolditalic.ttfbin0 -> 4945472 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-italic.ttfbin0 -> 4942932 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-light.ttfbin0 -> 4873916 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-lightitalic.ttfbin0 -> 5002596 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-regular.ttfbin0 -> 4786272 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-semilight.ttfbin0 -> 4809028 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-semilightitalic.ttfbin0 -> 4961300 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-bold.ttfbin0 -> 4032128 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-bolditalic.ttfbin0 -> 4226048 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-extrabold.ttfbin0 -> 4024448 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-extrabolditalic.ttfbin0 -> 4228820 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-italic.ttfbin0 -> 4241104 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-light.ttfbin0 -> 4036812 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-lightitalic.ttfbin0 -> 4242968 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-regular.ttfbin0 -> 4033896 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-semilight.ttfbin0 -> 4038748 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-semilightitalic.ttfbin0 -> 4242852 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-bold.ttfbin0 -> 6057684 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-bolditalic.ttfbin0 -> 6258820 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-extrabold.ttfbin0 -> 6067224 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-extrabolditalic.ttfbin0 -> 6275428 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-italic.ttfbin0 -> 6220572 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-light.ttfbin0 -> 6099060 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-lightitalic.ttfbin0 -> 6245992 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-regular.ttfbin0 -> 6014928 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-semilight.ttfbin0 -> 6030316 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-semilightitalic.ttfbin0 -> 6232608 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-bold.ttfbin0 -> 5536732 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-bolditalic.ttfbin0 -> 5947848 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-extrabold.ttfbin0 -> 5561084 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-extrabolditalic.ttfbin0 -> 5939368 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-italic.ttfbin0 -> 5962120 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-light.ttfbin0 -> 5507132 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-lightitalic.ttfbin0 -> 5952252 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-regular.ttfbin0 -> 5552484 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-semilight.ttfbin0 -> 5544116 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-semilightitalic.ttfbin0 -> 5962692 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-bold.ttfbin0 -> 8513920 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-bolditalic.ttfbin0 -> 9007428 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-extrabold.ttfbin0 -> 8697528 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-extrabolditalic.ttfbin0 -> 9187708 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-italic.ttfbin0 -> 8824968 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-light.ttfbin0 -> 8351796 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-lightitalic.ttfbin0 -> 8939636 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-regular.ttfbin0 -> 8327476 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-semilight.ttfbin0 -> 8428636 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-semilightitalic.ttfbin0 -> 9037960 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-bold.ttfbin0 -> 3230280 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-bolditalic.ttfbin0 -> 3379816 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-extrabold.ttfbin0 -> 3215880 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-extrabolditalic.ttfbin0 -> 3372680 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-italic.ttfbin0 -> 3399644 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-light.ttfbin0 -> 3258804 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-lightitalic.ttfbin0 -> 3404456 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-regular.ttfbin0 -> 3247088 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-semilight.ttfbin0 -> 3247848 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-semilightitalic.ttfbin0 -> 3400800 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-bold.ttfbin0 -> 4620688 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-bolditalic.ttfbin0 -> 4806224 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-extrabold.ttfbin0 -> 4611896 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-extrabolditalic.ttfbin0 -> 4814752 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-italic.ttfbin0 -> 4817772 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-light.ttfbin0 -> 4685232 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-lightitalic.ttfbin0 -> 4844196 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-regular.ttfbin0 -> 4639268 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-semilight.ttfbin0 -> 4639420 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-semilightitalic.ttfbin0 -> 4900548 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-bold.ttfbin0 -> 5600040 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-bolditalic.ttfbin0 -> 5979220 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-extrabold.ttfbin0 -> 5600052 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-extrabolditalic.ttfbin0 -> 5979140 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-italic.ttfbin0 -> 6002512 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-light.ttfbin0 -> 5513856 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-lightitalic.ttfbin0 -> 5994128 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-regular.ttfbin0 -> 5549092 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-semilight.ttfbin0 -> 5520328 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-semilightitalic.ttfbin0 -> 6007880 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-bold.ttfbin0 -> 8688280 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-bolditalic.ttfbin0 -> 9108872 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-extrabold.ttfbin0 -> 8805704 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-extrabolditalic.ttfbin0 -> 9308936 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-italic.ttfbin0 -> 8952880 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-light.ttfbin0 -> 8401200 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-lightitalic.ttfbin0 -> 9052808 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-regular.ttfbin0 -> 8382316 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-semilight.ttfbin0 -> 8403832 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-semilightitalic.ttfbin0 -> 9039564 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-bold.ttfbin0 -> 3249784 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-bolditalic.ttfbin0 -> 3383392 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-extrabold.ttfbin0 -> 3241732 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-extrabolditalic.ttfbin0 -> 3380076 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-italic.ttfbin0 -> 3418800 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-light.ttfbin0 -> 3287160 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-lightitalic.ttfbin0 -> 3410580 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-regular.ttfbin0 -> 3267468 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-semilight.ttfbin0 -> 3271476 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-semilightitalic.ttfbin0 -> 3405788 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-bold.ttfbin0 -> 4715472 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-bolditalic.ttfbin0 -> 4847016 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-extrabold.ttfbin0 -> 4727824 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-extrabolditalic.ttfbin0 -> 4871624 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-italic.ttfbin0 -> 4884312 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-light.ttfbin0 -> 4749728 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-lightitalic.ttfbin0 -> 4883104 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-regular.ttfbin0 -> 4688712 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-semilight.ttfbin0 -> 4762356 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-semilightitalic.ttfbin0 -> 4878260 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-bold.ttfbin0 -> 4069972 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-bolditalic.ttfbin0 -> 4241440 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-extrabold.ttfbin0 -> 4058196 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-extrabolditalic.ttfbin0 -> 4238640 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-italic.ttfbin0 -> 4255596 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-light.ttfbin0 -> 4084432 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-lightitalic.ttfbin0 -> 4253668 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-regular.ttfbin0 -> 4064064 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-semilight.ttfbin0 -> 4068924 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-semilightitalic.ttfbin0 -> 4247532 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-bold.ttfbin0 -> 6002080 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-bolditalic.ttfbin0 -> 6161404 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-extrabold.ttfbin0 -> 6052576 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-extrabolditalic.ttfbin0 -> 6225608 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-italic.ttfbin0 -> 6123920 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-light.ttfbin0 -> 5955288 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-lightitalic.ttfbin0 -> 6127196 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-regular.ttfbin0 -> 5895136 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-semilight.ttfbin0 -> 5969240 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-semilightitalic.ttfbin0 -> 6123340 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-bold.ttfbin0 -> 4045068 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-bolditalic.ttfbin0 -> 4233776 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-extrabold.ttfbin0 -> 4029768 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-extrabolditalic.ttfbin0 -> 4224548 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-italic.ttfbin0 -> 4251556 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-light.ttfbin0 -> 4057272 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-lightitalic.ttfbin0 -> 4254704 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-regular.ttfbin0 -> 4046764 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-semilight.ttfbin0 -> 4046904 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-semilightitalic.ttfbin0 -> 4251864 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-bold.ttfbin0 -> 5929884 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-bolditalic.ttfbin0 -> 6144632 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-extrabold.ttfbin0 -> 5918128 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-extrabolditalic.ttfbin0 -> 6150016 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-italic.ttfbin0 -> 6068256 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-light.ttfbin0 -> 5886788 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-lightitalic.ttfbin0 -> 6100036 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-regular.ttfbin0 -> 5838940 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-semilight.ttfbin0 -> 5844612 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-semilightitalic.ttfbin0 -> 6155320 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-bold.ttfbin0 -> 3999740 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-bolditalic.ttfbin0 -> 4207396 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-extrabold.ttfbin0 -> 3995872 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-extrabolditalic.ttfbin0 -> 4217844 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-italic.ttfbin0 -> 4219640 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-light.ttfbin0 -> 4026576 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-lightitalic.ttfbin0 -> 4239820 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-regular.ttfbin0 -> 4008992 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-semilight.ttfbin0 -> 4008540 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-semilightitalic.ttfbin0 -> 4223872 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-bold.ttfbin0 -> 5960768 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-bolditalic.ttfbin0 -> 6193924 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-extrabold.ttfbin0 -> 5972876 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-extrabolditalic.ttfbin0 -> 6218316 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-italic.ttfbin0 -> 6168576 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-light.ttfbin0 -> 5947080 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-lightitalic.ttfbin0 -> 6198852 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-regular.ttfbin0 -> 5986736 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-semilight.ttfbin0 -> 5919312 bytes
-rw-r--r--fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-semilightitalic.ttfbin0 -> 6169028 bytes
-rw-r--r--fonts/iosevka-comfy/private-build-plans.toml898
-rw-r--r--i3/.config/i3/autostart16
-rw-r--r--i3/.config/i3/colors36
-rw-r--r--i3/.config/i3/config69
-rw-r--r--i3/.config/i3/gaps5
-rw-r--r--i3/.config/i3/keybinds65
-rw-r--r--i3/.config/i3/winsettings91
-rw-r--r--i3/.config/i3status/config56
-rw-r--r--mbsync/.mbsyncrc42
-rw-r--r--misc/userChrome.css267
-rw-r--r--msmtp/.config/msmtp/config16
-rw-r--r--shell/.bash_aliases36
-rw-r--r--shell/.bashrc85
-rw-r--r--tmux/.config/tmux/tmux.conf38
-rw-r--r--urxvt/Repositories/URxvt-themes/And yet another random36
-rw-r--r--urxvt/Repositories/URxvt-themes/DebianThemeURxvt58
-rw-r--r--urxvt/Repositories/URxvt-themes/Good rainbow55
-rw-r--r--urxvt/Repositories/URxvt-themes/HomeMade Cotton Candy56
-rw-r--r--urxvt/Repositories/URxvt-themes/Jelly Beans yo45
-rw-r--r--urxvt/Repositories/URxvt-themes/LightPurpleGreen53
-rw-r--r--urxvt/Repositories/URxvt-themes/README.md110
-rw-r--r--urxvt/Repositories/URxvt-themes/a new one40
-rw-r--r--urxvt/Repositories/URxvt-themes/a theme49
-rw-r--r--urxvt/Repositories/URxvt-themes/all colorful and stuff56
-rw-r--r--urxvt/Repositories/URxvt-themes/arch dude remix39
-rw-r--r--urxvt/Repositories/URxvt-themes/black blue space33
-rw-r--r--urxvt/Repositories/URxvt-themes/blue white purpe calm51
-rw-r--r--urxvt/Repositories/URxvt-themes/brown slug44
-rw-r--r--urxvt/Repositories/URxvt-themes/calm girl55
-rw-r--r--urxvt/Repositories/URxvt-themes/dark violet good30
-rw-r--r--urxvt/Repositories/URxvt-themes/fall19
-rw-r--r--urxvt/Repositories/URxvt-themes/fall green45
-rw-r--r--urxvt/Repositories/URxvt-themes/gray blue chill brah43
-rw-r--r--urxvt/Repositories/URxvt-themes/green white URxvt50
-rw-r--r--urxvt/Repositories/URxvt-themes/holiday pine50
-rw-r--r--urxvt/Repositories/URxvt-themes/i have no name56
-rw-r--r--urxvt/Repositories/URxvt-themes/i'm not gentoo26
-rw-r--r--urxvt/Repositories/URxvt-themes/julie27
-rw-r--r--urxvt/Repositories/URxvt-themes/light dark27
-rw-r--r--urxvt/Repositories/URxvt-themes/mix a lot19
-rw-r--r--urxvt/Repositories/URxvt-themes/never-seen/g35
-rw-r--r--urxvt/Repositories/URxvt-themes/pretty49
-rw-r--r--urxvt/Repositories/URxvt-themes/purplish52
-rw-r--r--urxvt/Repositories/URxvt-themes/rando light purp67
-rw-r--r--urxvt/Repositories/URxvt-themes/rando mac39
-rw-r--r--urxvt/Repositories/URxvt-themes/ronery flower56
-rw-r--r--urxvt/Repositories/URxvt-themes/smooth white blue34
-rw-r--r--urxvt/Repositories/URxvt-themes/something44
-rw-r--r--urxvt/Repositories/URxvt-themes/the arch dude37
-rw-r--r--urxvt/Repositories/URxvt-themes/tree bark56
-rw-r--r--urxvt/Repositories/URxvt-themes/tree green brown41
-rw-r--r--urxvt/Repositories/urxvt-perls/LICENSE339
-rw-r--r--urxvt/Repositories/urxvt-perls/README.md45
-rw-r--r--urxvt/Repositories/urxvt-perls/deprecated/README.md87
-rw-r--r--urxvt/Repositories/urxvt-perls/deprecated/clipboard115
-rw-r--r--urxvt/Repositories/urxvt-perls/deprecated/url-select408
-rw-r--r--urxvt/Repositories/urxvt-perls/keyboard-select606
-rw-r--r--xorg/.Xmodmap3
-rw-r--r--xorg/.config/picom/picom.conf530
-rw-r--r--xorg/.urxvt/ext/resize-font170
-rw-r--r--xorg/.xinitrc67
-rw-r--r--xorg/.xprofile1
-rw-r--r--xorg/Xresources.melissa-dark34
-rw-r--r--xorg/Xresources.operandi34
-rw-r--r--xorg/Xresources.spring34
-rw-r--r--xorg/Xresources.vivendi34
425 files changed, 24581 insertions, 0 deletions
diff --git a/bin/.local/bin/scripts/alert b/bin/.local/bin/scripts/alert
new file mode 100755
index 0000000..d9e418f
--- /dev/null
+++ b/bin/.local/bin/scripts/alert
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+paplay --volume=40000 $HOME/.local/bin/scripts/bell.mp3
diff --git a/bin/.local/bin/scripts/backup.sh b/bin/.local/bin/scripts/backup.sh
new file mode 100755
index 0000000..acf6ad8
--- /dev/null
+++ b/bin/.local/bin/scripts/backup.sh
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+# Set paths
+SOURCE_DIRS=(
+ "/home/bard/Pictures/"
+ "/home/bard/Documents/"
+ "/home/bard/Code/"
+ "/home/bard/Notes/"
+ "/home/bard/Playlists/"
+ "/home/bard/Repositories/"
+ "/home/bard/Music/"
+ "/home/bard/Videos/"
+)
+
+DESTINATION_BASE="/mnt/hdd/"
+LOG_FILE="/mnt/hdd/backup.log"
+LOG_STATUS_FILE="/mnt/hdd/backup_status.log"
+ICON_PATH="/usr/share/icons/gnome/16x16/devices/drive-harddisk.png"
+
+# Log start time
+echo "Backup started at $(date)" >> "$LOG_FILE"
+notify-send -i $ICON_PATH "Backup started at $(date)"
+
+# Run rsync for each source directory
+for SOURCE_DIR in "${SOURCE_DIRS[@]}"; do
+ DESTINATION_DIR="$DESTINATION_BASE$(basename "$SOURCE_DIR")"
+ rsync -avuP "$SOURCE_DIR" "$DESTINATION_DIR" >> "$LOG_FILE" 2>&1
+ # rsync -avuPn "$SOURCE_DIR" "$DESTINATION_DIR" >> "$LOG_FILE" 2>&1
+done
+
+# Display summary made for notifications
+NOTIF_SUMMARY=""
+for SOURCE_DIR in "${SOURCE_DIRS[@]}"; do
+ DESTINATION_DIR="$DESTINATION_BASE$(basename "$SOURCE_DIR")"
+ BACKUP_SIZE=$(du -sh "$DESTINATION_DIR" | cut -f1)
+ NOTIF_SUMMARY+="$(basename "$SOURCE_DIR"): $BACKUP_SIZE\n"
+done
+
+# Display summary made for log file
+LOG_SUMMARY=""
+for SOURCE_DIR in "${SOURCE_DIRS[@]}"; do
+ DESTINATION_DIR="$DESTINATION_BASE$(basename "$SOURCE_DIR")"
+ BACKUP_SIZE=$(du -sh "$DESTINATION_DIR" | cut -f1)
+ LOG_SUMMARY+="$(basename "$SOURCE_DIR"): $BACKUP_SIZE\n"
+done
+
+# Log end time and display completion message with summary
+echo -e "\nBackup Summary:\n$NOTIF_SUMMARY" >> "$LOG_FILE"
+notify-send -i "$ICON_PATH" "Backup completed at $(date)" "$NOTIF_SUMMARY"
+echo -e "Most recent backup $(date)\n$LOG_SUMMARY" >> "$LOG_STATUS_FILE"
diff --git a/bin/.local/bin/scripts/bell.mp3 b/bin/.local/bin/scripts/bell.mp3
new file mode 100644
index 0000000..cac0ece
--- /dev/null
+++ b/bin/.local/bin/scripts/bell.mp3
Binary files differ
diff --git a/bin/.local/bin/scripts/cht.sh b/bin/.local/bin/scripts/cht.sh
new file mode 100755
index 0000000..bec30aa
--- /dev/null
+++ b/bin/.local/bin/scripts/cht.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+languages=$(echo "cpp clojure haskell ocaml python typescript" | tr " " "\n")
+core_utils=$(echo "find xargs sed awk" | tr " " "\n")
+
+selected=$(echo -e "$languages\n$core_utils" | fzf)
+read -p "query: " query
+
+if echo "$languages" | grep -qs $selected; then
+ tmux split-window -h bash -c "curl cht.sh/$selected/$(echo "$query" | tr " " "+") | less"
+else
+ curl cht.sh/$selected~$query
+fi
diff --git a/bin/.local/bin/scripts/countdown b/bin/.local/bin/scripts/countdown
new file mode 100755
index 0000000..8188637
--- /dev/null
+++ b/bin/.local/bin/scripts/countdown
Binary files differ
diff --git a/bin/.local/bin/scripts/daily.sh b/bin/.local/bin/scripts/daily.sh
new file mode 100755
index 0000000..937cff7
--- /dev/null
+++ b/bin/.local/bin/scripts/daily.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# Weather information
+weather_info="Погода $(curl -s wttr.in/?format="%c+%C+%t+%p\n")"
+
+# Top todos from todo.org file under "Important Stuff"
+todos=$(grep -A 100 '^\*\* Important Stuff$' /home/bard/Notes/Org-Roam/todo.org | grep '^\*\*\* TODO' | sed -E 's/^\*\*\* TODO (.+)$/\1/' | sed -E 's/\s*:[^:]+:\s*//g' | sed 's/^/☑ /')
+todos_message="Задачи на сегодня:\n${todos}"
+
+# Most recent backup status
+backup_log="/mnt/hdd/backup_status.log"
+backup_status=$(sed -n '1p; 2,9p' "$backup_log" | tr '\n' '\n')
+
+# Send desktop notification
+notify-send -i ~/.local/share/icons/Glass/cup.png "Доброе Утро Данила" "<b>${weather_info}</b>\n${todos_message}\n${backup_status}"
+echo -e "Доброе Утро Данила" "${weather_info}\n${todos_message}\n${backup_status}"
diff --git a/bin/.local/bin/scripts/directory_navigator b/bin/.local/bin/scripts/directory_navigator
new file mode 100755
index 0000000..2bf01e4
--- /dev/null
+++ b/bin/.local/bin/scripts/directory_navigator
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# Navigate directories with fzf and open a program based on file extension
+
+# Function to navigate directories with fzf
+navigate_directories() {
+ selected_file=$(find "$HOME" -type f | fzf --height=50%)
+ if [ -n "$selected_file" ]; then
+ file_extension="${selected_file##*.}"
+
+ case "$file_extension" in
+ "pdf")
+ zathura "$selected_file"
+ ;;
+ ".org")
+ emacsclient -c "$selected_file"
+ ;;
+ ".png" | ".webp" | ".gif" | ".jpg")
+ nsxiv "$selected_file"
+ ;;
+ *)
+ # Example: open other file types with a default program
+ xdg-open "$selected_file"
+ ;;
+ esac
+ fi
+}
+
+# Main script
+main() {
+ navigate_directories
+}
+
+main
diff --git a/bin/.local/bin/scripts/dired_selector b/bin/.local/bin/scripts/dired_selector
new file mode 100755
index 0000000..ef40af6
--- /dev/null
+++ b/bin/.local/bin/scripts/dired_selector
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+selectable_dirs=("~/Code/" "~/Repositories/" "~/Documents/" "~/Notes/Org-Roam/" "~/Pictures/" "~/Pictures/wallpaper" "~/Pictures/screenshots/" "~/Downloads/" "~/Music/" "~/Playlists/" "~/Videos/" "~/Videos/Youtube/Programming/Prot/" "~/Desktop/" "~/.local/bin/scripts/")
+# Use dmenu to select a directory
+selected_dir=$(printf "%s\n" "${selectable_dirs[@]}" | dmenu -p "Dired here: ")
+
+# Open the selected directory in Emacsclient with Dired mode
+if [ -n "$selected_dir" ]; then
+ emacsclient -c -e "(dired \"$selected_dir\")"
+fi
diff --git a/bin/.local/bin/scripts/dmenuunicode b/bin/.local/bin/scripts/dmenuunicode
new file mode 100755
index 0000000..b444742
--- /dev/null
+++ b/bin/.local/bin/scripts/dmenuunicode
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# The famous "get a menu of emojis to copy" script.
+
+# Get user selection via dmenu from emoji file.
+chosen=$(cut -d ';' -f1 ~/.local/share/fonts/emoji | dmenu -i -l 30 | sed "s/ .*//")
+
+# Exit if none chosen.
+[ -z "$chosen" ] && exit
+
+# If you run this command with an argument, it will automatically insert the
+# character. Otherwise, show a message that the emoji has been copied.
+if [ -n "$1" ]; then
+ xdotool type "$chosen"
+else
+ printf "%s" "$chosen" | xclip -selection clipboard
+ notify-send "'$chosen' copied to clipboard." &
+fi
diff --git a/bin/.local/bin/scripts/dzen2.sh b/bin/.local/bin/scripts/dzen2.sh
new file mode 100644
index 0000000..42e9af6
--- /dev/null
+++ b/bin/.local/bin/scripts/dzen2.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+# Set the font and colors
+FONT="-*-terminus-medium-*-*-*-12-*-*-*-*-*-*-*"
+FG_COLOR="#FFFFFF"
+BG_COLOR="#333333"
+
+# Set the Dzen2 geometry (position and size)
+GEOMETRY="1920x24+0+0"
+
+# Create the Dzen2 bar with specified settings
+dzen2 -fn "$FONT" -fg "$FG_COLOR" -bg "$BG_COLOR" -ta l -w 800 -h 24 -x 0 -y 0 -e "onstart=lower" &
+DZEN_PID=$!
+
+# Function to update the Dzen2 bar
+update_dzen() {
+ while true; do
+ DATE=$(date +"%A, %B %d %Y - %H:%M:%S")
+ echo -e "$DATE"
+ sleep 1
+ done
+}
+
+# Call the update_dzen function to continuously update the bar
+update_dzen | dzen2 -fn "$FONT" -fg "$FG_COLOR" -bg "$BG_COLOR" -x 800 -y 0 -w 1120 -h 24 -ta r -e "onstart=lower"
+
+# Clean up when the script exits
+trap "kill $DZEN_PID" EXIT
+
+# Wait for Dzen2 to finish
+wait
diff --git a/bin/.local/bin/scripts/emacs-theme.el b/bin/.local/bin/scripts/emacs-theme.el
new file mode 100644
index 0000000..4554cc3
--- /dev/null
+++ b/bin/.local/bin/scripts/emacs-theme.el
@@ -0,0 +1,10 @@
+(defun bard/disable-all-themes ()
+ "Disable all active themes."
+ (dolist (i custom-enabled-themes)
+ (disable-theme i)))
+
+(bard/disable-all-themes)
+
+(setq selected-emacs-theme (car command-line-args-left))
+
+(load-theme (intern selected-emacs-theme) t)
diff --git a/bin/.local/bin/scripts/emacs/emacs-daemon.sh b/bin/.local/bin/scripts/emacs/emacs-daemon.sh
new file mode 100755
index 0000000..a5133bd
--- /dev/null
+++ b/bin/.local/bin/scripts/emacs/emacs-daemon.sh
@@ -0,0 +1,121 @@
+#!/bin/bash
+
+set -e
+
+kill_server()
+{
+ local SERVER_DIR="/run/user/1000/emacs/"
+
+ usage()
+ {
+ cat <<EOT
+Usage '$0 kill':
+- -d <dir> or --server-dir <dir>
+ - Specify the directory where Emacs server sockets live, default is '$SERVER_DIR'.
+EOT
+ exit 1
+ }
+
+ while [[ $# -gt 0 ]]; do
+ case "$1" in
+ -d|--server-dir ) shift; SERVER_DIR="$1";;
+ -h|--help ) usage;;
+ * ) usage;;
+ esac
+ shift
+ done
+
+ local -a sockets
+ local socket_name
+
+ mapfile -t sockets < <(command ls -1 "$SERVER_DIR")
+
+ socket_name=$(printf '%s\n' "${sockets[@]}" | dmenu -p "Kill")
+ socket_path="${SERVER_DIR}${socket_name}"
+
+ emacsclient --eval '(kill-emacs)' --socket-name="$socket_path"
+}
+
+start_client()
+{
+
+ local SERVER_DIR="/run/user/1000/emacs/"
+ local DISPLAY_MODE="graphical"
+
+ usage()
+ {
+ cat <<EOT
+Usage '$0 start':
+- -d <dir> or --server-dir <dir>
+ - Specify the directory where Emacs server sockets live, default is '$SERVER_DIR'.
+- -t, -nw, --tty
+ - Create the client frame on the current terminal
+EOT
+ exit 1
+ }
+
+ while [[ $# -gt 0 ]]; do
+ case "$1" in
+ -d|--server-dir ) shift; SERVER_DIR="$1";;
+ -t|-nw|--tty ) DISPLAY_MODE="tty";;
+ -h|--help ) usage;;
+ * ) usage;;
+ esac
+ shift
+ done
+
+ local -a sockets
+ local socket_name
+ local cmd
+
+ if [[ ! -e "$SERVER_DIR" ]]; then
+ mkdir -p "$SERVER_DIR"
+ fi
+
+
+ mapfile -t sockets < <(command ls -1 "$SERVER_DIR")
+ sockets+=("<no-daemon>")
+
+ socket_name=$(printf '%s\n' "${sockets[@]}" | dmenu -p "Connect")
+
+ if [[ "$socket_name" == "<no-daemon>" ]]; then
+ cmd+="emacs"
+ else
+ socket_path="${SERVER_DIR}${socket_name}"
+ cmd+="emacsclient -c -a '' --socket-name=$socket_path"
+ fi
+
+ if [[ "$DISPLAY_MODE" == "tty" ]]; then
+ cmd+=" -t"
+ fi
+
+ eval "$cmd"
+}
+
+
+usage()
+{
+ cat <<EOT
+Usage '$0':
+- start: Choose the Emacs server and start the client to communicate it.
+- kill: Choose the Emacs server to kill.
+EOT
+ exit 1
+}
+
+main()
+{
+ if [[ $# -eq 0 ]]; then
+ usage
+ fi
+
+ case "$1" in
+ start ) shift; start_client "$@";;
+ kill ) shift; kill_server "$@";;
+ help ) usage;;
+ * ) usage;;
+ esac
+}
+
+
+main "$@"
diff --git a/bin/.local/bin/scripts/emacs/show-agenda.el b/bin/.local/bin/scripts/emacs/show-agenda.el
new file mode 100644
index 0000000..a36eb4c
--- /dev/null
+++ b/bin/.local/bin/scripts/emacs/show-agenda.el
@@ -0,0 +1,16 @@
+(org-eval-in-environment (org-make-parameter-alist
+ '(org-agenda-span
+ 'week
+ org-agenda-use-time-grid t
+ org-agenda-remove-tags t
+ org-agenda-window-setup 'nope))
+ (let* ((wins (current-window-configuration))
+ org-agenda-sticky)
+ (save-excursion
+ (with-current-buffer
+ (get-buffer-create org-agenda-buffer-name)
+ (pop-to-buffer (current-buffer))
+ (org-agenda nil "a")
+ (let ((result (buffer-string)))
+ (with-temp-file "~/.agenda" (insert result)))))
+ (set-window-configuration wins)))
diff --git a/bin/.local/bin/scripts/emacs/show-agenda.sh b/bin/.local/bin/scripts/emacs/show-agenda.sh
new file mode 100755
index 0000000..6c2f96e
--- /dev/null
+++ b/bin/.local/bin/scripts/emacs/show-agenda.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+emacsclient -e "$(cat show-agenda.el)"
+cat ~/.agenda
diff --git a/bin/.local/bin/scripts/emacs/youtube.el b/bin/.local/bin/scripts/emacs/youtube.el
new file mode 100644
index 0000000..5d062af
--- /dev/null
+++ b/bin/.local/bin/scripts/emacs/youtube.el
@@ -0,0 +1,10 @@
+(defun play-video-from-clipboard ()
+ "Play a video from the clipboard using mpv."
+ (interactive)
+ (let ((clipboard-contents (shell-command-to-string "xclip -o -selection clipboard")))
+ (if (string-empty-p clipboard-contents)
+ (message "Clipboard is empty.")
+ (let ((python-env "~/.pyvenv/bin/activate"))
+ (shell-command (format "source %s && mpv %s" python-env clipboard-contents))))))
+
+(global-set-key (kbd "C-c p") 'play-video-from-clipboard)
diff --git a/bin/.local/bin/scripts/maimpick b/bin/.local/bin/scripts/maimpick
new file mode 100755
index 0000000..da58635
--- /dev/null
+++ b/bin/.local/bin/scripts/maimpick
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# variables
+output="$(date '+%y%m%d-%H%M-%S').png"
+xclip_cmd="xclip -sel clip -t image/png"
+
+case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)" | dmenu -l 6 -i -p "Screenshot which area?")" in
+ "a selected area") maim -u -s $HOME/Pictures/screenshots/pic-selected-"${output}" ;;
+ "current window") maim -q -d 0.2 -i "$(xdotool getactivewindow)" $HOME/Pictures/screenshots/pic-window-"${output}" ;;
+ "full screen") maim -q -d 0.2 $HOME/Pictures/screenshots/pic-full-"${output}" ;;
+ "a selected area (copy)") maim -u -s | ${xclip_cmd} ;;
+ "current window (copy)") maim -q -d 0.2 -i "$(xdotool getactivewindow)" | ${xclip_cmd} ;;
+ "full screen (copy)") maim -q -d 0.2 | ${xclip_cmd} ;;
+esac
diff --git a/bin/.local/bin/scripts/rss.py b/bin/.local/bin/scripts/rss.py
new file mode 100644
index 0000000..31e7ea9
--- /dev/null
+++ b/bin/.local/bin/scripts/rss.py
@@ -0,0 +1,43 @@
+import requests
+from bs4 import BeautifulSoup
+
+# Function to find RSS feeds on a website
+def find_rss_feeds(url):
+ try:
+ # Send an HTTP GET request to the website
+ response = requests.get(url)
+
+ # Check if the request was successful
+ if response.status_code == 200:
+ # Parse the HTML content of the page using BeautifulSoup
+ soup = BeautifulSoup(response.text, 'html.parser')
+
+ # Search for RSS feed links in the HTML using a common pattern
+ rss_links = []
+ for link in soup.find_all('a', href=True):
+ href = link['href']
+ if 'rss' in href or 'feed' in href or 'xml' in href:
+ rss_links.append(href)
+
+ # If RSS feed links are found, return them
+ if rss_links:
+ return rss_links
+ else:
+ return "No RSS feeds found on this website."
+
+ else:
+ return f"Failed to retrieve the website. Status code: {response.status_code}"
+
+ except requests.exceptions.RequestException as e:
+ return f"Request failed: {e}"
+
+if __name__ == "__main__":
+ website_url = input("Enter the website URL: ")
+ rss_feeds = find_rss_feeds(website_url)
+
+ if isinstance(rss_feeds, list):
+ print("RSS feeds found on the website:")
+ for rss_feed in rss_feeds:
+ print(rss_feed)
+ else:
+ print(rss_feeds)
diff --git a/bin/.local/bin/scripts/school-video b/bin/.local/bin/scripts/school-video
new file mode 100755
index 0000000..7931861
--- /dev/null
+++ b/bin/.local/bin/scripts/school-video
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+# Prompt for YouTube URL using dmenu
+url=$(echo "" | dmenu -p "URL: ")
+
+# Check if the user provided a valid URL
+if [ -z "$url" ]; then
+ echo "Invalid URL. Exiting..."
+ exit 1
+fi
+
+# Set download directory
+download_dir="/tmp/school"
+
+# Download video with captions in MP4 format using youtube-dlp
+yt-dlp --write-sub --sub-lang en --format "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" -o "$download_dir/%(title)s.%(ext)s" "$url"
+
+# Get the filename of the downloaded video
+filename=$(youtube-dlp --get-filename --format "%(title)s.%(ext)s" "$url" -o "$download_dir/%(title)s.%(ext)s")
+
+# Get the filename of the subtitles
+subtitles_filename=$(yt-dlp --get-filename --format "%(title)s.%(ext)s" "$url" --sub-lang en -o "$download_dir/%(title)s.%(ext)s")
+
+# Open captions transcript in Emacs frame using dired
+emacsclient -e -c "(dired \"$download_dir\")" &
+emacsclient -e "(dired-do-find-regexp \"^$subtitles_filename\\.en\\.vtt$\")"
+
+# Play the downloaded video with mpv
+mpv "$download_dir/$filename"
diff --git a/bin/.local/bin/scripts/scratch.sh b/bin/.local/bin/scripts/scratch.sh
new file mode 100755
index 0000000..3d9f3ec
--- /dev/null
+++ b/bin/.local/bin/scripts/scratch.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+modes=("fundamental" "org" "elisp")
+
+selected_mode=$(printf "%s\n" "${modes[@]}" | dmenu -p "Major mode: ")
+
+case $selected_mode in
+ "fundamental")
+ emacsclient -c -e "(bard/new-text-buffer)"
+ ;;
+ "org")
+ emacsclient -c -e "(bard/new-org-buffer)"
+ ;;
+ "elisp")
+ emacsclient -c -e "(bard/new-elisp-buffer)"
+ ;;
+ *)
+ echo "Invalid option selected."
+ exit 1;
+ ;;
+ esac
diff --git a/bin/.local/bin/scripts/startpage.sh b/bin/.local/bin/scripts/startpage.sh
new file mode 100755
index 0000000..7e95dc6
--- /dev/null
+++ b/bin/.local/bin/scripts/startpage.sh
@@ -0,0 +1 @@
+python3 -m http.server -b 127.0.0.1 8080 -d /home/bard/Code/vivendi-startpage/ & python3 -m http.server -b 127.0.0.1 6969 -d /home/bard/Code/operandi-startpage/
diff --git a/bin/.local/bin/scripts/status/battery.sh b/bin/.local/bin/scripts/status/battery.sh
new file mode 100755
index 0000000..e027c68
--- /dev/null
+++ b/bin/.local/bin/scripts/status/battery.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# Prints all batteries, their percentage remaining and an emoji corresponding
+# to charge status (🔌 for plugged up, 🔋 for discharging on battery, etc.).
+
+case $BLOCK_BUTTON in
+ 3) notify-send "🔋 Battery module" "🔋: discharging
+🛑: not charging
+♻: stagnant charge
+🔌: charging
+⚡: charged
+❗: battery very low!
+- Scroll to change adjust xbacklight." ;;
+ 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
+esac
+
+# Loop through all attached batteries and format the info
+for battery in /sys/class/power_supply/BAT?*; do
+ # If non-first battery, print a space separator.
+ [ -n "${capacity+x}" ] && printf " "
+ # Sets up the status and capacity
+ case "$(cat "$battery/status" 2>&1)" in
+ "Full") status="⚡" ;;
+ "Discharging") status="🔋" ;;
+ "Charging") status="🔌" ;;
+ "Not charging") status="🛑" ;;
+ "Unknown") status="♻️" ;;
+ *) exit 1 ;;
+ esac
+ capacity="$(cat "$battery/capacity" 2>&1)"
+ # Will make a warn variable if discharging and low
+ [ "$status" = "🔋" ] && [ "$capacity" -le 25 ] && warn="❗"
+ # Prints the info
+ printf "%s%s%d%%" "$status" "$warn" "$capacity"; unset warn
+done && printf "\\n"
diff --git a/bin/.local/bin/scripts/status/brightness.sh b/bin/.local/bin/scripts/status/brightness.sh
new file mode 100755
index 0000000..821499c
--- /dev/null
+++ b/bin/.local/bin/scripts/status/brightness.sh
@@ -0,0 +1,57 @@
+#!/bin/bash
+
+# One of the following: xrandr, xbacklight, kernel
+METHOD="xbacklight"
+
+# Left click
+if [[ "${BLOCK_BUTTON}" -eq 1 ]]; then
+ xbacklight -inc 5
+# Right click
+elif [[ "${BLOCK_BUTTON}" -eq 3 ]]; then
+ xbacklight -dec 5
+fi
+
+URGENT_VALUE=10
+
+if [[ "${METHOD}" = "xrandr" ]]; then
+ device="${BLOCK_INSTANCE:-primary}"
+ xrandrOutput=$(xrandr --verbose)
+
+ if [[ "${device}" = "primary" ]]; then
+ device=$(echo "${xrandrOutput}" | grep 'primary' | head -n 1 | awk -F ' ' '{print $1}')
+ fi
+
+ curBrightness=$(echo "${xrandrOutput}" | grep "${device}" -A 5 | grep -i "Brightness" | awk -F ':' '{print $2}')
+elif [[ "${METHOD}" = "kernel" ]]; then
+ device="${BLOCK_INSTANCE:-intel_backlight}"
+ maxBrightness=$(cat /sys/class/backlight/${device}/max_brightness)
+ curBrightness=$(cat /sys/class/backlight/${device}/brightness)
+elif [[ "${METHOD}" = "xbacklight" ]]; then
+ curBrightness=$(xbacklight -get)
+fi
+
+if [[ "${curBrightness}" -le 0 ]]; then
+ exit
+fi
+
+if [[ "${METHOD}" = "xrandr" ]]; then
+ percent=$(echo "scale=0;${curBrightness} * 100" | bc -l)
+elif [[ "${METHOD}" = "kernel" ]]; then
+ percent=$(echo "scale=0;${curBrightness} * 100 / ${maxBrightness}" | bc -l)
+elif [[ "${METHOD}" = "xbacklight" ]]; then
+ percent=$(echo "scale=0;${curBrightness}" | bc -l)
+fi
+
+percent=${percent%.*}
+
+if [[ "${percent}" -le 0 ]]; then
+ exit
+fi
+
+echo "${percent}% "
+echo "${percent}% "
+echo " "
+
+if [[ "${percent}" -le "${URGENT_VALUE}" ]]; then
+ exit 33
+fi
diff --git a/bin/.local/bin/scripts/status/internet b/bin/.local/bin/scripts/status/internet
new file mode 100755
index 0000000..6d0c513
--- /dev/null
+++ b/bin/.local/bin/scripts/status/internet
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Show wifi 📶 and percent strength or 📡 if none.
+# Show 🌐 if connected to ethernet or ❎ if none.
+# Show 🔒 if a vpn connection is active
+
+case $BLOCK_BUTTON in
+ 1) "$TERMINAL" -e nmtui; pkill -RTMIN+4 dwmblocks ;;
+ 3) notify-send "🌐 Internet module" "\- Click to connect
+❌: wifi disabled
+📡: no wifi connection
+📶: wifi connection with quality
+❎: no ethernet
+🌐: ethernet working
+🔒: vpn is active
+" ;;
+ 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
+esac
+
+# Wifi
+if [ "$(cat /sys/class/net/w*/operstate 2>/dev/null)" = 'up' ] ; then
+ wifiicon="$(awk '/^\s*w/ { print "📶", int($3 * 100 / 70) "% " }' /proc/net/wireless)"
+elif [ "$(cat /sys/class/net/w*/operstate 2>/dev/null)" = 'down' ] ; then
+ [ "$(cat /sys/class/net/w*/flags 2>/dev/null)" = '0x1003' ] && wifiicon="📡 " || wifiicon="❌ "
+fi
+
+# Ethernet
+[ "$(cat /sys/class/net/e*/operstate 2>/dev/null)" = 'up' ] && ethericon="🌐" || ethericon="❎"
+
+# TUN
+[ -n "$(cat /sys/class/net/tun*/operstate 2>/dev/null)" ] && tunicon=" 🔒"
+
+printf "%s%s%s\n" "$wifiicon" "$ethericon" "$tunicon"
diff --git a/bin/.local/bin/scripts/status/mediaplayer b/bin/.local/bin/scripts/status/mediaplayer
new file mode 100755
index 0000000..3fa1c38
--- /dev/null
+++ b/bin/.local/bin/scripts/status/mediaplayer
@@ -0,0 +1,149 @@
+#!/usr/bin/env perl
+# Copyright (C) 2014 Tony Crisci <[email protected]>
+# Copyright (C) 2015 Thiago Perrotta <perrotta dot thiago at poli dot ufrj dot br>
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# For all media players except mpd/cmus/rhythmbox, MPRIS support should be
+# enabled and the playerctl binary should be in your path.
+# See https://github.com/acrisci/playerctl
+
+# Set instance=NAME in the i3blocks configuration to specify a music player
+# (playerctl will attempt to connect to org.mpris.MediaPlayer2.[NAME] on your
+# DBus session). If instance is empty, playerctl will connect to the first
+# supported media player it finds.
+
+use Time::HiRes qw(usleep);
+use Env qw(BLOCK_INSTANCE);
+
+use constant DELAY => 50; # Delay in ms to let network-based players (spotify) reflect new data.
+use constant SPOTIFY_STR => 'spotify';
+
+my @metadata = ();
+my $player_arg = "";
+
+if ($BLOCK_INSTANCE) {
+ $player_arg = "--player='$BLOCK_INSTANCE'";
+}
+
+sub buttons {
+ my $method = shift;
+
+ if($method eq 'mpd') {
+ if ($ENV{'BLOCK_BUTTON'} == 1) {
+ system("mpc prev &>/dev/null");
+ } elsif ($ENV{'BLOCK_BUTTON'} == 2) {
+ system("mpc toggle &>/dev/null");
+ } elsif ($ENV{'BLOCK_BUTTON'} == 3) {
+ system("mpc next &>/dev/null");
+ } elsif ($ENV{'BLOCK_BUTTON'} == 4) {
+ system("mpc volume +10 &>/dev/null");
+ } elsif ($ENV{'BLOCK_BUTTON'} == 5) {
+ system("mpc volume -10 &>/dev/null");
+ }
+ } elsif ($method eq 'cmus') {
+ if ($ENV{'BLOCK_BUTTON'} == 1) {
+ system("cmus-remote --prev");
+ } elsif ($ENV{'BLOCK_BUTTON'} == 2) {
+ system("cmus-remote --pause");
+ } elsif ($ENV{'BLOCK_BUTTON'} == 3) {
+ system("cmus-remote --next");
+ }
+ } elsif ($method eq 'playerctl') {
+ if ($ENV{'BLOCK_BUTTON'} == 1) {
+ system("playerctl $player_arg previous");
+ usleep(DELAY * 1000) if $BLOCK_INSTANCE eq SPOTIFY_STR;
+ } elsif ($ENV{'BLOCK_BUTTON'} == 2) {
+ system("playerctl $player_arg play-pause");
+ } elsif ($ENV{'BLOCK_BUTTON'} == 3) {
+ system("playerctl $player_arg next");
+ usleep(DELAY * 1000) if $BLOCK_INSTANCE eq SPOTIFY_STR;
+ } elsif ($ENV{'BLOCK_BUTTON'} == 4) {
+ system("playerctl $player_arg volume 0.01+");
+ } elsif ($ENV{'BLOCK_BUTTON'} == 5) {
+ system("playerctl $player_arg volume 0.01-");
+ }
+ } elsif ($method eq 'rhythmbox') {
+ if ($ENV{'BLOCK_BUTTON'} == 1) {
+ system("rhythmbox-client --previous");
+ } elsif ($ENV{'BLOCK_BUTTON'} == 2) {
+ system("rhythmbox-client --play-pause");
+ } elsif ($ENV{'BLOCK_BUTTON'} == 3) {
+ system("rhythmbox-client --next");
+ }
+ }
+}
+
+sub cmus {
+ my @cmus = split /^/, qx(cmus-remote -Q);
+ if ($? == 0) {
+ foreach my $line (@cmus) {
+ my @data = split /\s/, $line;
+ if (shift @data eq 'tag') {
+ my $key = shift @data;
+ my $value = join ' ', @data;
+
+ @metadata[0] = $value if $key eq 'artist';
+ @metadata[1] = $value if $key eq 'title';
+ }
+ }
+
+ if (@metadata) {
+ buttons('cmus');
+
+ # metadata found so we are done
+ print(join ' - ', @metadata);
+ print("\n");
+ exit 0;
+ }
+ }
+}
+
+sub mpd {
+ my $data = qx(mpc current);
+ if (not $data eq '') {
+ buttons("mpd");
+ print($data);
+ exit 0;
+ }
+}
+
+sub playerctl {
+ buttons('playerctl');
+
+ my $artist = qx(playerctl $player_arg metadata artist 2>/dev/null);
+ chomp $artist;
+ # exit status will be nonzero when playerctl cannot find your player
+ exit(0) if $? || $artist eq '(null)';
+
+ push(@metadata, $artist) if $artist;
+
+ my $title = qx(playerctl $player_arg metadata title);
+ exit(0) if $? || $title eq '(null)';
+
+ push(@metadata, $title) if $title;
+
+ print substr(join(" - ", @metadata), 0, 40) if @metadata;
+}
+
+sub rhythmbox {
+ buttons('rhythmbox');
+
+ my $data = qx(rhythmbox-client --print-playing --no-start);
+ print($data);
+}
+
+playerctl;
+
+print("\n");
diff --git a/bin/.local/bin/scripts/status/memory b/bin/.local/bin/scripts/status/memory
new file mode 100755
index 0000000..6c19de6
--- /dev/null
+++ b/bin/.local/bin/scripts/status/memory
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+case $BLOCK_BUTTON in
+ 1) notify-send "🧠 Memory hogs" "$(ps axch -o cmd:15,%mem --sort=-%mem | head)" ;;
+ 2) setsid -f "$TERMINAL" -e btop ;;
+ 3) notify-send "🧠 Memory module" "\- Shows Memory Used/Total.
+- Click to show memory hogs.
+- Middle click to open htop." ;;
+ 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
+esac
+
+free --mebi | sed -n '2{p;q}' | awk '{printf ("🧠%2.2fGiB/%2.2fGiB\n", ( $3 / 1024), ($2 / 1024))}'
diff --git a/bin/.local/bin/scripts/status/player b/bin/.local/bin/scripts/status/player
new file mode 100755
index 0000000..5e3fc54
--- /dev/null
+++ b/bin/.local/bin/scripts/status/player
@@ -0,0 +1,39 @@
+#!/bin/bash
+#----------------------------------------------------------------------------------------------------
+# Requires playerctl - https://github.com/acrisci/playerctl
+#----------------------------------------------------------------------------------------------------
+#Exit the script if no music players running
+[[ "$(playerctl status 2>&1)" = "No players found" ]] && exit 33;
+
+# Define cursor icons
+playIcon="";
+pauseIcon=" ⏸️";
+stopIcon=" ⏹️";
+
+#User provided args for playerctl
+ARGUMENTS="$INSTANCE";
+
+#Mouse actions for the block
+case $BLOCK_BUTTON in
+ 1) playerctl $ARGUMENTS previous ;;
+ 2) playerctl $ARGUMENTS play-pause ;;
+ 3) playerctl $ARGUMENTS next ;;
+ 4) playerctl $ARGUMENTS position 5+ ;;
+ 5) playerctl $ARGUMENTS position 5- ;;
+esac
+
+#Define song info variables
+playerStatus=$(playerctl $ARGUMENTS status);
+songArtist="$(playerctl $ARGUMENTS metadata artist)";
+songArtist="${songArtist:-(Unknown Artist)}";
+songTitle=$(playerctl $ARGUMENTS metadata title);
+songInfo="$songArtist - $songTitle";
+
+#Display output
+if [[ "${playerStatus^}" = "Paused" ]]; then
+ echo "$songInfo$pauseIcon";
+elif [[ "${playerStatus^}" = "Playing" ]]; then
+ echo "$songInfo$playIcon";
+elif [[ "${playerStatus^}" = "Stopped" ]]; then
+ echo "Stopped$stopIcon";
+fi
diff --git a/bin/.local/bin/scripts/status/volume b/bin/.local/bin/scripts/status/volume
new file mode 100755
index 0000000..e15dc20
--- /dev/null
+++ b/bin/.local/bin/scripts/status/volume
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# Prints the current volume or 🔇 if muted.
+
+case $BLOCK_BUTTON in
+ 1) setsid -w -f "$TERMINAL" -e alsamixer; pkill -RTMIN+10 "${STATUSBAR:-dwmblocks}" ;;
+ 2) pactl set-sink-mute @DEFAULT_SINK@ toggle ;;
+ 4) pactl set-sink-volume @DEFAULT_SINK@ 1%+ ;;
+ 5) pactl set-sink-volume @DEFAULT_SINK@ 1%- ;;
+ 3) notify-send "📢 Volume module" "\- Shows volume 🔊, 🔇 if muted.
+- Middle click to mute.
+- Scroll to change." ;;
+ 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
+esac
+
+vol="$(pactl get-sink-volume @DEFAULT_SINK@)"
+
+# If muted, print 🔇 and exit.
+[ "$vol" != "${vol%\[MUTED\]}" ] && echo 🔇 && exit
+
+vol="${vol#Volume: }"
+
+split() {
+ # For ommiting the . without calling and external program.
+ IFS=$2
+ set -- $1
+ printf '%s' "$@"
+}
+
+vol="$(printf "%.0f" "$(split "$vol" ".")")"
+
+case 1 in
+ $((vol >= 70)) ) icon="🔊" ;;
+ $((vol >= 30)) ) icon="🔉" ;;
+ $((vol >= 1)) ) icon="🔈" ;;
+ * ) echo 🔇 && exit ;;
+esac
+
+echo "$icon$vol%"
diff --git a/bin/.local/bin/scripts/status/volume-pulseaudio b/bin/.local/bin/scripts/status/volume-pulseaudio
new file mode 100755
index 0000000..4cb6b9d
--- /dev/null
+++ b/bin/.local/bin/scripts/status/volume-pulseaudio
@@ -0,0 +1,180 @@
+#!/usr/bin/env bash
+# Displays the default device, volume, and mute status for i3blocks
+
+set -a
+
+AUDIO_HIGH_SYMBOL=${AUDIO_HIGH_SYMBOL:-'🔊'}
+
+AUDIO_MED_THRESH=${AUDIO_MED_THRESH:-50}
+AUDIO_MED_SYMBOL=${AUDIO_MED_SYMBOL:-'🔉'}
+
+AUDIO_LOW_THRESH=${AUDIO_LOW_THRESH:-0}
+AUDIO_LOW_SYMBOL=${AUDIO_LOW_SYMBOL:-'🔈'}
+
+AUDIO_MUTED_SYMBOL=${AUDIO_MUTED_SYMBOL:-'🔇'}
+
+AUDIO_DELTA=${AUDIO_DELTA:-5}
+
+DEFAULT_COLOR=${DEFAULT_COLOR:-"#000000"}
+MUTED_COLOR=${MUTED_COLOR:-"#a0a0a0"}
+
+LONG_FORMAT=${LONG_FORMAT:-'${SYMB} ${VOL}% [${INDEX}:${NAME}]'}
+SHORT_FORMAT=${SHORT_FORMAT:-'${SYMB} ${VOL}% [${INDEX}]'}
+USE_ALSA_NAME=${USE_ALSA_NAME:-0}
+USE_DESCRIPTION=${USE_DESCRIPTION:-0}
+
+SUBSCRIBE=${SUBSCRIBE:-0}
+
+MIXER=${MIXER:-""}
+SCONTROL=${SCONTROL:-""}
+
+while getopts F:Sf:adH:M:L:X:T:t:C:c:i:m:s:h opt; do
+ case "$opt" in
+ S) SUBSCRIBE=1 ;;
+ F) LONG_FORMAT="$OPTARG" ;;
+ f) SHORT_FORMAT="$OPTARG" ;;
+ a) USE_ALSA_NAME=1 ;;
+ d) USE_DESCRIPTION=1 ;;
+ H) AUDIO_HIGH_SYMBOL="$OPTARG" ;;
+ M) AUDIO_MED_SYMBOL="$OPTARG" ;;
+ L) AUDIO_LOW_SYMBOL="$OPTARG" ;;
+ X) AUDIO_MUTED_SYMBOL="$OPTARG" ;;
+ T) AUDIO_MED_THRESH="$OPTARG" ;;
+ t) AUDIO_LOW_THRESH="$OPTARG" ;;
+ C) DEFAULT_COLOR="$OPTARG" ;;
+ c) MUTED_COLOR="$OPTARG" ;;
+ i) AUDIO_INTERVAL="$OPTARG" ;;
+ m) MIXER="$OPTARG" ;;
+ s) SCONTROL="$OPTARG" ;;
+ h) printf \
+"Usage: volume-pulseaudio [-S] [-F format] [-f format] [-p] [-a|-d] [-H symb] [-M symb]
+ [-L symb] [-X symb] [-T thresh] [-t thresh] [-C color] [-c color] [-i inter]
+ [-m mixer] [-s scontrol] [-j] [-h]
+Options:
+-F, -f\tOutput format (-F long format, -f short format) to use, with exposed variables:
+\${SYMB}, \${VOL}, \${INDEX}, \${NAME}
+-S\tSubscribe to volume events (requires persistent block, always uses long format)
+-a\tUse ALSA name if possible
+-d\tUse device description instead of name if possible
+-H\tSymbol to use when audio level is high. Default: '$AUDIO_HIGH_SYMBOL'
+-M\tSymbol to use when audio level is medium. Default: '$AUDIO_MED_SYMBOL'
+-L\tSymbol to use when audio level is low. Default: '$AUDIO_LOW_SYMBOL'
+-X\tSymbol to use when audio is muted. Default: '$AUDIO_MUTED_SYMBOL'
+-T\tThreshold for medium audio level. Default: $AUDIO_MED_THRESH
+-t\tThreshold for low audio level. Default: $AUDIO_LOW_THRESH
+-C\tColor for non-muted audio. Default: $DEFAULT_COLOR
+-c\tColor for muted audio. Default: $MUTED_COLOR
+-i\tInterval size of volume increase/decrease. Default: $AUDIO_DELTA
+-m\tUse the given mixer.
+-s\tUse the given scontrol.
+-h\tShow this help text
+" && exit 0;;
+ esac
+done
+
+if [[ -z "$MIXER" ]] ; then
+ MIXER="default"
+ if amixer -D pulse info >/dev/null 2>&1 ; then
+ MIXER="pulse"
+ fi
+fi
+
+if [[ -z "$SCONTROL" ]] ; then
+ SCONTROL=$(amixer -D "$MIXER" scontrols | sed -n "s/Simple mixer control '\([^']*\)',0/\1/p" | head -n1)
+fi
+
+CAPABILITY=$(amixer -D $MIXER get $SCONTROL | sed -n "s/ Capabilities:.*cvolume.*/Capture/p")
+
+
+function move_sinks_to_new_default {
+ DEFAULT_SINK=$1
+ pacmd list-sink-inputs | grep index: | grep -o '[0-9]\+' | while read SINK
+ do
+ pacmd move-sink-input $SINK $DEFAULT_SINK
+ done
+}
+
+function set_default_playback_device_next {
+ inc=${1:-1}
+ num_devices=$(pacmd list-sinks | grep -c index:)
+ sink_arr=($(pacmd list-sinks | grep index: | grep -o '[0-9]\+'))
+ default_sink_index=$(( $(pacmd list-sinks | grep index: | grep -no '*' | grep -o '^[0-9]\+') - 1 ))
+ default_sink_index=$(( ($default_sink_index + $num_devices + $inc) % $num_devices ))
+ default_sink=${sink_arr[$default_sink_index]}
+ pacmd set-default-sink $default_sink
+ move_sinks_to_new_default $default_sink
+}
+
+case "$BLOCK_BUTTON" in
+ 1) set_default_playback_device_next ;;
+ 2) amixer -q -D $MIXER sset $SCONTROL $CAPABILITY toggle ;;
+ 3) set_default_playback_device_next -1 ;;
+ 4) amixer -q -D $MIXER sset $SCONTROL $CAPABILITY $AUDIO_DELTA%+ ;;
+ 5) amixer -q -D $MIXER sset $SCONTROL $CAPABILITY $AUDIO_DELTA%- ;;
+esac
+
+
+function print_format {
+ if [[ $markup == "pango" ]] ; then
+ output="<span color=\"$2\">$1</span>"
+ else
+ output=$1
+ fi
+
+ echo "$output" | envsubst '${SYMB}${VOL}${INDEX}${NAME}'
+}
+
+function print_block {
+ ACTIVE=$(pacmd list-sinks | grep "state\: RUNNING" -B4 -A7 | grep "index:\|name:\|volume: \(front\|mono\)\|muted:")
+ [[ -z "$ACTIVE" ]] && ACTIVE=$(pacmd list-sinks | grep "index:\|name:\|volume: \(front\|mono\)\|muted:" | grep -A3 '*')
+ for name in INDEX NAME VOL MUTED; do
+ read $name
+ done < <(echo "$ACTIVE")
+ INDEX=$(echo "$INDEX" | grep -o '[0-9]\+')
+ VOL=$(echo "$VOL" | grep -o "[0-9]*%" | head -1 )
+ VOL="${VOL%?}"
+
+ NAME=$(echo "$NAME" | sed \
+'s/.*<.*\.\(.*\)>.*/\1/; t;'\
+'s/.*<\(.*\)>.*/\1/; t;'\
+'s/.*/unknown/')
+
+ if [[ $USE_ALSA_NAME == 1 ]] ; then
+ ALSA_NAME=$(pacmd list-sinks |\
+awk '/^\s*\*/{f=1}/^\s*index:/{f=0}f' |\
+grep "alsa.name\|alsa.mixer_name" |\
+head -n1 |\
+sed 's/.*= "\(.*\)".*/\1/')
+ NAME=${ALSA_NAME:-$NAME}
+ elif [[ $USE_DESCRIPTION == 1 ]] ; then
+ DESCRIPTION=$(pacmd list-sinks |\
+awk '/^\s*\*/{f=1}/^\s*index:/{f=0}f' |\
+grep "device.description" |\
+head -n1 |\
+sed 's/.*= "\(.*\)".*/\1/')
+ NAME=${DESCRIPTION:-$NAME}
+ fi
+
+ if [[ $MUTED =~ "no" ]] ; then
+ SYMB=$AUDIO_HIGH_SYMBOL
+ [[ $VOL -le $AUDIO_MED_THRESH ]] && SYMB=$AUDIO_MED_SYMBOL
+ [[ $VOL -le $AUDIO_LOW_THRESH ]] && SYMB=$AUDIO_LOW_SYMBOL
+ COLOR=$DEFAULT_COLOR
+ else
+ SYMB=$AUDIO_MUTED_SYMBOL
+ COLOR=$MUTED_COLOR
+ fi
+
+ print_format "$LONG_FORMAT" $COLOR
+ if [[ $SUBSCRIBE != 1 ]] ; then
+ print_format "$SHORT_FORMAT" $COLOR
+ echo $COLOR
+ fi
+}
+
+print_block
+if [[ $SUBSCRIBE == 1 ]] ; then
+ while read -r EVENT; do
+ print_block
+ done < <(pactl subscribe | stdbuf -oL grep change)
+fi
diff --git a/bin/.local/bin/scripts/status/weather b/bin/.local/bin/scripts/status/weather
new file mode 100755
index 0000000..ccf5847
--- /dev/null
+++ b/bin/.local/bin/scripts/status/weather
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+# Displays today's precipication chance (☔), and daily low (🥶) and high (🌞).
+# Usually intended for the statusbar.
+
+url="${WTTRURL:-wttr.in}"
+weatherreport="${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport"
+
+# Get a weather report from 'wttr.in' and save it locally.
+getforecast() { curl -sf "$url/$LOCATION?M" > "$weatherreport" || exit 1; }
+
+# Forecast should be updated only once a day.
+checkforecast() {
+ [ -s "$weatherreport" ] && [ "$(stat -c %y "$weatherreport" 2>/dev/null |
+ cut -d' ' -f1)" = "$(date '+%Y-%m-%d')" ]
+}
+
+getprecipchance() {
+ echo "$weatherdata" | sed '16q;d' | # Extract line 16 from file
+ grep -wo "[0-9]*%" | # Find a sequence of digits followed by '%'
+ sort -rn | # Sort in descending order
+ head -1q # Extract first line
+}
+
+getdailyhighlow() {
+ echo "$weatherdata" | sed '13q;d' | # Extract line 13 from file
+ grep -o "m\\([-+]\\)*[0-9]\\+" | # Find temperatures in the format "m<signed number>"
+ sed 's/[+m]//g' | # Remove '+' and 'm'
+ sort -g | # Sort in ascending order
+ sed -e 1b -e '$!d' # Extract the first and last lines
+}
+
+readfile() { weatherdata="$(cat "$weatherreport")" ;}
+
+showweather() {
+ readfile
+ printf "☔%s 🥶%s°C 🌞%s°C\n" "$(getprecipchance)" $(getdailyhighlow)
+ # printf " %s  %s°C  %s°C\n" "$(getprecipchance)" $(getdailyhighlow)
+}
+
+case $BLOCK_BUTTON in
+ 1) setsid -f "$TERMINAL" -e less -Sfr "$weatherreport" ;;
+ 2) getforecast && showweather ;;
+ 3) notify-send "🌈 Weather module" "\- Left click for full forecast.
+- Middle click to update forecast.
+☔: Chance of rain/snow
+🥶: Daily low
+🌞: Daily high" ;;
+ 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
+esac
+
+checkforecast || getforecast
+
+showweather
diff --git a/bin/.local/bin/scripts/theme-switch.sh b/bin/.local/bin/scripts/theme-switch.sh
new file mode 100755
index 0000000..2fe0c25
--- /dev/null
+++ b/bin/.local/bin/scripts/theme-switch.sh
@@ -0,0 +1,98 @@
+#!/bin/bash
+
+# Define the available themes
+themes=("modus vivendi" "modus operandi tinted" "ef spring" "melissa dark")
+
+# dmenu to prompt the user for i3 theme selection
+selected_theme=$(printf "%s\n" "${themes[@]}" | dmenu -p "Select a theme:")
+
+# set the theme in the i3 configuration file
+set_theme() {
+ sed -i "s/^set \$bg.*$/set \$bg $1/" ~/.config/i3/colors
+ sed -i "s/^set \$fg.*$/set \$fg $2/" ~/.config/i3/colors
+ sed -i "s/^set \$space.*$/set \$space $3/" ~/.config/i3/colors
+ sed -i "s/^set \$red.*$/set \$red $4/" ~/.config/i3/colors
+ sed -i "s/^set \$green.*$/set \$green $5/" ~/.config/i3/colors
+ sed -i "s/^set \$yellow.*$/set \$yellow $6/" ~/.config/i3/colors
+ sed -i "s/^set \$blue.*$/set \$blue $7/" ~/.config/i3/colors
+ sed -i "s/^set \$aqua.*$/set \$aqua $8/" ~/.config/i3/colors
+ sed -i "s/^set \$purple.*$/set \$purple $9/" ~/.config/i3/colors
+ sed -i "s/^set \$border.*$/set \$border ${10}/" ~/.config/i3/colors
+}
+
+# paths for wallpapers per themes
+melissa_wallpaper1="/home/bard/Pictures/wallpaper/Landscape/Favourite/yellowshinkansen.jpg "
+melissa_wallpaper2="/home/bard/Pictures/wallpaper/Landscape/Favourite/teaworkers.jpg "
+vivendi_wallpaper="/home/bard/Pictures/wallpaper/Stoic/dublinlibrary.jpg"
+operandi_wallpaper="/home/bard/Pictures/wallpaper/Stoic/downton_abbey.jpg"
+spring_wallpaper1="/home/bard/Pictures/wallpaper/Landscape/Favourite/chineselake.jpg"
+spring_wallpaper2="/home/bard/Pictures/wallpaper/Art/TeahouseatKoishikawa.jpg"
+
+set_wallpaper() {
+ # Set wallpaper for monitor 1
+ nitrogen --set-zoom-fill --head=0 --save $1
+
+ # Set wallpaper for monitor 2
+ nitrogen --set-zoom-fill --head=1 --save $2
+
+ echo $1
+ echo $2
+}
+
+# bg, fg. space. red. green, yellow, blue, aqua/cyan, purple, border
+case $selected_theme in
+ "modus vivendi")
+ # set i3 theme
+ set_theme "#000000" "#ffffff" "#ffffff" "#ff5f59" "#44bc44" "#fec43f" "#2fafff" "#00d3d0" "#b6a0ff" "#ffffff"
+ # set xresources theme
+ xrdb -merge /home/bard/Xresources.vivendi
+ # set emacs theme
+ selected_emacs_theme="modus-vivendi"
+ emacsclient -e "(setq command-line-args-left (list \"$selected_emacs_theme\"))" -e "(load-file \"/home/bard/.local/bin/scripts/emacs-theme.el\")"
+ # set wallpaper
+ set_wallpaper $vivendi_wallpaper $vivendi_wallpaper
+ ;;
+ "modus operandi tinted")
+ # set i3 theme
+ set_theme "#fbf7f0" "#000000" "#000000" "#a60000" "#006800" "#6f5500" "#0031a9" "#721045" "#005e8b" "#721045"
+ # set xresources theme
+ xrdb -merge /home/bard/Xresources.operandi
+ # set emacs theme
+ selected_emacs_theme="modus-operandi-tinted"
+ emacsclient -e "(setq command-line-args-left (list \"$selected_emacs_theme\"))" -e "(load-file \"/home/bard/.local/bin/scripts/emacs-theme.el\")"
+ # set wallpaper
+ set_wallpaper $operandi_wallpaper $operandi_wallpaper
+ ;;
+ "ef spring")
+ # set i3 theme
+ set_theme "#34494a" "#f6fff9" "#f6fff9" "#c42d2f" "#1a870f" "#a45f22" "#375cc6" "#1f6fbf" "#9435b4" "#9d5e7a"
+ # set xresources theme
+ xrdb -merge /home/bard/Xresources.spring
+ # set emacs theme
+ selected_emacs_theme="ef-spring"
+ emacsclient -e "(setq command-line-args-left (list \"$selected_emacs_theme\"))" -e "(load-file \"/home/bard/.local/bin/scripts/emacs-theme.el\")"
+ # set wallpaper
+ set_wallpaper $spring_wallpaper1 $spring_wallpaper2
+ ;;
+ "melissa dark")
+ # set i3 theme
+ set_theme "#352718" "#e8e4b1" "#e8e4b1" "#ff7f7f" "#6fd560" "#ffa21f" "#57aff6" "#6fcad0" "#f0aac5" "#ffa21f"
+ # set xresources theme
+ xrdb -merge /home/bard/Xresources.melissa-dark
+ # set emacs theme
+ selected_emacs_theme="ef-melissa-dark"
+ emacsclient -e "(setq command-line-args-left (list \"$selected_emacs_theme\"))" -e "(load-file \"/home/bard/.local/bin/scripts/emacs-theme.el\")"
+ # set wallpaper
+ set_wallpaper $melissa_wallpaper1 $melissa_wallpaper2
+ ;;
+ *)
+ echo "Invalid theme selected."
+ ;;
+esac
+
+# Reload i3 to apply the changes
+i3-msg reload
+
+# restart compositor
+killall picom
+picom --experimental-backends --daemon
diff --git a/bin/.local/bin/scripts/tmux-sessionizer b/bin/.local/bin/scripts/tmux-sessionizer
new file mode 100755
index 0000000..f66aafb
--- /dev/null
+++ b/bin/.local/bin/scripts/tmux-sessionizer
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+if [ "$#" -eq 1 ]; then
+ selected=$1
+else
+ selected=$(find ~/Notes/Org-Roam/ ~/Code/ ~/Documents/ -mindepth 1 -maxdepth 1 -type d | fzf)
+fi
+
+if [ -z "$selected" ]; then
+ exit 0
+fi
+
+selected_name=$(basename "$selected" | tr . _)
+tmux_running=$(pgrep tmux)
+
+if [ -z "$TMUX" ] && [ -z "$tmux_running" ]; then
+ tmux new-session -s "$selected_name" -c "$selected"
+ exit 0
+fi
+
+if ! tmux has-session -t="$selected_name" 2> /dev/null; then
+ tmux new-session -ds "$selected_name" -c "$selected"
+fi
+
+# tmux switch-client -t "$selected"
+tmux attach
diff --git a/bin/.local/bin/scripts/wallpaper.sh b/bin/.local/bin/scripts/wallpaper.sh
new file mode 100755
index 0000000..18e1f42
--- /dev/null
+++ b/bin/.local/bin/scripts/wallpaper.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# Path to the directory containing your wallpapers
+WALLPAPER_DIRS="$HOME/Pictures/wallpaper/\n$HOME/Pictures/Anime-Wallpaper/"
+
+WALLPAPER_DIR=$(echo -e "$WALLPAPER_DIRS" | dmenu -p "Select directory: ")
+
+# Use nsxiv to mark an image
+selected_wallpaper=$(nsxiv -t -r -o $WALLPAPER_DIR)
+
+# Options for display modes
+OPTIONS="Tiled\nZoom Filled\nCentered"
+
+# Prompt user to select a display mode
+selected_mode=$(echo -e "$OPTIONS" | dmenu -p "Select Display Mode:")
+
+# Command to set wallpaper based on selected mode
+case "$selected_mode" in
+ "Tiled")
+ feh --bg-tile "$selected_wallpaper"
+ ;;
+ "Zoom Filled")
+ feh --bg-fill "$selected_wallpaper"
+ ;;
+ "Centered")
+ feh --bg-center "$selected_wallpaper"
+ ;;
+ *)
+ echo "Invalid option selected."
+ exit 1
+ ;;
+esac
+
+echo "Wallpaper set successfully."
diff --git a/bin/.local/bin/scripts/webcam b/bin/.local/bin/scripts/webcam
new file mode 100755
index 0000000..bd4a278
--- /dev/null
+++ b/bin/.local/bin/scripts/webcam
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+ffplay -window_title Webcam -fast /dev/video0
diff --git a/bin/.local/bin/scripts/youtube.py b/bin/.local/bin/scripts/youtube.py
new file mode 100644
index 0000000..54168e6
--- /dev/null
+++ b/bin/.local/bin/scripts/youtube.py
@@ -0,0 +1,22 @@
+import re
+
+# Define the regular expression pattern for matching links
+pattern = r'https://youtube\.com/@\w+'
+
+# Initialize an empty list to store the matched links
+links = []
+
+# Open the file for reading
+with open('trimmed.html', 'r') as file:
+ # Iterate through each line in the file
+ for line in file:
+ # Search for links that match the pattern in the current line
+ matches = re.findall(pattern, line)
+
+ # If matches were found, add them to the links list
+ if matches:
+ links.extend(matches)
+
+# Print the list of matched links
+for link in links:
+ print(link)
diff --git a/bin/.local/bin/scripts/youtube.sh b/bin/.local/bin/scripts/youtube.sh
new file mode 100755
index 0000000..d7e681a
--- /dev/null
+++ b/bin/.local/bin/scripts/youtube.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# Define a function to extract RSS feed URL using curl and sed
+extract_rss_url() {
+ youtube_channel_url="$1"
+ rss_url=$(curl -s "$youtube_channel_url" | sed -n 's/.*title="RSS"\s\+href="\([^"]\+\).*/\1/p')
+ echo "$rss_url"
+}
+
+# Add YouTube channel URLs to this array
+youtube_channel_urls=(
+ "https://www.youtube.com/@jvscholz"
+ "https://www.youtube.com/@yerbamatelab/videos"
+)
+
+# Loop through the array and extract RSS feed URLs
+for url in "${youtube_channel_urls[@]}"; do
+ rss_feed_url=$(extract_rss_url "$url")
+ if [ -n "$rss_feed_url" ]; then
+ echo "Channel: $url"
+ echo "RSS Feed: $rss_feed_url"
+ else
+ echo "No RSS feed found for $url"
+ fi
+done
diff --git a/dwm/.config/dunst/dunstrc b/dwm/.config/dunst/dunstrc
new file mode 100644
index 0000000..eea6742
--- /dev/null
+++ b/dwm/.config/dunst/dunstrc
@@ -0,0 +1,437 @@
+[global]
+ ### Display ###
+ # Which monitor should the notifications be displayed on.
+ monitor = 0
+ # Display notification on focused monitor. Possible modes are:
+ # mouse: follow mouse pointer
+ # keyboard: follow window with keyboard focus
+ # none: don't follow anything
+ #
+ # "keyboard" needs a window manager that exports the
+ # _NET_ACTIVE_WINDOW property.
+ # This should be the case for almost all modern window managers.
+ #
+ # If this option is set to mouse or keyboard, the monitor option
+ # will be ignored.
+ follow = none
+ ### Geometry ###
+ # dynamic width from 0 to 300
+ # width = (0, 300)
+ # constant width of 300
+ width = 300
+ # The maximum height of a single notification, excluding the frame.
+ height = 300
+ # Position the notification in the top right corner
+ origin = top-right
+ # Offset from the origin
+ offset = 10x50
+ # Scale factor. It is auto-detected if value is 0.
+ scale = 0
+ # Maximum number of notification (0 means no limit)
+ notification_limit = 0
+ ### Progress bar ###
+ # Turn on the progess bar. It appears when a progress hint is passed with
+ # for example dunstify -h int:value:12
+ progress_bar = true
+ # Set the progress bar height. This includes the frame, so make sure
+ # it's at least twice as big as the frame width.
+ progress_bar_height = 10
+ # Set the frame width of the progress bar
+ progress_bar_frame_width = 1
+ # Set the minimum width for the progress bar
+ progress_bar_min_width = 150
+ # Set the maximum width for the progress bar
+ progress_bar_max_width = 300
+ # Show how many messages are currently hidden (because of
+ # notification_limit).
+ indicate_hidden = yes
+ # The transparency of the window. Range: [0; 100].
+ # This option will only work if a compositing window manager is
+ # present (e.g. xcompmgr, compiz, etc.). (X11 only)
+ transparency = 0
+ # Draw a line of "separator_height" pixel height between two
+ # notifications.
+ # Set to 0 to disable.
+ # If gap_size is greater than 0, this setting will be ignored.
+ separator_height = 2
+
+ # Padding between text and separator.
+ padding = 8
+
+ # Horizontal padding.
+ horizontal_padding = 8
+
+ # Padding between text and icon.
+ text_icon_padding = 0
+
+ # Defines width in pixels of frame around the notification window.
+ # Set to 0 to disable.
+ frame_width = 3
+
+ # Defines color of the frame around the notification window.
+ frame_color = "#ffffff"
+
+ # Size of gap to display between notifications - requires a compositor.
+ # If value is greater than 0, separator_height will be ignored and a border
+ # of size frame_width will be drawn around each notification instead.
+ # Click events on gaps do not currently propagate to applications below.
+ gap_size = 0
+
+ # Define a color for the separator.
+ # possible values are:
+ # * auto: dunst tries to find a color fitting to the background;
+ # * foreground: use the same color as the foreground;
+ # * frame: use the same color as the frame;
+ # * anything else will be interpreted as a X color.
+ separator_color = frame
+
+ # Sort messages by urgency.
+ sort = yes
+
+ # Don't remove messages, if the user is idle (no mouse or keyboard input)
+ # for longer than idle_threshold seconds.
+ # Set to 0 to disable.
+ # A client can set the 'transient' hint to bypass this. See the rules
+ # section for how to disable this if necessary
+ # idle_threshold = 120
+
+ ### Text ###
+
+ font = Iosevka Comfy 12
+
+ # The spacing between lines. If the height is smaller than the
+ # font height, it will get raised to the font height.
+ line_height = 0
+
+ # Possible values are:
+ # full: Allow a small subset of html markup in notifications:
+ # <b>bold</b>
+ # <i>italic</i>
+ # <s>strikethrough</s>
+ # <u>underline</u>
+ #
+ # For a complete reference see
+ # <https://docs.gtk.org/Pango/pango_markup.html>.
+ #
+ # strip: This setting is provided for compatibility with some broken
+ # clients that send markup even though it's not enabled on the
+ # server. Dunst will try to strip the markup but the parsing is
+ # simplistic so using this option outside of matching rules for
+ # specific applications *IS GREATLY DISCOURAGED*.
+ #
+ # no: Disable markup parsing, incoming notifications will be treated as
+ # plain text. Dunst will not advertise that it has the body-markup
+ # capability if this is set as a global setting.
+ #
+ # It's important to note that markup inside the format option will be parsed
+ # regardless of what this is set to.
+ markup = full
+
+ # The format of the message. Possible variables are:
+ # %a appname
+ # %s summary
+ # %b body
+ # %i iconname (including its path)
+ # %I iconname (without its path)
+ # %p progress value if set ([ 0%] to [100%]) or nothing
+ # %n progress value if set without any extra characters
+ # %% Literal %
+ # Markup is allowed
+ format = "<b>%s</b>\n%b"
+
+ # Alignment of message text.
+ # Possible values are "left", "center" and "right".
+ alignment = left
+
+ # Vertical alignment of message text and icon.
+ # Possible values are "top", "center" and "bottom".
+ vertical_alignment = center
+
+ # Show age of message if message is older than show_age_threshold
+ # seconds.
+ # Set to -1 to disable.
+ show_age_threshold = 60
+
+ # Specify where to make an ellipsis in long lines.
+ # Possible values are "start", "middle" and "end".
+ ellipsize = middle
+
+ # Ignore newlines '\n' in notifications.
+ ignore_newline = no
+
+ # Stack together notifications with the same content
+ stack_duplicates = true
+
+ # Hide the count of stacked notifications with the same content
+ hide_duplicate_count = false
+
+ # Display indicators for URLs (U) and actions (A).
+ show_indicators = yes
+
+ ### Icons ###
+
+ # Recursive icon lookup. You can set a single theme, instead of having to
+ # define all lookup paths.
+ enable_recursive_icon_lookup = true
+
+ # Set icon theme (only used for recursive icon lookup)
+ icon_theme = Adwaita
+ # You can also set multiple icon themes, with the leftmost one being used first.
+ # icon_theme = "Adwaita, breeze"
+
+ # Align icons left/right/top/off
+ icon_position = left
+
+ # Scale small icons up to this size, set to 0 to disable. Helpful
+ # for e.g. small files or high-dpi screens. In case of conflict,
+ # max_icon_size takes precedence over this.
+ min_icon_size = 32
+
+ # Scale larger icons down to this size, set to 0 to disable
+ max_icon_size = 128
+
+ # Paths to default icons (only neccesary when not using recursive icon lookup)
+ icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
+
+ ### History ###
+
+ # Should a notification popped up from history be sticky or timeout
+ # as if it would normally do.
+ sticky_history = yes
+
+ # Maximum amount of notifications kept in history
+ history_length = 20
+
+ ### Misc/Advanced ###
+
+ # dmenu path.
+ dmenu = /usr/bin/dmenu -p dunst:
+
+ # Browser for opening urls in context menu.
+ browser = /usr/bin/firefox-bin
+
+ # Always run rule-defined scripts, even if the notification is suppressed
+ always_run_script = true
+
+ # Define the title of the windows spawned by dunst
+ title = Dunst
+
+ # Define the class of the windows spawned by dunst
+ class = Dunst
+
+ # Define the corner radius of the notification window
+ # in pixel size. If the radius is 0, you have no rounded
+ # corners.
+ # The radius will be automatically lowered if it exceeds half of the
+ # notification height to avoid clipping text and/or icons.
+ corner_radius = 0
+
+ # Ignore the dbus closeNotification message.
+ # Useful to enforce the timeout set by dunst configuration. Without this
+ # parameter, an application may close the notification sent before the
+ # user defined timeout.
+ ignore_dbusclose = false
+
+ ### Wayland ###
+ # These settings are Wayland-specific. They have no effect when using X11
+
+ # Uncomment this if you want to let notications appear under fullscreen
+ # applications (default: overlay)
+ # layer = top
+
+ # Set this to true to use X11 output on Wayland.
+ force_xwayland = false
+
+ ### Legacy
+
+ # Use the Xinerama extension instead of RandR for multi-monitor support.
+ # This setting is provided for compatibility with older nVidia drivers that
+ # do not support RandR and using it on systems that support RandR is highly
+ # discouraged.
+ #
+ # By enabling this setting dunst will not be able to detect when a monitor
+ # is connected or disconnected which might break follow mode if the screen
+ # layout changes.
+ force_xinerama = false
+
+ ### mouse
+
+ # Defines list of actions for each mouse event
+ # Possible values are:
+ # * none: Don't do anything.
+ # * do_action: Invoke the action determined by the action_name rule. If there is no
+ # such action, open the context menu.
+ # * open_url: If the notification has exactly one url, open it. If there are multiple
+ # ones, open the context menu.
+ # * close_current: Close current notification.
+ # * close_all: Close all notifications.
+ # * context: Open context menu for the notification.
+ # * context_all: Open context menu for all notifications.
+ # These values can be strung together for each mouse event, and
+ # will be executed in sequence.
+ mouse_left_click = close_current
+ mouse_middle_click = do_action, close_current
+ mouse_right_click = close_all
+
+# Experimental features that may or may not work correctly. Do not expect them
+# to have a consistent behaviour across releases.
+[experimental]
+ # Calculate the dpi to use on a per-monitor basis.
+ # If this setting is enabled the Xft.dpi value will be ignored and instead
+ # dunst will attempt to calculate an appropriate dpi value for each monitor
+ # using the resolution and physical size. This might be useful in setups
+ # where there are multiple screens with very different dpi values.
+ per_monitor_dpi = false
+
+
+[urgency_low]
+ # IMPORTANT: colors have to be defined in quotation marks.
+ # Otherwise the "#" and following would be interpreted as a comment.
+ background = "#222222"
+ foreground = "#888888"
+ timeout = 10
+ # Icon for notifications with low urgency, uncomment to enable
+ #default_icon = /path/to/icon
+
+[urgency_normal]
+ background = "#000000"
+ foreground = "#ffffff"
+ timeout = 10
+ # Icon for notifications with normal urgency, uncomment to enable
+ #default_icon = /path/to/icon
+
+[urgency_critical]
+ background = "#9d1f1f"
+ foreground = "#ffffff"
+ frame_color = "#ff0000"
+ timeout = 0
+ # Icon for notifications with critical urgency, uncomment to enable
+ #default_icon = /path/to/icon
+
+# Every section that isn't one of the above is interpreted as a rules to
+# override settings for certain messages.
+#
+# Messages can be matched by
+# appname (discouraged, see desktop_entry)
+# body
+# category
+# desktop_entry
+# icon
+# match_transient
+# msg_urgency
+# stack_tag
+# summary
+#
+# and you can override the
+# background
+# foreground
+# format
+# frame_color
+# fullscreen
+# new_icon
+# set_stack_tag
+# set_transient
+# set_category
+# timeout
+# urgency
+# icon_position
+# skip_display
+# history_ignore
+# action_name
+# word_wrap
+# ellipsize
+# alignment
+# hide_text
+#
+# Shell-like globbing will get expanded.
+#
+# Instead of the appname filter, it's recommended to use the desktop_entry filter.
+# GLib based applications export their desktop-entry name. In comparison to the appname,
+# the desktop-entry won't get localized.
+#
+# SCRIPTING
+# You can specify a script that gets run when the rule matches by
+# setting the "script" option.
+# The script will be called as follows:
+# script appname summary body icon urgency
+# where urgency can be "LOW", "NORMAL" or "CRITICAL".
+#
+# NOTE: It might be helpful to run dunst -print in a terminal in order
+# to find fitting options for rules.
+
+# Disable the transient hint so that idle_threshold cannot be bypassed from the
+# client
+#[transient_disable]
+# match_transient = yes
+# set_transient = no
+#
+# Make the handling of transient notifications more strict by making them not
+# be placed in history.
+#[transient_history_ignore]
+# match_transient = yes
+# history_ignore = yes
+
+# fullscreen values
+# show: show the notifications, regardless if there is a fullscreen window opened
+# delay: displays the new notification, if there is no fullscreen window active
+# If the notification is already drawn, it won't get undrawn.
+# pushback: same as delay, but when switching into fullscreen, the notification will get
+# withdrawn from screen again and will get delayed like a new notification
+#[fullscreen_delay_everything]
+# fullscreen = delay
+#[fullscreen_show_critical]
+# msg_urgency = critical
+# fullscreen = show
+
+#[espeak]
+# summary = "*"
+# script = dunst_espeak.sh
+
+#[script-test]
+# summary = "*script*"
+# script = dunst_test.sh
+
+#[ignore]
+# # This notification will not be displayed
+# summary = "foobar"
+# skip_display = true
+
+#[history-ignore]
+# # This notification will not be saved in history
+# summary = "foobar"
+# history_ignore = yes
+
+#[skip-display]
+# # This notification will not be displayed, but will be included in the history
+# summary = "foobar"
+# skip_display = yes
+
+#[signed_on]
+# appname = Pidgin
+# summary = "*signed on*"
+# urgency = low
+#
+#[signed_off]
+# appname = Pidgin
+# summary = *signed off*
+# urgency = low
+#
+#[says]
+# appname = Pidgin
+# summary = *says*
+# urgency = critical
+#
+#[twitter]
+# appname = Pidgin
+# summary = *twitter.com*
+# urgency = normal
+#
+#[stack-volumes]
+# appname = "some_volume_notifiers"
+# set_stack_tag = "volume"
+#
+# vim: ft=cfg
+
+[play-sound]
+ summary="*"
+ script="/home/bard/.local/bin/scripts/alert"
diff --git a/dwm/Repositories/dmenu/LICENSE b/dwm/Repositories/dmenu/LICENSE
new file mode 100644
index 0000000..2a64b28
--- /dev/null
+++ b/dwm/Repositories/dmenu/LICENSE
@@ -0,0 +1,30 @@
+MIT/X Consortium License
+
+© 2006-2019 Anselm R Garbe <[email protected]>
+© 2006-2008 Sander van Dijk <[email protected]>
+© 2006-2007 Michał Janeczek <[email protected]>
+© 2007 Kris Maglione <[email protected]>
+© 2009 Gottox <[email protected]>
+© 2009 Markus Schnalke <[email protected]>
+© 2009 Evan Gates <[email protected]>
+© 2010-2012 Connor Lane Smith <[email protected]>
+© 2014-2022 Hiltjo Posthuma <[email protected]>
+© 2015-2019 Quentin Rameau <[email protected]>
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/dwm/Repositories/dmenu/Makefile b/dwm/Repositories/dmenu/Makefile
new file mode 100644
index 0000000..458c524
--- /dev/null
+++ b/dwm/Repositories/dmenu/Makefile
@@ -0,0 +1,58 @@
+# dmenu - dynamic menu
+# See LICENSE file for copyright and license details.
+
+include config.mk
+
+SRC = drw.c dmenu.c stest.c util.c
+OBJ = $(SRC:.c=.o)
+
+all: dmenu stest
+
+.c.o:
+ $(CC) -c $(CFLAGS) $<
+
+config.h:
+ cp config.def.h $@
+
+$(OBJ): arg.h config.h config.mk drw.h
+
+dmenu: dmenu.o drw.o util.o
+ $(CC) -o $@ dmenu.o drw.o util.o $(LDFLAGS)
+
+stest: stest.o
+ $(CC) -o $@ stest.o $(LDFLAGS)
+
+clean:
+ rm -f dmenu stest $(OBJ) dmenu-$(VERSION).tar.gz
+
+dist: clean
+ mkdir -p dmenu-$(VERSION)
+ cp LICENSE Makefile README arg.h config.def.h config.mk dmenu.1\
+ drw.h util.h dmenu_path dmenu_run stest.1 $(SRC)\
+ dmenu-$(VERSION)
+ tar -cf dmenu-$(VERSION).tar dmenu-$(VERSION)
+ gzip dmenu-$(VERSION).tar
+ rm -rf dmenu-$(VERSION)
+
+install: all
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ cp -f dmenu dmenu_path dmenu_run stest $(DESTDIR)$(PREFIX)/bin
+ chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu
+ chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_path
+ chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_run
+ chmod 755 $(DESTDIR)$(PREFIX)/bin/stest
+ mkdir -p $(DESTDIR)$(MANPREFIX)/man1
+ sed "s/VERSION/$(VERSION)/g" < dmenu.1 > $(DESTDIR)$(MANPREFIX)/man1/dmenu.1
+ sed "s/VERSION/$(VERSION)/g" < stest.1 > $(DESTDIR)$(MANPREFIX)/man1/stest.1
+ chmod 644 $(DESTDIR)$(MANPREFIX)/man1/dmenu.1
+ chmod 644 $(DESTDIR)$(MANPREFIX)/man1/stest.1
+
+uninstall:
+ rm -f $(DESTDIR)$(PREFIX)/bin/dmenu\
+ $(DESTDIR)$(PREFIX)/bin/dmenu_path\
+ $(DESTDIR)$(PREFIX)/bin/dmenu_run\
+ $(DESTDIR)$(PREFIX)/bin/stest\
+ $(DESTDIR)$(MANPREFIX)/man1/dmenu.1\
+ $(DESTDIR)$(MANPREFIX)/man1/stest.1
+
+.PHONY: all clean dist install uninstall
diff --git a/dwm/Repositories/dmenu/README b/dwm/Repositories/dmenu/README
new file mode 100644
index 0000000..a8fcdfe
--- /dev/null
+++ b/dwm/Repositories/dmenu/README
@@ -0,0 +1,24 @@
+dmenu - dynamic menu
+====================
+dmenu is an efficient dynamic menu for X.
+
+
+Requirements
+------------
+In order to build dmenu you need the Xlib header files.
+
+
+Installation
+------------
+Edit config.mk to match your local setup (dmenu is installed into
+the /usr/local namespace by default).
+
+Afterwards enter the following command to build and install dmenu
+(if necessary as root):
+
+ make clean install
+
+
+Running dmenu
+-------------
+See the man page for details.
diff --git a/dwm/Repositories/dmenu/arg.h b/dwm/Repositories/dmenu/arg.h
new file mode 100644
index 0000000..e94e02b
--- /dev/null
+++ b/dwm/Repositories/dmenu/arg.h
@@ -0,0 +1,49 @@
+/*
+ * Copy me if you can.
+ * by 20h
+ */
+
+#ifndef ARG_H__
+#define ARG_H__
+
+extern char *argv0;
+
+/* use main(int argc, char *argv[]) */
+#define ARGBEGIN for (argv0 = *argv, argv++, argc--;\
+ argv[0] && argv[0][0] == '-'\
+ && argv[0][1];\
+ argc--, argv++) {\
+ char argc_;\
+ char **argv_;\
+ int brk_;\
+ if (argv[0][1] == '-' && argv[0][2] == '\0') {\
+ argv++;\
+ argc--;\
+ break;\
+ }\
+ for (brk_ = 0, argv[0]++, argv_ = argv;\
+ argv[0][0] && !brk_;\
+ argv[0]++) {\
+ if (argv_ != argv)\
+ break;\
+ argc_ = argv[0][0];\
+ switch (argc_)
+
+#define ARGEND }\
+ }
+
+#define ARGC() argc_
+
+#define EARGF(x) ((argv[0][1] == '\0' && argv[1] == NULL)?\
+ ((x), abort(), (char *)0) :\
+ (brk_ = 1, (argv[0][1] != '\0')?\
+ (&argv[0][1]) :\
+ (argc--, argv++, argv[0])))
+
+#define ARGF() ((argv[0][1] == '\0' && argv[1] == NULL)?\
+ (char *)0 :\
+ (brk_ = 1, (argv[0][1] != '\0')?\
+ (&argv[0][1]) :\
+ (argc--, argv++, argv[0])))
+
+#endif
diff --git a/dwm/Repositories/dmenu/config.def.h b/dwm/Repositories/dmenu/config.def.h
new file mode 100644
index 0000000..cfff3e4
--- /dev/null
+++ b/dwm/Repositories/dmenu/config.def.h
@@ -0,0 +1,28 @@
+/* See LICENSE file for copyright and license details. */
+/* Default settings; can be overriden by command line. */
+
+static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
+static int centered = 0; /* -c option; centers dmenu on screen */
+static int min_width = 500; /* minimum width when centered */
+/* -fn option overrides fonts[0]; default X11 font or font set */
+static const char *fonts[] = {
+ "monospace:size=10"
+};
+static const char *prompt = NULL; /* -p option; prompt to the left of input field */
+static const char *colors[SchemeLast][2] = {
+ /* fg bg */
+ [SchemeNorm] = { "#bbbbbb", "#222222" },
+ [SchemeSel] = { "#eeeeee", "#005577" },
+ [SchemeOut] = { "#000000", "#00ffff" },
+};
+/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
+static unsigned int lines = 0;
+
+/*
+ * Characters not considered part of a word while deleting words
+ * for example: " /?\"&[]"
+ */
+static const char worddelimiters[] = " ";
+
+/* Size of the window border */
+static unsigned int border_width = 0;
diff --git a/dwm/Repositories/dmenu/config.def.h.orig b/dwm/Repositories/dmenu/config.def.h.orig
new file mode 100644
index 0000000..88ef264
--- /dev/null
+++ b/dwm/Repositories/dmenu/config.def.h.orig
@@ -0,0 +1,25 @@
+/* See LICENSE file for copyright and license details. */
+/* Default settings; can be overriden by command line. */
+
+static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
+static int centered = 0; /* -c option; centers dmenu on screen */
+static int min_width = 500; /* minimum width when centered */
+/* -fn option overrides fonts[0]; default X11 font or font set */
+static const char *fonts[] = {
+ "monospace:size=10"
+};
+static const char *prompt = NULL; /* -p option; prompt to the left of input field */
+static const char *colors[SchemeLast][2] = {
+ /* fg bg */
+ [SchemeNorm] = { "#bbbbbb", "#222222" },
+ [SchemeSel] = { "#eeeeee", "#005577" },
+ [SchemeOut] = { "#000000", "#00ffff" },
+};
+/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
+static unsigned int lines = 0;
+
+/*
+ * Characters not considered part of a word while deleting words
+ * for example: " /?\"&[]"
+ */
+static const char worddelimiters[] = " ";
diff --git a/dwm/Repositories/dmenu/config.h b/dwm/Repositories/dmenu/config.h
new file mode 100644
index 0000000..7947d42
--- /dev/null
+++ b/dwm/Repositories/dmenu/config.h
@@ -0,0 +1,29 @@
+/* See LICENSE file for copyright and license details. */
+/* Default settings; can be overriden by command line. */
+
+static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
+static int centered = 1; /* -c option; centers dmenu on screen */
+static int min_width = 1000; /* minimum width when centered */
+/* Size of the window border */
+static unsigned int border_width = 2;
+
+/* -fn option overrides fonts[0]; default X11 font or font set */
+static const char *fonts[] = {
+ "Iosevka Comfy:size=16",
+ "NotoColorEmoji:size=10"
+};
+static const char *prompt = NULL; /* -p option; prompt to the left of input field */
+static const char *colors[SchemeLast][2] = {
+ /* fg bg */
+ [SchemeNorm] = { "#ffffff", "#000000" },
+ [SchemeSel] = { "#ffffff", "#989898" },
+ [SchemeOut] = { "#000000", "#00ffff" },
+};
+/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
+static unsigned int lines = 20;
+
+/*
+ * Characters not considered part of a word while deleting words
+ * for example: " /?\"&[]"
+ */
+static const char worddelimiters[] = " ";
diff --git a/dwm/Repositories/dmenu/config.mk b/dwm/Repositories/dmenu/config.mk
new file mode 100644
index 0000000..566348b
--- /dev/null
+++ b/dwm/Repositories/dmenu/config.mk
@@ -0,0 +1,32 @@
+# dmenu version
+VERSION = 5.2
+
+# paths
+PREFIX = /usr/local
+MANPREFIX = $(PREFIX)/share/man
+
+X11INC = /usr/X11R6/include
+X11LIB = /usr/X11R6/lib
+
+# Xinerama, comment if you don't want it
+XINERAMALIBS = -lXinerama
+XINERAMAFLAGS = -DXINERAMA
+
+# freetype
+FREETYPELIBS = -lfontconfig -lXft
+FREETYPEINC = /usr/include/freetype2
+# OpenBSD (uncomment)
+#FREETYPEINC = $(X11INC)/freetype2
+#MANPREFIX = ${PREFIX}/man
+
+# includes and libs
+INCS = -I$(X11INC) -I$(FREETYPEINC)
+LIBS = -L$(X11LIB) -lX11 $(XINERAMALIBS) $(FREETYPELIBS)
+
+# flags
+CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" $(XINERAMAFLAGS)
+CFLAGS = -std=c99 -pedantic -Wall -Os $(INCS) $(CPPFLAGS)
+LDFLAGS = $(LIBS)
+
+# compiler and linker
+CC = cc
diff --git a/dwm/Repositories/dmenu/dmenu b/dwm/Repositories/dmenu/dmenu
new file mode 100755
index 0000000..d4f3379
--- /dev/null
+++ b/dwm/Repositories/dmenu/dmenu
Binary files differ
diff --git a/dwm/Repositories/dmenu/dmenu-border-20230512-0fe460d.diff b/dwm/Repositories/dmenu/dmenu-border-20230512-0fe460d.diff
new file mode 100644
index 0000000..f7a5971
--- /dev/null
+++ b/dwm/Repositories/dmenu/dmenu-border-20230512-0fe460d.diff
@@ -0,0 +1,36 @@
+diff --git a/config.def.h b/config.def.h
+index 1edb647..dd3eb31 100644
+--- a/config.def.h
++++ b/config.def.h
+@@ -21,3 +21,6 @@ static unsigned int lines = 0;
+ * for example: " /?\"&[]"
+ */
+ static const char worddelimiters[] = " ";
++
++/* Size of the window border */
++static unsigned int border_width = 0;
+diff --git a/dmenu.c b/dmenu.c
+index 27b7a30..7c130fc 100644
+--- a/dmenu.c
++++ b/dmenu.c
+@@ -684,9 +684,11 @@ setup(void)
+ swa.override_redirect = True;
+ swa.background_pixel = scheme[SchemeNorm][ColBg].pixel;
+ swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask;
+- win = XCreateWindow(dpy, root, x, y, mw, mh, 0,
++ win = XCreateWindow(dpy, root, x, y, mw, mh, border_width,
+ CopyFromParent, CopyFromParent, CopyFromParent,
+ CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
++ if (border_width)
++ XSetWindowBorder(dpy, win, scheme[SchemeSel][ColBg].pixel);
+ XSetClassHint(dpy, win, &ch);
+
+
+@@ -757,6 +759,8 @@ main(int argc, char *argv[])
+ colors[SchemeSel][ColFg] = argv[++i];
+ else if (!strcmp(argv[i], "-w")) /* embedding window id */
+ embed = argv[++i];
++ else if (!strcmp(argv[i], "-bw"))
++ border_width = atoi(argv[++i]); /* border width */
+ else
+ usage();
diff --git a/dwm/Repositories/dmenu/dmenu-center-5.2.diff b/dwm/Repositories/dmenu/dmenu-center-5.2.diff
new file mode 100644
index 0000000..9401dc5
--- /dev/null
+++ b/dwm/Repositories/dmenu/dmenu-center-5.2.diff
@@ -0,0 +1,104 @@
+diff --git a/config.def.h b/config.def.h
+index 1edb647..88ef264 100644
+--- a/config.def.h
++++ b/config.def.h
+@@ -2,6 +2,8 @@
+ /* Default settings; can be overriden by command line. */
+
+ static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
++static int centered = 0; /* -c option; centers dmenu on screen */
++static int min_width = 500; /* minimum width when centered */
+ /* -fn option overrides fonts[0]; default X11 font or font set */
+ static const char *fonts[] = {
+ "monospace:size=10"
+diff --git a/dmenu.1 b/dmenu.1
+index 323f93c..c036baa 100644
+--- a/dmenu.1
++++ b/dmenu.1
+@@ -40,6 +40,9 @@ which lists programs in the user's $PATH and runs the result in their $SHELL.
+ .B \-b
+ dmenu appears at the bottom of the screen.
+ .TP
++.B \-c
++dmenu appears centered on the screen.
++.TP
+ .B \-f
+ dmenu grabs the keyboard before reading stdin if not reading from a tty. This
+ is faster, but will lock up X until stdin reaches end\-of\-file.
+diff --git a/dmenu.c b/dmenu.c
+index 27b7a30..427fb04 100644
+--- a/dmenu.c
++++ b/dmenu.c
+@@ -96,6 +96,15 @@ calcoffsets(void)
+ break;
+ }
+
++static int
++max_textw(void)
++{
++ int len = 0;
++ for (struct item *item = items; item && item->text; item++)
++ len = MAX(TEXTW(item->text), len);
++ return len;
++}
++
+ static void
+ cleanup(void)
+ {
+@@ -636,6 +645,7 @@ setup(void)
+ bh = drw->fonts->h + 2;
+ lines = MAX(lines, 0);
+ mh = (lines + 1) * bh;
++ promptw = (prompt && *prompt) ? TEXTW(prompt) - lrpad / 4 : 0;
+ #ifdef XINERAMA
+ i = 0;
+ if (parentwin == root && (info = XineramaQueryScreens(dpy, &n))) {
+@@ -662,9 +672,16 @@ setup(void)
+ if (INTERSECT(x, y, 1, 1, info[i]) != 0)
+ break;
+
+- x = info[i].x_org;
+- y = info[i].y_org + (topbar ? 0 : info[i].height - mh);
+- mw = info[i].width;
++ if (centered) {
++ mw = MIN(MAX(max_textw() + promptw, min_width), info[i].width);
++ x = info[i].x_org + ((info[i].width - mw) / 2);
++ y = info[i].y_org + ((info[i].height - mh) / 2);
++ } else {
++ x = info[i].x_org;
++ y = info[i].y_org + (topbar ? 0 : info[i].height - mh);
++ mw = info[i].width;
++ }
++
+ XFree(info);
+ } else
+ #endif
+@@ -672,9 +689,16 @@ setup(void)
+ if (!XGetWindowAttributes(dpy, parentwin, &wa))
+ die("could not get embedding window attributes: 0x%lx",
+ parentwin);
+- x = 0;
+- y = topbar ? 0 : wa.height - mh;
+- mw = wa.width;
++
++ if (centered) {
++ mw = MIN(MAX(max_textw() + promptw, min_width), wa.width);
++ x = (wa.width - mw) / 2;
++ y = (wa.height - mh) / 2;
++ } else {
++ x = 0;
++ y = topbar ? 0 : wa.height - mh;
++ mw = wa.width;
++ }
+ }
+ promptw = (prompt && *prompt) ? TEXTW(prompt) - lrpad / 4 : 0;
+ inputw = mw / 3; /* input width: ~33% of monitor width */
+@@ -733,6 +757,8 @@ main(int argc, char *argv[])
+ topbar = 0;
+ else if (!strcmp(argv[i], "-f")) /* grabs keyboard before reading stdin */
+ fast = 1;
++ else if (!strcmp(argv[i], "-c")) /* centers dmenu on screen */
++ centered = 1;
+ else if (!strcmp(argv[i], "-i")) { /* case-insensitive item matching */
+ fstrncmp = strncasecmp;
+ fstrstr = cistrstr;
diff --git a/dwm/Repositories/dmenu/dmenu-lineheight-5.2.diff b/dwm/Repositories/dmenu/dmenu-lineheight-5.2.diff
new file mode 100644
index 0000000..a5e8468
--- /dev/null
+++ b/dwm/Repositories/dmenu/dmenu-lineheight-5.2.diff
@@ -0,0 +1,106 @@
+From ba103e38ea4ab07f9a3ee90627714b9bea17c329 Mon Sep 17 00:00:00 2001
+From: pskry <[email protected]>
+Date: Sun, 8 Nov 2020 22:04:22 +0100
+Subject: [PATCH] Add an option which defines the lineheight
+
+Despite both the panel and dmenu using the same font (a Terminus 12),
+dmenu is shorter and the panel is visible from under the dmenu bar.
+The appearance can be even more distracting when using similar colors
+for background and selections. With the option added by this patch,
+dmenu can be launched with a '-h 24', thus completely covering the panel.
+---
+ config.def.h | 3 +++
+ dmenu.1 | 5 +++++
+ dmenu.c | 11 ++++++++---
+ 3 files changed, 16 insertions(+), 3 deletions(-)
+
+diff --git a/config.def.h b/config.def.h
+index 1edb647..4394dec 100644
+--- a/config.def.h
++++ b/config.def.h
+@@ -15,6 +15,9 @@ static const char *colors[SchemeLast][2] = {
+ };
+ /* -l option; if nonzero, dmenu uses vertical list with given number of lines */
+ static unsigned int lines = 0;
++/* -h option; minimum height of a menu line */
++static unsigned int lineheight = 0;
++static unsigned int min_lineheight = 8;
+
+ /*
+ * Characters not considered part of a word while deleting words
+diff --git a/dmenu.1 b/dmenu.1
+index 323f93c..f2a82b4 100644
+--- a/dmenu.1
++++ b/dmenu.1
+@@ -6,6 +6,8 @@ dmenu \- dynamic menu
+ .RB [ \-bfiv ]
+ .RB [ \-l
+ .IR lines ]
++.RB [ \-h
++.IR height ]
+ .RB [ \-m
+ .IR monitor ]
+ .RB [ \-p
+@@ -50,6 +52,9 @@ dmenu matches menu items case insensitively.
+ .BI \-l " lines"
+ dmenu lists items vertically, with the given number of lines.
+ .TP
++.BI \-h " height"
++dmenu uses a menu line of at least 'height' pixels tall, but no less than 8.
++.TP
+ .BI \-m " monitor"
+ dmenu is displayed on the monitor number supplied. Monitor numbers are starting
+ from 0.
+diff --git a/dmenu.c b/dmenu.c
+index e7be8af..82b204b 100644
+--- a/dmenu.c
++++ b/dmenu.c
+@@ -148,7 +148,7 @@ drawmenu(void)
+ {
+ unsigned int curpos;
+ struct item *item;
+- int x = 0, y = 0, w;
++ int x = 0, y = 0, fh = drw->fonts->h, w;
+
+ drw_setscheme(drw, scheme[SchemeNorm]);
+ drw_rect(drw, 0, 0, mw, mh, 1, 1);
+@@ -165,7 +165,7 @@ drawmenu(void)
+ curpos = TEXTW(text) - TEXTW(&text[cursor]);
+ if ((curpos += lrpad / 2 - 1) < w) {
+ drw_setscheme(drw, scheme[SchemeNorm]);
+- drw_rect(drw, x + curpos, 2, 2, bh - 4, 1, 0);
++ drw_rect(drw, x + curpos, 2 + (bh - fh) / 2, 2, fh - 4, 1, 0);
+ }
+
+ if (lines > 0) {
+@@ -630,6 +630,7 @@ setup(void)
+
+ /* calculate menu geometry */
+ bh = drw->fonts->h + 2;
++ bh = MAX(bh,lineheight); /* make a menu line AT LEAST 'lineheight' tall */
+ lines = MAX(lines, 0);
+ mh = (lines + 1) * bh;
+ #ifdef XINERAMA
+@@ -710,7 +711,7 @@ setup(void)
+ static void
+ usage(void)
+ {
+- die("usage: dmenu [-bfiv] [-l lines] [-p prompt] [-fn font] [-m monitor]\n"
++ die("usage: dmenu [-bfiv] [-l lines] [-h height] [-p prompt] [-fn font] [-m monitor]\n"
+ " [-nb color] [-nf color] [-sb color] [-sf color] [-w windowid]");
+ }
+
+@@ -737,6 +738,10 @@ main(int argc, char *argv[])
+ /* these options take one argument */
+ else if (!strcmp(argv[i], "-l")) /* number of lines in vertical list */
+ lines = atoi(argv[++i]);
++ else if (!strcmp(argv[i], "-h")) { /* minimum height of one menu line */
++ lineheight = atoi(argv[++i]);
++ lineheight = MAX(lineheight, min_lineheight);
++ }
+ else if (!strcmp(argv[i], "-m"))
+ mon = atoi(argv[++i]);
+ else if (!strcmp(argv[i], "-p")) /* adds prompt to left of input field */
+--
+2.38.1
+
diff --git a/dwm/Repositories/dmenu/dmenu-xresources-4.9.diff b/dwm/Repositories/dmenu/dmenu-xresources-4.9.diff
new file mode 100644
index 0000000..267fb0a
--- /dev/null
+++ b/dwm/Repositories/dmenu/dmenu-xresources-4.9.diff
@@ -0,0 +1,126 @@
+diff '--color=auto' -up ../dmenu-4.9/dmenu.c ./dmenu.c
+--- ../dmenu-4.9/dmenu.c 2019-02-02 13:55:02.000000000 +0100
++++ ./dmenu.c 2020-05-24 00:27:58.038586112 +0200
+@@ -15,6 +15,7 @@
+ #include <X11/extensions/Xinerama.h>
+ #endif
+ #include <X11/Xft/Xft.h>
++#include <X11/Xresource.h>
+
+ #include "drw.h"
+ #include "util.h"
+@@ -53,6 +54,10 @@ static XIC xic;
+ static Drw *drw;
+ static Clr *scheme[SchemeLast];
+
++/* Temporary arrays to allow overriding xresources values */
++static char *colortemp[4];
++static char *tempfonts;
++
+ #include "config.h"
+
+ static int (*fstrncmp)(const char *, const char *, size_t) = strncmp;
+@@ -596,8 +601,13 @@ setup(void)
+ int a, di, n, area = 0;
+ #endif
+ /* init appearance */
+- for (j = 0; j < SchemeLast; j++)
+- scheme[j] = drw_scm_create(drw, colors[j], 2);
++ for (j = 0; j < SchemeLast; j++) {
++ scheme[j] = drw_scm_create(drw, (const char**)colors[j], 2);
++ }
++ for (j = 0; j < SchemeOut; ++j) {
++ for (i = 0; i < 2; ++i)
++ free(colors[j][i]);
++ }
+
+ clip = XInternAtom(dpy, "CLIPBOARD", False);
+ utf8 = XInternAtom(dpy, "UTF8_STRING", False);
+@@ -687,6 +697,41 @@ usage(void)
+ exit(1);
+ }
+
++void
++readxresources(void) {
++ XrmInitialize();
++
++ char* xrm;
++ if ((xrm = XResourceManagerString(drw->dpy))) {
++ char *type;
++ XrmDatabase xdb = XrmGetStringDatabase(xrm);
++ XrmValue xval;
++
++ if (XrmGetResource(xdb, "dmenu.font", "*", &type, &xval))
++ fonts[0] = strdup(xval.addr);
++ else
++ fonts[0] = strdup(fonts[0]);
++ if (XrmGetResource(xdb, "dmenu.background", "*", &type, &xval))
++ colors[SchemeNorm][ColBg] = strdup(xval.addr);
++ else
++ colors[SchemeNorm][ColBg] = strdup(colors[SchemeNorm][ColBg]);
++ if (XrmGetResource(xdb, "dmenu.foreground", "*", &type, &xval))
++ colors[SchemeNorm][ColFg] = strdup(xval.addr);
++ else
++ colors[SchemeNorm][ColFg] = strdup(colors[SchemeNorm][ColFg]);
++ if (XrmGetResource(xdb, "dmenu.selbackground", "*", &type, &xval))
++ colors[SchemeSel][ColBg] = strdup(xval.addr);
++ else
++ colors[SchemeSel][ColBg] = strdup(colors[SchemeSel][ColBg]);
++ if (XrmGetResource(xdb, "dmenu.selforeground", "*", &type, &xval))
++ colors[SchemeSel][ColFg] = strdup(xval.addr);
++ else
++ colors[SchemeSel][ColFg] = strdup(colors[SchemeSel][ColFg]);
++
++ XrmDestroyDatabase(xdb);
++ }
++}
++
+ int
+ main(int argc, char *argv[])
+ {
+@@ -715,15 +760,15 @@ main(int argc, char *argv[])
+ else if (!strcmp(argv[i], "-p")) /* adds prompt to left of input field */
+ prompt = argv[++i];
+ else if (!strcmp(argv[i], "-fn")) /* font or font set */
+- fonts[0] = argv[++i];
++ tempfonts = argv[++i];
+ else if (!strcmp(argv[i], "-nb")) /* normal background color */
+- colors[SchemeNorm][ColBg] = argv[++i];
++ colortemp[0] = argv[++i];
+ else if (!strcmp(argv[i], "-nf")) /* normal foreground color */
+- colors[SchemeNorm][ColFg] = argv[++i];
++ colortemp[1] = argv[++i];
+ else if (!strcmp(argv[i], "-sb")) /* selected background color */
+- colors[SchemeSel][ColBg] = argv[++i];
++ colortemp[2] = argv[++i];
+ else if (!strcmp(argv[i], "-sf")) /* selected foreground color */
+- colors[SchemeSel][ColFg] = argv[++i];
++ colortemp[3] = argv[++i];
+ else if (!strcmp(argv[i], "-w")) /* embedding window id */
+ embed = argv[++i];
+ else
+@@ -743,8 +788,23 @@ main(int argc, char *argv[])
+ die("could not get embedding window attributes: 0x%lx",
+ parentwin);
+ drw = drw_create(dpy, screen, root, wa.width, wa.height);
+- if (!drw_fontset_create(drw, fonts, LENGTH(fonts)))
++ readxresources();
++ /* Now we check whether to override xresources with commandline parameters */
++ if ( tempfonts )
++ fonts[0] = strdup(tempfonts);
++ if ( colortemp[0])
++ colors[SchemeNorm][ColBg] = strdup(colortemp[0]);
++ if ( colortemp[1])
++ colors[SchemeNorm][ColFg] = strdup(colortemp[1]);
++ if ( colortemp[2])
++ colors[SchemeSel][ColBg] = strdup(colortemp[2]);
++ if ( colortemp[3])
++ colors[SchemeSel][ColFg] = strdup(colortemp[3]);
++
++ if (!drw_fontset_create(drw, (const char**)fonts, LENGTH(fonts)))
+ die("no fonts could be loaded.");
++
++ free(fonts[0]);
+ lrpad = drw->fonts->h;
+
+ #ifdef __OpenBSD__
diff --git a/dwm/Repositories/dmenu/dmenu.1 b/dwm/Repositories/dmenu/dmenu.1
new file mode 100644
index 0000000..c036baa
--- /dev/null
+++ b/dwm/Repositories/dmenu/dmenu.1
@@ -0,0 +1,197 @@
+.TH DMENU 1 dmenu\-VERSION
+.SH NAME
+dmenu \- dynamic menu
+.SH SYNOPSIS
+.B dmenu
+.RB [ \-bfiv ]
+.RB [ \-l
+.IR lines ]
+.RB [ \-m
+.IR monitor ]
+.RB [ \-p
+.IR prompt ]
+.RB [ \-fn
+.IR font ]
+.RB [ \-nb
+.IR color ]
+.RB [ \-nf
+.IR color ]
+.RB [ \-sb
+.IR color ]
+.RB [ \-sf
+.IR color ]
+.RB [ \-w
+.IR windowid ]
+.P
+.BR dmenu_run " ..."
+.SH DESCRIPTION
+.B dmenu
+is a dynamic menu for X, which reads a list of newline\-separated items from
+stdin. When the user selects an item and presses Return, their choice is printed
+to stdout and dmenu terminates. Entering text will narrow the items to those
+matching the tokens in the input.
+.P
+.B dmenu_run
+is a script used by
+.IR dwm (1)
+which lists programs in the user's $PATH and runs the result in their $SHELL.
+.SH OPTIONS
+.TP
+.B \-b
+dmenu appears at the bottom of the screen.
+.TP
+.B \-c
+dmenu appears centered on the screen.
+.TP
+.B \-f
+dmenu grabs the keyboard before reading stdin if not reading from a tty. This
+is faster, but will lock up X until stdin reaches end\-of\-file.
+.TP
+.B \-i
+dmenu matches menu items case insensitively.
+.TP
+.BI \-l " lines"
+dmenu lists items vertically, with the given number of lines.
+.TP
+.BI \-m " monitor"
+dmenu is displayed on the monitor number supplied. Monitor numbers are starting
+from 0.
+.TP
+.BI \-p " prompt"
+defines the prompt to be displayed to the left of the input field.
+.TP
+.BI \-fn " font"
+defines the font or font set used.
+.TP
+.BI \-nb " color"
+defines the normal background color.
+.IR #RGB ,
+.IR #RRGGBB ,
+and X color names are supported.
+.TP
+.BI \-nf " color"
+defines the normal foreground color.
+.TP
+.BI \-sb " color"
+defines the selected background color.
+.TP
+.BI \-sf " color"
+defines the selected foreground color.
+.TP
+.B \-v
+prints version information to stdout, then exits.
+.TP
+.BI \-w " windowid"
+embed into windowid.
+.SH USAGE
+dmenu is completely controlled by the keyboard. Items are selected using the
+arrow keys, page up, page down, home, and end.
+.TP
+.B Tab
+Copy the selected item to the input field.
+.TP
+.B Return
+Confirm selection. Prints the selected item to stdout and exits, returning
+success.
+.TP
+.B Ctrl-Return
+Confirm selection. Prints the selected item to stdout and continues.
+.TP
+.B Shift\-Return
+Confirm input. Prints the input text to stdout and exits, returning success.
+.TP
+.B Escape
+Exit without selecting an item, returning failure.
+.TP
+.B Ctrl-Left
+Move cursor to the start of the current word
+.TP
+.B Ctrl-Right
+Move cursor to the end of the current word
+.TP
+.B C\-a
+Home
+.TP
+.B C\-b
+Left
+.TP
+.B C\-c
+Escape
+.TP
+.B C\-d
+Delete
+.TP
+.B C\-e
+End
+.TP
+.B C\-f
+Right
+.TP
+.B C\-g
+Escape
+.TP
+.B C\-h
+Backspace
+.TP
+.B C\-i
+Tab
+.TP
+.B C\-j
+Return
+.TP
+.B C\-J
+Shift-Return
+.TP
+.B C\-k
+Delete line right
+.TP
+.B C\-m
+Return
+.TP
+.B C\-M
+Shift-Return
+.TP
+.B C\-n
+Down
+.TP
+.B C\-p
+Up
+.TP
+.B C\-u
+Delete line left
+.TP
+.B C\-w
+Delete word left
+.TP
+.B C\-y
+Paste from primary X selection
+.TP
+.B C\-Y
+Paste from X clipboard
+.TP
+.B M\-b
+Move cursor to the start of the current word
+.TP
+.B M\-f
+Move cursor to the end of the current word
+.TP
+.B M\-g
+Home
+.TP
+.B M\-G
+End
+.TP
+.B M\-h
+Up
+.TP
+.B M\-j
+Page down
+.TP
+.B M\-k
+Page up
+.TP
+.B M\-l
+Down
+.SH SEE ALSO
+.IR dwm (1),
+.IR stest (1)
diff --git a/dwm/Repositories/dmenu/dmenu.c b/dwm/Repositories/dmenu/dmenu.c
new file mode 100644
index 0000000..c816d04
--- /dev/null
+++ b/dwm/Repositories/dmenu/dmenu.c
@@ -0,0 +1,886 @@
+/* See LICENSE file for copyright and license details. */
+#include <ctype.h>
+#include <locale.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <time.h>
+#include <unistd.h>
+
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+#include <X11/Xutil.h>
+#ifdef XINERAMA
+#include <X11/extensions/Xinerama.h>
+#endif
+#include <X11/Xft/Xft.h>
+#include <X11/Xresource.h>
+
+#include "drw.h"
+#include "util.h"
+
+/* macros */
+#define INTERSECT(x,y,w,h,r) (MAX(0, MIN((x)+(w),(r).x_org+(r).width) - MAX((x),(r).x_org)) \
+ * MAX(0, MIN((y)+(h),(r).y_org+(r).height) - MAX((y),(r).y_org)))
+#define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad)
+
+/* enums */
+enum { SchemeNorm, SchemeSel, SchemeOut, SchemeLast }; /* color schemes */
+
+struct item {
+ char *text;
+ struct item *left, *right;
+ int out;
+};
+
+static char text[BUFSIZ] = "";
+static char *embed;
+static int bh, mw, mh;
+static int inputw = 0, promptw;
+static int lrpad; /* sum of left and right padding */
+static size_t cursor;
+static struct item *items = NULL;
+static struct item *matches, *matchend;
+static struct item *prev, *curr, *next, *sel;
+static int mon = -1, screen;
+
+static Atom clip, utf8;
+static Display *dpy;
+static Window root, parentwin, win;
+static XIC xic;
+
+static Drw *drw;
+static Clr *scheme[SchemeLast];
+
+/* Temporary arrays to allow overriding xresources values */
+static char *colortemp[4];
+static char *tempfonts;
+
+#include "config.h"
+
+static int (*fstrncmp)(const char *, const char *, size_t) = strncmp;
+static char *(*fstrstr)(const char *, const char *) = strstr;
+
+static unsigned int
+textw_clamp(const char *str, unsigned int n)
+{
+ unsigned int w = drw_fontset_getwidth_clamp(drw, str, n) + lrpad;
+ return MIN(w, n);
+}
+
+static void
+appenditem(struct item *item, struct item **list, struct item **last)
+{
+ if (*last)
+ (*last)->right = item;
+ else
+ *list = item;
+
+ item->left = *last;
+ item->right = NULL;
+ *last = item;
+}
+
+static void
+calcoffsets(void)
+{
+ int i, n;
+
+ if (lines > 0)
+ n = lines * bh;
+ else
+ n = mw - (promptw + inputw + TEXTW("<") + TEXTW(">"));
+ /* calculate which items will begin the next page and previous page */
+ for (i = 0, next = curr; next; next = next->right)
+ if ((i += (lines > 0) ? bh : textw_clamp(next->text, n)) > n)
+ break;
+ for (i = 0, prev = curr; prev && prev->left; prev = prev->left)
+ if ((i += (lines > 0) ? bh : textw_clamp(prev->left->text, n)) > n)
+ break;
+}
+
+static int
+max_textw(void)
+{
+ int len = 0;
+ for (struct item *item = items; item && item->text; item++)
+ len = MAX(TEXTW(item->text), len);
+ return len;
+}
+
+static void
+cleanup(void)
+{
+ size_t i;
+
+ XUngrabKey(dpy, AnyKey, AnyModifier, root);
+ for (i = 0; i < SchemeLast; i++)
+ free(scheme[i]);
+ for (i = 0; items && items[i].text; ++i)
+ free(items[i].text);
+ free(items);
+ drw_free(drw);
+ XSync(dpy, False);
+ XCloseDisplay(dpy);
+}
+
+static char *
+cistrstr(const char *h, const char *n)
+{
+ size_t i;
+
+ if (!n[0])
+ return (char *)h;
+
+ for (; *h; ++h) {
+ for (i = 0; n[i] && tolower((unsigned char)n[i]) ==
+ tolower((unsigned char)h[i]); ++i)
+ ;
+ if (n[i] == '\0')
+ return (char *)h;
+ }
+ return NULL;
+}
+
+static int
+drawitem(struct item *item, int x, int y, int w)
+{
+ if (item == sel)
+ drw_setscheme(drw, scheme[SchemeSel]);
+ else if (item->out)
+ drw_setscheme(drw, scheme[SchemeOut]);
+ else
+ drw_setscheme(drw, scheme[SchemeNorm]);
+
+ return drw_text(drw, x, y, w, bh, lrpad / 2, item->text, 0);
+}
+
+static void
+drawmenu(void)
+{
+ unsigned int curpos;
+ struct item *item;
+ int x = 0, y = 0, w;
+
+ drw_setscheme(drw, scheme[SchemeNorm]);
+ drw_rect(drw, 0, 0, mw, mh, 1, 1);
+
+ if (prompt && *prompt) {
+ drw_setscheme(drw, scheme[SchemeSel]);
+ x = drw_text(drw, x, 0, promptw, bh, lrpad / 2, prompt, 0);
+ }
+ /* draw input field */
+ w = (lines > 0 || !matches) ? mw - x : inputw;
+ drw_setscheme(drw, scheme[SchemeNorm]);
+ drw_text(drw, x, 0, w, bh, lrpad / 2, text, 0);
+
+ curpos = TEXTW(text) - TEXTW(&text[cursor]);
+ if ((curpos += lrpad / 2 - 1) < w) {
+ drw_setscheme(drw, scheme[SchemeNorm]);
+ drw_rect(drw, x + curpos, 2, 2, bh - 4, 1, 0);
+ }
+
+ if (lines > 0) {
+ /* draw vertical list */
+ for (item = curr; item != next; item = item->right)
+ drawitem(item, x, y += bh, mw - x);
+ } else if (matches) {
+ /* draw horizontal list */
+ x += inputw;
+ w = TEXTW("<");
+ if (curr->left) {
+ drw_setscheme(drw, scheme[SchemeNorm]);
+ drw_text(drw, x, 0, w, bh, lrpad / 2, "<", 0);
+ }
+ x += w;
+ for (item = curr; item != next; item = item->right)
+ x = drawitem(item, x, 0, textw_clamp(item->text, mw - x - TEXTW(">")));
+ if (next) {
+ w = TEXTW(">");
+ drw_setscheme(drw, scheme[SchemeNorm]);
+ drw_text(drw, mw - w, 0, w, bh, lrpad / 2, ">", 0);
+ }
+ }
+ drw_map(drw, win, 0, 0, mw, mh);
+}
+
+static void
+grabfocus(void)
+{
+ struct timespec ts = { .tv_sec = 0, .tv_nsec = 10000000 };
+ Window focuswin;
+ int i, revertwin;
+
+ for (i = 0; i < 100; ++i) {
+ XGetInputFocus(dpy, &focuswin, &revertwin);
+ if (focuswin == win)
+ return;
+ XSetInputFocus(dpy, win, RevertToParent, CurrentTime);
+ nanosleep(&ts, NULL);
+ }
+ die("cannot grab focus");
+}
+
+static void
+grabkeyboard(void)
+{
+ struct timespec ts = { .tv_sec = 0, .tv_nsec = 1000000 };
+ int i;
+
+ if (embed)
+ return;
+ /* try to grab keyboard, we may have to wait for another process to ungrab */
+ for (i = 0; i < 1000; i++) {
+ if (XGrabKeyboard(dpy, DefaultRootWindow(dpy), True, GrabModeAsync,
+ GrabModeAsync, CurrentTime) == GrabSuccess)
+ return;
+ nanosleep(&ts, NULL);
+ }
+ die("cannot grab keyboard");
+}
+
+static void
+match(void)
+{
+ static char **tokv = NULL;
+ static int tokn = 0;
+
+ char buf[sizeof text], *s;
+ int i, tokc = 0;
+ size_t len, textsize;
+ struct item *item, *lprefix, *lsubstr, *prefixend, *substrend;
+
+ strcpy(buf, text);
+ /* separate input text into tokens to be matched individually */
+ for (s = strtok(buf, " "); s; tokv[tokc - 1] = s, s = strtok(NULL, " "))
+ if (++tokc > tokn && !(tokv = realloc(tokv, ++tokn * sizeof *tokv)))
+ die("cannot realloc %zu bytes:", tokn * sizeof *tokv);
+ len = tokc ? strlen(tokv[0]) : 0;
+
+ matches = lprefix = lsubstr = matchend = prefixend = substrend = NULL;
+ textsize = strlen(text) + 1;
+ for (item = items; item && item->text; item++) {
+ for (i = 0; i < tokc; i++)
+ if (!fstrstr(item->text, tokv[i]))
+ break;
+ if (i != tokc) /* not all tokens match */
+ continue;
+ /* exact matches go first, then prefixes, then substrings */
+ if (!tokc || !fstrncmp(text, item->text, textsize))
+ appenditem(item, &matches, &matchend);
+ else if (!fstrncmp(tokv[0], item->text, len))
+ appenditem(item, &lprefix, &prefixend);
+ else
+ appenditem(item, &lsubstr, &substrend);
+ }
+ if (lprefix) {
+ if (matches) {
+ matchend->right = lprefix;
+ lprefix->left = matchend;
+ } else
+ matches = lprefix;
+ matchend = prefixend;
+ }
+ if (lsubstr) {
+ if (matches) {
+ matchend->right = lsubstr;
+ lsubstr->left = matchend;
+ } else
+ matches = lsubstr;
+ matchend = substrend;
+ }
+ curr = sel = matches;
+ calcoffsets();
+}
+
+static void
+insert(const char *str, ssize_t n)
+{
+ if (strlen(text) + n > sizeof text - 1)
+ return;
+ /* move existing text out of the way, insert new text, and update cursor */
+ memmove(&text[cursor + n], &text[cursor], sizeof text - cursor - MAX(n, 0));
+ if (n > 0)
+ memcpy(&text[cursor], str, n);
+ cursor += n;
+ match();
+}
+
+static size_t
+nextrune(int inc)
+{
+ ssize_t n;
+
+ /* return location of next utf8 rune in the given direction (+1 or -1) */
+ for (n = cursor + inc; n + inc >= 0 && (text[n] & 0xc0) == 0x80; n += inc)
+ ;
+ return n;
+}
+
+static void
+movewordedge(int dir)
+{
+ if (dir < 0) { /* move cursor to the start of the word*/
+ while (cursor > 0 && strchr(worddelimiters, text[nextrune(-1)]))
+ cursor = nextrune(-1);
+ while (cursor > 0 && !strchr(worddelimiters, text[nextrune(-1)]))
+ cursor = nextrune(-1);
+ } else { /* move cursor to the end of the word */
+ while (text[cursor] && strchr(worddelimiters, text[cursor]))
+ cursor = nextrune(+1);
+ while (text[cursor] && !strchr(worddelimiters, text[cursor]))
+ cursor = nextrune(+1);
+ }
+}
+
+static void
+keypress(XKeyEvent *ev)
+{
+ char buf[64];
+ int len;
+ KeySym ksym = NoSymbol;
+ Status status;
+
+ len = XmbLookupString(xic, ev, buf, sizeof buf, &ksym, &status);
+ switch (status) {
+ default: /* XLookupNone, XBufferOverflow */
+ return;
+ case XLookupChars: /* composed string from input method */
+ goto insert;
+ case XLookupKeySym:
+ case XLookupBoth: /* a KeySym and a string are returned: use keysym */
+ break;
+ }
+
+ if (ev->state & ControlMask) {
+ switch(ksym) {
+ case XK_a: ksym = XK_Home; break;
+ case XK_b: ksym = XK_Left; break;
+ case XK_c: ksym = XK_Escape; break;
+ case XK_d: ksym = XK_Delete; break;
+ case XK_e: ksym = XK_End; break;
+ case XK_f: ksym = XK_Right; break;
+ case XK_g: ksym = XK_Escape; break;
+ case XK_h: ksym = XK_BackSpace; break;
+ case XK_i: ksym = XK_Tab; break;
+ case XK_j: /* fallthrough */
+ case XK_J: /* fallthrough */
+ case XK_m: /* fallthrough */
+ case XK_M: ksym = XK_Return; ev->state &= ~ControlMask; break;
+ case XK_n: ksym = XK_Down; break;
+ case XK_p: ksym = XK_Up; break;
+
+ case XK_k: /* delete right */
+ text[cursor] = '\0';
+ match();
+ break;
+ case XK_u: /* delete left */
+ insert(NULL, 0 - cursor);
+ break;
+ case XK_w: /* delete word */
+ while (cursor > 0 && strchr(worddelimiters, text[nextrune(-1)]))
+ insert(NULL, nextrune(-1) - cursor);
+ while (cursor > 0 && !strchr(worddelimiters, text[nextrune(-1)]))
+ insert(NULL, nextrune(-1) - cursor);
+ break;
+ case XK_y: /* paste selection */
+ case XK_Y:
+ XConvertSelection(dpy, (ev->state & ShiftMask) ? clip : XA_PRIMARY,
+ utf8, utf8, win, CurrentTime);
+ return;
+ case XK_Left:
+ case XK_KP_Left:
+ movewordedge(-1);
+ goto draw;
+ case XK_Right:
+ case XK_KP_Right:
+ movewordedge(+1);
+ goto draw;
+ case XK_Return:
+ case XK_KP_Enter:
+ break;
+ case XK_bracketleft:
+ cleanup();
+ exit(1);
+ default:
+ return;
+ }
+ } else if (ev->state & Mod1Mask) {
+ switch(ksym) {
+ case XK_b:
+ movewordedge(-1);
+ goto draw;
+ case XK_f:
+ movewordedge(+1);
+ goto draw;
+ case XK_g: ksym = XK_Home; break;
+ case XK_G: ksym = XK_End; break;
+ case XK_h: ksym = XK_Up; break;
+ case XK_j: ksym = XK_Next; break;
+ case XK_k: ksym = XK_Prior; break;
+ case XK_l: ksym = XK_Down; break;
+ default:
+ return;
+ }
+ }
+
+ switch(ksym) {
+ default:
+insert:
+ if (!iscntrl((unsigned char)*buf))
+ insert(buf, len);
+ break;
+ case XK_Delete:
+ case XK_KP_Delete:
+ if (text[cursor] == '\0')
+ return;
+ cursor = nextrune(+1);
+ /* fallthrough */
+ case XK_BackSpace:
+ if (cursor == 0)
+ return;
+ insert(NULL, nextrune(-1) - cursor);
+ break;
+ case XK_End:
+ case XK_KP_End:
+ if (text[cursor] != '\0') {
+ cursor = strlen(text);
+ break;
+ }
+ if (next) {
+ /* jump to end of list and position items in reverse */
+ curr = matchend;
+ calcoffsets();
+ curr = prev;
+ calcoffsets();
+ while (next && (curr = curr->right))
+ calcoffsets();
+ }
+ sel = matchend;
+ break;
+ case XK_Escape:
+ cleanup();
+ exit(1);
+ case XK_Home:
+ case XK_KP_Home:
+ if (sel == matches) {
+ cursor = 0;
+ break;
+ }
+ sel = curr = matches;
+ calcoffsets();
+ break;
+ case XK_Left:
+ case XK_KP_Left:
+ if (cursor > 0 && (!sel || !sel->left || lines > 0)) {
+ cursor = nextrune(-1);
+ break;
+ }
+ if (lines > 0)
+ return;
+ /* fallthrough */
+ case XK_Up:
+ case XK_KP_Up:
+ if (sel && sel->left && (sel = sel->left)->right == curr) {
+ curr = prev;
+ calcoffsets();
+ }
+ break;
+ case XK_Next:
+ case XK_KP_Next:
+ if (!next)
+ return;
+ sel = curr = next;
+ calcoffsets();
+ break;
+ case XK_Prior:
+ case XK_KP_Prior:
+ if (!prev)
+ return;
+ sel = curr = prev;
+ calcoffsets();
+ break;
+ case XK_Return:
+ case XK_KP_Enter:
+ puts((sel && !(ev->state & ShiftMask)) ? sel->text : text);
+ if (!(ev->state & ControlMask)) {
+ cleanup();
+ exit(0);
+ }
+ if (sel)
+ sel->out = 1;
+ break;
+ case XK_Right:
+ case XK_KP_Right:
+ if (text[cursor] != '\0') {
+ cursor = nextrune(+1);
+ break;
+ }
+ if (lines > 0)
+ return;
+ /* fallthrough */
+ case XK_Down:
+ case XK_KP_Down:
+ if (sel && sel->right && (sel = sel->right) == next) {
+ curr = next;
+ calcoffsets();
+ }
+ break;
+ case XK_Tab:
+ if (!sel)
+ return;
+ cursor = strnlen(sel->text, sizeof text - 1);
+ memcpy(text, sel->text, cursor);
+ text[cursor] = '\0';
+ match();
+ break;
+ }
+
+draw:
+ drawmenu();
+}
+
+static void
+paste(void)
+{
+ char *p, *q;
+ int di;
+ unsigned long dl;
+ Atom da;
+
+ /* we have been given the current selection, now insert it into input */
+ if (XGetWindowProperty(dpy, win, utf8, 0, (sizeof text / 4) + 1, False,
+ utf8, &da, &di, &dl, &dl, (unsigned char **)&p)
+ == Success && p) {
+ insert(p, (q = strchr(p, '\n')) ? q - p : (ssize_t)strlen(p));
+ XFree(p);
+ }
+ drawmenu();
+}
+
+static void
+readstdin(void)
+{
+ char *line = NULL;
+ size_t i, itemsiz = 0, linesiz = 0;
+ ssize_t len;
+
+ /* read each line from stdin and add it to the item list */
+ for (i = 0; (len = getline(&line, &linesiz, stdin)) != -1; i++) {
+ if (i + 1 >= itemsiz) {
+ itemsiz += 256;
+ if (!(items = realloc(items, itemsiz * sizeof(*items))))
+ die("cannot realloc %zu bytes:", itemsiz * sizeof(*items));
+ }
+ if (line[len - 1] == '\n')
+ line[len - 1] = '\0';
+ if (!(items[i].text = strdup(line)))
+ die("strdup:");
+
+ items[i].out = 0;
+ }
+ free(line);
+ if (items)
+ items[i].text = NULL;
+ lines = MIN(lines, i);
+}
+
+static void
+run(void)
+{
+ XEvent ev;
+
+ while (!XNextEvent(dpy, &ev)) {
+ if (XFilterEvent(&ev, win))
+ continue;
+ switch(ev.type) {
+ case DestroyNotify:
+ if (ev.xdestroywindow.window != win)
+ break;
+ cleanup();
+ exit(1);
+ case Expose:
+ if (ev.xexpose.count == 0)
+ drw_map(drw, win, 0, 0, mw, mh);
+ break;
+ case FocusIn:
+ /* regrab focus from parent window */
+ if (ev.xfocus.window != win)
+ grabfocus();
+ break;
+ case KeyPress:
+ keypress(&ev.xkey);
+ break;
+ case SelectionNotify:
+ if (ev.xselection.property == utf8)
+ paste();
+ break;
+ case VisibilityNotify:
+ if (ev.xvisibility.state != VisibilityUnobscured)
+ XRaiseWindow(dpy, win);
+ break;
+ }
+ }
+}
+
+static void
+setup(void)
+{
+ int x, y, i, j;
+ unsigned int du;
+ XSetWindowAttributes swa;
+ XIM xim;
+ Window w, dw, *dws;
+ XWindowAttributes wa;
+ XClassHint ch = {"dmenu", "dmenu"};
+#ifdef XINERAMA
+ XineramaScreenInfo *info;
+ Window pw;
+ int a, di, n, area = 0;
+#endif
+ /* init appearance */
+ for (j = 0; j < SchemeLast; j++) {
+ scheme[j] = drw_scm_create(drw, (const char**)colors[j], 2);
+ }
+ for (j = 0; j < SchemeOut; ++j) {
+ for (i = 0; i < 2; ++i)
+ free(colors[j][i]);
+ }
+
+ clip = XInternAtom(dpy, "CLIPBOARD", False);
+ utf8 = XInternAtom(dpy, "UTF8_STRING", False);
+
+ /* calculate menu geometry */
+ bh = drw->fonts->h + 2;
+ lines = MAX(lines, 0);
+ mh = (lines + 1) * bh;
+ promptw = (prompt && *prompt) ? TEXTW(prompt) - lrpad / 4 : 0;
+#ifdef XINERAMA
+ i = 0;
+ if (parentwin == root && (info = XineramaQueryScreens(dpy, &n))) {
+ XGetInputFocus(dpy, &w, &di);
+ if (mon >= 0 && mon < n)
+ i = mon;
+ else if (w != root && w != PointerRoot && w != None) {
+ /* find top-level window containing current input focus */
+ do {
+ if (XQueryTree(dpy, (pw = w), &dw, &w, &dws, &du) && dws)
+ XFree(dws);
+ } while (w != root && w != pw);
+ /* find xinerama screen with which the window intersects most */
+ if (XGetWindowAttributes(dpy, pw, &wa))
+ for (j = 0; j < n; j++)
+ if ((a = INTERSECT(wa.x, wa.y, wa.width, wa.height, info[j])) > area) {
+ area = a;
+ i = j;
+ }
+ }
+ /* no focused window is on screen, so use pointer location instead */
+ if (mon < 0 && !area && XQueryPointer(dpy, root, &dw, &dw, &x, &y, &di, &di, &du))
+ for (i = 0; i < n; i++)
+ if (INTERSECT(x, y, 1, 1, info[i]) != 0)
+ break;
+
+ if (centered) {
+ mw = MIN(MAX(max_textw() + promptw, min_width), info[i].width);
+ x = info[i].x_org + ((info[i].width - mw) / 2);
+ y = info[i].y_org + ((info[i].height - mh) / 2);
+ } else {
+ x = info[i].x_org;
+ y = info[i].y_org + (topbar ? 0 : info[i].height - mh);
+ mw = info[i].width;
+ }
+
+ XFree(info);
+ } else
+#endif
+ {
+ if (!XGetWindowAttributes(dpy, parentwin, &wa))
+ die("could not get embedding window attributes: 0x%lx",
+ parentwin);
+
+ if (centered) {
+ mw = MIN(MAX(max_textw() + promptw, min_width), wa.width);
+ x = (wa.width - mw) / 2;
+ y = (wa.height - mh) / 2;
+ } else {
+ x = 0;
+ y = topbar ? 0 : wa.height - mh;
+ mw = wa.width;
+ }
+ }
+ promptw = (prompt && *prompt) ? TEXTW(prompt) - lrpad / 4 : 0;
+ inputw = mw / 3; /* input width: ~33% of monitor width */
+ match();
+
+ /* create menu window */
+ swa.override_redirect = True;
+ swa.background_pixel = scheme[SchemeNorm][ColBg].pixel;
+ swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask;
+ win = XCreateWindow(dpy, root, x, y, mw, mh, border_width,
+ CopyFromParent, CopyFromParent, CopyFromParent,
+ CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
+ if (border_width)
+ XSetWindowBorder(dpy, win, scheme[SchemeSel][ColBg].pixel);
+ XSetClassHint(dpy, win, &ch);
+
+
+ /* input methods */
+ if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL)
+ die("XOpenIM failed: could not open input device");
+
+ xic = XCreateIC(xim, XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
+ XNClientWindow, win, XNFocusWindow, win, NULL);
+
+ XMapRaised(dpy, win);
+ if (embed) {
+ XReparentWindow(dpy, win, parentwin, x, y);
+ XSelectInput(dpy, parentwin, FocusChangeMask | SubstructureNotifyMask);
+ if (XQueryTree(dpy, parentwin, &dw, &w, &dws, &du) && dws) {
+ for (i = 0; i < du && dws[i] != win; ++i)
+ XSelectInput(dpy, dws[i], FocusChangeMask);
+ XFree(dws);
+ }
+ grabfocus();
+ }
+ drw_resize(drw, mw, mh);
+ drawmenu();
+}
+
+static void
+usage(void)
+{
+ die("usage: dmenu [-bfiv] [-l lines] [-p prompt] [-fn font] [-m monitor]\n"
+ " [-nb color] [-nf color] [-sb color] [-sf color] [-w windowid]");
+}
+
+void
+readxresources(void) {
+ XrmInitialize();
+
+ char* xrm;
+ if ((xrm = XResourceManagerString(drw->dpy))) {
+ char *type;
+ XrmDatabase xdb = XrmGetStringDatabase(xrm);
+ XrmValue xval;
+
+ if (XrmGetResource(xdb, "dmenu.font", "*", &type, &xval))
+ fonts[0] = strdup(xval.addr);
+ else
+ fonts[0] = strdup(fonts[0]);
+ if (XrmGetResource(xdb, "dmenu.background", "*", &type, &xval))
+ colors[SchemeNorm][ColBg] = strdup(xval.addr);
+ else
+ colors[SchemeNorm][ColBg] = strdup(colors[SchemeNorm][ColBg]);
+ if (XrmGetResource(xdb, "dmenu.foreground", "*", &type, &xval))
+ colors[SchemeNorm][ColFg] = strdup(xval.addr);
+ else
+ colors[SchemeNorm][ColFg] = strdup(colors[SchemeNorm][ColFg]);
+ if (XrmGetResource(xdb, "dmenu.selbackground", "*", &type, &xval))
+ colors[SchemeSel][ColBg] = strdup(xval.addr);
+ else
+ colors[SchemeSel][ColBg] = strdup(colors[SchemeSel][ColBg]);
+ if (XrmGetResource(xdb, "dmenu.selforeground", "*", &type, &xval))
+ colors[SchemeSel][ColFg] = strdup(xval.addr);
+ else
+ colors[SchemeSel][ColFg] = strdup(colors[SchemeSel][ColFg]);
+
+ XrmDestroyDatabase(xdb);
+ }
+}
+
+int
+main(int argc, char *argv[])
+{
+ XWindowAttributes wa;
+ int i, fast = 0;
+
+ for (i = 1; i < argc; i++)
+ /* these options take no arguments */
+ if (!strcmp(argv[i], "-v")) { /* prints version information */
+ puts("dmenu-"VERSION);
+ exit(0);
+ } else if (!strcmp(argv[i], "-b")) /* appears at the bottom of the screen */
+ topbar = 0;
+ else if (!strcmp(argv[i], "-f")) /* grabs keyboard before reading stdin */
+ fast = 1;
+ else if (!strcmp(argv[i], "-c")) /* centers dmenu on screen */
+ centered = 1;
+ else if (!strcmp(argv[i], "-i")) { /* case-insensitive item matching */
+ fstrncmp = strncasecmp;
+ fstrstr = cistrstr;
+ } else if (i + 1 == argc)
+ usage();
+ /* these options take one argument */
+ else if (!strcmp(argv[i], "-l")) /* number of lines in vertical list */
+ lines = atoi(argv[++i]);
+ else if (!strcmp(argv[i], "-m"))
+ mon = atoi(argv[++i]);
+ else if (!strcmp(argv[i], "-p")) /* adds prompt to left of input field */
+ prompt = argv[++i];
+ else if (!strcmp(argv[i], "-fn")) /* font or font set */
+ tempfonts = argv[++i];
+ else if (!strcmp(argv[i], "-nb")) /* normal background color */
+ colortemp[0] = argv[++i];
+ else if (!strcmp(argv[i], "-nf")) /* normal foreground color */
+ colortemp[1] = argv[++i];
+ else if (!strcmp(argv[i], "-sb")) /* selected background color */
+ colortemp[2] = argv[++i];
+ else if (!strcmp(argv[i], "-sf")) /* selected foreground color */
+ colortemp[3] = argv[++i];
+ else if (!strcmp(argv[i], "-w")) /* embedding window id */
+ embed = argv[++i];
+ else if (!strcmp(argv[i], "-bw"))
+ border_width = atoi(argv[++i]); /* border width */
+ else
+ usage();
+
+ if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
+ fputs("warning: no locale support\n", stderr);
+ if (!(dpy = XOpenDisplay(NULL)))
+ die("cannot open display");
+ screen = DefaultScreen(dpy);
+ root = RootWindow(dpy, screen);
+ if (!embed || !(parentwin = strtol(embed, NULL, 0)))
+ parentwin = root;
+ if (!XGetWindowAttributes(dpy, parentwin, &wa))
+ die("could not get embedding window attributes: 0x%lx",
+ parentwin);
+ drw = drw_create(dpy, screen, root, wa.width, wa.height);
+ readxresources();
+ /* Now we check whether to override xresources with commandline parameters */
+ if ( tempfonts )
+ fonts[0] = strdup(tempfonts);
+ if ( colortemp[0])
+ colors[SchemeNorm][ColBg] = strdup(colortemp[0]);
+ if ( colortemp[1])
+ colors[SchemeNorm][ColFg] = strdup(colortemp[1]);
+ if ( colortemp[2])
+ colors[SchemeSel][ColBg] = strdup(colortemp[2]);
+ if ( colortemp[3])
+ colors[SchemeSel][ColFg] = strdup(colortemp[3]);
+
+ if (!drw_fontset_create(drw, (const char**)fonts, LENGTH(fonts)))
+ die("no fonts could be loaded.");
+
+ free(fonts[0]);
+ lrpad = drw->fonts->h;
+
+#ifdef __OpenBSD__
+ if (pledge("stdio rpath", NULL) == -1)
+ die("pledge");
+#endif
+
+ if (fast && !isatty(0)) {
+ grabkeyboard();
+ readstdin();
+ } else {
+ readstdin();
+ grabkeyboard();
+ }
+ setup();
+ run();
+
+ return 1; /* unreachable */
+}
diff --git a/dwm/Repositories/dmenu/dmenu.c.orig b/dwm/Repositories/dmenu/dmenu.c.orig
new file mode 100644
index 0000000..024d8fd
--- /dev/null
+++ b/dwm/Repositories/dmenu/dmenu.c.orig
@@ -0,0 +1,826 @@
+/* See LICENSE file for copyright and license details. */
+#include <ctype.h>
+#include <locale.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <time.h>
+#include <unistd.h>
+
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+#include <X11/Xutil.h>
+#ifdef XINERAMA
+#include <X11/extensions/Xinerama.h>
+#endif
+#include <X11/Xft/Xft.h>
+
+#include "drw.h"
+#include "util.h"
+
+/* macros */
+#define INTERSECT(x,y,w,h,r) (MAX(0, MIN((x)+(w),(r).x_org+(r).width) - MAX((x),(r).x_org)) \
+ * MAX(0, MIN((y)+(h),(r).y_org+(r).height) - MAX((y),(r).y_org)))
+#define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad)
+
+/* enums */
+enum { SchemeNorm, SchemeSel, SchemeOut, SchemeLast }; /* color schemes */
+
+struct item {
+ char *text;
+ struct item *left, *right;
+ int out;
+};
+
+static char text[BUFSIZ] = "";
+static char *embed;
+static int bh, mw, mh;
+static int inputw = 0, promptw;
+static int lrpad; /* sum of left and right padding */
+static size_t cursor;
+static struct item *items = NULL;
+static struct item *matches, *matchend;
+static struct item *prev, *curr, *next, *sel;
+static int mon = -1, screen;
+
+static Atom clip, utf8;
+static Display *dpy;
+static Window root, parentwin, win;
+static XIC xic;
+
+static Drw *drw;
+static Clr *scheme[SchemeLast];
+
+#include "config.h"
+
+static int (*fstrncmp)(const char *, const char *, size_t) = strncmp;
+static char *(*fstrstr)(const char *, const char *) = strstr;
+
+static unsigned int
+textw_clamp(const char *str, unsigned int n)
+{
+ unsigned int w = drw_fontset_getwidth_clamp(drw, str, n) + lrpad;
+ return MIN(w, n);
+}
+
+static void
+appenditem(struct item *item, struct item **list, struct item **last)
+{
+ if (*last)
+ (*last)->right = item;
+ else
+ *list = item;
+
+ item->left = *last;
+ item->right = NULL;
+ *last = item;
+}
+
+static void
+calcoffsets(void)
+{
+ int i, n;
+
+ if (lines > 0)
+ n = lines * bh;
+ else
+ n = mw - (promptw + inputw + TEXTW("<") + TEXTW(">"));
+ /* calculate which items will begin the next page and previous page */
+ for (i = 0, next = curr; next; next = next->right)
+ if ((i += (lines > 0) ? bh : textw_clamp(next->text, n)) > n)
+ break;
+ for (i = 0, prev = curr; prev && prev->left; prev = prev->left)
+ if ((i += (lines > 0) ? bh : textw_clamp(prev->left->text, n)) > n)
+ break;
+}
+
+static int
+max_textw(void)
+{
+ int len = 0;
+ for (struct item *item = items; item && item->text; item++)
+ len = MAX(TEXTW(item->text), len);
+ return len;
+}
+
+static void
+cleanup(void)
+{
+ size_t i;
+
+ XUngrabKey(dpy, AnyKey, AnyModifier, root);
+ for (i = 0; i < SchemeLast; i++)
+ free(scheme[i]);
+ for (i = 0; items && items[i].text; ++i)
+ free(items[i].text);
+ free(items);
+ drw_free(drw);
+ XSync(dpy, False);
+ XCloseDisplay(dpy);
+}
+
+static char *
+cistrstr(const char *h, const char *n)
+{
+ size_t i;
+
+ if (!n[0])
+ return (char *)h;
+
+ for (; *h; ++h) {
+ for (i = 0; n[i] && tolower((unsigned char)n[i]) ==
+ tolower((unsigned char)h[i]); ++i)
+ ;
+ if (n[i] == '\0')
+ return (char *)h;
+ }
+ return NULL;
+}
+
+static int
+drawitem(struct item *item, int x, int y, int w)
+{
+ if (item == sel)
+ drw_setscheme(drw, scheme[SchemeSel]);
+ else if (item->out)
+ drw_setscheme(drw, scheme[SchemeOut]);
+ else
+ drw_setscheme(drw, scheme[SchemeNorm]);
+
+ return drw_text(drw, x, y, w, bh, lrpad / 2, item->text, 0);
+}
+
+static void
+drawmenu(void)
+{
+ unsigned int curpos;
+ struct item *item;
+ int x = 0, y = 0, w;
+
+ drw_setscheme(drw, scheme[SchemeNorm]);
+ drw_rect(drw, 0, 0, mw, mh, 1, 1);
+
+ if (prompt && *prompt) {
+ drw_setscheme(drw, scheme[SchemeSel]);
+ x = drw_text(drw, x, 0, promptw, bh, lrpad / 2, prompt, 0);
+ }
+ /* draw input field */
+ w = (lines > 0 || !matches) ? mw - x : inputw;
+ drw_setscheme(drw, scheme[SchemeNorm]);
+ drw_text(drw, x, 0, w, bh, lrpad / 2, text, 0);
+
+ curpos = TEXTW(text) - TEXTW(&text[cursor]);
+ if ((curpos += lrpad / 2 - 1) < w) {
+ drw_setscheme(drw, scheme[SchemeNorm]);
+ drw_rect(drw, x + curpos, 2, 2, bh - 4, 1, 0);
+ }
+
+ if (lines > 0) {
+ /* draw vertical list */
+ for (item = curr; item != next; item = item->right)
+ drawitem(item, x, y += bh, mw - x);
+ } else if (matches) {
+ /* draw horizontal list */
+ x += inputw;
+ w = TEXTW("<");
+ if (curr->left) {
+ drw_setscheme(drw, scheme[SchemeNorm]);
+ drw_text(drw, x, 0, w, bh, lrpad / 2, "<", 0);
+ }
+ x += w;
+ for (item = curr; item != next; item = item->right)
+ x = drawitem(item, x, 0, textw_clamp(item->text, mw - x - TEXTW(">")));
+ if (next) {
+ w = TEXTW(">");
+ drw_setscheme(drw, scheme[SchemeNorm]);
+ drw_text(drw, mw - w, 0, w, bh, lrpad / 2, ">", 0);
+ }
+ }
+ drw_map(drw, win, 0, 0, mw, mh);
+}
+
+static void
+grabfocus(void)
+{
+ struct timespec ts = { .tv_sec = 0, .tv_nsec = 10000000 };
+ Window focuswin;
+ int i, revertwin;
+
+ for (i = 0; i < 100; ++i) {
+ XGetInputFocus(dpy, &focuswin, &revertwin);
+ if (focuswin == win)
+ return;
+ XSetInputFocus(dpy, win, RevertToParent, CurrentTime);
+ nanosleep(&ts, NULL);
+ }
+ die("cannot grab focus");
+}
+
+static void
+grabkeyboard(void)
+{
+ struct timespec ts = { .tv_sec = 0, .tv_nsec = 1000000 };
+ int i;
+
+ if (embed)
+ return;
+ /* try to grab keyboard, we may have to wait for another process to ungrab */
+ for (i = 0; i < 1000; i++) {
+ if (XGrabKeyboard(dpy, DefaultRootWindow(dpy), True, GrabModeAsync,
+ GrabModeAsync, CurrentTime) == GrabSuccess)
+ return;
+ nanosleep(&ts, NULL);
+ }
+ die("cannot grab keyboard");
+}
+
+static void
+match(void)
+{
+ static char **tokv = NULL;
+ static int tokn = 0;
+
+ char buf[sizeof text], *s;
+ int i, tokc = 0;
+ size_t len, textsize;
+ struct item *item, *lprefix, *lsubstr, *prefixend, *substrend;
+
+ strcpy(buf, text);
+ /* separate input text into tokens to be matched individually */
+ for (s = strtok(buf, " "); s; tokv[tokc - 1] = s, s = strtok(NULL, " "))
+ if (++tokc > tokn && !(tokv = realloc(tokv, ++tokn * sizeof *tokv)))
+ die("cannot realloc %zu bytes:", tokn * sizeof *tokv);
+ len = tokc ? strlen(tokv[0]) : 0;
+
+ matches = lprefix = lsubstr = matchend = prefixend = substrend = NULL;
+ textsize = strlen(text) + 1;
+ for (item = items; item && item->text; item++) {
+ for (i = 0; i < tokc; i++)
+ if (!fstrstr(item->text, tokv[i]))
+ break;
+ if (i != tokc) /* not all tokens match */
+ continue;
+ /* exact matches go first, then prefixes, then substrings */
+ if (!tokc || !fstrncmp(text, item->text, textsize))
+ appenditem(item, &matches, &matchend);
+ else if (!fstrncmp(tokv[0], item->text, len))
+ appenditem(item, &lprefix, &prefixend);
+ else
+ appenditem(item, &lsubstr, &substrend);
+ }
+ if (lprefix) {
+ if (matches) {
+ matchend->right = lprefix;
+ lprefix->left = matchend;
+ } else
+ matches = lprefix;
+ matchend = prefixend;
+ }
+ if (lsubstr) {
+ if (matches) {
+ matchend->right = lsubstr;
+ lsubstr->left = matchend;
+ } else
+ matches = lsubstr;
+ matchend = substrend;
+ }
+ curr = sel = matches;
+ calcoffsets();
+}
+
+static void
+insert(const char *str, ssize_t n)
+{
+ if (strlen(text) + n > sizeof text - 1)
+ return;
+ /* move existing text out of the way, insert new text, and update cursor */
+ memmove(&text[cursor + n], &text[cursor], sizeof text - cursor - MAX(n, 0));
+ if (n > 0)
+ memcpy(&text[cursor], str, n);
+ cursor += n;
+ match();
+}
+
+static size_t
+nextrune(int inc)
+{
+ ssize_t n;
+
+ /* return location of next utf8 rune in the given direction (+1 or -1) */
+ for (n = cursor + inc; n + inc >= 0 && (text[n] & 0xc0) == 0x80; n += inc)
+ ;
+ return n;
+}
+
+static void
+movewordedge(int dir)
+{
+ if (dir < 0) { /* move cursor to the start of the word*/
+ while (cursor > 0 && strchr(worddelimiters, text[nextrune(-1)]))
+ cursor = nextrune(-1);
+ while (cursor > 0 && !strchr(worddelimiters, text[nextrune(-1)]))
+ cursor = nextrune(-1);
+ } else { /* move cursor to the end of the word */
+ while (text[cursor] && strchr(worddelimiters, text[cursor]))
+ cursor = nextrune(+1);
+ while (text[cursor] && !strchr(worddelimiters, text[cursor]))
+ cursor = nextrune(+1);
+ }
+}
+
+static void
+keypress(XKeyEvent *ev)
+{
+ char buf[64];
+ int len;
+ KeySym ksym = NoSymbol;
+ Status status;
+
+ len = XmbLookupString(xic, ev, buf, sizeof buf, &ksym, &status);
+ switch (status) {
+ default: /* XLookupNone, XBufferOverflow */
+ return;
+ case XLookupChars: /* composed string from input method */
+ goto insert;
+ case XLookupKeySym:
+ case XLookupBoth: /* a KeySym and a string are returned: use keysym */
+ break;
+ }
+
+ if (ev->state & ControlMask) {
+ switch(ksym) {
+ case XK_a: ksym = XK_Home; break;
+ case XK_b: ksym = XK_Left; break;
+ case XK_c: ksym = XK_Escape; break;
+ case XK_d: ksym = XK_Delete; break;
+ case XK_e: ksym = XK_End; break;
+ case XK_f: ksym = XK_Right; break;
+ case XK_g: ksym = XK_Escape; break;
+ case XK_h: ksym = XK_BackSpace; break;
+ case XK_i: ksym = XK_Tab; break;
+ case XK_j: /* fallthrough */
+ case XK_J: /* fallthrough */
+ case XK_m: /* fallthrough */
+ case XK_M: ksym = XK_Return; ev->state &= ~ControlMask; break;
+ case XK_n: ksym = XK_Down; break;
+ case XK_p: ksym = XK_Up; break;
+
+ case XK_k: /* delete right */
+ text[cursor] = '\0';
+ match();
+ break;
+ case XK_u: /* delete left */
+ insert(NULL, 0 - cursor);
+ break;
+ case XK_w: /* delete word */
+ while (cursor > 0 && strchr(worddelimiters, text[nextrune(-1)]))
+ insert(NULL, nextrune(-1) - cursor);
+ while (cursor > 0 && !strchr(worddelimiters, text[nextrune(-1)]))
+ insert(NULL, nextrune(-1) - cursor);
+ break;
+ case XK_y: /* paste selection */
+ case XK_Y:
+ XConvertSelection(dpy, (ev->state & ShiftMask) ? clip : XA_PRIMARY,
+ utf8, utf8, win, CurrentTime);
+ return;
+ case XK_Left:
+ case XK_KP_Left:
+ movewordedge(-1);
+ goto draw;
+ case XK_Right:
+ case XK_KP_Right:
+ movewordedge(+1);
+ goto draw;
+ case XK_Return:
+ case XK_KP_Enter:
+ break;
+ case XK_bracketleft:
+ cleanup();
+ exit(1);
+ default:
+ return;
+ }
+ } else if (ev->state & Mod1Mask) {
+ switch(ksym) {
+ case XK_b:
+ movewordedge(-1);
+ goto draw;
+ case XK_f:
+ movewordedge(+1);
+ goto draw;
+ case XK_g: ksym = XK_Home; break;
+ case XK_G: ksym = XK_End; break;
+ case XK_h: ksym = XK_Up; break;
+ case XK_j: ksym = XK_Next; break;
+ case XK_k: ksym = XK_Prior; break;
+ case XK_l: ksym = XK_Down; break;
+ default:
+ return;
+ }
+ }
+
+ switch(ksym) {
+ default:
+insert:
+ if (!iscntrl((unsigned char)*buf))
+ insert(buf, len);
+ break;
+ case XK_Delete:
+ case XK_KP_Delete:
+ if (text[cursor] == '\0')
+ return;
+ cursor = nextrune(+1);
+ /* fallthrough */
+ case XK_BackSpace:
+ if (cursor == 0)
+ return;
+ insert(NULL, nextrune(-1) - cursor);
+ break;
+ case XK_End:
+ case XK_KP_End:
+ if (text[cursor] != '\0') {
+ cursor = strlen(text);
+ break;
+ }
+ if (next) {
+ /* jump to end of list and position items in reverse */
+ curr = matchend;
+ calcoffsets();
+ curr = prev;
+ calcoffsets();
+ while (next && (curr = curr->right))
+ calcoffsets();
+ }
+ sel = matchend;
+ break;
+ case XK_Escape:
+ cleanup();
+ exit(1);
+ case XK_Home:
+ case XK_KP_Home:
+ if (sel == matches) {
+ cursor = 0;
+ break;
+ }
+ sel = curr = matches;
+ calcoffsets();
+ break;
+ case XK_Left:
+ case XK_KP_Left:
+ if (cursor > 0 && (!sel || !sel->left || lines > 0)) {
+ cursor = nextrune(-1);
+ break;
+ }
+ if (lines > 0)
+ return;
+ /* fallthrough */
+ case XK_Up:
+ case XK_KP_Up:
+ if (sel && sel->left && (sel = sel->left)->right == curr) {
+ curr = prev;
+ calcoffsets();
+ }
+ break;
+ case XK_Next:
+ case XK_KP_Next:
+ if (!next)
+ return;
+ sel = curr = next;
+ calcoffsets();
+ break;
+ case XK_Prior:
+ case XK_KP_Prior:
+ if (!prev)
+ return;
+ sel = curr = prev;
+ calcoffsets();
+ break;
+ case XK_Return:
+ case XK_KP_Enter:
+ puts((sel && !(ev->state & ShiftMask)) ? sel->text : text);
+ if (!(ev->state & ControlMask)) {
+ cleanup();
+ exit(0);
+ }
+ if (sel)
+ sel->out = 1;
+ break;
+ case XK_Right:
+ case XK_KP_Right:
+ if (text[cursor] != '\0') {
+ cursor = nextrune(+1);
+ break;
+ }
+ if (lines > 0)
+ return;
+ /* fallthrough */
+ case XK_Down:
+ case XK_KP_Down:
+ if (sel && sel->right && (sel = sel->right) == next) {
+ curr = next;
+ calcoffsets();
+ }
+ break;
+ case XK_Tab:
+ if (!sel)
+ return;
+ cursor = strnlen(sel->text, sizeof text - 1);
+ memcpy(text, sel->text, cursor);
+ text[cursor] = '\0';
+ match();
+ break;
+ }
+
+draw:
+ drawmenu();
+}
+
+static void
+paste(void)
+{
+ char *p, *q;
+ int di;
+ unsigned long dl;
+ Atom da;
+
+ /* we have been given the current selection, now insert it into input */
+ if (XGetWindowProperty(dpy, win, utf8, 0, (sizeof text / 4) + 1, False,
+ utf8, &da, &di, &dl, &dl, (unsigned char **)&p)
+ == Success && p) {
+ insert(p, (q = strchr(p, '\n')) ? q - p : (ssize_t)strlen(p));
+ XFree(p);
+ }
+ drawmenu();
+}
+
+static void
+readstdin(void)
+{
+ char *line = NULL;
+ size_t i, itemsiz = 0, linesiz = 0;
+ ssize_t len;
+
+ /* read each line from stdin and add it to the item list */
+ for (i = 0; (len = getline(&line, &linesiz, stdin)) != -1; i++) {
+ if (i + 1 >= itemsiz) {
+ itemsiz += 256;
+ if (!(items = realloc(items, itemsiz * sizeof(*items))))
+ die("cannot realloc %zu bytes:", itemsiz * sizeof(*items));
+ }
+ if (line[len - 1] == '\n')
+ line[len - 1] = '\0';
+ if (!(items[i].text = strdup(line)))
+ die("strdup:");
+
+ items[i].out = 0;
+ }
+ free(line);
+ if (items)
+ items[i].text = NULL;
+ lines = MIN(lines, i);
+}
+
+static void
+run(void)
+{
+ XEvent ev;
+
+ while (!XNextEvent(dpy, &ev)) {
+ if (XFilterEvent(&ev, win))
+ continue;
+ switch(ev.type) {
+ case DestroyNotify:
+ if (ev.xdestroywindow.window != win)
+ break;
+ cleanup();
+ exit(1);
+ case Expose:
+ if (ev.xexpose.count == 0)
+ drw_map(drw, win, 0, 0, mw, mh);
+ break;
+ case FocusIn:
+ /* regrab focus from parent window */
+ if (ev.xfocus.window != win)
+ grabfocus();
+ break;
+ case KeyPress:
+ keypress(&ev.xkey);
+ break;
+ case SelectionNotify:
+ if (ev.xselection.property == utf8)
+ paste();
+ break;
+ case VisibilityNotify:
+ if (ev.xvisibility.state != VisibilityUnobscured)
+ XRaiseWindow(dpy, win);
+ break;
+ }
+ }
+}
+
+static void
+setup(void)
+{
+ int x, y, i, j;
+ unsigned int du;
+ XSetWindowAttributes swa;
+ XIM xim;
+ Window w, dw, *dws;
+ XWindowAttributes wa;
+ XClassHint ch = {"dmenu", "dmenu"};
+#ifdef XINERAMA
+ XineramaScreenInfo *info;
+ Window pw;
+ int a, di, n, area = 0;
+#endif
+ /* init appearance */
+ for (j = 0; j < SchemeLast; j++)
+ scheme[j] = drw_scm_create(drw, colors[j], 2);
+
+ clip = XInternAtom(dpy, "CLIPBOARD", False);
+ utf8 = XInternAtom(dpy, "UTF8_STRING", False);
+
+ /* calculate menu geometry */
+ bh = drw->fonts->h + 2;
+ lines = MAX(lines, 0);
+ mh = (lines + 1) * bh;
+ promptw = (prompt && *prompt) ? TEXTW(prompt) - lrpad / 4 : 0;
+#ifdef XINERAMA
+ i = 0;
+ if (parentwin == root && (info = XineramaQueryScreens(dpy, &n))) {
+ XGetInputFocus(dpy, &w, &di);
+ if (mon >= 0 && mon < n)
+ i = mon;
+ else if (w != root && w != PointerRoot && w != None) {
+ /* find top-level window containing current input focus */
+ do {
+ if (XQueryTree(dpy, (pw = w), &dw, &w, &dws, &du) && dws)
+ XFree(dws);
+ } while (w != root && w != pw);
+ /* find xinerama screen with which the window intersects most */
+ if (XGetWindowAttributes(dpy, pw, &wa))
+ for (j = 0; j < n; j++)
+ if ((a = INTERSECT(wa.x, wa.y, wa.width, wa.height, info[j])) > area) {
+ area = a;
+ i = j;
+ }
+ }
+ /* no focused window is on screen, so use pointer location instead */
+ if (mon < 0 && !area && XQueryPointer(dpy, root, &dw, &dw, &x, &y, &di, &di, &du))
+ for (i = 0; i < n; i++)
+ if (INTERSECT(x, y, 1, 1, info[i]) != 0)
+ break;
+
+ if (centered) {
+ mw = MIN(MAX(max_textw() + promptw, min_width), info[i].width);
+ x = info[i].x_org + ((info[i].width - mw) / 2);
+ y = info[i].y_org + ((info[i].height - mh) / 2);
+ } else {
+ x = info[i].x_org;
+ y = info[i].y_org + (topbar ? 0 : info[i].height - mh);
+ mw = info[i].width;
+ }
+
+ XFree(info);
+ } else
+#endif
+ {
+ if (!XGetWindowAttributes(dpy, parentwin, &wa))
+ die("could not get embedding window attributes: 0x%lx",
+ parentwin);
+
+ if (centered) {
+ mw = MIN(MAX(max_textw() + promptw, min_width), wa.width);
+ x = (wa.width - mw) / 2;
+ y = (wa.height - mh) / 2;
+ } else {
+ x = 0;
+ y = topbar ? 0 : wa.height - mh;
+ mw = wa.width;
+ }
+ }
+ promptw = (prompt && *prompt) ? TEXTW(prompt) - lrpad / 4 : 0;
+ inputw = mw / 3; /* input width: ~33% of monitor width */
+ match();
+
+ /* create menu window */
+ swa.override_redirect = True;
+ swa.background_pixel = scheme[SchemeNorm][ColBg].pixel;
+ swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask;
+ win = XCreateWindow(dpy, root, x, y, mw, mh, border_width,
+ CopyFromParent, CopyFromParent, CopyFromParent,
+ CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
+ if (border_width)
+ XSetWindowBorder(dpy, win, scheme[SchemeSel][ColBg].pixel);
+ XSetClassHint(dpy, win, &ch);
+
+
+ /* input methods */
+ if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL)
+ die("XOpenIM failed: could not open input device");
+
+ xic = XCreateIC(xim, XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
+ XNClientWindow, win, XNFocusWindow, win, NULL);
+
+ XMapRaised(dpy, win);
+ if (embed) {
+ XReparentWindow(dpy, win, parentwin, x, y);
+ XSelectInput(dpy, parentwin, FocusChangeMask | SubstructureNotifyMask);
+ if (XQueryTree(dpy, parentwin, &dw, &w, &dws, &du) && dws) {
+ for (i = 0; i < du && dws[i] != win; ++i)
+ XSelectInput(dpy, dws[i], FocusChangeMask);
+ XFree(dws);
+ }
+ grabfocus();
+ }
+ drw_resize(drw, mw, mh);
+ drawmenu();
+}
+
+static void
+usage(void)
+{
+ die("usage: dmenu [-bfiv] [-l lines] [-p prompt] [-fn font] [-m monitor]\n"
+ " [-nb color] [-nf color] [-sb color] [-sf color] [-w windowid]");
+}
+
+int
+main(int argc, char *argv[])
+{
+ XWindowAttributes wa;
+ int i, fast = 0;
+
+ for (i = 1; i < argc; i++)
+ /* these options take no arguments */
+ if (!strcmp(argv[i], "-v")) { /* prints version information */
+ puts("dmenu-"VERSION);
+ exit(0);
+ } else if (!strcmp(argv[i], "-b")) /* appears at the bottom of the screen */
+ topbar = 0;
+ else if (!strcmp(argv[i], "-f")) /* grabs keyboard before reading stdin */
+ fast = 1;
+ else if (!strcmp(argv[i], "-c")) /* centers dmenu on screen */
+ centered = 1;
+ else if (!strcmp(argv[i], "-i")) { /* case-insensitive item matching */
+ fstrncmp = strncasecmp;
+ fstrstr = cistrstr;
+ } else if (i + 1 == argc)
+ usage();
+ /* these options take one argument */
+ else if (!strcmp(argv[i], "-l")) /* number of lines in vertical list */
+ lines = atoi(argv[++i]);
+ else if (!strcmp(argv[i], "-m"))
+ mon = atoi(argv[++i]);
+ else if (!strcmp(argv[i], "-p")) /* adds prompt to left of input field */
+ prompt = argv[++i];
+ else if (!strcmp(argv[i], "-fn")) /* font or font set */
+ fonts[0] = argv[++i];
+ else if (!strcmp(argv[i], "-nb")) /* normal background color */
+ colors[SchemeNorm][ColBg] = argv[++i];
+ else if (!strcmp(argv[i], "-nf")) /* normal foreground color */
+ colors[SchemeNorm][ColFg] = argv[++i];
+ else if (!strcmp(argv[i], "-sb")) /* selected background color */
+ colors[SchemeSel][ColBg] = argv[++i];
+ else if (!strcmp(argv[i], "-sf")) /* selected foreground color */
+ colors[SchemeSel][ColFg] = argv[++i];
+ else if (!strcmp(argv[i], "-w")) /* embedding window id */
+ embed = argv[++i];
+ else if (!strcmp(argv[i], "-bw"))
+ border_width = atoi(argv[++i]); /* border width */
+ else
+ usage();
+
+ if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
+ fputs("warning: no locale support\n", stderr);
+ if (!(dpy = XOpenDisplay(NULL)))
+ die("cannot open display");
+ screen = DefaultScreen(dpy);
+ root = RootWindow(dpy, screen);
+ if (!embed || !(parentwin = strtol(embed, NULL, 0)))
+ parentwin = root;
+ if (!XGetWindowAttributes(dpy, parentwin, &wa))
+ die("could not get embedding window attributes: 0x%lx",
+ parentwin);
+ drw = drw_create(dpy, screen, root, wa.width, wa.height);
+ if (!drw_fontset_create(drw, fonts, LENGTH(fonts)))
+ die("no fonts could be loaded.");
+ lrpad = drw->fonts->h;
+
+#ifdef __OpenBSD__
+ if (pledge("stdio rpath", NULL) == -1)
+ die("pledge");
+#endif
+
+ if (fast && !isatty(0)) {
+ grabkeyboard();
+ readstdin();
+ } else {
+ readstdin();
+ grabkeyboard();
+ }
+ setup();
+ run();
+
+ return 1; /* unreachable */
+}
diff --git a/dwm/Repositories/dmenu/dmenu.o b/dwm/Repositories/dmenu/dmenu.o
new file mode 100644
index 0000000..9c23bdf
--- /dev/null
+++ b/dwm/Repositories/dmenu/dmenu.o
Binary files differ
diff --git a/dwm/Repositories/dmenu/dmenu_path b/dwm/Repositories/dmenu/dmenu_path
new file mode 100755
index 0000000..3a7cda7
--- /dev/null
+++ b/dwm/Repositories/dmenu/dmenu_path
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+cachedir="${XDG_CACHE_HOME:-"$HOME/.cache"}"
+cache="$cachedir/dmenu_run"
+
+[ ! -e "$cachedir" ] && mkdir -p "$cachedir"
+
+IFS=:
+if stest -dqr -n "$cache" $PATH; then
+ stest -flx $PATH | sort -u | tee "$cache"
+else
+ cat "$cache"
+fi
diff --git a/dwm/Repositories/dmenu/dmenu_run b/dwm/Repositories/dmenu/dmenu_run
new file mode 100755
index 0000000..834ede5
--- /dev/null
+++ b/dwm/Repositories/dmenu/dmenu_run
@@ -0,0 +1,2 @@
+#!/bin/sh
+dmenu_path | dmenu "$@" | ${SHELL:-"/bin/sh"} &
diff --git a/dwm/Repositories/dmenu/drw.c b/dwm/Repositories/dmenu/drw.c
new file mode 100644
index 0000000..78a2b27
--- /dev/null
+++ b/dwm/Repositories/dmenu/drw.c
@@ -0,0 +1,451 @@
+/* See LICENSE file for copyright and license details. */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <X11/Xlib.h>
+#include <X11/Xft/Xft.h>
+
+#include "drw.h"
+#include "util.h"
+
+#define UTF_INVALID 0xFFFD
+#define UTF_SIZ 4
+
+static const unsigned char utfbyte[UTF_SIZ + 1] = {0x80, 0, 0xC0, 0xE0, 0xF0};
+static const unsigned char utfmask[UTF_SIZ + 1] = {0xC0, 0x80, 0xE0, 0xF0, 0xF8};
+static const long utfmin[UTF_SIZ + 1] = { 0, 0, 0x80, 0x800, 0x10000};
+static const long utfmax[UTF_SIZ + 1] = {0x10FFFF, 0x7F, 0x7FF, 0xFFFF, 0x10FFFF};
+
+static long
+utf8decodebyte(const char c, size_t *i)
+{
+ for (*i = 0; *i < (UTF_SIZ + 1); ++(*i))
+ if (((unsigned char)c & utfmask[*i]) == utfbyte[*i])
+ return (unsigned char)c & ~utfmask[*i];
+ return 0;
+}
+
+static size_t
+utf8validate(long *u, size_t i)
+{
+ if (!BETWEEN(*u, utfmin[i], utfmax[i]) || BETWEEN(*u, 0xD800, 0xDFFF))
+ *u = UTF_INVALID;
+ for (i = 1; *u > utfmax[i]; ++i)
+ ;
+ return i;
+}
+
+static size_t
+utf8decode(const char *c, long *u, size_t clen)
+{
+ size_t i, j, len, type;
+ long udecoded;
+
+ *u = UTF_INVALID;
+ if (!clen)
+ return 0;
+ udecoded = utf8decodebyte(c[0], &len);
+ if (!BETWEEN(len, 1, UTF_SIZ))
+ return 1;
+ for (i = 1, j = 1; i < clen && j < len; ++i, ++j) {
+ udecoded = (udecoded << 6) | utf8decodebyte(c[i], &type);
+ if (type)
+ return j;
+ }
+ if (j < len)
+ return 0;
+ *u = udecoded;
+ utf8validate(u, len);
+
+ return len;
+}
+
+Drw *
+drw_create(Display *dpy, int screen, Window root, unsigned int w, unsigned int h)
+{
+ Drw *drw = ecalloc(1, sizeof(Drw));
+
+ drw->dpy = dpy;
+ drw->screen = screen;
+ drw->root = root;
+ drw->w = w;
+ drw->h = h;
+ drw->drawable = XCreatePixmap(dpy, root, w, h, DefaultDepth(dpy, screen));
+ drw->gc = XCreateGC(dpy, root, 0, NULL);
+ XSetLineAttributes(dpy, drw->gc, 1, LineSolid, CapButt, JoinMiter);
+
+ return drw;
+}
+
+void
+drw_resize(Drw *drw, unsigned int w, unsigned int h)
+{
+ if (!drw)
+ return;
+
+ drw->w = w;
+ drw->h = h;
+ if (drw->drawable)
+ XFreePixmap(drw->dpy, drw->drawable);
+ drw->drawable = XCreatePixmap(drw->dpy, drw->root, w, h, DefaultDepth(drw->dpy, drw->screen));
+}
+
+void
+drw_free(Drw *drw)
+{
+ XFreePixmap(drw->dpy, drw->drawable);
+ XFreeGC(drw->dpy, drw->gc);
+ drw_fontset_free(drw->fonts);
+ free(drw);
+}
+
+/* This function is an implementation detail. Library users should use
+ * drw_fontset_create instead.
+ */
+static Fnt *
+xfont_create(Drw *drw, const char *fontname, FcPattern *fontpattern)
+{
+ Fnt *font;
+ XftFont *xfont = NULL;
+ FcPattern *pattern = NULL;
+
+ if (fontname) {
+ /* Using the pattern found at font->xfont->pattern does not yield the
+ * same substitution results as using the pattern returned by
+ * FcNameParse; using the latter results in the desired fallback
+ * behaviour whereas the former just results in missing-character
+ * rectangles being drawn, at least with some fonts. */
+ if (!(xfont = XftFontOpenName(drw->dpy, drw->screen, fontname))) {
+ fprintf(stderr, "error, cannot load font from name: '%s'\n", fontname);
+ return NULL;
+ }
+ if (!(pattern = FcNameParse((FcChar8 *) fontname))) {
+ fprintf(stderr, "error, cannot parse font name to pattern: '%s'\n", fontname);
+ XftFontClose(drw->dpy, xfont);
+ return NULL;
+ }
+ } else if (fontpattern) {
+ if (!(xfont = XftFontOpenPattern(drw->dpy, fontpattern))) {
+ fprintf(stderr, "error, cannot load font from pattern.\n");
+ return NULL;
+ }
+ } else {
+ die("no font specified.");
+ }
+
+ font = ecalloc(1, sizeof(Fnt));
+ font->xfont = xfont;
+ font->pattern = pattern;
+ font->h = xfont->ascent + xfont->descent;
+ font->dpy = drw->dpy;
+
+ return font;
+}
+
+static void
+xfont_free(Fnt *font)
+{
+ if (!font)
+ return;
+ if (font->pattern)
+ FcPatternDestroy(font->pattern);
+ XftFontClose(font->dpy, font->xfont);
+ free(font);
+}
+
+Fnt*
+drw_fontset_create(Drw* drw, const char *fonts[], size_t fontcount)
+{
+ Fnt *cur, *ret = NULL;
+ size_t i;
+
+ if (!drw || !fonts)
+ return NULL;
+
+ for (i = 1; i <= fontcount; i++) {
+ if ((cur = xfont_create(drw, fonts[fontcount - i], NULL))) {
+ cur->next = ret;
+ ret = cur;
+ }
+ }
+ return (drw->fonts = ret);
+}
+
+void
+drw_fontset_free(Fnt *font)
+{
+ if (font) {
+ drw_fontset_free(font->next);
+ xfont_free(font);
+ }
+}
+
+void
+drw_clr_create(Drw *drw, Clr *dest, const char *clrname)
+{
+ if (!drw || !dest || !clrname)
+ return;
+
+ if (!XftColorAllocName(drw->dpy, DefaultVisual(drw->dpy, drw->screen),
+ DefaultColormap(drw->dpy, drw->screen),
+ clrname, dest))
+ die("error, cannot allocate color '%s'", clrname);
+}
+
+/* Wrapper to create color schemes. The caller has to call free(3) on the
+ * returned color scheme when done using it. */
+Clr *
+drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount)
+{
+ size_t i;
+ Clr *ret;
+
+ /* need at least two colors for a scheme */
+ if (!drw || !clrnames || clrcount < 2 || !(ret = ecalloc(clrcount, sizeof(XftColor))))
+ return NULL;
+
+ for (i = 0; i < clrcount; i++)
+ drw_clr_create(drw, &ret[i], clrnames[i]);
+ return ret;
+}
+
+void
+drw_setfontset(Drw *drw, Fnt *set)
+{
+ if (drw)
+ drw->fonts = set;
+}
+
+void
+drw_setscheme(Drw *drw, Clr *scm)
+{
+ if (drw)
+ drw->scheme = scm;
+}
+
+void
+drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert)
+{
+ if (!drw || !drw->scheme)
+ return;
+ XSetForeground(drw->dpy, drw->gc, invert ? drw->scheme[ColBg].pixel : drw->scheme[ColFg].pixel);
+ if (filled)
+ XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
+ else
+ XDrawRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w - 1, h - 1);
+}
+
+int
+drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert)
+{
+ int ty, ellipsis_x = 0;
+ unsigned int tmpw, ew, ellipsis_w = 0, ellipsis_len, hash, h0, h1;
+ XftDraw *d = NULL;
+ Fnt *usedfont, *curfont, *nextfont;
+ int utf8strlen, utf8charlen, render = x || y || w || h;
+ long utf8codepoint = 0;
+ const char *utf8str;
+ FcCharSet *fccharset;
+ FcPattern *fcpattern;
+ FcPattern *match;
+ XftResult result;
+ int charexists = 0, overflow = 0;
+ /* keep track of a couple codepoints for which we have no match. */
+ static unsigned int nomatches[128], ellipsis_width;
+
+ if (!drw || (render && (!drw->scheme || !w)) || !text || !drw->fonts)
+ return 0;
+
+ if (!render) {
+ w = invert ? invert : ~invert;
+ } else {
+ XSetForeground(drw->dpy, drw->gc, drw->scheme[invert ? ColFg : ColBg].pixel);
+ XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
+ d = XftDrawCreate(drw->dpy, drw->drawable,
+ DefaultVisual(drw->dpy, drw->screen),
+ DefaultColormap(drw->dpy, drw->screen));
+ x += lpad;
+ w -= lpad;
+ }
+
+ usedfont = drw->fonts;
+ if (!ellipsis_width && render)
+ ellipsis_width = drw_fontset_getwidth(drw, "...");
+ while (1) {
+ ew = ellipsis_len = utf8strlen = 0;
+ utf8str = text;
+ nextfont = NULL;
+ while (*text) {
+ utf8charlen = utf8decode(text, &utf8codepoint, UTF_SIZ);
+ for (curfont = drw->fonts; curfont; curfont = curfont->next) {
+ charexists = charexists || XftCharExists(drw->dpy, curfont->xfont, utf8codepoint);
+ if (charexists) {
+ drw_font_getexts(curfont, text, utf8charlen, &tmpw, NULL);
+ if (ew + ellipsis_width <= w) {
+ /* keep track where the ellipsis still fits */
+ ellipsis_x = x + ew;
+ ellipsis_w = w - ew;
+ ellipsis_len = utf8strlen;
+ }
+
+ if (ew + tmpw > w) {
+ overflow = 1;
+ /* called from drw_fontset_getwidth_clamp():
+ * it wants the width AFTER the overflow
+ */
+ if (!render)
+ x += tmpw;
+ else
+ utf8strlen = ellipsis_len;
+ } else if (curfont == usedfont) {
+ utf8strlen += utf8charlen;
+ text += utf8charlen;
+ ew += tmpw;
+ } else {
+ nextfont = curfont;
+ }
+ break;
+ }
+ }
+
+ if (overflow || !charexists || nextfont)
+ break;
+ else
+ charexists = 0;
+ }
+
+ if (utf8strlen) {
+ if (render) {
+ ty = y + (h - usedfont->h) / 2 + usedfont->xfont->ascent;
+ XftDrawStringUtf8(d, &drw->scheme[invert ? ColBg : ColFg],
+ usedfont->xfont, x, ty, (XftChar8 *)utf8str, utf8strlen);
+ }
+ x += ew;
+ w -= ew;
+ }
+ if (render && overflow)
+ drw_text(drw, ellipsis_x, y, ellipsis_w, h, 0, "...", invert);
+
+ if (!*text || overflow) {
+ break;
+ } else if (nextfont) {
+ charexists = 0;
+ usedfont = nextfont;
+ } else {
+ /* Regardless of whether or not a fallback font is found, the
+ * character must be drawn. */
+ charexists = 1;
+
+ hash = (unsigned int)utf8codepoint;
+ hash = ((hash >> 16) ^ hash) * 0x21F0AAAD;
+ hash = ((hash >> 15) ^ hash) * 0xD35A2D97;
+ h0 = ((hash >> 15) ^ hash) % LENGTH(nomatches);
+ h1 = (hash >> 17) % LENGTH(nomatches);
+ /* avoid expensive XftFontMatch call when we know we won't find a match */
+ if (nomatches[h0] == utf8codepoint || nomatches[h1] == utf8codepoint)
+ goto no_match;
+
+ fccharset = FcCharSetCreate();
+ FcCharSetAddChar(fccharset, utf8codepoint);
+
+ if (!drw->fonts->pattern) {
+ /* Refer to the comment in xfont_create for more information. */
+ die("the first font in the cache must be loaded from a font string.");
+ }
+
+ fcpattern = FcPatternDuplicate(drw->fonts->pattern);
+ FcPatternAddCharSet(fcpattern, FC_CHARSET, fccharset);
+ FcPatternAddBool(fcpattern, FC_SCALABLE, FcTrue);
+
+ FcConfigSubstitute(NULL, fcpattern, FcMatchPattern);
+ FcDefaultSubstitute(fcpattern);
+ match = XftFontMatch(drw->dpy, drw->screen, fcpattern, &result);
+
+ FcCharSetDestroy(fccharset);
+ FcPatternDestroy(fcpattern);
+
+ if (match) {
+ usedfont = xfont_create(drw, NULL, match);
+ if (usedfont && XftCharExists(drw->dpy, usedfont->xfont, utf8codepoint)) {
+ for (curfont = drw->fonts; curfont->next; curfont = curfont->next)
+ ; /* NOP */
+ curfont->next = usedfont;
+ } else {
+ xfont_free(usedfont);
+ nomatches[nomatches[h0] ? h1 : h0] = utf8codepoint;
+no_match:
+ usedfont = drw->fonts;
+ }
+ }
+ }
+ }
+ if (d)
+ XftDrawDestroy(d);
+
+ return x + (render ? w : 0);
+}
+
+void
+drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h)
+{
+ if (!drw)
+ return;
+
+ XCopyArea(drw->dpy, drw->drawable, win, drw->gc, x, y, w, h, x, y);
+ XSync(drw->dpy, False);
+}
+
+unsigned int
+drw_fontset_getwidth(Drw *drw, const char *text)
+{
+ if (!drw || !drw->fonts || !text)
+ return 0;
+ return drw_text(drw, 0, 0, 0, 0, 0, text, 0);
+}
+
+unsigned int
+drw_fontset_getwidth_clamp(Drw *drw, const char *text, unsigned int n)
+{
+ unsigned int tmp = 0;
+ if (drw && drw->fonts && text && n)
+ tmp = drw_text(drw, 0, 0, 0, 0, 0, text, n);
+ return MIN(n, tmp);
+}
+
+void
+drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h)
+{
+ XGlyphInfo ext;
+
+ if (!font || !text)
+ return;
+
+ XftTextExtentsUtf8(font->dpy, font->xfont, (XftChar8 *)text, len, &ext);
+ if (w)
+ *w = ext.xOff;
+ if (h)
+ *h = font->h;
+}
+
+Cur *
+drw_cur_create(Drw *drw, int shape)
+{
+ Cur *cur;
+
+ if (!drw || !(cur = ecalloc(1, sizeof(Cur))))
+ return NULL;
+
+ cur->cursor = XCreateFontCursor(drw->dpy, shape);
+
+ return cur;
+}
+
+void
+drw_cur_free(Drw *drw, Cur *cursor)
+{
+ if (!cursor)
+ return;
+
+ XFreeCursor(drw->dpy, cursor->cursor);
+ free(cursor);
+}
diff --git a/dwm/Repositories/dmenu/drw.h b/dwm/Repositories/dmenu/drw.h
new file mode 100644
index 0000000..fd7631b
--- /dev/null
+++ b/dwm/Repositories/dmenu/drw.h
@@ -0,0 +1,58 @@
+/* See LICENSE file for copyright and license details. */
+
+typedef struct {
+ Cursor cursor;
+} Cur;
+
+typedef struct Fnt {
+ Display *dpy;
+ unsigned int h;
+ XftFont *xfont;
+ FcPattern *pattern;
+ struct Fnt *next;
+} Fnt;
+
+enum { ColFg, ColBg }; /* Clr scheme index */
+typedef XftColor Clr;
+
+typedef struct {
+ unsigned int w, h;
+ Display *dpy;
+ int screen;
+ Window root;
+ Drawable drawable;
+ GC gc;
+ Clr *scheme;
+ Fnt *fonts;
+} Drw;
+
+/* Drawable abstraction */
+Drw *drw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h);
+void drw_resize(Drw *drw, unsigned int w, unsigned int h);
+void drw_free(Drw *drw);
+
+/* Fnt abstraction */
+Fnt *drw_fontset_create(Drw* drw, const char *fonts[], size_t fontcount);
+void drw_fontset_free(Fnt* set);
+unsigned int drw_fontset_getwidth(Drw *drw, const char *text);
+unsigned int drw_fontset_getwidth_clamp(Drw *drw, const char *text, unsigned int n);
+void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h);
+
+/* Colorscheme abstraction */
+void drw_clr_create(Drw *drw, Clr *dest, const char *clrname);
+Clr *drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount);
+
+/* Cursor abstraction */
+Cur *drw_cur_create(Drw *drw, int shape);
+void drw_cur_free(Drw *drw, Cur *cursor);
+
+/* Drawing context manipulation */
+void drw_setfontset(Drw *drw, Fnt *set);
+void drw_setscheme(Drw *drw, Clr *scm);
+
+/* Drawing functions */
+void drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert);
+int drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert);
+
+/* Map functions */
+void drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h);
diff --git a/dwm/Repositories/dmenu/drw.o b/dwm/Repositories/dmenu/drw.o
new file mode 100644
index 0000000..59bfd10
--- /dev/null
+++ b/dwm/Repositories/dmenu/drw.o
Binary files differ
diff --git a/dwm/Repositories/dmenu/stest b/dwm/Repositories/dmenu/stest
new file mode 100755
index 0000000..99a4985
--- /dev/null
+++ b/dwm/Repositories/dmenu/stest
Binary files differ
diff --git a/dwm/Repositories/dmenu/stest.1 b/dwm/Repositories/dmenu/stest.1
new file mode 100644
index 0000000..2667d8a
--- /dev/null
+++ b/dwm/Repositories/dmenu/stest.1
@@ -0,0 +1,90 @@
+.TH STEST 1 dmenu\-VERSION
+.SH NAME
+stest \- filter a list of files by properties
+.SH SYNOPSIS
+.B stest
+.RB [ -abcdefghlpqrsuwx ]
+.RB [ -n
+.IR file ]
+.RB [ -o
+.IR file ]
+.RI [ file ...]
+.SH DESCRIPTION
+.B stest
+takes a list of files and filters by the files' properties, analogous to
+.IR test (1).
+Files which pass all tests are printed to stdout. If no files are given, stest
+reads files from stdin.
+.SH OPTIONS
+.TP
+.B \-a
+Test hidden files.
+.TP
+.B \-b
+Test that files are block specials.
+.TP
+.B \-c
+Test that files are character specials.
+.TP
+.B \-d
+Test that files are directories.
+.TP
+.B \-e
+Test that files exist.
+.TP
+.B \-f
+Test that files are regular files.
+.TP
+.B \-g
+Test that files have their set-group-ID flag set.
+.TP
+.B \-h
+Test that files are symbolic links.
+.TP
+.B \-l
+Test the contents of a directory given as an argument.
+.TP
+.BI \-n " file"
+Test that files are newer than
+.IR file .
+.TP
+.BI \-o " file"
+Test that files are older than
+.IR file .
+.TP
+.B \-p
+Test that files are named pipes.
+.TP
+.B \-q
+No files are printed, only the exit status is returned.
+.TP
+.B \-r
+Test that files are readable.
+.TP
+.B \-s
+Test that files are not empty.
+.TP
+.B \-u
+Test that files have their set-user-ID flag set.
+.TP
+.B \-v
+Invert the sense of tests, only failing files pass.
+.TP
+.B \-w
+Test that files are writable.
+.TP
+.B \-x
+Test that files are executable.
+.SH EXIT STATUS
+.TP
+.B 0
+At least one file passed all tests.
+.TP
+.B 1
+No files passed all tests.
+.TP
+.B 2
+An error occurred.
+.SH SEE ALSO
+.IR dmenu (1),
+.IR test (1)
diff --git a/dwm/Repositories/dmenu/stest.c b/dwm/Repositories/dmenu/stest.c
new file mode 100644
index 0000000..e27d3a5
--- /dev/null
+++ b/dwm/Repositories/dmenu/stest.c
@@ -0,0 +1,109 @@
+/* See LICENSE file for copyright and license details. */
+#include <sys/stat.h>
+
+#include <dirent.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "arg.h"
+char *argv0;
+
+#define FLAG(x) (flag[(x)-'a'])
+
+static void test(const char *, const char *);
+static void usage(void);
+
+static int match = 0;
+static int flag[26];
+static struct stat old, new;
+
+static void
+test(const char *path, const char *name)
+{
+ struct stat st, ln;
+
+ if ((!stat(path, &st) && (FLAG('a') || name[0] != '.') /* hidden files */
+ && (!FLAG('b') || S_ISBLK(st.st_mode)) /* block special */
+ && (!FLAG('c') || S_ISCHR(st.st_mode)) /* character special */
+ && (!FLAG('d') || S_ISDIR(st.st_mode)) /* directory */
+ && (!FLAG('e') || access(path, F_OK) == 0) /* exists */
+ && (!FLAG('f') || S_ISREG(st.st_mode)) /* regular file */
+ && (!FLAG('g') || st.st_mode & S_ISGID) /* set-group-id flag */
+ && (!FLAG('h') || (!lstat(path, &ln) && S_ISLNK(ln.st_mode))) /* symbolic link */
+ && (!FLAG('n') || st.st_mtime > new.st_mtime) /* newer than file */
+ && (!FLAG('o') || st.st_mtime < old.st_mtime) /* older than file */
+ && (!FLAG('p') || S_ISFIFO(st.st_mode)) /* named pipe */
+ && (!FLAG('r') || access(path, R_OK) == 0) /* readable */
+ && (!FLAG('s') || st.st_size > 0) /* not empty */
+ && (!FLAG('u') || st.st_mode & S_ISUID) /* set-user-id flag */
+ && (!FLAG('w') || access(path, W_OK) == 0) /* writable */
+ && (!FLAG('x') || access(path, X_OK) == 0)) != FLAG('v')) { /* executable */
+ if (FLAG('q'))
+ exit(0);
+ match = 1;
+ puts(name);
+ }
+}
+
+static void
+usage(void)
+{
+ fprintf(stderr, "usage: %s [-abcdefghlpqrsuvwx] "
+ "[-n file] [-o file] [file...]\n", argv0);
+ exit(2); /* like test(1) return > 1 on error */
+}
+
+int
+main(int argc, char *argv[])
+{
+ struct dirent *d;
+ char path[PATH_MAX], *line = NULL, *file;
+ size_t linesiz = 0;
+ ssize_t n;
+ DIR *dir;
+ int r;
+
+ ARGBEGIN {
+ case 'n': /* newer than file */
+ case 'o': /* older than file */
+ file = EARGF(usage());
+ if (!(FLAG(ARGC()) = !stat(file, (ARGC() == 'n' ? &new : &old))))
+ perror(file);
+ break;
+ default:
+ /* miscellaneous operators */
+ if (strchr("abcdefghlpqrsuvwx", ARGC()))
+ FLAG(ARGC()) = 1;
+ else
+ usage(); /* unknown flag */
+ } ARGEND;
+
+ if (!argc) {
+ /* read list from stdin */
+ while ((n = getline(&line, &linesiz, stdin)) > 0) {
+ if (line[n - 1] == '\n')
+ line[n - 1] = '\0';
+ test(line, line);
+ }
+ free(line);
+ } else {
+ for (; argc; argc--, argv++) {
+ if (FLAG('l') && (dir = opendir(*argv))) {
+ /* test directory contents */
+ while ((d = readdir(dir))) {
+ r = snprintf(path, sizeof path, "%s/%s",
+ *argv, d->d_name);
+ if (r >= 0 && (size_t)r < sizeof path)
+ test(path, d->d_name);
+ }
+ closedir(dir);
+ } else {
+ test(*argv, *argv);
+ }
+ }
+ }
+ return match ? 0 : 1;
+}
diff --git a/dwm/Repositories/dmenu/stest.o b/dwm/Repositories/dmenu/stest.o
new file mode 100644
index 0000000..0700d9b
--- /dev/null
+++ b/dwm/Repositories/dmenu/stest.o
Binary files differ
diff --git a/dwm/Repositories/dmenu/util.c b/dwm/Repositories/dmenu/util.c
new file mode 100644
index 0000000..96b82c9
--- /dev/null
+++ b/dwm/Repositories/dmenu/util.c
@@ -0,0 +1,36 @@
+/* See LICENSE file for copyright and license details. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "util.h"
+
+void
+die(const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+
+ if (fmt[0] && fmt[strlen(fmt)-1] == ':') {
+ fputc(' ', stderr);
+ perror(NULL);
+ } else {
+ fputc('\n', stderr);
+ }
+
+ exit(1);
+}
+
+void *
+ecalloc(size_t nmemb, size_t size)
+{
+ void *p;
+
+ if (!(p = calloc(nmemb, size)))
+ die("calloc:");
+ return p;
+}
diff --git a/dwm/Repositories/dmenu/util.h b/dwm/Repositories/dmenu/util.h
new file mode 100644
index 0000000..c0a50d4
--- /dev/null
+++ b/dwm/Repositories/dmenu/util.h
@@ -0,0 +1,9 @@
+/* See LICENSE file for copyright and license details. */
+
+#define MAX(A, B) ((A) > (B) ? (A) : (B))
+#define MIN(A, B) ((A) < (B) ? (A) : (B))
+#define BETWEEN(X, A, B) ((A) <= (X) && (X) <= (B))
+#define LENGTH(X) (sizeof (X) / sizeof (X)[0])
+
+void die(const char *fmt, ...);
+void *ecalloc(size_t nmemb, size_t size);
diff --git a/dwm/Repositories/dmenu/util.o b/dwm/Repositories/dmenu/util.o
new file mode 100644
index 0000000..04ef62b
--- /dev/null
+++ b/dwm/Repositories/dmenu/util.o
Binary files differ
diff --git a/dwm/Repositories/dmenu/zen.h b/dwm/Repositories/dmenu/zen.h
new file mode 100644
index 0000000..e2c203c
--- /dev/null
+++ b/dwm/Repositories/dmenu/zen.h
@@ -0,0 +1,28 @@
+/* See LICENSE file for copyright and license details. */
+/* Default settings; can be overriden by command line. */
+
+static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
+static int centered = 1; /* -c option; centers dmenu on screen */
+static int min_width = 1000; /* minimum width when centered */
+/* Size of the window border */
+static unsigned int border_width = 2;
+
+/* -fn option overrides fonts[0]; default X11 font or font set */
+static const char *fonts[] = {
+ "Iosevka Comfy:size=16"
+};
+static const char *prompt = NULL; /* -p option; prompt to the left of input field */
+static const char *colors[SchemeLast][2] = {
+ /* fg bg */
+ [SchemeNorm] = { "#DCDCCC", "#3F3F3F" },
+ [SchemeSel] = { "#DCDCCC", "#7F9F7F" },
+ [SchemeOut] = { "#000000", "#00ffff" },
+};
+/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
+static unsigned int lines = 20;
+
+/*
+ * Characters not considered part of a word while deleting words
+ * for example: " /?\"&[]"
+ */
+static const char worddelimiters[] = " ";
diff --git a/dwm/Repositories/luke-dwm/FUNDING.yml b/dwm/Repositories/luke-dwm/FUNDING.yml
new file mode 100644
index 0000000..c7c9a22
--- /dev/null
+++ b/dwm/Repositories/luke-dwm/FUNDING.yml
@@ -0,0 +1,2 @@
+custom: ["https://lukesmith.xyz/donate.html"]
+github: lukesmithxyz
diff --git a/dwm/Repositories/luke-dwm/LICENSE b/dwm/Repositories/luke-dwm/LICENSE
new file mode 100644
index 0000000..1e1b5a4
--- /dev/null
+++ b/dwm/Repositories/luke-dwm/LICENSE
@@ -0,0 +1,38 @@
+MIT/X Consortium License
+
+© 2006-2019 Anselm R Garbe <[email protected]>
+© 2006-2009 Jukka Salmi <jukka at salmi dot ch>
+© 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
+© 2007-2011 Peter Hartlich <sgkkr at hartlich dot com>
+© 2007-2009 Szabolcs Nagy <nszabolcs at gmail dot com>
+© 2007-2009 Christof Musik <christof at sendfax dot de>
+© 2007-2009 Premysl Hruby <dfenze at gmail dot com>
+© 2007-2008 Enno Gottox Boland <gottox at s01 dot de>
+© 2008 Martin Hurton <martin dot hurton at gmail dot com>
+© 2008 Neale Pickett <neale dot woozle dot org>
+© 2009 Mate Nagy <mnagy at port70 dot net>
+© 2010-2016 Hiltjo Posthuma <[email protected]>
+© 2010-2012 Connor Lane Smith <[email protected]>
+© 2011 Christoph Lohmann <[email protected]>
+© 2015-2016 Quentin Rameau <[email protected]>
+© 2015-2016 Eric Pruitt <[email protected]>
+© 2016-2017 Markus Teich <[email protected]>
+© 2019-2020 Luke Smith <[email protected]>
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/dwm/Repositories/luke-dwm/Makefile b/dwm/Repositories/luke-dwm/Makefile
new file mode 100644
index 0000000..11a49c4
--- /dev/null
+++ b/dwm/Repositories/luke-dwm/Makefile
@@ -0,0 +1,50 @@
+# dwm - dynamic window manager
+# See LICENSE file for copyright and license details.
+
+include config.mk
+
+SRC = drw.c dwm.c util.c
+OBJ = ${SRC:.c=.o}
+
+all: options dwm
+
+options:
+ @echo dwm build options:
+ @echo "CFLAGS = ${CFLAGS}"
+ @echo "LDFLAGS = ${LDFLAGS}"
+ @echo "CC = ${CC}"
+
+.c.o:
+ ${CC} -c ${CFLAGS} $<
+
+${OBJ}: config.h config.mk
+
+dwm: ${OBJ}
+ ${CC} -o $@ ${OBJ} ${LDFLAGS}
+
+clean:
+ rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz *.orig *.rej
+
+dist: clean
+ mkdir -p dwm-${VERSION}
+ cp -R LICENSE Makefile README config.mk\
+ dwm.1 drw.h util.h ${SRC} transient.c dwm-${VERSION}
+ tar -cf dwm-${VERSION}.tar dwm-${VERSION}
+ gzip dwm-${VERSION}.tar
+ rm -rf dwm-${VERSION}
+
+install: all
+ mkdir -p ${DESTDIR}${PREFIX}/bin
+ install -Dm755 ./dwm ${DESTDIR}${PREFIX}/bin
+ mkdir -p ${DESTDIR}${MANPREFIX}/man1
+ sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1
+ chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
+ mkdir -p ${DESTDIR}${PREFIX}/share/dwm
+ install -Dm644 ./larbs.mom ${DESTDIR}${PREFIX}/share/dwm
+
+uninstall:
+ rm -f ${DESTDIR}${PREFIX}/bin/dwm\
+ ${DESTDIR}${PREFIX}/share/dwm/larbs.mom\
+ ${DESTDIR}${MANPREFIX}/man1/dwm.1
+
+.PHONY: all options clean dist install uninstall
diff --git a/dwm/Repositories/luke-dwm/PKGBUILD b/dwm/Repositories/luke-dwm/PKGBUILD
new file mode 100644
index 0000000..1903c72
--- /dev/null
+++ b/dwm/Repositories/luke-dwm/PKGBUILD
@@ -0,0 +1,44 @@
+_pkgname=dwm
+pkgname=$_pkgname-larbs-git
+pkgver=6.2.r1888.0ac09e0
+pkgrel=1
+pkgdesc="Luke's build of dwm"
+url=https://github.com/LukeSmithxyz/dwm
+arch=(i686 x86_64)
+license=(MIT)
+makedepends=(git)
+depends=(freetype2 libx11 libxft)
+optdepends=(
+ 'dmenu: program launcher'
+ 'st: terminal emulator')
+provides=($_pkgname)
+conflicts=($_pkgname)
+source=(git+https://github.com/LukeSmithxyz/dwm)
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$_pkgname"
+ echo "$(awk '/^VERSION =/ {print $3}' config.mk)".r"$(git rev-list --count HEAD)"."$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$_pkgname"
+ echo "CPPFLAGS+=${CPPFLAGS}" >> config.mk
+ echo "CFLAGS+=${CFLAGS}" >> config.mk
+ echo "LDFLAGS+=${LDFLAGS}" >> config.mk
+ # to use a custom config.h, place it in the package directory
+ if [[ -f ${SRCDEST}/config.h ]]; then
+ cp "${SRCDEST}/config.h" .
+ fi
+}
+
+build() {
+ cd "$_pkgname"
+ make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
+}
+
+package() {
+ cd "$_pkgname"
+ make PREFIX=/usr DESTDIR="$pkgdir" install
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
diff --git a/dwm/Repositories/luke-dwm/README.md b/dwm/Repositories/luke-dwm/README.md
new file mode 100644
index 0000000..1c15d73
--- /dev/null
+++ b/dwm/Repositories/luke-dwm/README.md
@@ -0,0 +1,36 @@
+# Luke's build of dwm
+
+## FAQ
+
+> What are the bindings?
+
+This is suckless, mmmbud, the source code is the documentation! Check out [config.h](config.h).
+
+Okay, okay, actually I keep a readme in `larbs.mom` for my whole system, including the binds here.
+Press <kbd>super+F1</kbd> to view it in dwm (zathura is required for that binding).
+I haven't kept `man dwm`/`dwm.1` updated though. PRs welcome on that, lol.
+
+## Patches and features
+
+- [Clickable statusbar](https://dwm.suckless.org/patches/statuscmd/) with my build of [dwmblocks](https://github.com/lukesmithxyz/dwmblocks).
+- Reads [xresources](https://dwm.suckless.org/patches/xresources/) colors/variables (i.e. works with `pywal`, etc.).
+- scratchpad: Accessible with <kbd>mod+shift+enter</kbd>.
+- New layouts: bstack, fibonacci, deck, centered master and more. All bound to keys <kbd>super+(shift+)t/y/u/i</kbd>.
+- True fullscreen (<kbd>super+f</kbd>) and prevents focus shifting.
+- Windows can be made sticky (<kbd>super+s</kbd>).
+- [hide vacant tags](https://dwm.suckless.org/patches/hide_vacant_tags/) hides tags with no windows.
+- [stacker](https://dwm.suckless.org/patches/stacker/): Move windows up the stack manually (<kbd>super-K/J</kbd>).
+- [shiftview](https://dwm.suckless.org/patches/nextprev/): Cycle through tags (<kbd>super+g/;</kbd>).
+- [vanitygaps](https://dwm.suckless.org/patches/vanitygaps/): Gaps allowed across all layouts.
+- [swallow patch](https://dwm.suckless.org/patches/swallow/): if a program run from a terminal would make it inoperable, it temporarily takes its place to save space.
+
+
+## Installation for newbs
+
+```bash
+git clone https://github.com/LukeSmithxyz/dwm.git
+cd dwm
+sudo make install
+```
+
+There is also a `PKGBUILD` usable on distributions with pacman. Run `makepkg -si` instead of `sudo make install`.
diff --git a/dwm/Repositories/luke-dwm/config.h b/dwm/Repositories/luke-dwm/config.h
new file mode 100644
index 0000000..322975e
--- /dev/null
+++ b/dwm/Repositories/luke-dwm/config.h
@@ -0,0 +1,261 @@
+/* See LICENSE file for copyright and license details. */
+
+/* Constants */
+#define TERMINAL "st"
+#define TERMCLASS "St"
+#define BROWSER "librewolf"
+#define BROWSER2 "firefox"
+
+/* appearance */
+static unsigned int borderpx = 3; /* border pixel of windows */
+static unsigned int snap = 32; /* snap pixel */
+static unsigned int gappih = 20; /* horiz inner gap between windows */
+static unsigned int gappiv = 10; /* vert inner gap between windows */
+static unsigned int gappoh = 10; /* horiz outer gap between windows and screen edge */
+static unsigned int gappov = 30; /* vert outer gap between windows and screen edge */
+static int swallowfloating = 0; /* 1 means swallow floating windows by default */
+static int smartgaps = 0; /* 1 means no outer gap when there is only one window */
+static int showbar = 1; /* 0 means no bar */
+static int topbar = 1; /* 0 means bottom bar */
+static char *fonts[] = { "Iosevka Comfy:size=12", "NotoColorEmoji:pixelsize=10:antialias=true:autohint=true" };
+static char normbgcolor[] = "#000000";
+static char normbordercolor[] = "#1e1e1e";
+static char normfgcolor[] = "#ffffff";
+static char selfgcolor[] = "#ffffff";
+static char selbordercolor[] = "#ffffff";
+static char selbgcolor[] = "#535353";
+static char *colors[][3] = {
+ /* fg bg border */
+ [SchemeNorm] = { normfgcolor, normbgcolor, normbordercolor },
+ [SchemeSel] = { selfgcolor, selbgcolor, selbordercolor },
+};
+
+typedef struct {
+ const char *name;
+ const void *cmd;
+} Sp;
+const char *spcmd1[] = {TERMINAL, "-n", "spterm", "-g", "120x34", NULL };
+const char *spcmd2[] = {TERMINAL, "-n", "spcalc", "-f", "Iosevka Comfy Motion:size=16", "-g", "50x20", "-e", "bc", "-lq", NULL };
+const char *spcmd3[] = {TERMINAL, "-n", "spnote", "-f", "Iosevka Comfy Motion:size=23", "-g", "60x20", "-e", "vim", "~/note.md", NULL };
+static Sp scratchpads[] = {
+ /* name cmd */
+ {"spterm", spcmd1},
+ {"spcalc", spcmd2},
+ {"spnote", spcmd3},
+};
+
+/* tagging */
+static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
+
+static const Rule rules[] = {
+ /* xprop(1):
+ * WM_CLASS(STRING) = instance, class
+ * WM_NAME(STRING) = title
+ */
+ /* class instance title tags mask isfloating isterminal noswallow monitor */
+ { "Gimp", NULL, NULL, 1 << 8, 0, 0, 0, -1 },
+ { TERMCLASS, NULL, NULL, 0, 0, 1, 0, -1 },
+ { NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 },
+ { TERMCLASS, "floatterm", NULL, 0, 1, 1, 0, -1 },
+ { TERMCLASS, "bg", NULL, 1 << 7, 0, 1, 0, -1 },
+ { TERMCLASS, "spterm", NULL, SPTAG(0), 1, 1, 0, -1 },
+ { TERMCLASS, "spcalc", NULL, SPTAG(1), 1, 1, 0, -1 },
+ { TERMCLASS, "spnote", NULL, SPTAG(2), 1, 1, 0, -1 },
+};
+
+/* layout(s) */
+static float mfact = 0.50; /* factor of master area size [0.05..0.95] */
+static int nmaster = 1; /* number of clients in master area */
+static int resizehints = 0; /* 1 means respect size hints in tiled resizals */
+static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
+#define FORCE_VSPLIT 1 /* nrowgrid layout: force two clients to always split vertically */
+#include "vanitygaps.c"
+static const Layout layouts[] = {
+ /* symbol arrange function */
+ { "[]=", tile }, /* Default: Master on left, slaves on right */
+ { "TTT", bstack }, /* Master on top, slaves on bottom */
+
+ { "[@]", spiral }, /* Fibonacci spiral */
+ { "[\\]", dwindle }, /* Decreasing in size right and leftward */
+
+ { "[D]", deck }, /* Master on left, slaves in monocle-like mode on right */
+ { "[M]", monocle }, /* All windows on top of eachother */
+
+ { "|M|", centeredmaster }, /* Master in middle, slaves on sides */
+ { ">M>", centeredfloatingmaster }, /* Same but master floats */
+
+ { "><>", NULL }, /* no layout function means floating behavior */
+ { NULL, NULL },
+};
+
+/* key definitions */
+#define MODKEY Mod4Mask
+#define TAGKEYS(KEY,TAG) \
+ { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
+ { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
+ { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
+ { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
+#define STACKKEYS(MOD,ACTION) \
+ { MOD, XK_j, ACTION##stack, {.i = INC(+1) } }, \
+ { MOD, XK_k, ACTION##stack, {.i = INC(-1) } }, \
+ { MOD, XK_v, ACTION##stack, {.i = 0 } }, \
+ /* { MOD, XK_grave, ACTION##stack, {.i = PREVSEL } }, \ */
+ /* { MOD, XK_a, ACTION##stack, {.i = 1 } }, \ */
+ /* { MOD, XK_z, ACTION##stack, {.i = 2 } }, \ */
+ /* { MOD, XK_x, ACTION##stack, {.i = -1 } }, */
+
+/* helper for spawning shell commands in the pre dwm-5.0 fashion */
+#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
+
+/* commands */
+static const char *termcmd[] = { TERMINAL, NULL };
+
+/*
+ * Xresources preferences to load at startup
+ */
+ResourcePref resources[] = {
+ { "dmemu.background", STRING, &normbordercolor },
+ { "dmenu.foreground", STRING, &selbordercolor },
+ { "dmenu.background", STRING, &normbgcolor },
+ { "dmenu.foreground", STRING, &normfgcolor },
+ { "dmenu.foreground", STRING, &selfgcolor },
+ { "color8", STRING, &selbgcolor },
+ { "borderpx", INTEGER, &borderpx },
+ { "snap", INTEGER, &snap },
+ { "showbar", INTEGER, &showbar },
+ { "topbar", INTEGER, &topbar },
+ { "nmaster", INTEGER, &nmaster },
+ { "resizehints", INTEGER, &resizehints },
+ { "mfact", FLOAT, &mfact },
+ { "gappih", INTEGER, &gappih },
+ { "gappiv", INTEGER, &gappiv },
+ { "gappoh", INTEGER, &gappoh },
+ { "gappov", INTEGER, &gappov },
+ { "swallowfloating", INTEGER, &swallowfloating },
+ { "smartgaps", INTEGER, &smartgaps },
+};
+
+#include <X11/XF86keysym.h>
+#include "shiftview.c"
+
+static const Key keys[] = {
+ /* modifier key function argument */
+ STACKKEYS(MODKEY, focus)
+ STACKKEYS(MODKEY|ShiftMask, push)
+ { MODKEY, XK_grave, spawn, SHCMD("$HOME/.local/bin/scripts/dmenuunicode") },
+ TAGKEYS( XK_1, 0)
+ TAGKEYS( XK_2, 1)
+ TAGKEYS( XK_3, 2)
+ TAGKEYS( XK_4, 3)
+ TAGKEYS( XK_5, 4)
+ TAGKEYS( XK_6, 5)
+ TAGKEYS( XK_7, 6)
+ TAGKEYS( XK_8, 7)
+ TAGKEYS( XK_9, 8)
+ { MODKEY, XK_0, view, {.ui = ~0 } },
+ { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
+ { MODKEY, XK_Tab, view, {0} },
+ { MODKEY, XK_q, killclient, {0} },
+ { MODKEY|ShiftMask, XK_q, quit, {0} },
+
+ // monitors
+ { MODKEY, XK_Left, focusmon, {.i = -1 } },
+ { MODKEY|ShiftMask, XK_Left, tagmon, {.i = -1 } },
+ { MODKEY, XK_Right, focusmon, {.i = +1 } },
+ { MODKEY|ShiftMask, XK_Right, tagmon, {.i = +1 } },
+
+ { MODKEY, XK_w, spawn, {.v = (const char*[]){ BROWSER, NULL } } },
+ { MODKEY|ShiftMask, XK_w, spawn, {.v = (const char*[]){ BROWSER2, NULL } } },
+ { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, /* tile */
+ { MODKEY|ShiftMask, XK_t, setlayout, {.v = &layouts[1]} }, /* bstack */
+ { MODKEY, XK_y, setlayout, {.v = &layouts[2]} }, /* spiral */
+ { MODKEY|ShiftMask, XK_y, setlayout, {.v = &layouts[3]} }, /* dwindle */
+ { MODKEY, XK_u, setlayout, {.v = &layouts[4]} }, /* deck */
+ { MODKEY|ShiftMask, XK_u, setlayout, {.v = &layouts[5]} }, /* monocle */
+ { MODKEY, XK_i, setlayout, {.v = &layouts[6]} }, /* centeredmaster */
+ { MODKEY|ShiftMask, XK_i, setlayout, {.v = &layouts[7]} }, /* centeredfloatingmaster */
+ { MODKEY, XK_o, incnmaster, {.i = +1 } },
+ { MODKEY|ShiftMask, XK_o, incnmaster, {.i = -1 } },
+ { MODKEY, XK_a, togglegaps, {0} },
+ { MODKEY|ShiftMask, XK_a, defaultgaps, {0} },
+ { MODKEY, XK_s, togglesticky, {0} },
+ { MODKEY, XK_d, spawn, {.v = (const char*[]){ "dmenu_run", NULL } } },
+ { MODKEY, XK_x, spawn, SHCMD("$HOME/.local/bin/scripts/emacs/emacs-daemon.sh start") },
+ { MODKEY|ShiftMask, XK_x, spawn, SHCMD("$HOME/.local/bin/scripts/emacs/emacs-daemon.sh kill") },
+ { MODKEY, XK_n, spawn, SHCMD("emacsclient -c") },
+ { MODKEY, XK_e, spawn, SHCMD("emacs") },
+ { MODKEY, XK_equal, spawn, SHCMD("$HOME/.local/bin/scripts/scratch.sh") },
+ { MODKEY|ShiftMask, XK_n, spawn, SHCMD("$HOME/.local/bin/scripts/dired_selector") },
+ /* { MODKEY|ShiftMask, XK_m, spawn, SHCMD("emacsclient -e '(emacs-everywhere)'") }, */
+ { MODKEY, XK_m, spawn, SHCMD("emacsclient -c -e '(emms)'") },
+ { MODKEY|ShiftMask, XK_m, spawn, SHCMD("$HOME/.local/bin/scripts/wallpaper.sh") },
+ { MODKEY|ShiftMask, XK_e, spawn, SHCMD("boomer") },
+ /* { MODKEY, XK_r, spawn, SHCMD("$HOME/.local/bin/scripts/") }, */
+ /* { MODKEY|ShiftMask, XK_r, spawn, SHCMD("$HOME/.local/bin/scripts/") }, */
+ { MODKEY, XK_f, togglefullscr, {0} },
+ { MODKEY, XK_h, setmfact, {.f = -0.05} },
+ /* J and K are automatically bound above in STACKEYS */
+ { MODKEY, XK_l, setmfact, {.f = +0.05} },
+ { MODKEY, XK_semicolon, shiftview, { .i = 1 } },
+ { MODKEY|ShiftMask, XK_semicolon, shifttag, { .i = 1 } },
+ { MODKEY, XK_apostrophe, togglescratch, {.ui = 1} },
+ { MODKEY, XK_Return, spawn, {.v = termcmd } },
+ { MODKEY|ShiftMask, XK_Return, togglescratch, {.ui = 0} },
+ { MODKEY, XK_BackSpace, togglescratch, {.ui = 2} },
+ { MODKEY, XK_z, incrgaps, {.i = +3 } },
+ { MODKEY|ShiftMask, XK_z, incrgaps, {.i = -3 } },
+ /* V is automatically bound above in STACKKEYS */
+ { MODKEY, XK_b, togglebar, {0} },
+ // { MODKEY, XK_Insert, spawn, SHCMD("xdotool type $(grep -v '^#' ~/.local/share/larbs/snippets | dmenu -i -l 50 | cut -d' ' -f1)") },
+
+ { MODKEY, XK_p, spawn, SHCMD(TERMINAL " -e pavucontrol; kill -44 $(pidof dwmblocks)") },
+ /* { MODKEY, XK_e, spawn, SHCMD() }, */
+ { MODKEY, XK_space, zoom, {0} },
+ { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
+
+ { 0, XK_Print, spawn, SHCMD("maim $HOME/Pictures/screenshots/pic-full-$(date '+%y%m%d-%H%M-%S').png") },
+ { ShiftMask, XK_Print, spawn, SHCMD("$HOME/.local/bin/scripts/maimpick") },
+
+ { 0, XF86XK_AudioMute, spawn, SHCMD("pactl set-sink-mute @DEFAULT_SINK@ toggle; kill -44 $(pidof dwmblocks)") },
+ { 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("pactl set-sink-volume @DEFAULT_SINK@ +10%; kill -44 $(pidof dwmblocks)") },
+ { 0, XF86XK_AudioLowerVolume, spawn, SHCMD("pactl set-sink-volume @DEFAULT_SINK@ -10%; kill -44 $(pidof dwmblocks)") },
+ { 0, XF86XK_AudioMicMute, spawn, SHCMD("pactl set-source-mute @DEFAULT_SOURCE@ toggle") },
+
+ { 0, XF86XK_AudioPrev, spawn, {.v = (const char*[]){ "playerctl", "previous", NULL } } },
+ { 0, XF86XK_AudioNext, spawn, {.v = (const char*[]){ "playerctl", "next", NULL } } },
+ { 0, XF86XK_AudioPause, spawn, {.v = (const char*[]){ "playerctl", "pause", NULL } } },
+ { 0, XF86XK_AudioPlay, spawn, {.v = (const char*[]){ "playerctl", "play", NULL } } },
+
+ /* { 0, XF86XK_PowerOff, spawn, {.v = (const char*[]){ "sysact", NULL } } }, */
+ { 0, XF86XK_MonBrightnessUp, spawn, {.v = (const char*[]){ "xbacklight", "-inc", "5", NULL } } },
+ { 0, XF86XK_MonBrightnessDown, spawn, {.v = (const char*[]){ "xbacklight", "-dec", "5", NULL } } },
+};
+
+/* button definitions */
+/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
+static const Button buttons[] = {
+ /* click event mask button function argument */
+#ifndef __OpenBSD__
+ { ClkWinTitle, 0, Button2, zoom, {0} },
+ { ClkStatusText, 0, Button1, sigdwmblocks, {.i = 1} },
+ { ClkStatusText, 0, Button2, sigdwmblocks, {.i = 2} },
+ { ClkStatusText, 0, Button3, sigdwmblocks, {.i = 3} },
+ { ClkStatusText, 0, Button4, sigdwmblocks, {.i = 4} },
+ { ClkStatusText, 0, Button5, sigdwmblocks, {.i = 5} },
+ { ClkStatusText, ShiftMask, Button1, sigdwmblocks, {.i = 6} },
+#endif
+ // { ClkStatusText, ShiftMask, Button3, spawn, SHCMD(TERMINAL " -e nvim ~/.local/src/dwmblocks/config.h") },
+ { ClkClientWin, MODKEY, Button1, movemouse, {0} },
+ { ClkClientWin, MODKEY, Button2, defaultgaps, {0} },
+ { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
+ { ClkClientWin, MODKEY, Button4, incrgaps, {.i = +1} },
+ { ClkClientWin, MODKEY, Button5, incrgaps, {.i = -1} },
+ { ClkTagBar, 0, Button1, view, {0} },
+ { ClkTagBar, 0, Button3, toggleview, {0} },
+ { ClkTagBar, MODKEY, Button1, tag, {0} },
+ { ClkTagBar, MODKEY, Button3, toggletag, {0} },
+ { ClkTagBar, 0, Button4, shiftview, {.i = -1} },
+ { ClkTagBar, 0, Button5, shiftview, {.i = 1} },
+ { ClkRootWin, 0, Button2, togglebar, {0} },
+};
+
diff --git a/dwm/Repositories/luke-dwm/config.mk b/dwm/Repositories/luke-dwm/config.mk
new file mode 100644
index 0000000..0d70060
--- /dev/null
+++ b/dwm/Repositories/luke-dwm/config.mk
@@ -0,0 +1,39 @@
+# dwm version
+VERSION = 6.4
+
+# Customize below to fit your system
+
+# paths
+PREFIX = /usr/local
+MANPREFIX = ${PREFIX}/share/man
+
+X11INC = /usr/X11R6/include
+X11LIB = /usr/X11R6/lib
+
+# Xinerama, comment if you don't want it
+XINERAMALIBS = -lXinerama
+XINERAMAFLAGS = -DXINERAMA
+
+# freetype
+FREETYPELIBS = -lfontconfig -lXft
+FREETYPEINC = /usr/include/freetype2
+# OpenBSD (uncomment)
+#MANPREFIX = ${PREFIX}/man
+#FREETYPEINC = ${X11INC}/freetype2
+
+# includes and libs
+INCS = -I${X11INC} -I${FREETYPEINC}
+LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} -lX11-xcb -lxcb -lxcb-res
+
+# flags
+CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
+#CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
+CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os ${INCS} ${CPPFLAGS}
+LDFLAGS = ${LIBS}
+
+# Solaris
+#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
+#LDFLAGS = ${LIBS}
+
+# compiler and linker
+CC = cc
diff --git a/dwm/Repositories/luke-dwm/drw.c b/dwm/Repositories/luke-dwm/drw.c
new file mode 100644
index 0000000..975ca63
--- /dev/null
+++ b/dwm/Repositories/luke-dwm/drw.c
@@ -0,0 +1,453 @@
+/* See LICENSE file for copyright and license details. */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <X11/Xlib.h>
+#include <X11/Xft/Xft.h>
+
+#include "drw.h"
+#include "util.h"
+
+#define UTF_INVALID 0xFFFD
+#define UTF_SIZ 4
+
+static const unsigned char utfbyte[UTF_SIZ + 1] = {0x80, 0, 0xC0, 0xE0, 0xF0};
+static const unsigned char utfmask[UTF_SIZ + 1] = {0xC0, 0x80, 0xE0, 0xF0, 0xF8};
+static const long utfmin[UTF_SIZ + 1] = { 0, 0, 0x80, 0x800, 0x10000};
+static const long utfmax[UTF_SIZ + 1] = {0x10FFFF, 0x7F, 0x7FF, 0xFFFF, 0x10FFFF};
+
+static long
+utf8decodebyte(const char c, size_t *i)
+{
+ for (*i = 0; *i < (UTF_SIZ + 1); ++(*i))
+ if (((unsigned char)c & utfmask[*i]) == utfbyte[*i])
+ return (unsigned char)c & ~utfmask[*i];
+ return 0;
+}
+
+static size_t
+utf8validate(long *u, size_t i)
+{
+ if (!BETWEEN(*u, utfmin[i], utfmax[i]) || BETWEEN(*u, 0xD800, 0xDFFF))
+ *u = UTF_INVALID;
+ for (i = 1; *u > utfmax[i]; ++i)
+ ;
+ return i;
+}
+
+static size_t
+utf8decode(const char *c, long *u, size_t clen)
+{
+ size_t i, j, len, type;
+ long udecoded;
+
+ *u = UTF_INVALID;
+ if (!clen)
+ return 0;
+ udecoded = utf8decodebyte(c[0], &len);
+ if (!BETWEEN(len, 1, UTF_SIZ))
+ return 1;
+ for (i = 1, j = 1; i < clen && j < len; ++i, ++j) {
+ udecoded = (udecoded << 6) | utf8decodebyte(c[i], &type);
+ if (type)
+ return j;
+ }
+ if (j < len)
+ return 0;
+ *u = udecoded;
+ utf8validate(u, len);
+
+ return len;
+}
+
+Drw *
+drw_create(Display *dpy, int screen, Window root, unsigned int w, unsigned int h)
+{
+ Drw *drw = ecalloc(1, sizeof(Drw));
+
+ drw->dpy = dpy;
+ drw->screen = screen;
+ drw->root = root;
+ drw->w = w;
+ drw->h = h;
+ drw->drawable = XCreatePixmap(dpy, root, w, h, DefaultDepth(dpy, screen));
+ drw->gc = XCreateGC(dpy, root, 0, NULL);
+ XSetLineAttributes(dpy, drw->gc, 1, LineSolid, CapButt, JoinMiter);
+
+ return drw;
+}
+
+void
+drw_resize(Drw *drw, unsigned int w, unsigned int h)
+{
+ if (!drw)
+ return;
+
+ drw->w = w;
+ drw->h = h;
+ if (drw->drawable)
+ XFreePixmap(drw->dpy, drw->drawable);
+ drw->drawable = XCreatePixmap(drw->dpy, drw->root, w, h, DefaultDepth(drw->dpy, drw->screen));
+}
+
+void
+drw_free(Drw *drw)
+{
+ XFreePixmap(drw->dpy, drw->drawable);
+ XFreeGC(drw->dpy, drw->gc);
+ drw_fontset_free(drw->fonts);
+ free(drw);
+}
+
+/* This function is an implementation detail. Library users should use
+ * drw_fontset_create instead.
+ */
+static Fnt *
+xfont_create(Drw *drw, const char *fontname, FcPattern *fontpattern)
+{
+ Fnt *font;
+ XftFont *xfont = NULL;
+ FcPattern *pattern = NULL;
+
+ if (fontname) {
+ /* Using the pattern found at font->xfont->pattern does not yield the
+ * same substitution results as using the pattern returned by
+ * FcNameParse; using the latter results in the desired fallback
+ * behaviour whereas the former just results in missing-character
+ * rectangles being drawn, at least with some fonts. */
+ if (!(xfont = XftFontOpenName(drw->dpy, drw->screen, fontname))) {
+ fprintf(stderr, "error, cannot load font from name: '%s'\n", fontname);
+ return NULL;
+ }
+ if (!(pattern = FcNameParse((FcChar8 *) fontname))) {
+ fprintf(stderr, "error, cannot parse font name to pattern: '%s'\n", fontname);
+ XftFontClose(drw->dpy, xfont);
+ return NULL;
+ }
+ } else if (fontpattern) {
+ if (!(xfont = XftFontOpenPattern(drw->dpy, fontpattern))) {
+ fprintf(stderr, "error, cannot load font from pattern.\n");
+ return NULL;
+ }
+ } else {
+ die("no font specified.");
+ }
+
+ font = ecalloc(1, sizeof(Fnt));
+ font->xfont = xfont;
+ font->pattern = pattern;
+ font->h = xfont->ascent + xfont->descent;
+ font->dpy = drw->dpy;
+
+ return font;
+}
+
+static void
+xfont_free(Fnt *font)
+{
+ if (!font)
+ return;
+ if (font->pattern)
+ FcPatternDestroy(font->pattern);
+ XftFontClose(font->dpy, font->xfont);
+ free(font);
+}
+
+Fnt*
+drw_fontset_create(Drw* drw, char *fonts[], size_t fontcount)
+{
+ Fnt *cur, *ret = NULL;
+ size_t i;
+
+ if (!drw || !fonts)
+ return NULL;
+
+ for (i = 1; i <= fontcount; i++) {
+ if ((cur = xfont_create(drw, fonts[fontcount - i], NULL))) {
+ cur->next = ret;
+ ret = cur;
+ }
+ }
+ return (drw->fonts = ret);
+}
+
+void
+drw_fontset_free(Fnt *font)
+{
+ if (font) {
+ drw_fontset_free(font->next);
+ xfont_free(font);
+ }
+}
+
+void
+drw_clr_create(Drw *drw, Clr *dest, const char *clrname)
+{
+ if (!drw || !dest || !clrname)
+ return;
+
+ if (!XftColorAllocName(drw->dpy, DefaultVisual(drw->dpy, drw->screen),
+ DefaultColormap(drw->dpy, drw->screen),
+ clrname, dest))
+ die("error, cannot allocate color '%s'", clrname);
+
+ dest->pixel |= 0xff << 24;
+}
+
+/* Wrapper to create color schemes. The caller has to call free(3) on the
+ * returned color scheme when done using it. */
+Clr *
+drw_scm_create(Drw *drw, char *clrnames[], size_t clrcount)
+{
+ size_t i;
+ Clr *ret;
+
+ /* need at least two colors for a scheme */
+ if (!drw || !clrnames || clrcount < 2 || !(ret = ecalloc(clrcount, sizeof(XftColor))))
+ return NULL;
+
+ for (i = 0; i < clrcount; i++)
+ drw_clr_create(drw, &ret[i], clrnames[i]);
+ return ret;
+}
+
+void
+drw_setfontset(Drw *drw, Fnt *set)
+{
+ if (drw)
+ drw->fonts = set;
+}
+
+void
+drw_setscheme(Drw *drw, Clr *scm)
+{
+ if (drw)
+ drw->scheme = scm;
+}
+
+void
+drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert)
+{
+ if (!drw || !drw->scheme)
+ return;
+ XSetForeground(drw->dpy, drw->gc, invert ? drw->scheme[ColBg].pixel : drw->scheme[ColFg].pixel);
+ if (filled)
+ XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
+ else
+ XDrawRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w - 1, h - 1);
+}
+
+int
+drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert)
+{
+ int i, ty, ellipsis_x = 0;
+ unsigned int tmpw, ew, ellipsis_w = 0, ellipsis_len;
+ XftDraw *d = NULL;
+ Fnt *usedfont, *curfont, *nextfont;
+ int utf8strlen, utf8charlen, render = x || y || w || h;
+ long utf8codepoint = 0;
+ const char *utf8str;
+ FcCharSet *fccharset;
+ FcPattern *fcpattern;
+ FcPattern *match;
+ XftResult result;
+ int charexists = 0, overflow = 0;
+ /* keep track of a couple codepoints for which we have no match. */
+ enum { nomatches_len = 64 };
+ static struct { long codepoint[nomatches_len]; unsigned int idx; } nomatches;
+ static unsigned int ellipsis_width = 0;
+
+ if (!drw || (render && (!drw->scheme || !w)) || !text || !drw->fonts)
+ return 0;
+
+ if (!render) {
+ w = invert ? invert : ~invert;
+ } else {
+ XSetForeground(drw->dpy, drw->gc, drw->scheme[invert ? ColFg : ColBg].pixel);
+ XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
+ d = XftDrawCreate(drw->dpy, drw->drawable,
+ DefaultVisual(drw->dpy, drw->screen),
+ DefaultColormap(drw->dpy, drw->screen));
+ x += lpad;
+ w -= lpad;
+ }
+
+ usedfont = drw->fonts;
+ if (!ellipsis_width && render)
+ ellipsis_width = drw_fontset_getwidth(drw, "...");
+ while (1) {
+ ew = ellipsis_len = utf8strlen = 0;
+ utf8str = text;
+ nextfont = NULL;
+ while (*text) {
+ utf8charlen = utf8decode(text, &utf8codepoint, UTF_SIZ);
+ for (curfont = drw->fonts; curfont; curfont = curfont->next) {
+ charexists = charexists || XftCharExists(drw->dpy, curfont->xfont, utf8codepoint);
+ if (charexists) {
+ drw_font_getexts(curfont, text, utf8charlen, &tmpw, NULL);
+ if (ew + ellipsis_width <= w) {
+ /* keep track where the ellipsis still fits */
+ ellipsis_x = x + ew;
+ ellipsis_w = w - ew;
+ ellipsis_len = utf8strlen;
+ }
+
+ if (ew + tmpw > w) {
+ overflow = 1;
+ /* called from drw_fontset_getwidth_clamp():
+ * it wants the width AFTER the overflow
+ */
+ if (!render)
+ x += tmpw;
+ else
+ utf8strlen = ellipsis_len;
+ } else if (curfont == usedfont) {
+ utf8strlen += utf8charlen;
+ text += utf8charlen;
+ ew += tmpw;
+ } else {
+ nextfont = curfont;
+ }
+ break;
+ }
+ }
+
+ if (overflow || !charexists || nextfont)
+ break;
+ else
+ charexists = 0;
+ }
+
+ if (utf8strlen) {
+ if (render) {
+ ty = y + (h - usedfont->h) / 2 + usedfont->xfont->ascent;
+ XftDrawStringUtf8(d, &drw->scheme[invert ? ColBg : ColFg],
+ usedfont->xfont, x, ty, (XftChar8 *)utf8str, utf8strlen);
+ }
+ x += ew;
+ w -= ew;
+ }
+ if (render && overflow)
+ drw_text(drw, ellipsis_x, y, ellipsis_w, h, 0, "...", invert);
+
+ if (!*text || overflow) {
+ break;
+ } else if (nextfont) {
+ charexists = 0;
+ usedfont = nextfont;
+ } else {
+ /* Regardless of whether or not a fallback font is found, the
+ * character must be drawn. */
+ charexists = 1;
+
+ for (i = 0; i < nomatches_len; ++i) {
+ /* avoid calling XftFontMatch if we know we won't find a match */
+ if (utf8codepoint == nomatches.codepoint[i])
+ goto no_match;
+ }
+
+ fccharset = FcCharSetCreate();
+ FcCharSetAddChar(fccharset, utf8codepoint);
+
+ if (!drw->fonts->pattern) {
+ /* Refer to the comment in xfont_create for more information. */
+ die("the first font in the cache must be loaded from a font string.");
+ }
+
+ fcpattern = FcPatternDuplicate(drw->fonts->pattern);
+ FcPatternAddCharSet(fcpattern, FC_CHARSET, fccharset);
+ FcPatternAddBool(fcpattern, FC_SCALABLE, FcTrue);
+ FcPatternAddBool(fcpattern, FC_COLOR, FcFalse);
+
+ FcConfigSubstitute(NULL, fcpattern, FcMatchPattern);
+ FcDefaultSubstitute(fcpattern);
+ match = XftFontMatch(drw->dpy, drw->screen, fcpattern, &result);
+
+ FcCharSetDestroy(fccharset);
+ FcPatternDestroy(fcpattern);
+
+ if (match) {
+ usedfont = xfont_create(drw, NULL, match);
+ if (usedfont && XftCharExists(drw->dpy, usedfont->xfont, utf8codepoint)) {
+ for (curfont = drw->fonts; curfont->next; curfont = curfont->next)
+ ; /* NOP */
+ curfont->next = usedfont;
+ } else {
+ xfont_free(usedfont);
+ nomatches.codepoint[++nomatches.idx % nomatches_len] = utf8codepoint;
+no_match:
+ usedfont = drw->fonts;
+ }
+ }
+ }
+ }
+ if (d)
+ XftDrawDestroy(d);
+
+ return x + (render ? w : 0);
+}
+
+void
+drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h)
+{
+ if (!drw)
+ return;
+
+ XCopyArea(drw->dpy, drw->drawable, win, drw->gc, x, y, w, h, x, y);
+ XSync(drw->dpy, False);
+}
+
+unsigned int
+drw_fontset_getwidth(Drw *drw, const char *text)
+{
+ if (!drw || !drw->fonts || !text)
+ return 0;
+ return drw_text(drw, 0, 0, 0, 0, 0, text, 0);
+}
+
+unsigned int
+drw_fontset_getwidth_clamp(Drw *drw, const char *text, unsigned int n)
+{
+ unsigned int tmp = 0;
+ if (drw && drw->fonts && text && n)
+ tmp = drw_text(drw, 0, 0, 0, 0, 0, text, n);
+ return MIN(n, tmp);
+}
+
+void
+drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h)
+{
+ XGlyphInfo ext;
+
+ if (!font || !text)
+ return;
+
+ XftTextExtentsUtf8(font->dpy, font->xfont, (XftChar8 *)text, len, &ext);
+ if (w)
+ *w = ext.xOff;
+ if (h)
+ *h = font->h;
+}
+
+Cur *
+drw_cur_create(Drw *drw, int shape)
+{
+ Cur *cur;
+
+ if (!drw || !(cur = ecalloc(1, sizeof(Cur))))
+ return NULL;
+
+ cur->cursor = XCreateFontCursor(drw->dpy, shape);
+
+ return cur;
+}
+
+void
+drw_cur_free(Drw *drw, Cur *cursor)
+{
+ if (!cursor)
+ return;
+
+ XFreeCursor(drw->dpy, cursor->cursor);
+ free(cursor);
+}
diff --git a/dwm/Repositories/luke-dwm/drw.h b/dwm/Repositories/luke-dwm/drw.h
new file mode 100644
index 0000000..000fb09
--- /dev/null
+++ b/dwm/Repositories/luke-dwm/drw.h
@@ -0,0 +1,58 @@
+/* See LICENSE file for copyright and license details. */
+
+typedef struct {
+ Cursor cursor;
+} Cur;
+
+typedef struct Fnt {
+ Display *dpy;
+ unsigned int h;
+ XftFont *xfont;
+ FcPattern *pattern;
+ struct Fnt *next;
+} Fnt;
+
+enum { ColFg, ColBg, ColBorder }; /* Clr scheme index */
+typedef XftColor Clr;
+
+typedef struct {
+ unsigned int w, h;
+ Display *dpy;
+ int screen;
+ Window root;
+ Drawable drawable;
+ GC gc;
+ Clr *scheme;
+ Fnt *fonts;
+} Drw;
+
+/* Drawable abstraction */
+Drw *drw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h);
+void drw_resize(Drw *drw, unsigned int w, unsigned int h);
+void drw_free(Drw *drw);
+
+/* Fnt abstraction */
+Fnt *drw_fontset_create(Drw* drw, char *fonts[], size_t fontcount);
+void drw_fontset_free(Fnt* set);
+unsigned int drw_fontset_getwidth(Drw *drw, const char *text);
+unsigned int drw_fontset_getwidth_clamp(Drw *drw, const char *text, unsigned int n);
+void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h);
+
+/* Colorscheme abstraction */
+void drw_clr_create(Drw *drw, Clr *dest, const char *clrname);
+Clr *drw_scm_create(Drw *drw, char *clrnames[], size_t clrcount);
+
+/* Cursor abstraction */
+Cur *drw_cur_create(Drw *drw, int shape);
+void drw_cur_free(Drw *drw, Cur *cursor);
+
+/* Drawing context manipulation */
+void drw_setfontset(Drw *drw, Fnt *set);
+void drw_setscheme(Drw *drw, Clr *scm);
+
+/* Drawing functions */
+void drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert);
+int drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert);
+
+/* Map functions */
+void drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h);
diff --git a/dwm/Repositories/luke-dwm/drw.o b/dwm/Repositories/luke-dwm/drw.o
new file mode 100644
index 0000000..65422c1
--- /dev/null
+++ b/dwm/Repositories/luke-dwm/drw.o
Binary files differ
diff --git a/dwm/Repositories/luke-dwm/dwm b/dwm/Repositories/luke-dwm/dwm
new file mode 100755
index 0000000..07c1dc9
--- /dev/null
+++ b/dwm/Repositories/luke-dwm/dwm
Binary files differ
diff --git a/dwm/Repositories/luke-dwm/dwm.1 b/dwm/Repositories/luke-dwm/dwm.1
new file mode 100644
index 0000000..62fff83
--- /dev/null
+++ b/dwm/Repositories/luke-dwm/dwm.1
@@ -0,0 +1,213 @@
+.TH DWM 1 dwm\-VERSION
+.SH NAME
+dwm \- dynamic window manager (Luke Smith <https://lukesmith.xyz>'s build)
+.SH SYNOPSIS
+.B dwm
+.RB [ \-v ]
+.SH DESCRIPTION
+dwm is a dynamic window manager for X.
+.P
+dwm "orders" windows based on recency and primacy, while dwm layouts may
+change, the most recent "master" window is shown in the most prominent
+position. There are bindings for cycling through and promoting windows to the
+master position.
+.P
+Windows are grouped by tags. Each window can be tagged with one or multiple
+tags. Selecting certain tags displays all windows with these tags.
+.P
+Each screen contains a small status bar which displays all available tags, the
+layout, the title of the focused window, and the text read from the root window
+name property, if the screen is focused. A floating window is indicated with an
+empty square and a maximised floating window is indicated with a filled square
+before the windows title. The selected tags are indicated with a different
+color. The tags of the focused window are indicated with a filled square in the
+top left corner. The tags which are applied to one or more windows are
+indicated with an empty square in the top left corner.
+.P
+dwm draws a small border around windows to indicate the focus state.
+.SH OPTIONS
+.TP
+.B \-v
+prints version information to stderr, then exits.
+.SH USAGE
+.SS Status bar
+.TP
+.B X root window name
+is read and displayed in the status text area. It can be set with the
+.BR xsetroot (1)
+command.
+.TP
+.B Left click
+click on a tag label to display all windows with that tag, click on the layout
+label toggles between tiled and floating layout.
+.TP
+.B Right click
+click on a tag label adds/removes all windows with that tag to/from the view.
+.TP
+.B Super\-Left click
+click on a tag label applies that tag to the focused window.
+.TP
+.B Super\-Right click
+click on a tag label adds/removes that tag to/from the focused window.
+.SS Keyboard commands
+.TP
+.B Super\-Return
+Start terminal,
+.BR st(1).
+.TP
+.B Super\-d
+Spawn
+.BR dmenu(1)
+for launching other programs.
+.TP
+.B Super\-grave
+Spawn
+.BR dmenuunicode(1)
+for selecting emoji.
+.TP
+.B Super\-minus/plus, Super\-Shift\-minus/plus
+Decrease/increase volume by 5 and 15 respectively.
+.TP
+.B Super\-b
+Toggles bar on and off.
+.TP
+.B Super\-q
+Close focused window.
+.TP
+.B Super\-t/T
+Sets tiled/bstack layouts.
+.TP
+.B Super\-f
+Toggle fullscreen window.
+.TP
+.B Super\-F
+Toggle floating layout.
+.TP
+.B Super\-y/Y
+Sets Fibonacci spiral/dwinde layouts.
+.TP
+.B Super\-u/U
+Sets centered master layout.
+.TP
+.B Super\-i/I
+Sets centered master or floating master layouts.
+.TP
+.B Super\-space
+Zooms/cycles focused window to/from master area.
+.TP
+.B Super\-j/k
+Focus next/previous window.
+.TP
+.B Super\-Shift\-j/k
+Move selected window down/up in stack.
+.TP
+.B Super\-o/O
+Increase/decrease number of windows in master area.
+.TP
+.B Super\-l
+Increase master area size.
+.TP
+.B Super\-h
+Decrease master area size.
+.TP
+.B Super\-Shift\-space
+Toggle focused window between tiled and floating state.
+.TP
+.B Super\-Tab
+Toggles to the previously selected tags.
+.TP
+.B Super\-g
+Moves to the previous tag.
+.TP
+.B Super\-Shift\-g
+Moves selected window to the previous tag.
+.TP
+.B Super\-;
+Moves to the next tag.
+.TP
+.B Super\-Shift\-;
+Moves selected window to the next tag.
+.TP
+.B Super\-PageUp
+Moves to the previous tag.
+.TP
+.B Super\-Shift\-PageUp
+Moves selected window to the previous tag.
+.TP
+.B Super\-Pagedown
+Moves to the next tag.
+.TP
+.B Super\-Shift\-PageDown
+Moves selected window to the next tag.
+.TP
+.B Super\-a
+Toggle gaps.
+.TP
+.B Super\-z
+Increase gaps between windows.
+.TP
+.B Super\-x
+Decrease gaps between windows.
+.TP
+.B Super\-Shift\-[1..n]
+Apply nth tag to focused window.
+.TP
+.B Super\-Shift\-0
+Apply all tags to focused window.
+.TP
+.B Super\-Control\-Shift\-[1..n]
+Add/remove nth tag to/from focused window.
+.TP
+.B Super\-[1..n]
+View all windows with nth tag.
+.TP
+.B Super\-0
+View all windows with any tag.
+.TP
+.B Super\-Control\-[1..n]
+Add/remove all windows with nth tag to/from the view.
+.TP
+.B Super\-Shift\-q
+Quit dwm.
+.TP
+.B Mod1\-Control\-Shift\-q
+Menu to refresh/quit/reboot/shutdown.
+.SS Mouse commands
+.TP
+.B Super\-Left click
+Move focused window while dragging. Tiled windows will be toggled to the floating state.
+.TP
+.B Super\-Middle click
+Toggles focused window between floating and tiled state.
+.TP
+.B Super\-Right click
+Resize focused window while dragging. Tiled windows will be toggled to the floating state.
+.SH CUSTOMIZATION
+dwm is customized by creating a custom config.h and (re)compiling the source
+code. This keeps it fast, secure and simple.
+.SH SIGNALS
+.TP
+.B SIGHUP - 1
+Restart the dwm process.
+.TP
+.B SIGTERM - 15
+Cleanly terminate the dwm process.
+.SH SEE ALSO
+.BR dmenu (1),
+.BR st (1)
+.SH ISSUES
+Java applications which use the XToolkit/XAWT backend may draw grey windows
+only. The XToolkit/XAWT backend breaks ICCCM-compliance in recent JDK 1.5 and early
+JDK 1.6 versions, because it assumes a reparenting window manager. Possible workarounds
+are using JDK 1.4 (which doesn't contain the XToolkit/XAWT backend) or setting the
+environment variable
+.BR AWT_TOOLKIT=MToolkit
+(to use the older Motif backend instead) or running
+.B xprop -root -f _NET_WM_NAME 32a -set _NET_WM_NAME LG3D
+or
+.B wmname LG3D
+(to pretend that a non-reparenting window manager is running that the
+XToolkit/XAWT backend can recognize) or when using OpenJDK setting the environment variable
+.BR _JAVA_AWT_WM_NONREPARENTING=1 .
+.SH BUGS
+Send all bug reports with a patch to [email protected].
diff --git a/dwm/Repositories/luke-dwm/dwm.c b/dwm/Repositories/luke-dwm/dwm.c
new file mode 100644
index 0000000..1ce854c
--- /dev/null
+++ b/dwm/Repositories/luke-dwm/dwm.c
@@ -0,0 +1,2686 @@
+/* See LICENSE file for copyright and license details.
+ *
+ * dynamic window manager is designed like any other X client as well. It is
+ * driven through handling X events. In contrast to other X clients, a window
+ * manager selects for SubstructureRedirectMask on the root window, to receive
+ * events about window (dis-)appearance. Only one X connection at a time is
+ * allowed to select for this event mask.
+ *
+ * The event handlers of dwm are organized in an array which is accessed
+ * whenever a new event has been fetched. This allows event dispatching
+ * in O(1) time.
+ *
+ * Each child of the root window is called a client, except windows which have
+ * set the override_redirect flag. Clients are organized in a linked client
+ * list on each monitor, the focus history is remembered through a stack list
+ * on each monitor. Each client contains a bit array to indicate the tags of a
+ * client.
+ *
+ * Keys and tagging rules are organized as arrays and defined in config.h.
+ *
+ * To understand everything else, start reading main().
+ */
+#include <errno.h>
+#include <locale.h>
+#include <signal.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <X11/cursorfont.h>
+#include <X11/keysym.h>
+#include <X11/Xatom.h>
+#include <X11/Xlib.h>
+#include <X11/Xproto.h>
+#include <X11/Xresource.h>
+#include <X11/Xutil.h>
+#include <X11/Xresource.h>
+#ifdef XINERAMA
+#include <X11/extensions/Xinerama.h>
+#endif /* XINERAMA */
+#include <X11/Xft/Xft.h>
+#include <X11/Xlib-xcb.h>
+#include <xcb/res.h>
+
+#include "drw.h"
+#include "util.h"
+
+/* macros */
+#define BUTTONMASK (ButtonPressMask|ButtonReleaseMask)
+#define CLEANMASK(mask) (mask & ~(numlockmask|LockMask) & (ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask))
+#define GETINC(X) ((X) - 2000)
+#define INC(X) ((X) + 2000)
+#define INTERSECT(x,y,w,h,m) (MAX(0, MIN((x)+(w),(m)->wx+(m)->ww) - MAX((x),(m)->wx)) \
+ * MAX(0, MIN((y)+(h),(m)->wy+(m)->wh) - MAX((y),(m)->wy)))
+#define ISINC(X) ((X) > 1000 && (X) < 3000)
+#define ISVISIBLE(C) ((C->tags & C->mon->tagset[C->mon->seltags]) || C->issticky)
+#define PREVSEL 3000
+#define LENGTH(X) (sizeof X / sizeof X[0])
+#define MOUSEMASK (BUTTONMASK|PointerMotionMask)
+#define MOD(N,M) ((N)%(M) < 0 ? (N)%(M) + (M) : (N)%(M))
+#define WIDTH(X) ((X)->w + 2 * (X)->bw)
+#define HEIGHT(X) ((X)->h + 2 * (X)->bw)
+#define NUMTAGS (LENGTH(tags) + LENGTH(scratchpads))
+#define TAGMASK ((1 << NUMTAGS) - 1)
+#define SPTAG(i) ((1 << LENGTH(tags)) << (i))
+#define SPTAGMASK (((1 << LENGTH(scratchpads))-1) << LENGTH(tags))
+#define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad)
+#define TRUNC(X,A,B) (MAX((A), MIN((X), (B))))
+
+/* enums */
+enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
+enum { SchemeNorm, SchemeSel }; /* color schemes */
+enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
+ NetWMFullscreen, NetActiveWindow, NetWMWindowType,
+ NetWMWindowTypeDialog, NetClientList, NetClientInfo, NetLast }; /* EWMH atoms */
+enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */
+enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
+ ClkClientWin, ClkRootWin, ClkLast }; /* clicks */
+
+typedef union {
+ int i;
+ unsigned int ui;
+ float f;
+ const void *v;
+} Arg;
+
+typedef struct {
+ unsigned int click;
+ unsigned int mask;
+ unsigned int button;
+ void (*func)(const Arg *arg);
+ const Arg arg;
+} Button;
+
+typedef struct Monitor Monitor;
+typedef struct Client Client;
+struct Client {
+ char name[256];
+ float mina, maxa;
+ int x, y, w, h;
+ int oldx, oldy, oldw, oldh;
+ int basew, baseh, incw, inch, maxw, maxh, minw, minh, hintsvalid;
+ int bw, oldbw;
+ unsigned int tags;
+ int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, isterminal, noswallow, issticky;
+ pid_t pid;
+ Client *next;
+ Client *snext;
+ Client *swallowing;
+ Monitor *mon;
+ Window win;
+};
+
+typedef struct {
+ unsigned int mod;
+ KeySym keysym;
+ void (*func)(const Arg *);
+ const Arg arg;
+} Key;
+
+typedef struct {
+ const char *symbol;
+ void (*arrange)(Monitor *);
+} Layout;
+
+struct Monitor {
+ char ltsymbol[16];
+ float mfact;
+ int nmaster;
+ int num;
+ int by; /* bar geometry */
+ int mx, my, mw, mh; /* screen size */
+ int wx, wy, ww, wh; /* window area */
+ int gappih; /* horizontal gap between windows */
+ int gappiv; /* vertical gap between windows */
+ int gappoh; /* horizontal outer gaps */
+ int gappov; /* vertical outer gaps */
+ unsigned int seltags;
+ unsigned int sellt;
+ unsigned int tagset[2];
+ int showbar;
+ int topbar;
+ Client *clients;
+ Client *sel;
+ Client *stack;
+ Monitor *next;
+ Window barwin;
+ const Layout *lt[2];
+};
+
+typedef struct {
+ const char *class;
+ const char *instance;
+ const char *title;
+ unsigned int tags;
+ int isfloating;
+ int isterminal;
+ int noswallow;
+ int monitor;
+} Rule;
+
+/* Xresources preferences */
+enum resource_type {
+ STRING = 0,
+ INTEGER = 1,
+ FLOAT = 2
+};
+
+typedef struct {
+ char *name;
+ enum resource_type type;
+ void *dst;
+} ResourcePref;
+
+/* function declarations */
+static void applyrules(Client *c);
+static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact);
+static void arrange(Monitor *m);
+static void arrangemon(Monitor *m);
+static void attach(Client *c);
+static void attachstack(Client *c);
+static void buttonpress(XEvent *e);
+static void checkotherwm(void);
+static void cleanup(void);
+static void cleanupmon(Monitor *mon);
+static void clientmessage(XEvent *e);
+static void configure(Client *c);
+static void configurenotify(XEvent *e);
+static void configurerequest(XEvent *e);
+static void copyvalidchars(char *text, char *rawtext);
+static Monitor *createmon(void);
+static void destroynotify(XEvent *e);
+static void detach(Client *c);
+static void detachstack(Client *c);
+static Monitor *dirtomon(int dir);
+static void drawbar(Monitor *m);
+static void drawbars(void);
+static void enternotify(XEvent *e);
+static void expose(XEvent *e);
+static void focus(Client *c);
+static void focusin(XEvent *e);
+static void focusmon(const Arg *arg);
+static void focusstack(const Arg *arg);
+static Atom getatomprop(Client *c, Atom prop);
+static int getrootptr(int *x, int *y);
+static long getstate(Window w);
+static int gettextprop(Window w, Atom atom, char *text, unsigned int size);
+static void grabbuttons(Client *c, int focused);
+static void grabkeys(void);
+static void incnmaster(const Arg *arg);
+static void keypress(XEvent *e);
+static void killclient(const Arg *arg);
+static void manage(Window w, XWindowAttributes *wa);
+static void mappingnotify(XEvent *e);
+static void maprequest(XEvent *e);
+static void monocle(Monitor *m);
+static void motionnotify(XEvent *e);
+static void movemouse(const Arg *arg);
+static Client *nexttiled(Client *c);
+static void pop(Client *c);
+static void propertynotify(XEvent *e);
+static void pushstack(const Arg *arg);
+static void quit(const Arg *arg);
+static Monitor *recttomon(int x, int y, int w, int h);
+static void resize(Client *c, int x, int y, int w, int h, int interact);
+static void resizeclient(Client *c, int x, int y, int w, int h);
+static void resizemouse(const Arg *arg);
+static void restack(Monitor *m);
+static void run(void);
+static void runAutostart(void);
+static void scan(void);
+static int sendevent(Client *c, Atom proto);
+static void sendmon(Client *c, Monitor *m);
+static void setclientstate(Client *c, long state);
+static void setclienttagprop(Client *c);
+static void setfocus(Client *c);
+static void setfullscreen(Client *c, int fullscreen);
+static void setlayout(const Arg *arg);
+static void setmfact(const Arg *arg);
+static void setup(void);
+static void seturgent(Client *c, int urg);
+static void showhide(Client *c);
+static void sigchld(int unused);
+#ifndef __OpenBSD__
+static int getdwmblockspid();
+static void sigdwmblocks(const Arg *arg);
+#endif
+static void sighup(int unused);
+static void sigterm(int unused);
+static void spawn(const Arg *arg);
+static int stackpos(const Arg *arg);
+static void tag(const Arg *arg);
+static void tagmon(const Arg *arg);
+static void togglebar(const Arg *arg);
+static void togglefloating(const Arg *arg);
+static void togglescratch(const Arg *arg);
+static void togglesticky(const Arg *arg);
+static void togglefullscr(const Arg *arg);
+static void toggletag(const Arg *arg);
+static void toggleview(const Arg *arg);
+static void unfocus(Client *c, int setfocus);
+static void unmanage(Client *c, int destroyed);
+static void unmapnotify(XEvent *e);
+static void updatebarpos(Monitor *m);
+static void updatebars(void);
+static void updateclientlist(void);
+static int updategeom(void);
+static void updatenumlockmask(void);
+static void updatesizehints(Client *c);
+static void updatestatus(void);
+static void updatetitle(Client *c);
+static void updatewindowtype(Client *c);
+static void updatewmhints(Client *c);
+static void view(const Arg *arg);
+static Client *wintoclient(Window w);
+static Monitor *wintomon(Window w);
+static int xerror(Display *dpy, XErrorEvent *ee);
+static int xerrordummy(Display *dpy, XErrorEvent *ee);
+static int xerrorstart(Display *dpy, XErrorEvent *ee);
+static void zoom(const Arg *arg);
+static void xrdb(const Arg *arg);
+static void load_xresources(void);
+static void resource_load(XrmDatabase db, char *name, enum resource_type rtype, void *dst);
+
+static pid_t getparentprocess(pid_t p);
+static int isdescprocess(pid_t p, pid_t c);
+static Client *swallowingclient(Window w);
+static Client *termforwin(const Client *c);
+static pid_t winpid(Window w);
+
+
+/* variables */
+static const char broken[] = "broken";
+static char stext[256];
+static char rawstext[256];
+static int dwmblockssig;
+pid_t dwmblockspid = 0;
+static int screen;
+static int sw, sh; /* X display screen geometry width, height */
+static int bh; /* bar height */
+static int lrpad; /* sum of left and right padding for text */
+static int (*xerrorxlib)(Display *, XErrorEvent *);
+static unsigned int numlockmask = 0;
+static void (*handler[LASTEvent]) (XEvent *) = {
+ [ButtonPress] = buttonpress,
+ [ClientMessage] = clientmessage,
+ [ConfigureRequest] = configurerequest,
+ [ConfigureNotify] = configurenotify,
+ [DestroyNotify] = destroynotify,
+ [EnterNotify] = enternotify,
+ [Expose] = expose,
+ [FocusIn] = focusin,
+ [KeyPress] = keypress,
+ [MappingNotify] = mappingnotify,
+ [MapRequest] = maprequest,
+ [MotionNotify] = motionnotify,
+ [PropertyNotify] = propertynotify,
+ [UnmapNotify] = unmapnotify
+};
+static Atom wmatom[WMLast], netatom[NetLast];
+static int restart = 0;
+static int running = 1;
+static Cur *cursor[CurLast];
+static Clr **scheme;
+static Display *dpy;
+static Drw *drw;
+static Monitor *mons, *selmon;
+static Window root, wmcheckwin;
+
+static xcb_connection_t *xcon;
+
+/* configuration, allows nested code to access above variables */
+#include "config.h"
+
+/* compile-time check if all tags fit into an unsigned int bit array. */
+struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };
+
+/* function implementations */
+void
+applyrules(Client *c)
+{
+ const char *class, *instance;
+ unsigned int i;
+ const Rule *r;
+ Monitor *m;
+ XClassHint ch = { NULL, NULL };
+
+ /* rule matching */
+ c->isfloating = 0;
+ c->tags = 0;
+ XGetClassHint(dpy, c->win, &ch);
+ class = ch.res_class ? ch.res_class : broken;
+ instance = ch.res_name ? ch.res_name : broken;
+
+ for (i = 0; i < LENGTH(rules); i++) {
+ r = &rules[i];
+ if ((!r->title || strstr(c->name, r->title))
+ && (!r->class || strstr(class, r->class))
+ && (!r->instance || strstr(instance, r->instance)))
+ {
+ c->isterminal = r->isterminal;
+ c->isfloating = r->isfloating;
+ c->noswallow = r->noswallow;
+ c->tags |= r->tags;
+ if ((r->tags & SPTAGMASK) && r->isfloating) {
+ c->x = c->mon->wx + (c->mon->ww / 2 - WIDTH(c) / 2);
+ c->y = c->mon->wy + (c->mon->wh / 2 - HEIGHT(c) / 2);
+ }
+
+ for (m = mons; m && m->num != r->monitor; m = m->next);
+ if (m)
+ c->mon = m;
+ }
+ }
+ if (ch.res_class)
+ XFree(ch.res_class);
+ if (ch.res_name)
+ XFree(ch.res_name);
+ c->tags = c->tags & TAGMASK ? c->tags & TAGMASK : (c->mon->tagset[c->mon->seltags] & ~SPTAGMASK);
+}
+
+int
+applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact)
+{
+ int baseismin;
+ Monitor *m = c->mon;
+
+ /* set minimum possible */
+ *w = MAX(1, *w);
+ *h = MAX(1, *h);
+ if (interact) {
+ if (*x > sw)
+ *x = sw - WIDTH(c);
+ if (*y > sh)
+ *y = sh - HEIGHT(c);
+ if (*x + *w + 2 * c->bw < 0)
+ *x = 0;
+ if (*y + *h + 2 * c->bw < 0)
+ *y = 0;
+ } else {
+ if (*x >= m->wx + m->ww)
+ *x = m->wx + m->ww - WIDTH(c);
+ if (*y >= m->wy + m->wh)
+ *y = m->wy + m->wh - HEIGHT(c);
+ if (*x + *w + 2 * c->bw <= m->wx)
+ *x = m->wx;
+ if (*y + *h + 2 * c->bw <= m->wy)
+ *y = m->wy;
+ }
+ if (*h < bh)
+ *h = bh;
+ if (*w < bh)
+ *w = bh;
+ if (resizehints || c->isfloating || !c->mon->lt[c->mon->sellt]->arrange) {
+ if (!c->hintsvalid)
+ updatesizehints(c);
+ /* see last two sentences in ICCCM 4.1.2.3 */
+ baseismin = c->basew == c->minw && c->baseh == c->minh;
+ if (!baseismin) { /* temporarily remove base dimensions */
+ *w -= c->basew;
+ *h -= c->baseh;
+ }
+ /* adjust for aspect limits */
+ if (c->mina > 0 && c->maxa > 0) {
+ if (c->maxa < (float)*w / *h)
+ *w = *h * c->maxa + 0.5;
+ else if (c->mina < (float)*h / *w)
+ *h = *w * c->mina + 0.5;
+ }
+ if (baseismin) { /* increment calculation requires this */
+ *w -= c->basew;
+ *h -= c->baseh;
+ }
+ /* adjust for increment value */
+ if (c->incw)
+ *w -= *w % c->incw;
+ if (c->inch)
+ *h -= *h % c->inch;
+ /* restore base dimensions */
+ *w = MAX(*w + c->basew, c->minw);
+ *h = MAX(*h + c->baseh, c->minh);
+ if (c->maxw)
+ *w = MIN(*w, c->maxw);
+ if (c->maxh)
+ *h = MIN(*h, c->maxh);
+ }
+ return *x != c->x || *y != c->y || *w != c->w || *h != c->h;
+}
+
+void
+arrange(Monitor *m)
+{
+ if (m)
+ showhide(m->stack);
+ else for (m = mons; m; m = m->next)
+ showhide(m->stack);
+ if (m) {
+ arrangemon(m);
+ restack(m);
+ } else for (m = mons; m; m = m->next)
+ arrangemon(m);
+}
+
+void
+arrangemon(Monitor *m)
+{
+ strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, sizeof m->ltsymbol);
+ if (m->lt[m->sellt]->arrange)
+ m->lt[m->sellt]->arrange(m);
+}
+
+void
+attach(Client *c)
+{
+ c->next = c->mon->clients;
+ c->mon->clients = c;
+}
+
+void
+attachstack(Client *c)
+{
+ c->snext = c->mon->stack;
+ c->mon->stack = c;
+}
+
+void
+swallow(Client *p, Client *c)
+{
+ if (c->noswallow || c->isterminal)
+ return;
+ if (!swallowfloating && c->isfloating)
+ return;
+
+ detach(c);
+ detachstack(c);
+
+ setclientstate(c, WithdrawnState);
+ XUnmapWindow(dpy, p->win);
+
+ p->swallowing = c;
+ c->mon = p->mon;
+
+ Window w = p->win;
+ p->win = c->win;
+ c->win = w;
+ updatetitle(p);
+
+ XWindowChanges wc;
+ wc.border_width = p->bw;
+ XConfigureWindow(dpy, p->win, CWBorderWidth, &wc);
+ XMoveResizeWindow(dpy, p->win, p->x, p->y, p->w, p->h);
+ XSetWindowBorder(dpy, p->win, scheme[SchemeNorm][ColBorder].pixel);
+
+ arrange(p->mon);
+ configure(p);
+ updateclientlist();
+}
+
+void
+unswallow(Client *c)
+{
+ c->win = c->swallowing->win;
+
+ free(c->swallowing);
+ c->swallowing = NULL;
+
+ /* unfullscreen the client */
+ setfullscreen(c, 0);
+ updatetitle(c);
+ arrange(c->mon);
+ XMapWindow(dpy, c->win);
+
+ XWindowChanges wc;
+ wc.border_width = c->bw;
+ XConfigureWindow(dpy, c->win, CWBorderWidth, &wc);
+ XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h);
+ XSetWindowBorder(dpy, c->win, scheme[SchemeNorm][ColBorder].pixel);
+
+ setclientstate(c, NormalState);
+ focus(NULL);
+ arrange(c->mon);
+}
+
+void
+buttonpress(XEvent *e)
+{
+ unsigned int i, x, click, occ = 0;
+ Arg arg = {0};
+ Client *c;
+ Monitor *m;
+ XButtonPressedEvent *ev = &e->xbutton;
+
+ click = ClkRootWin;
+ /* focus monitor if necessary */
+ if ((m = wintomon(ev->window)) && m != selmon) {
+ unfocus(selmon->sel, 1);
+ selmon = m;
+ focus(NULL);
+ }
+ if (ev->window == selmon->barwin) {
+ i = x = 0;
+ for (c = m->clients; c; c = c->next)
+ occ |= c->tags == 255 ? 0 : c->tags;
+ do {
+ /* do not reserve space for vacant tags */
+ if (!(occ & 1 << i || m->tagset[m->seltags] & 1 << i))
+ continue;
+ x += TEXTW(tags[i]);
+ } while (ev->x >= x && ++i < LENGTH(tags));
+ if (i < LENGTH(tags)) {
+ click = ClkTagBar;
+ arg.ui = 1 << i;
+ } else if (ev->x < x + TEXTW(selmon->ltsymbol))
+ click = ClkLtSymbol;
+ else if (ev->x > (x = selmon->ww - (int)TEXTW(stext) + lrpad)) {
+ click = ClkStatusText;
+
+ char *text = rawstext;
+ int i = -1;
+ char ch;
+ dwmblockssig = 0;
+ while (text[++i]) {
+ if ((unsigned char)text[i] < ' ') {
+ ch = text[i];
+ text[i] = '\0';
+ x += TEXTW(text) - lrpad;
+ text[i] = ch;
+ text += i+1;
+ i = -1;
+ if (x >= ev->x) break;
+ dwmblockssig = ch;
+ }
+ }
+ } else
+ click = ClkWinTitle;
+ } else if ((c = wintoclient(ev->window))) {
+ focus(c);
+ restack(selmon);
+ XAllowEvents(dpy, ReplayPointer, CurrentTime);
+ click = ClkClientWin;
+ }
+ for (i = 0; i < LENGTH(buttons); i++)
+ if (click == buttons[i].click && buttons[i].func && buttons[i].button == ev->button
+ && CLEANMASK(buttons[i].mask) == CLEANMASK(ev->state))
+ buttons[i].func(click == ClkTagBar && buttons[i].arg.i == 0 ? &arg : &buttons[i].arg);
+}
+
+void
+checkotherwm(void)
+{
+ xerrorxlib = XSetErrorHandler(xerrorstart);
+ /* this causes an error if some other window manager is running */
+ XSelectInput(dpy, DefaultRootWindow(dpy), SubstructureRedirectMask);
+ XSync(dpy, False);
+ XSetErrorHandler(xerror);
+ XSync(dpy, False);
+}
+
+void
+cleanup(void)
+{
+ Arg a = {.ui = ~0};
+ Layout foo = { "", NULL };
+ Monitor *m;
+ size_t i;
+
+ view(&a);
+ selmon->lt[selmon->sellt] = &foo;
+ for (m = mons; m; m = m->next)
+ while (m->stack)
+ unmanage(m->stack, 0);
+ XUngrabKey(dpy, AnyKey, AnyModifier, root);
+ while (mons)
+ cleanupmon(mons);
+ for (i = 0; i < CurLast; i++)
+ drw_cur_free(drw, cursor[i]);
+ for (i = 0; i < LENGTH(colors); i++)
+ free(scheme[i]);
+ free(scheme);
+ XDestroyWindow(dpy, wmcheckwin);
+ drw_free(drw);
+ XSync(dpy, False);
+ XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
+ XDeleteProperty(dpy, root, netatom[NetActiveWindow]);
+}
+
+void
+cleanupmon(Monitor *mon)
+{
+ Monitor *m;
+
+ if (mon == mons)
+ mons = mons->next;
+ else {
+ for (m = mons; m && m->next != mon; m = m->next);
+ m->next = mon->next;
+ }
+ XUnmapWindow(dpy, mon->barwin);
+ XDestroyWindow(dpy, mon->barwin);
+ free(mon);
+}
+
+void
+clientmessage(XEvent *e)
+{
+ XClientMessageEvent *cme = &e->xclient;
+ Client *c = wintoclient(cme->window);
+
+ if (!c)
+ return;
+ if (cme->message_type == netatom[NetWMState]) {
+ if (cme->data.l[1] == netatom[NetWMFullscreen]
+ || cme->data.l[2] == netatom[NetWMFullscreen])
+ setfullscreen(c, (cme->data.l[0] == 1 /* _NET_WM_STATE_ADD */
+ || (cme->data.l[0] == 2 /* _NET_WM_STATE_TOGGLE */ && !c->isfullscreen)));
+ } else if (cme->message_type == netatom[NetActiveWindow]) {
+ if (c != selmon->sel && !c->isurgent)
+ seturgent(c, 1);
+ }
+}
+
+void
+configure(Client *c)
+{
+ XConfigureEvent ce;
+
+ ce.type = ConfigureNotify;
+ ce.display = dpy;
+ ce.event = c->win;
+ ce.window = c->win;
+ ce.x = c->x;
+ ce.y = c->y;
+ ce.width = c->w;
+ ce.height = c->h;
+ ce.border_width = c->bw;
+ ce.above = None;
+ ce.override_redirect = False;
+ XSendEvent(dpy, c->win, False, StructureNotifyMask, (XEvent *)&ce);
+}
+
+void
+configurenotify(XEvent *e)
+{
+ Monitor *m;
+ Client *c;
+ XConfigureEvent *ev = &e->xconfigure;
+ int dirty;
+
+ /* TODO: updategeom handling sucks, needs to be simplified */
+ if (ev->window == root) {
+ dirty = (sw != ev->width || sh != ev->height);
+ sw = ev->width;
+ sh = ev->height;
+ if (updategeom() || dirty) {
+ drw_resize(drw, sw, bh);
+ updatebars();
+ for (m = mons; m; m = m->next) {
+ for (c = m->clients; c; c = c->next)
+ if (c->isfullscreen)
+ resizeclient(c, m->mx, m->my, m->mw, m->mh);
+ XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, m->ww, bh);
+ }
+ focus(NULL);
+ arrange(NULL);
+ }
+ }
+}
+
+void
+configurerequest(XEvent *e)
+{
+ Client *c;
+ Monitor *m;
+ XConfigureRequestEvent *ev = &e->xconfigurerequest;
+ XWindowChanges wc;
+
+ if ((c = wintoclient(ev->window))) {
+ if (ev->value_mask & CWBorderWidth)
+ c->bw = ev->border_width;
+ else if (c->isfloating || !selmon->lt[selmon->sellt]->arrange) {
+ m = c->mon;
+ if (ev->value_mask & CWX) {
+ c->oldx = c->x;
+ c->x = m->mx + ev->x;
+ }
+ if (ev->value_mask & CWY) {
+ c->oldy = c->y;
+ c->y = m->my + ev->y;
+ }
+ if (ev->value_mask & CWWidth) {
+ c->oldw = c->w;
+ c->w = ev->width;
+ }
+ if (ev->value_mask & CWHeight) {
+ c->oldh = c->h;
+ c->h = ev->height;
+ }
+ if ((c->x + c->w) > m->mx + m->mw && c->isfloating)
+ c->x = m->mx + (m->mw / 2 - WIDTH(c) / 2); /* center in x direction */
+ if ((c->y + c->h) > m->my + m->mh && c->isfloating)
+ c->y = m->my + (m->mh / 2 - HEIGHT(c) / 2); /* center in y direction */
+ if ((ev->value_mask & (CWX|CWY)) && !(ev->value_mask & (CWWidth|CWHeight)))
+ configure(c);
+ if (ISVISIBLE(c))
+ XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h);
+ } else
+ configure(c);
+ } else {
+ wc.x = ev->x;
+ wc.y = ev->y;
+ wc.width = ev->width;
+ wc.height = ev->height;
+ wc.border_width = ev->border_width;
+ wc.sibling = ev->above;
+ wc.stack_mode = ev->detail;
+ XConfigureWindow(dpy, ev->window, ev->value_mask, &wc);
+ }
+ XSync(dpy, False);
+}
+
+void
+copyvalidchars(char *text, char *rawtext)
+{
+ int i = -1, j = 0;
+
+ while(rawtext[++i]) {
+ if ((unsigned char)rawtext[i] >= ' ') {
+ text[j++] = rawtext[i];
+ }
+ }
+ text[j] = '\0';
+}
+
+Monitor *
+createmon(void)
+{
+ Monitor *m;
+
+ m = ecalloc(1, sizeof(Monitor));
+ m->tagset[0] = m->tagset[1] = 1;
+ m->mfact = mfact;
+ m->nmaster = nmaster;
+ m->showbar = showbar;
+ m->topbar = topbar;
+ m->gappih = gappih;
+ m->gappiv = gappiv;
+ m->gappoh = gappoh;
+ m->gappov = gappov;
+ m->lt[0] = &layouts[0];
+ m->lt[1] = &layouts[1 % LENGTH(layouts)];
+ strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol);
+ return m;
+}
+
+void
+destroynotify(XEvent *e)
+{
+ Client *c;
+ XDestroyWindowEvent *ev = &e->xdestroywindow;
+
+ if ((c = wintoclient(ev->window)))
+ unmanage(c, 1);
+
+ else if ((c = swallowingclient(ev->window)))
+ unmanage(c->swallowing, 1);
+}
+
+void
+detach(Client *c)
+{
+ Client **tc;
+
+ for (tc = &c->mon->clients; *tc && *tc != c; tc = &(*tc)->next);
+ *tc = c->next;
+}
+
+void
+detachstack(Client *c)
+{
+ Client **tc, *t;
+
+ for (tc = &c->mon->stack; *tc && *tc != c; tc = &(*tc)->snext);
+ *tc = c->snext;
+
+ if (c == c->mon->sel) {
+ for (t = c->mon->stack; t && !ISVISIBLE(t); t = t->snext);
+ c->mon->sel = t;
+ }
+}
+
+Monitor *
+dirtomon(int dir)
+{
+ Monitor *m = NULL;
+
+ if (dir > 0) {
+ if (!(m = selmon->next))
+ m = mons;
+ } else if (selmon == mons)
+ for (m = mons; m->next; m = m->next);
+ else
+ for (m = mons; m->next != selmon; m = m->next);
+ return m;
+}
+
+void
+drawbar(Monitor *m)
+{
+ int x, w, tw = 0;
+ int boxs = drw->fonts->h / 9;
+ int boxw = drw->fonts->h / 6 + 2;
+ unsigned int i, occ = 0, urg = 0;
+ Client *c;
+
+ if(!m->showbar)
+ return;
+
+ /* draw status first so it can be overdrawn by tags later */
+ if (m == selmon) { /* status is only drawn on selected monitor */
+ drw_setscheme(drw, scheme[SchemeNorm]);
+ tw = TEXTW(stext) - lrpad + 2; /* 2px right padding */
+ drw_text(drw, m->ww - tw, 0, tw, bh, 0, stext, 0);
+ }
+
+ for (c = m->clients; c; c = c->next) {
+ occ |= c->tags == 255 ? 0 : c->tags;
+ if (c->isurgent)
+ urg |= c->tags;
+ }
+ x = 0;
+ for (i = 0; i < LENGTH(tags); i++) {
+ /* do not draw vacant tags */
+ if (!(occ & 1 << i || m->tagset[m->seltags] & 1 << i))
+ continue;
+
+ w = TEXTW(tags[i]);
+ drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
+ drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i);
+ x += w;
+ }
+ w = TEXTW(m->ltsymbol);
+ drw_setscheme(drw, scheme[SchemeNorm]);
+ x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
+
+ if ((w = m->ww - tw - x) > bh) {
+ if (m->sel) {
+ drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
+ drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
+ if (m->sel->isfloating)
+ drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);
+ } else {
+ drw_setscheme(drw, scheme[SchemeNorm]);
+ drw_rect(drw, x, 0, w, bh, 1, 1);
+ }
+ }
+ drw_map(drw, m->barwin, 0, 0, m->ww, bh);
+}
+
+void
+drawbars(void)
+{
+ Monitor *m;
+
+ for (m = mons; m; m = m->next)
+ drawbar(m);
+}
+
+void
+enternotify(XEvent *e)
+{
+ Client *c;
+ Monitor *m;
+ XCrossingEvent *ev = &e->xcrossing;
+
+ if ((ev->mode != NotifyNormal || ev->detail == NotifyInferior) && ev->window != root)
+ return;
+ c = wintoclient(ev->window);
+ m = c ? c->mon : wintomon(ev->window);
+ if (m != selmon) {
+ unfocus(selmon->sel, 1);
+ selmon = m;
+ } else if (!c || c == selmon->sel)
+ return;
+ focus(c);
+}
+
+void
+expose(XEvent *e)
+{
+ Monitor *m;
+ XExposeEvent *ev = &e->xexpose;
+
+ if (ev->count == 0 && (m = wintomon(ev->window)))
+ drawbar(m);
+}
+
+void
+focus(Client *c)
+{
+ if (!c || !ISVISIBLE(c)) {
+ for (c = selmon->stack; c && (!ISVISIBLE(c) || (c->issticky && !selmon->sel->issticky)); c = c->snext);
+
+ if (!c) /* No windows found; check for available stickies */
+ for (c = selmon->stack; c && !ISVISIBLE(c); c = c->snext);
+ }
+
+ if (selmon->sel && selmon->sel != c)
+ unfocus(selmon->sel, 0);
+ if (c) {
+ if (c->mon != selmon)
+ selmon = c->mon;
+ if (c->isurgent)
+ seturgent(c, 0);
+ detachstack(c);
+ attachstack(c);
+ grabbuttons(c, 1);
+ XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColBorder].pixel);
+ setfocus(c);
+ } else {
+ XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
+ XDeleteProperty(dpy, root, netatom[NetActiveWindow]);
+ }
+ selmon->sel = c;
+ drawbars();
+}
+
+/* there are some broken focus acquiring clients needing extra handling */
+void
+focusin(XEvent *e)
+{
+ XFocusChangeEvent *ev = &e->xfocus;
+
+ if (selmon->sel && ev->window != selmon->sel->win)
+ setfocus(selmon->sel);
+}
+
+void
+focusmon(const Arg *arg)
+{
+ Monitor *m;
+
+ if (!mons->next)
+ return;
+ if ((m = dirtomon(arg->i)) == selmon)
+ return;
+ unfocus(selmon->sel, 0);
+ selmon = m;
+ focus(NULL);
+}
+
+void
+focusstack(const Arg *arg)
+{
+ int i = stackpos(arg);
+ Client *c, *p;
+
+ if(i < 0 || !selmon->sel || (selmon->sel->isfullscreen && lockfullscreen))
+ return;
+
+ for(p = NULL, c = selmon->clients; c && (i || !ISVISIBLE(c));
+ i -= ISVISIBLE(c) ? 1 : 0, p = c, c = c->next);
+ focus(c ? c : p);
+ restack(selmon);
+}
+
+Atom
+getatomprop(Client *c, Atom prop)
+{
+ int di;
+ unsigned long dl;
+ unsigned char *p = NULL;
+ Atom da, atom = None;
+
+ if (XGetWindowProperty(dpy, c->win, prop, 0L, sizeof atom, False, XA_ATOM,
+ &da, &di, &dl, &dl, &p) == Success && p) {
+ atom = *(Atom *)p;
+ XFree(p);
+ }
+ return atom;
+}
+
+#ifndef __OpenBSD__
+int
+getdwmblockspid()
+{
+ char buf[16];
+ FILE *fp = popen("pidof -s dwmblocks", "r");
+ fgets(buf, sizeof(buf), fp);
+ pid_t pid = strtoul(buf, NULL, 10);
+ pclose(fp);
+ dwmblockspid = pid;
+ return pid != 0 ? 0 : -1;
+}
+#endif
+
+int
+getrootptr(int *x, int *y)
+{
+ int di;
+ unsigned int dui;
+ Window dummy;
+
+ return XQueryPointer(dpy, root, &dummy, &dummy, x, y, &di, &di, &dui);
+}
+
+long
+getstate(Window w)
+{
+ int format;
+ long result = -1;
+ unsigned char *p = NULL;
+ unsigned long n, extra;
+ Atom real;
+
+ if (XGetWindowProperty(dpy, w, wmatom[WMState], 0L, 2L, False, wmatom[WMState],
+ &real, &format, &n, &extra, (unsigned char **)&p) != Success)
+ return -1;
+ if (n != 0)
+ result = *p;
+ XFree(p);
+ return result;
+}
+
+int
+gettextprop(Window w, Atom atom, char *text, unsigned int size)
+{
+ char **list = NULL;
+ int n;
+ XTextProperty name;
+
+ if (!text || size == 0)
+ return 0;
+ text[0] = '\0';
+ if (!XGetTextProperty(dpy, w, &name, atom) || !name.nitems)
+ return 0;
+ if (name.encoding == XA_STRING) {
+ strncpy(text, (char *)name.value, size - 1);
+ } else if (XmbTextPropertyToTextList(dpy, &name, &list, &n) >= Success && n > 0 && *list) {
+ strncpy(text, *list, size - 1);
+ XFreeStringList(list);
+ }
+ text[size - 1] = '\0';
+ XFree(name.value);
+ return 1;
+}
+
+void
+grabbuttons(Client *c, int focused)
+{
+ updatenumlockmask();
+ {
+ unsigned int i, j;
+ unsigned int modifiers[] = { 0, LockMask, numlockmask, numlockmask|LockMask };
+ XUngrabButton(dpy, AnyButton, AnyModifier, c->win);
+ if (!focused)
+ XGrabButton(dpy, AnyButton, AnyModifier, c->win, False,
+ BUTTONMASK, GrabModeSync, GrabModeSync, None, None);
+ for (i = 0; i < LENGTH(buttons); i++)
+ if (buttons[i].click == ClkClientWin)
+ for (j = 0; j < LENGTH(modifiers); j++)
+ XGrabButton(dpy, buttons[i].button,
+ buttons[i].mask | modifiers[j],
+ c->win, False, BUTTONMASK,
+ GrabModeAsync, GrabModeSync, None, None);
+ }
+}
+
+void
+grabkeys(void)
+{
+ updatenumlockmask();
+ {
+ unsigned int i, j, k;
+ unsigned int modifiers[] = { 0, LockMask, numlockmask, numlockmask|LockMask };
+ int start, end, skip;
+ KeySym *syms;
+
+ XUngrabKey(dpy, AnyKey, AnyModifier, root);
+ XDisplayKeycodes(dpy, &start, &end);
+ syms = XGetKeyboardMapping(dpy, start, end - start + 1, &skip);
+ if (!syms)
+ return;
+ for (k = start; k <= end; k++)
+ for (i = 0; i < LENGTH(keys); i++)
+ /* skip modifier codes, we do that ourselves */
+ if (keys[i].keysym == syms[(k - start) * skip])
+ for (j = 0; j < LENGTH(modifiers); j++)
+ XGrabKey(dpy, k,
+ keys[i].mod | modifiers[j],
+ root, True,
+ GrabModeAsync, GrabModeAsync);
+ XFree(syms);
+ }
+}
+
+void
+incnmaster(const Arg *arg)
+{
+ selmon->nmaster = MAX(selmon->nmaster + arg->i, 0);
+ arrange(selmon);
+}
+
+#ifdef XINERAMA
+static int
+isuniquegeom(XineramaScreenInfo *unique, size_t n, XineramaScreenInfo *info)
+{
+ while (n--)
+ if (unique[n].x_org == info->x_org && unique[n].y_org == info->y_org
+ && unique[n].width == info->width && unique[n].height == info->height)
+ return 0;
+ return 1;
+}
+#endif /* XINERAMA */
+
+void
+keypress(XEvent *e)
+{
+ unsigned int i;
+ KeySym keysym;
+ XKeyEvent *ev;
+
+ ev = &e->xkey;
+ keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0);
+ for (i = 0; i < LENGTH(keys); i++)
+ if (keysym == keys[i].keysym
+ && CLEANMASK(keys[i].mod) == CLEANMASK(ev->state)
+ && keys[i].func)
+ keys[i].func(&(keys[i].arg));
+}
+
+void
+killclient(const Arg *arg)
+{
+ if (!selmon->sel)
+ return;
+ if (!sendevent(selmon->sel, wmatom[WMDelete])) {
+ XGrabServer(dpy);
+ XSetErrorHandler(xerrordummy);
+ XSetCloseDownMode(dpy, DestroyAll);
+ XKillClient(dpy, selmon->sel->win);
+ XSync(dpy, False);
+ XSetErrorHandler(xerror);
+ XUngrabServer(dpy);
+ }
+}
+
+void
+manage(Window w, XWindowAttributes *wa)
+{
+ Client *c, *t = NULL, *term = NULL;
+ Window trans = None;
+ XWindowChanges wc;
+
+ c = ecalloc(1, sizeof(Client));
+ c->win = w;
+ c->pid = winpid(w);
+ /* geometry */
+ c->x = c->oldx = wa->x;
+ c->y = c->oldy = wa->y;
+ c->w = c->oldw = wa->width;
+ c->h = c->oldh = wa->height;
+ c->oldbw = wa->border_width;
+
+ updatetitle(c);
+ if (XGetTransientForHint(dpy, w, &trans) && (t = wintoclient(trans))) {
+ c->mon = t->mon;
+ c->tags = t->tags;
+ } else {
+ c->mon = selmon;
+ applyrules(c);
+ term = termforwin(c);
+ }
+
+ if (c->x + WIDTH(c) > c->mon->wx + c->mon->ww)
+ c->x = c->mon->wx + c->mon->ww - WIDTH(c);
+ if (c->y + HEIGHT(c) > c->mon->wy + c->mon->wh)
+ c->y = c->mon->wy + c->mon->wh - HEIGHT(c);
+ c->x = MAX(c->x, c->mon->wx);
+ c->y = MAX(c->y, c->mon->wy);
+ c->bw = borderpx;
+
+ wc.border_width = c->bw;
+ XConfigureWindow(dpy, w, CWBorderWidth, &wc);
+ XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColBorder].pixel);
+ configure(c); /* propagates border_width, if size doesn't change */
+ updatewindowtype(c);
+ updatesizehints(c);
+ updatewmhints(c);
+ {
+ int format;
+ unsigned long *data, n, extra;
+ Monitor *m;
+ Atom atom;
+ if (XGetWindowProperty(dpy, c->win, netatom[NetClientInfo], 0L, 2L, False, XA_CARDINAL,
+ &atom, &format, &n, &extra, (unsigned char **)&data) == Success && n == 2) {
+ c->tags = *data;
+ for (m = mons; m; m = m->next) {
+ if (m->num == *(data+1)) {
+ c->mon = m;
+ break;
+ }
+ }
+ }
+ if (n > 0)
+ XFree(data);
+ }
+ setclienttagprop(c);
+
+ c->x = c->mon->mx + (c->mon->mw - WIDTH(c)) / 2;
+ c->y = c->mon->my + (c->mon->mh - HEIGHT(c)) / 2;
+ XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask);
+ grabbuttons(c, 0);
+ if (!c->isfloating)
+ c->isfloating = c->oldstate = trans != None || c->isfixed;
+ if (c->isfloating)
+ XRaiseWindow(dpy, c->win);
+ attach(c);
+ attachstack(c);
+ XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend,
+ (unsigned char *) &(c->win), 1);
+ XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */
+ setclientstate(c, NormalState);
+ if(selmon->sel && selmon->sel->isfullscreen && !c->isfloating)
+ setfullscreen(selmon->sel, 0);
+ if (c->mon == selmon)
+ unfocus(selmon->sel, 0);
+ c->mon->sel = c;
+ XMapWindow(dpy, c->win);
+ if (term)
+ swallow(term, c);
+ arrange(c->mon);
+ focus(NULL);
+}
+
+void
+mappingnotify(XEvent *e)
+{
+ XMappingEvent *ev = &e->xmapping;
+
+ XRefreshKeyboardMapping(ev);
+ if (ev->request == MappingKeyboard)
+ grabkeys();
+}
+
+void
+maprequest(XEvent *e)
+{
+ static XWindowAttributes wa;
+ XMapRequestEvent *ev = &e->xmaprequest;
+
+ if (!XGetWindowAttributes(dpy, ev->window, &wa) || wa.override_redirect)
+ return;
+ if (!wintoclient(ev->window))
+ manage(ev->window, &wa);
+}
+
+void
+monocle(Monitor *m)
+{
+ unsigned int n;
+ int oh, ov, ih, iv;
+ Client *c;
+
+ getgaps(m, &oh, &ov, &ih, &iv, &n);
+
+ if (n > 0) /* override layout symbol */
+ snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
+ for (c = nexttiled(m->clients); c; c = nexttiled(c->next))
+ resize(c, m->wx + ov, m->wy + oh, m->ww - 2 * c->bw - 2 * ov, m->wh - 2 * c->bw - 2 * oh, 0);
+}
+
+void
+motionnotify(XEvent *e)
+{
+ static Monitor *mon = NULL;
+ Monitor *m;
+ XMotionEvent *ev = &e->xmotion;
+
+ if (ev->window != root)
+ return;
+ if ((m = recttomon(ev->x_root, ev->y_root, 1, 1)) != mon && mon) {
+ unfocus(selmon->sel, 1);
+ selmon = m;
+ focus(NULL);
+ }
+ mon = m;
+}
+
+void
+movemouse(const Arg *arg)
+{
+ int x, y, ocx, ocy, nx, ny;
+ Client *c;
+ Monitor *m;
+ XEvent ev;
+ Time lasttime = 0;
+
+ if (!(c = selmon->sel))
+ return;
+ if (c->isfullscreen) /* no support moving fullscreen windows by mouse */
+ return;
+ restack(selmon);
+ ocx = c->x;
+ ocy = c->y;
+ if (XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
+ None, cursor[CurMove]->cursor, CurrentTime) != GrabSuccess)
+ return;
+ if (!getrootptr(&x, &y))
+ return;
+ do {
+ XMaskEvent(dpy, MOUSEMASK|ExposureMask|SubstructureRedirectMask, &ev);
+ switch(ev.type) {
+ case ConfigureRequest:
+ case Expose:
+ case MapRequest:
+ handler[ev.type](&ev);
+ break;
+ case MotionNotify:
+ if ((ev.xmotion.time - lasttime) <= (1000 / 60))
+ continue;
+ lasttime = ev.xmotion.time;
+
+ nx = ocx + (ev.xmotion.x - x);
+ ny = ocy + (ev.xmotion.y - y);
+ if (abs(selmon->wx - nx) < snap)
+ nx = selmon->wx;
+ else if (abs((selmon->wx + selmon->ww) - (nx + WIDTH(c))) < snap)
+ nx = selmon->wx + selmon->ww - WIDTH(c);
+ if (abs(selmon->wy - ny) < snap)
+ ny = selmon->wy;
+ else if (abs((selmon->wy + selmon->wh) - (ny + HEIGHT(c))) < snap)
+ ny = selmon->wy + selmon->wh - HEIGHT(c);
+ if (!c->isfloating && selmon->lt[selmon->sellt]->arrange
+ && (abs(nx - c->x) > snap || abs(ny - c->y) > snap))
+ togglefloating(NULL);
+ if (!selmon->lt[selmon->sellt]->arrange || c->isfloating)
+ resize(c, nx, ny, c->w, c->h, 1);
+ break;
+ }
+ } while (ev.type != ButtonRelease);
+ XUngrabPointer(dpy, CurrentTime);
+ if ((m = recttomon(c->x, c->y, c->w, c->h)) != selmon) {
+ sendmon(c, m);
+ selmon = m;
+ focus(NULL);
+ }
+}
+
+Client *
+nexttiled(Client *c)
+{
+ for (; c && (c->isfloating || !ISVISIBLE(c)); c = c->next);
+ return c;
+}
+
+void
+pop(Client *c)
+{
+ detach(c);
+ attach(c);
+ focus(c);
+ arrange(c->mon);
+}
+
+void
+pushstack(const Arg *arg) {
+ int i = stackpos(arg);
+ Client *sel = selmon->sel, *c, *p;
+
+ if(i < 0 || !sel)
+ return;
+ else if(i == 0) {
+ detach(sel);
+ attach(sel);
+ }
+ else {
+ for(p = NULL, c = selmon->clients; c; p = c, c = c->next)
+ if(!(i -= (ISVISIBLE(c) && c != sel)))
+ break;
+ c = c ? c : p;
+ detach(sel);
+ sel->next = c->next;
+ c->next = sel;
+ }
+ arrange(selmon);
+}
+
+void
+propertynotify(XEvent *e)
+{
+ Client *c;
+ Window trans;
+ XPropertyEvent *ev = &e->xproperty;
+
+ if ((ev->window == root) && (ev->atom == XA_WM_NAME)) {
+ updatestatus();
+ } else if (ev->state == PropertyDelete) {
+ return; /* ignore */
+ } else if ((c = wintoclient(ev->window))) {
+ switch(ev->atom) {
+ default: break;
+ case XA_WM_TRANSIENT_FOR:
+ if (!c->isfloating && (XGetTransientForHint(dpy, c->win, &trans)) &&
+ (c->isfloating = (wintoclient(trans)) != NULL))
+ arrange(c->mon);
+ break;
+ case XA_WM_NORMAL_HINTS:
+ updatesizehints(c);
+ break;
+ case XA_WM_HINTS:
+ updatewmhints(c);
+ drawbars();
+ break;
+ }
+ if (ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) {
+ updatetitle(c);
+ if (c == c->mon->sel)
+ drawbar(c->mon);
+ }
+ if (ev->atom == netatom[NetWMWindowType])
+ updatewindowtype(c);
+ }
+}
+
+void
+quit(const Arg *arg)
+{
+ if(arg->i) restart = 1;
+ running = 0;
+}
+
+Monitor *
+recttomon(int x, int y, int w, int h)
+{
+ Monitor *m, *r = selmon;
+ int a, area = 0;
+
+ for (m = mons; m; m = m->next)
+ if ((a = INTERSECT(x, y, w, h, m)) > area) {
+ area = a;
+ r = m;
+ }
+ return r;
+}
+
+void
+resize(Client *c, int x, int y, int w, int h, int interact)
+{
+ if (applysizehints(c, &x, &y, &w, &h, interact))
+ resizeclient(c, x, y, w, h);
+}
+
+void
+resizeclient(Client *c, int x, int y, int w, int h)
+{
+ XWindowChanges wc;
+
+ c->oldx = c->x; c->x = wc.x = x;
+ c->oldy = c->y; c->y = wc.y = y;
+ c->oldw = c->w; c->w = wc.width = w;
+ c->oldh = c->h; c->h = wc.height = h;
+ wc.border_width = c->bw;
+ XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
+ configure(c);
+ XSync(dpy, False);
+}
+
+void
+resizemouse(const Arg *arg)
+{
+ int ocx, ocy, nw, nh;
+ Client *c;
+ Monitor *m;
+ XEvent ev;
+ Time lasttime = 0;
+
+ if (!(c = selmon->sel))
+ return;
+ if (c->isfullscreen) /* no support resizing fullscreen windows by mouse */
+ return;
+ restack(selmon);
+ ocx = c->x;
+ ocy = c->y;
+ if (XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
+ None, cursor[CurResize]->cursor, CurrentTime) != GrabSuccess)
+ return;
+ XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1);
+ do {
+ XMaskEvent(dpy, MOUSEMASK|ExposureMask|SubstructureRedirectMask, &ev);
+ switch(ev.type) {
+ case ConfigureRequest:
+ case Expose:
+ case MapRequest:
+ handler[ev.type](&ev);
+ break;
+ case MotionNotify:
+ if ((ev.xmotion.time - lasttime) <= (1000 / 60))
+ continue;
+ lasttime = ev.xmotion.time;
+
+ nw = MAX(ev.xmotion.x - ocx - 2 * c->bw + 1, 1);
+ nh = MAX(ev.xmotion.y - ocy - 2 * c->bw + 1, 1);
+ if (c->mon->wx + nw >= selmon->wx && c->mon->wx + nw <= selmon->wx + selmon->ww
+ && c->mon->wy + nh >= selmon->wy && c->mon->wy + nh <= selmon->wy + selmon->wh)
+ {
+ if (!c->isfloating && selmon->lt[selmon->sellt]->arrange
+ && (abs(nw - c->w) > snap || abs(nh - c->h) > snap))
+ togglefloating(NULL);
+ }
+ if (!selmon->lt[selmon->sellt]->arrange || c->isfloating)
+ resize(c, c->x, c->y, nw, nh, 1);
+ break;
+ }
+ } while (ev.type != ButtonRelease);
+ XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1);
+ XUngrabPointer(dpy, CurrentTime);
+ while (XCheckMaskEvent(dpy, EnterWindowMask, &ev));
+ if ((m = recttomon(c->x, c->y, c->w, c->h)) != selmon) {
+ sendmon(c, m);
+ selmon = m;
+ focus(NULL);
+ }
+}
+
+void
+restack(Monitor *m)
+{
+ Client *c;
+ XEvent ev;
+ XWindowChanges wc;
+
+ drawbar(m);
+ if (!m->sel)
+ return;
+ if (m->sel->isfloating || !m->lt[m->sellt]->arrange)
+ XRaiseWindow(dpy, m->sel->win);
+ if (m->lt[m->sellt]->arrange) {
+ wc.stack_mode = Below;
+ wc.sibling = m->barwin;
+ for (c = m->stack; c; c = c->snext)
+ if (!c->isfloating && ISVISIBLE(c)) {
+ XConfigureWindow(dpy, c->win, CWSibling|CWStackMode, &wc);
+ wc.sibling = c->win;
+ }
+ }
+ XSync(dpy, False);
+ while (XCheckMaskEvent(dpy, EnterWindowMask, &ev));
+}
+
+void
+run(void)
+{
+ XEvent ev;
+ /* main event loop */
+ XSync(dpy, False);
+ while (running && !XNextEvent(dpy, &ev))
+ if (handler[ev.type])
+ handler[ev.type](&ev); /* call handler */
+}
+
+void
+runAutostart(void) {
+ system("killall -q dwmblocks; dwmblocks &");
+}
+
+void
+scan(void)
+{
+ unsigned int i, num;
+ Window d1, d2, *wins = NULL;
+ XWindowAttributes wa;
+
+ if (XQueryTree(dpy, root, &d1, &d2, &wins, &num)) {
+ for (i = 0; i < num; i++) {
+ if (!XGetWindowAttributes(dpy, wins[i], &wa)
+ || wa.override_redirect || XGetTransientForHint(dpy, wins[i], &d1))
+ continue;
+ if (wa.map_state == IsViewable || getstate(wins[i]) == IconicState)
+ manage(wins[i], &wa);
+ }
+ for (i = 0; i < num; i++) { /* now the transients */
+ if (!XGetWindowAttributes(dpy, wins[i], &wa))
+ continue;
+ if (XGetTransientForHint(dpy, wins[i], &d1)
+ && (wa.map_state == IsViewable || getstate(wins[i]) == IconicState))
+ manage(wins[i], &wa);
+ }
+ if (wins)
+ XFree(wins);
+ }
+}
+
+void
+sendmon(Client *c, Monitor *m)
+{
+ if (c->mon == m)
+ return;
+ unfocus(c, 1);
+ detach(c);
+ detachstack(c);
+ c->mon = m;
+ c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
+ attach(c);
+ attachstack(c);
+ setclienttagprop(c);
+ focus(NULL);
+ arrange(NULL);
+}
+
+void
+setclientstate(Client *c, long state)
+{
+ long data[] = { state, None };
+
+ XChangeProperty(dpy, c->win, wmatom[WMState], wmatom[WMState], 32,
+ PropModeReplace, (unsigned char *)data, 2);
+}
+
+int
+sendevent(Client *c, Atom proto)
+{
+ int n;
+ Atom *protocols;
+ int exists = 0;
+ XEvent ev;
+
+ if (XGetWMProtocols(dpy, c->win, &protocols, &n)) {
+ while (!exists && n--)
+ exists = protocols[n] == proto;
+ XFree(protocols);
+ }
+ if (exists) {
+ ev.type = ClientMessage;
+ ev.xclient.window = c->win;
+ ev.xclient.message_type = wmatom[WMProtocols];
+ ev.xclient.format = 32;
+ ev.xclient.data.l[0] = proto;
+ ev.xclient.data.l[1] = CurrentTime;
+ XSendEvent(dpy, c->win, False, NoEventMask, &ev);
+ }
+ return exists;
+}
+
+void
+setfocus(Client *c)
+{
+ if (!c->neverfocus) {
+ XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
+ XChangeProperty(dpy, root, netatom[NetActiveWindow],
+ XA_WINDOW, 32, PropModeReplace,
+ (unsigned char *) &(c->win), 1);
+ }
+ sendevent(c, wmatom[WMTakeFocus]);
+}
+
+void
+setfullscreen(Client *c, int fullscreen)
+{
+ if (fullscreen && !c->isfullscreen) {
+ XChangeProperty(dpy, c->win, netatom[NetWMState], XA_ATOM, 32,
+ PropModeReplace, (unsigned char*)&netatom[NetWMFullscreen], 1);
+ c->isfullscreen = 1;
+ c->oldstate = c->isfloating;
+ c->oldbw = c->bw;
+ c->bw = 0;
+ c->isfloating = 1;
+ resizeclient(c, c->mon->mx, c->mon->my, c->mon->mw, c->mon->mh);
+ XRaiseWindow(dpy, c->win);
+ } else if (!fullscreen && c->isfullscreen){
+ XChangeProperty(dpy, c->win, netatom[NetWMState], XA_ATOM, 32,
+ PropModeReplace, (unsigned char*)0, 0);
+ c->isfullscreen = 0;
+ c->isfloating = c->oldstate;
+ c->bw = c->oldbw;
+ c->x = c->oldx;
+ c->y = c->oldy;
+ c->w = c->oldw;
+ c->h = c->oldh;
+ resizeclient(c, c->x, c->y, c->w, c->h);
+ arrange(c->mon);
+ }
+}
+
+int
+stackpos(const Arg *arg) {
+ int n, i;
+ Client *c, *l;
+
+ if(!selmon->clients)
+ return -1;
+
+ if(arg->i == PREVSEL) {
+ for(l = selmon->stack; l && (!ISVISIBLE(l) || l == selmon->sel); l = l->snext);
+ if(!l)
+ return -1;
+ for(i = 0, c = selmon->clients; c != l; i += ISVISIBLE(c) ? 1 : 0, c = c->next);
+ return i;
+ }
+ else if(ISINC(arg->i)) {
+ if(!selmon->sel)
+ return -1;
+ for(i = 0, c = selmon->clients; c != selmon->sel; i += ISVISIBLE(c) ? 1 : 0, c = c->next);
+ for(n = i; c; n += ISVISIBLE(c) ? 1 : 0, c = c->next);
+ return MOD(i + GETINC(arg->i), n);
+ }
+ else if(arg->i < 0) {
+ for(i = 0, c = selmon->clients; c; i += ISVISIBLE(c) ? 1 : 0, c = c->next);
+ return MAX(i + arg->i, 0);
+ }
+ else
+ return arg->i;
+}
+
+void
+setlayout(const Arg *arg)
+{
+ if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt])
+ selmon->sellt ^= 1;
+ if (arg && arg->v)
+ selmon->lt[selmon->sellt] = (Layout *)arg->v;
+ strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol);
+ if (selmon->sel)
+ arrange(selmon);
+ else
+ drawbar(selmon);
+}
+
+/* arg > 1.0 will set mfact absolutely */
+void
+setmfact(const Arg *arg)
+{
+ float f;
+
+ if (!arg || !selmon->lt[selmon->sellt]->arrange)
+ return;
+ f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0;
+ if (f < 0.05 || f > 0.95)
+ return;
+ selmon->mfact = f;
+ arrange(selmon);
+}
+
+void
+setup(void)
+{
+ int i;
+ XSetWindowAttributes wa;
+ Atom utf8string;
+
+ /* clean up any zombies immediately */
+ sigchld(0);
+
+ signal(SIGHUP, sighup);
+ signal(SIGTERM, sigterm);
+
+ /* init screen */
+ screen = DefaultScreen(dpy);
+ sw = DisplayWidth(dpy, screen);
+ sh = DisplayHeight(dpy, screen);
+ root = RootWindow(dpy, screen);
+ drw = drw_create(dpy, screen, root, sw, sh);
+ if (!drw_fontset_create(drw, fonts, LENGTH(fonts)))
+ die("no fonts could be loaded.");
+ lrpad = drw->fonts->h;
+ bh = drw->fonts->h + 2;
+ updategeom();
+ /* init atoms */
+ utf8string = XInternAtom(dpy, "UTF8_STRING", False);
+ wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False);
+ wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
+ wmatom[WMState] = XInternAtom(dpy, "WM_STATE", False);
+ wmatom[WMTakeFocus] = XInternAtom(dpy, "WM_TAKE_FOCUS", False);
+ netatom[NetActiveWindow] = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False);
+ netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False);
+ netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False);
+ netatom[NetWMState] = XInternAtom(dpy, "_NET_WM_STATE", False);
+ netatom[NetWMCheck] = XInternAtom(dpy, "_NET_SUPPORTING_WM_CHECK", False);
+ netatom[NetWMFullscreen] = XInternAtom(dpy, "_NET_WM_STATE_FULLSCREEN", False);
+ netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False);
+ netatom[NetWMWindowTypeDialog] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DIALOG", False);
+ netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False);
+ netatom[NetClientInfo] = XInternAtom(dpy, "_NET_CLIENT_INFO", False);
+ /* init cursors */
+ cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr);
+ cursor[CurResize] = drw_cur_create(drw, XC_sizing);
+ cursor[CurMove] = drw_cur_create(drw, XC_fleur);
+ /* init appearance */
+ scheme = ecalloc(LENGTH(colors), sizeof(Clr *));
+ for (i = 0; i < LENGTH(colors); i++)
+ scheme[i] = drw_scm_create(drw, colors[i], 3);
+ /* init bars */
+ updatebars();
+ updatestatus();
+ /* supporting window for NetWMCheck */
+ wmcheckwin = XCreateSimpleWindow(dpy, root, 0, 0, 1, 1, 0, 0, 0);
+ XChangeProperty(dpy, wmcheckwin, netatom[NetWMCheck], XA_WINDOW, 32,
+ PropModeReplace, (unsigned char *) &wmcheckwin, 1);
+ XChangeProperty(dpy, wmcheckwin, netatom[NetWMName], utf8string, 8,
+ PropModeReplace, (unsigned char *) "dwm", 3);
+ XChangeProperty(dpy, root, netatom[NetWMCheck], XA_WINDOW, 32,
+ PropModeReplace, (unsigned char *) &wmcheckwin, 1);
+ /* EWMH support per view */
+ XChangeProperty(dpy, root, netatom[NetSupported], XA_ATOM, 32,
+ PropModeReplace, (unsigned char *) netatom, NetLast);
+ XDeleteProperty(dpy, root, netatom[NetClientList]);
+ XDeleteProperty(dpy, root, netatom[NetClientInfo]);
+ /* select events */
+ wa.cursor = cursor[CurNormal]->cursor;
+ wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask
+ |ButtonPressMask|PointerMotionMask|EnterWindowMask
+ |LeaveWindowMask|StructureNotifyMask|PropertyChangeMask;
+ XChangeWindowAttributes(dpy, root, CWEventMask|CWCursor, &wa);
+ XSelectInput(dpy, root, wa.event_mask);
+ grabkeys();
+ focus(NULL);
+}
+
+void
+seturgent(Client *c, int urg)
+{
+ XWMHints *wmh;
+
+ c->isurgent = urg;
+ if (!(wmh = XGetWMHints(dpy, c->win)))
+ return;
+ wmh->flags = urg ? (wmh->flags | XUrgencyHint) : (wmh->flags & ~XUrgencyHint);
+ XSetWMHints(dpy, c->win, wmh);
+ XFree(wmh);
+}
+
+void
+showhide(Client *c)
+{
+ if (!c)
+ return;
+ if (ISVISIBLE(c)) {
+ if ((c->tags & SPTAGMASK) && c->isfloating) {
+ c->x = c->mon->wx + (c->mon->ww / 2 - WIDTH(c) / 2);
+ c->y = c->mon->wy + (c->mon->wh / 2 - HEIGHT(c) / 2);
+ }
+ /* show clients top down */
+ XMoveWindow(dpy, c->win, c->x, c->y);
+ if ((!c->mon->lt[c->mon->sellt]->arrange || c->isfloating) && !c->isfullscreen)
+ resize(c, c->x, c->y, c->w, c->h, 0);
+ showhide(c->snext);
+ } else {
+ /* hide clients bottom up */
+ showhide(c->snext);
+ XMoveWindow(dpy, c->win, WIDTH(c) * -2, c->y);
+ }
+}
+
+void
+sighup(int unused)
+{
+ Arg a = {.i = 1};
+ quit(&a);
+}
+
+void
+sigterm(int unused)
+{
+ Arg a = {.i = 0};
+ quit(&a);
+}
+
+#ifndef __OpenBSD__
+void
+sigdwmblocks(const Arg *arg)
+{
+ union sigval sv;
+ sv.sival_int = 0 | (dwmblockssig << 8) | arg->i;
+ if (!dwmblockspid)
+ if (getdwmblockspid() == -1)
+ return;
+
+ if (sigqueue(dwmblockspid, SIGUSR1, sv) == -1) {
+ if (errno == ESRCH) {
+ if (!getdwmblockspid())
+ sigqueue(dwmblockspid, SIGUSR1, sv);
+ }
+ }
+}
+#endif
+
+void
+sigchld(int unused)
+{
+ if (signal(SIGCHLD, sigchld) == SIG_ERR)
+ die("can't install SIGCHLD handler:");
+ while (0 < waitpid(-1, NULL, WNOHANG));
+}
+
+void
+spawn(const Arg *arg)
+{
+ if (fork() == 0) {
+ if (dpy)
+ close(ConnectionNumber(dpy));
+ setsid();
+ execvp(((char **)arg->v)[0], (char **)arg->v);
+ die("dwm: execvp '%s' failed:", ((char **)arg->v)[0]);
+ }
+}
+
+void
+setclienttagprop(Client *c)
+{
+ long data[] = { (long) c->tags, (long) c->mon->num };
+ XChangeProperty(dpy, c->win, netatom[NetClientInfo], XA_CARDINAL, 32,
+ PropModeReplace, (unsigned char *) data, 2);
+}
+
+void
+tag(const Arg *arg)
+{
+ Client *c;
+ if (selmon->sel && arg->ui & TAGMASK) {
+ c = selmon->sel;
+ selmon->sel->tags = arg->ui & TAGMASK;
+ setclienttagprop(c);
+ focus(NULL);
+ arrange(selmon);
+ }
+}
+
+void
+tagmon(const Arg *arg)
+{
+ if (!selmon->sel || !mons->next)
+ return;
+ sendmon(selmon->sel, dirtomon(arg->i));
+}
+
+void
+togglebar(const Arg *arg)
+{
+ selmon->showbar = !selmon->showbar;
+ updatebarpos(selmon);
+ XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh);
+ arrange(selmon);
+}
+
+void
+togglefloating(const Arg *arg)
+{
+ if (!selmon->sel)
+ return;
+ if (selmon->sel->isfullscreen) /* no support for fullscreen windows */
+ return;
+ selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed;
+ if (selmon->sel->isfloating)
+ resize(selmon->sel, selmon->sel->x, selmon->sel->y,
+ selmon->sel->w, selmon->sel->h, 0);
+ arrange(selmon);
+}
+
+void
+togglefullscr(const Arg *arg)
+{
+ if(selmon->sel)
+ setfullscreen(selmon->sel, !selmon->sel->isfullscreen);
+}
+
+void
+togglesticky(const Arg *arg)
+{
+ if (!selmon->sel)
+ return;
+ selmon->sel->issticky = !selmon->sel->issticky;
+ arrange(selmon);
+}
+
+void
+togglescratch(const Arg *arg)
+{
+ Client *c;
+ unsigned int found = 0;
+ unsigned int scratchtag = SPTAG(arg->ui);
+ Arg sparg = {.v = scratchpads[arg->ui].cmd};
+
+ for (c = selmon->clients; c && !(found = c->tags & scratchtag); c = c->next);
+ if (found) {
+ unsigned int newtagset = selmon->tagset[selmon->seltags] ^ scratchtag;
+ if (newtagset) {
+ selmon->tagset[selmon->seltags] = newtagset;
+ focus(NULL);
+ arrange(selmon);
+ }
+ if (ISVISIBLE(c)) {
+ focus(c);
+ restack(selmon);
+ }
+ } else {
+ selmon->tagset[selmon->seltags] |= scratchtag;
+ spawn(&sparg);
+ }
+}
+
+void
+toggletag(const Arg *arg)
+{
+ unsigned int newtags;
+
+ if (!selmon->sel)
+ return;
+ newtags = selmon->sel->tags ^ (arg->ui & TAGMASK);
+ if (newtags) {
+ selmon->sel->tags = newtags;
+ setclienttagprop(selmon->sel);
+ focus(NULL);
+ arrange(selmon);
+ }
+}
+
+void
+toggleview(const Arg *arg)
+{
+ unsigned int newtagset = selmon->tagset[selmon->seltags] ^ (arg->ui & TAGMASK);
+
+ if (newtagset) {
+ selmon->tagset[selmon->seltags] = newtagset;
+ focus(NULL);
+ arrange(selmon);
+ }
+}
+
+void
+unfocus(Client *c, int setfocus)
+{
+ if (!c)
+ return;
+ grabbuttons(c, 0);
+ XSetWindowBorder(dpy, c->win, scheme[SchemeNorm][ColBorder].pixel);
+ if (setfocus) {
+ XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
+ XDeleteProperty(dpy, root, netatom[NetActiveWindow]);
+ }
+}
+
+void
+unmanage(Client *c, int destroyed)
+{
+ Monitor *m = c->mon;
+ XWindowChanges wc;
+
+ if (c->swallowing) {
+ unswallow(c);
+ return;
+ }
+
+ Client *s = swallowingclient(c->win);
+ if (s) {
+ free(s->swallowing);
+ s->swallowing = NULL;
+ arrange(m);
+ focus(NULL);
+ return;
+ }
+
+ detach(c);
+ detachstack(c);
+ if (!destroyed) {
+ wc.border_width = c->oldbw;
+ XGrabServer(dpy); /* avoid race conditions */
+ XSetErrorHandler(xerrordummy);
+ XSelectInput(dpy, c->win, NoEventMask);
+ XConfigureWindow(dpy, c->win, CWBorderWidth, &wc); /* restore border */
+ XUngrabButton(dpy, AnyButton, AnyModifier, c->win);
+ setclientstate(c, WithdrawnState);
+ XSync(dpy, False);
+ XSetErrorHandler(xerror);
+ XUngrabServer(dpy);
+ }
+ free(c);
+
+ if (!s) {
+ arrange(m);
+ focus(NULL);
+ updateclientlist();
+ }
+}
+
+void
+unmapnotify(XEvent *e)
+{
+ Client *c;
+ XUnmapEvent *ev = &e->xunmap;
+
+ if ((c = wintoclient(ev->window))) {
+ if (ev->send_event)
+ setclientstate(c, WithdrawnState);
+ else
+ unmanage(c, 0);
+ }
+}
+
+void
+updatebars(void)
+{
+ Monitor *m;
+ XSetWindowAttributes wa = {
+ .override_redirect = True,
+ .background_pixmap = ParentRelative,
+ .event_mask = ButtonPressMask|ExposureMask
+ };
+ XClassHint ch = {"dwm", "dwm"};
+ for (m = mons; m; m = m->next) {
+ if (m->barwin)
+ continue;
+ m->barwin = XCreateWindow(dpy, root, m->wx, m->by, m->ww, bh, 0, DefaultDepth(dpy, screen),
+ CopyFromParent, DefaultVisual(dpy, screen),
+ CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa);
+ XDefineCursor(dpy, m->barwin, cursor[CurNormal]->cursor);
+ XMapRaised(dpy, m->barwin);
+ XSetClassHint(dpy, m->barwin, &ch);
+ }
+}
+
+void
+updatebarpos(Monitor *m)
+{
+ m->wy = m->my;
+ m->wh = m->mh;
+ if (m->showbar) {
+ m->wh -= bh;
+ m->by = m->topbar ? m->wy : m->wy + m->wh;
+ m->wy = m->topbar ? m->wy + bh : m->wy;
+ } else
+ m->by = -bh;
+}
+
+void
+updateclientlist()
+{
+ Client *c;
+ Monitor *m;
+
+ XDeleteProperty(dpy, root, netatom[NetClientList]);
+ for (m = mons; m; m = m->next)
+ for (c = m->clients; c; c = c->next)
+ XChangeProperty(dpy, root, netatom[NetClientList],
+ XA_WINDOW, 32, PropModeAppend,
+ (unsigned char *) &(c->win), 1);
+}
+
+int
+updategeom(void)
+{
+ int dirty = 0;
+
+#ifdef XINERAMA
+ if (XineramaIsActive(dpy)) {
+ int i, j, n, nn;
+ Client *c;
+ Monitor *m;
+ XineramaScreenInfo *info = XineramaQueryScreens(dpy, &nn);
+ XineramaScreenInfo *unique = NULL;
+
+ for (n = 0, m = mons; m; m = m->next, n++);
+ /* only consider unique geometries as separate screens */
+ unique = ecalloc(nn, sizeof(XineramaScreenInfo));
+ for (i = 0, j = 0; i < nn; i++)
+ if (isuniquegeom(unique, j, &info[i]))
+ memcpy(&unique[j++], &info[i], sizeof(XineramaScreenInfo));
+ XFree(info);
+ nn = j;
+
+ /* new monitors if nn > n */
+ for (i = n; i < nn; i++) {
+ for (m = mons; m && m->next; m = m->next);
+ if (m)
+ m->next = createmon();
+ else
+ mons = createmon();
+ }
+ for (i = 0, m = mons; i < nn && m; m = m->next, i++)
+ if (i >= n
+ || unique[i].x_org != m->mx || unique[i].y_org != m->my
+ || unique[i].width != m->mw || unique[i].height != m->mh)
+ {
+ dirty = 1;
+ m->num = i;
+ m->mx = m->wx = unique[i].x_org;
+ m->my = m->wy = unique[i].y_org;
+ m->mw = m->ww = unique[i].width;
+ m->mh = m->wh = unique[i].height;
+ updatebarpos(m);
+ }
+ /* removed monitors if n > nn */
+ for (i = nn; i < n; i++) {
+ for (m = mons; m && m->next; m = m->next);
+ while ((c = m->clients)) {
+ dirty = 1;
+ m->clients = c->next;
+ detachstack(c);
+ c->mon = mons;
+ attach(c);
+ attachstack(c);
+ }
+ if (m == selmon)
+ selmon = mons;
+ cleanupmon(m);
+ }
+ free(unique);
+ } else
+#endif /* XINERAMA */
+ { /* default monitor setup */
+ if (!mons)
+ mons = createmon();
+ if (mons->mw != sw || mons->mh != sh) {
+ dirty = 1;
+ mons->mw = mons->ww = sw;
+ mons->mh = mons->wh = sh;
+ updatebarpos(mons);
+ }
+ }
+ if (dirty) {
+ selmon = mons;
+ selmon = wintomon(root);
+ }
+ return dirty;
+}
+
+void
+updatenumlockmask(void)
+{
+ unsigned int i, j;
+ XModifierKeymap *modmap;
+
+ numlockmask = 0;
+ modmap = XGetModifierMapping(dpy);
+ for (i = 0; i < 8; i++)
+ for (j = 0; j < modmap->max_keypermod; j++)
+ if (modmap->modifiermap[i * modmap->max_keypermod + j]
+ == XKeysymToKeycode(dpy, XK_Num_Lock))
+ numlockmask = (1 << i);
+ XFreeModifiermap(modmap);
+}
+
+void
+updatesizehints(Client *c)
+{
+ long msize;
+ XSizeHints size;
+
+ if (!XGetWMNormalHints(dpy, c->win, &size, &msize))
+ /* size is uninitialized, ensure that size.flags aren't used */
+ size.flags = PSize;
+ if (size.flags & PBaseSize) {
+ c->basew = size.base_width;
+ c->baseh = size.base_height;
+ } else if (size.flags & PMinSize) {
+ c->basew = size.min_width;
+ c->baseh = size.min_height;
+ } else
+ c->basew = c->baseh = 0;
+ if (size.flags & PResizeInc) {
+ c->incw = size.width_inc;
+ c->inch = size.height_inc;
+ } else
+ c->incw = c->inch = 0;
+ if (size.flags & PMaxSize) {
+ c->maxw = size.max_width;
+ c->maxh = size.max_height;
+ } else
+ c->maxw = c->maxh = 0;
+ if (size.flags & PMinSize) {
+ c->minw = size.min_width;
+ c->minh = size.min_height;
+ } else if (size.flags & PBaseSize) {
+ c->minw = size.base_width;
+ c->minh = size.base_height;
+ } else
+ c->minw = c->minh = 0;
+ if (size.flags & PAspect) {
+ c->mina = (float)size.min_aspect.y / size.min_aspect.x;
+ c->maxa = (float)size.max_aspect.x / size.max_aspect.y;
+ } else
+ c->maxa = c->mina = 0.0;
+ c->isfixed = (c->maxw && c->maxh && c->maxw == c->minw && c->maxh == c->minh);
+}
+
+void
+updatestatus(void)
+{
+ if (!gettextprop(root, XA_WM_NAME, rawstext, sizeof(rawstext)))
+ strcpy(stext, "dwm-"VERSION);
+ else
+ copyvalidchars(stext, rawstext);
+ drawbar(selmon);
+}
+
+void
+updatetitle(Client *c)
+{
+ if (!gettextprop(c->win, netatom[NetWMName], c->name, sizeof c->name))
+ gettextprop(c->win, XA_WM_NAME, c->name, sizeof c->name);
+ if (c->name[0] == '\0') /* hack to mark broken clients */
+ strcpy(c->name, broken);
+}
+
+void
+updatewindowtype(Client *c)
+{
+ Atom state = getatomprop(c, netatom[NetWMState]);
+ Atom wtype = getatomprop(c, netatom[NetWMWindowType]);
+
+ if (state == netatom[NetWMFullscreen])
+ setfullscreen(c, 1);
+ if (wtype == netatom[NetWMWindowTypeDialog])
+ c->isfloating = 1;
+}
+
+void
+updatewmhints(Client *c)
+{
+ XWMHints *wmh;
+
+ if ((wmh = XGetWMHints(dpy, c->win))) {
+ if (c == selmon->sel && wmh->flags & XUrgencyHint) {
+ wmh->flags &= ~XUrgencyHint;
+ XSetWMHints(dpy, c->win, wmh);
+ } else
+ c->isurgent = (wmh->flags & XUrgencyHint) ? 1 : 0;
+ if (wmh->flags & InputHint)
+ c->neverfocus = !wmh->input;
+ else
+ c->neverfocus = 0;
+ XFree(wmh);
+ }
+}
+
+void
+view(const Arg *arg)
+{
+ if ((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags])
+ return;
+ selmon->seltags ^= 1; /* toggle sel tagset */
+ if (arg->ui & TAGMASK)
+ selmon->tagset[selmon->seltags] = arg->ui & TAGMASK;
+ focus(NULL);
+ arrange(selmon);
+}
+
+pid_t
+winpid(Window w)
+{
+ pid_t result = 0;
+
+ xcb_res_client_id_spec_t spec = {0};
+ spec.client = w;
+ spec.mask = XCB_RES_CLIENT_ID_MASK_LOCAL_CLIENT_PID;
+
+ xcb_generic_error_t *e = NULL;
+ xcb_res_query_client_ids_cookie_t c = xcb_res_query_client_ids(xcon, 1, &spec);
+ xcb_res_query_client_ids_reply_t *r = xcb_res_query_client_ids_reply(xcon, c, &e);
+
+ if (!r)
+ return (pid_t)0;
+
+ xcb_res_client_id_value_iterator_t i = xcb_res_query_client_ids_ids_iterator(r);
+ for (; i.rem; xcb_res_client_id_value_next(&i)) {
+ spec = i.data->spec;
+ if (spec.mask & XCB_RES_CLIENT_ID_MASK_LOCAL_CLIENT_PID) {
+ uint32_t *t = xcb_res_client_id_value_value(i.data);
+ result = *t;
+ break;
+ }
+ }
+
+ free(r);
+
+ if (result == (pid_t)-1)
+ result = 0;
+ return result;
+}
+
+pid_t
+getparentprocess(pid_t p)
+{
+ unsigned int v = 0;
+
+#if defined(__linux__)
+ FILE *f;
+ char buf[256];
+ snprintf(buf, sizeof(buf) - 1, "/proc/%u/stat", (unsigned)p);
+
+ if (!(f = fopen(buf, "r")))
+ return (pid_t)0;
+
+ if (fscanf(f, "%*u %*s %*c %u", (unsigned *)&v) != 1)
+ v = (pid_t)0;
+ fclose(f);
+#elif defined(__FreeBSD__)
+ struct kinfo_proc *proc = kinfo_getproc(p);
+ if (!proc)
+ return (pid_t)0;
+
+ v = proc->ki_ppid;
+ free(proc);
+#endif
+ return (pid_t)v;
+}
+
+int
+isdescprocess(pid_t p, pid_t c)
+{
+ while (p != c && c != 0)
+ c = getparentprocess(c);
+
+ return (int)c;
+}
+
+Client *
+termforwin(const Client *w)
+{
+ Client *c;
+ Monitor *m;
+
+ if (!w->pid || w->isterminal)
+ return NULL;
+
+ for (m = mons; m; m = m->next) {
+ for (c = m->clients; c; c = c->next) {
+ if (c->isterminal && !c->swallowing && c->pid && isdescprocess(c->pid, w->pid))
+ return c;
+ }
+ }
+
+ return NULL;
+}
+
+Client *
+swallowingclient(Window w)
+{
+ Client *c;
+ Monitor *m;
+
+ for (m = mons; m; m = m->next) {
+ for (c = m->clients; c; c = c->next) {
+ if (c->swallowing && c->swallowing->win == w)
+ return c;
+ }
+ }
+
+ return NULL;
+}
+
+Client *
+wintoclient(Window w)
+{
+ Client *c;
+ Monitor *m;
+
+ for (m = mons; m; m = m->next)
+ for (c = m->clients; c; c = c->next)
+ if (c->win == w)
+ return c;
+ return NULL;
+}
+
+Monitor *
+wintomon(Window w)
+{
+ int x, y;
+ Client *c;
+ Monitor *m;
+
+ if (w == root && getrootptr(&x, &y))
+ return recttomon(x, y, 1, 1);
+ for (m = mons; m; m = m->next)
+ if (w == m->barwin)
+ return m;
+ if ((c = wintoclient(w)))
+ return c->mon;
+ return selmon;
+}
+
+/* There's no way to check accesses to destroyed windows, thus those cases are
+ * ignored (especially on UnmapNotify's). Other types of errors call Xlibs
+ * default error handler, which may call exit. */
+int
+xerror(Display *dpy, XErrorEvent *ee)
+{
+ if (ee->error_code == BadWindow
+ || (ee->request_code == X_SetInputFocus && ee->error_code == BadMatch)
+ || (ee->request_code == X_PolyText8 && ee->error_code == BadDrawable)
+ || (ee->request_code == X_PolyFillRectangle && ee->error_code == BadDrawable)
+ || (ee->request_code == X_PolySegment && ee->error_code == BadDrawable)
+ || (ee->request_code == X_ConfigureWindow && ee->error_code == BadMatch)
+ || (ee->request_code == X_GrabButton && ee->error_code == BadAccess)
+ || (ee->request_code == X_GrabKey && ee->error_code == BadAccess)
+ || (ee->request_code == X_CopyArea && ee->error_code == BadDrawable))
+ return 0;
+ fprintf(stderr, "dwm: fatal error: request code=%d, error code=%d\n",
+ ee->request_code, ee->error_code);
+ return xerrorxlib(dpy, ee); /* may call exit */
+}
+
+int
+xerrordummy(Display *dpy, XErrorEvent *ee)
+{
+ return 0;
+}
+
+/* Startup Error handler to check if another window manager
+ * is already running. */
+int
+xerrorstart(Display *dpy, XErrorEvent *ee)
+{
+ die("dwm: another window manager is already running");
+ return -1;
+}
+
+void
+zoom(const Arg *arg)
+{
+ Client *c = selmon->sel;
+
+ if (!selmon->lt[selmon->sellt]->arrange || !c || c->isfloating)
+ return;
+ if (c == nexttiled(selmon->clients) && !(c = nexttiled(c->next)))
+ return;
+ pop(c);
+}
+
+void
+xrdb(const Arg *arg)
+{
+ load_xresources();
+
+ for (int i = 0; i < LENGTH(colors); i++)
+ scheme[i] = drw_scm_create(drw, colors[i], 3);
+
+ focus(NULL);
+ arrange(NULL);
+}
+
+void
+resource_load(XrmDatabase db, char *name, enum resource_type rtype, void *dst)
+{
+ char *sdst = NULL;
+ int *idst = NULL;
+ float *fdst = NULL;
+
+ sdst = dst;
+ idst = dst;
+ fdst = dst;
+
+ char fullname[256];
+ char *type;
+ XrmValue ret;
+
+ snprintf(fullname, sizeof(fullname), "%s.%s", "dwm", name);
+ fullname[sizeof(fullname) - 1] = '\0';
+
+ XrmGetResource(db, fullname, "*", &type, &ret);
+ if (!(ret.addr == NULL || strncmp("String", type, 64)))
+ {
+ switch (rtype) {
+ case STRING:
+ strcpy(sdst, ret.addr);
+ break;
+ case INTEGER:
+ *idst = strtoul(ret.addr, NULL, 10);
+ break;
+ case FLOAT:
+ *fdst = strtof(ret.addr, NULL);
+ break;
+ }
+ }
+}
+
+void
+load_xresources(void)
+{
+ Display *display;
+ char *resm;
+ XrmDatabase db;
+ ResourcePref *p;
+
+ display = XOpenDisplay(NULL);
+ resm = XResourceManagerString(display);
+ if (!resm)
+ return;
+
+ db = XrmGetStringDatabase(resm);
+ for (p = resources; p < resources + LENGTH(resources); p++)
+ resource_load(db, p->name, p->type, p->dst);
+ XCloseDisplay(display);
+}
+
+int
+main(int argc, char *argv[])
+{
+ if (argc == 2 && !strcmp("-v", argv[1]))
+ die("dwm-"VERSION);
+ else if (argc != 1)
+ die("usage: dwm [-v]");
+ if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
+ fputs("warning: no locale support\n", stderr);
+ if (!(dpy = XOpenDisplay(NULL)))
+ die("dwm: cannot open display");
+ if (!(xcon = XGetXCBConnection(dpy)))
+ die("dwm: cannot get xcb connection\n");
+ checkotherwm();
+ XrmInitialize();
+ load_xresources();
+ setup();
+#ifdef __OpenBSD__
+ if (pledge("stdio rpath proc exec", NULL) == -1)
+ die("pledge");
+#endif /* __OpenBSD__ */
+ scan();
+ runAutostart();
+ run();
+ if(restart) execvp(argv[0], argv);
+ cleanup();
+ XCloseDisplay(dpy);
+ return EXIT_SUCCESS;
+}
+
diff --git a/dwm/Repositories/luke-dwm/dwm.o b/dwm/Repositories/luke-dwm/dwm.o
new file mode 100644
index 0000000..61a9ada
--- /dev/null
+++ b/dwm/Repositories/luke-dwm/dwm.o
Binary files differ
diff --git a/dwm/Repositories/luke-dwm/larbs.mom b/dwm/Repositories/luke-dwm/larbs.mom
new file mode 100644
index 0000000..999ce1c
--- /dev/null
+++ b/dwm/Repositories/luke-dwm/larbs.mom
@@ -0,0 +1,362 @@
+.de LI
+.LIST
+.SHIFT_LIST 10p
+..
+.PARA_SPACE 1m
+.TITLE "\s+(10A Friendly Guide to LARBS!\s0"
+.AUTHOR "\s+5Luke Smith\s0"
+.DOCTYPE DEFAULT
+.COPYSTYLE FINAL
+.PRINTSTYLE TYPESET
+.PT_SIZE 12
+.START
+Use vim keys (\f(CWh/j/k/l\fP) to navigate this document.
+Pressing \f(CWs\fP will fit it to window width (\f(CWa\fP to revert).
+\f(CWK\fP and \f(CWJ\fP zoom in and out.
+\f(CWSuper+f\fP to toggle fullscreen.
+\f(CWq\fP to quit.
+\f(CW/\fP to search for text.
+(These are general binds set for \fBzathura\fP, the pdf reader.)
+.LI
+.ITEM
+\f(CWMod+F1\fP will show this document at any time.
+.ITEM
+By \f(CWMod\fP, I mean the Super Key, usually known as "the Windows Key."
+.LIST OFF
+.PP
+FAQs are at the end of this document.
+.HEADING 1 "Welcome!"
+.HEADING 2 "Basic goals and principles of this system:"
+.LI
+.ITEM
+\fBNaturalness\fP \(en
+Remove the border between mind and matter:
+everything important should be as few keypresses as possible away from you,
+and you shouldn't have to think about what you're doing.
+Immersion.
+.ITEM
+\fBEconomy\fP \(en
+Programs should be simple and light on system resources and highly extensible.
+Because of this, many are terminal or small ncurses programs that have all the magic inside of them.
+.ITEM
+\fBKeyboard/vim-centrality\fP \(en
+All terminal programs (and other programs) use vim keys when possible.
+Your hands never need leave the home row or thereabout.
+.ITEM
+\fBDecentralization\fP \(en
+This system is a web of small, modifiable and replaceable programs that users can easily customize.
+.LIST OFF
+.HEADING 2 "General keyboard changes"
+.LI
+.ITEM
+Capslock is a useless key in high quality space.
+It's now remapped.
+If you press it alone, it will function as escape, making vimcraft much more natural,
+but you can also hold it down and it will act as another Windows/super/mod key.
+.ITEM
+The menu button (usually between the right Alt and Ctrl) is an alternative Super/Mod button.
+This is to make one-handing on laptops easier.
+.LIST OFF
+.PP
+If you'd like to change any of these keyboard changes, you need only open and change the \f(CWremaps\fP script.
+All custom scripts in LARBS are located in \f(CW~/.local/bin/\fP.
+Actually, this should go without saying, but \fIeverything\fP here can easily be changed.
+Below in this document, there is information about where to change programs/components.
+.PP
+Additionally, while this isn't a part of the desktop environment, the default editing mode in the shell is using vi bindings.
+If you want to learn more of this, run \f(CWMod+F2\fP and type and select the option for "vi mode in shell".
+This setting can be changed if you don't like it by deleting or commenting out the contents of \f(CW~/.config/shell/inputrc\fP.
+.HEADING 2 "The Status Bar"
+.PP
+To the left, you'll see the numbers of your current workspace/tag(s).
+On the right, you'll see various system status notifiers, the date, volume, even music and local weather if possible, etc.
+Each module on the right of the statusbar is a script located in \f(CW~/.local/bin/statusbar/\fP.
+You can see what they do and modify them from there.
+I'm sure you can figure it out.
+You can also right click on the module to see what it does.
+.PP
+The program dwmblocks is what is run to generate the statusbar from those scripts.
+You can edit its config/source code in \f(CW~/.local/src/dwmblocks/\fP to tell it what scripts/commands you want it to display.
+.HEADING 3 "HiDPI and 4K Displays"
+.PP
+If you have a screen with a very high dots-per-inch, the interface, particularly the status bar at the top may be very small. To change this, you can run \f(CWxrandr --dpi 96\fP, replacing 96 with a higher number, then you can refresh the window manager in the menu at \f(CWsuper+backspace\fP. To make this change persistent after reboot, edit \f(CW~/.xprofile\fP and you will see that same command which you can change to have the dots-per-inch value you want.
+.HEADING 2 "Deeper Tutorials"
+.PP
+Press \f(CWmod+F2\fP at any time to get a menu of programs to watch videos about streaming directly from YouTube.
+You can also check the config files for programs which detail a lot of the specific bindings.
+.HEADING 1 "Key Bindings"
+.PP
+The window manager dwm abstractly orders all of your windows into a stack from most important to least based on when you last manipulated it.
+dwm is an easy to use window manager, but you should understand that it makes use of that stack layout.
+If you're not familiar, I recommend you press \f(CWMod+F2\fP and select the "dwm" option to watch my brief tutorial (note that the bindings I discuss in the video are the default dwm binds, which are different (inferior) to those here).
+.PP
+Notice also the case sensitivity of the shortcuts\c
+.FOOTNOTE
+To type capital letters, hold down the \f(CWShift\fP key\(emthat might sound like an obvious and condescending thing to tell you, but there have literally been multiple people (Boomers) who have emailed me asking how to type a capital letter since caps lock isn't enabled.
+.FOOTNOTE OFF
+ , Be sure you play around with these. Be flexible with the basic commands and the system will grow on you quick.
+.LI
+.ITEM
+\f(CWMod+Enter\fP \(en Spawn terminal (the default terminal is \f(CWst\fP; run \f(CWman st\fP for more.)
+.ITEM
+\f(CWMod+q\fP \(en Close window
+.ITEM
+\f(CWMod+d\fP \(en dmenu (For running commands or programs without shortcuts)
+.ITEM
+\f(CWMod+j/k\fP \(en Cycle thru windows by their stack order
+.ITEM
+\f(CWMod+Space\fP \(en Make selected window the master (or switch master with 2nd)
+.ITEM
+\f(CWMod+h/l\fP \(en Change width of master window
+.ITEM
+\f(CWMod+z/x\fP \(en Increase/decrease gaps (may also hold \f(CWMod\fP and scroll mouse)
+.ITEM
+\f(CWMod+a\fP \(en Toggle gaps
+.ITEM
+\f(CWMod+A\fP \(en Gaps return to default values (may also hold \f(CWMod\fP and middle click)
+.ITEM
+\f(CWMod+Shift+Space\fP \(en Make a window float (move and resize with \f(CWMod+\fPleft/right click).
+.ITEM
+\f(CWMod+s\fP \(en Make/unmake a window "sticky" (follows you from tag to tag)
+.ITEM
+\f(CWMod+b\fP \(en Toggle statusbar (may also middle click on desktop)
+.ITEM
+\f(CWMod+v\fP \(en Jump to master window
+.LIST OFF
+.HEADING 2 "Window layouts"
+.LI
+.ITEM
+\f(CWMod+t\fP \(en Tiling mode (active by default)
+.ITEM
+\f(CWMod+T\fP \(en Bottom stack mode (just like tiling, but master is on top)
+.ITEM
+\f(CWMod+f\fP \(en Fullscreen mode
+.ITEM
+\f(CWMod+F\fP \(en Floating (AKA normie) mode
+.ITEM
+\f(CWMod+y\fP \(en Fibonacci spiral mode
+.ITEM
+\f(CWMod+Y\fP \(en Dwindle mode (similar to Fibonacci)
+.ITEM
+\f(CWMod+u\fP \(en Master on left, other windows in monocle mode
+.ITEM
+\f(CWMod+U\fP \(en Monocle mode (all windows fullscreen and cycle through)
+.ITEM
+\f(CWMod+i\fP \(en Center the master window
+.ITEM
+\f(CWMod+I\fP \(en Center and float the master window
+.ITEM
+\f(CWMod+o/O\fP \(en Increase/decrease the number of master windows
+.LIST OFF
+.HEADING 2 "Basic Programs"
+.LI
+.ITEM
+\f(CWMod+r\fP \(en lf (file browser/manager)
+.ITEM
+\f(CWMod+R\fP \(en htop (task manager, system monitor that R*dditors use to look cool)
+.ITEM
+\f(CWMod+e\fP \(en neomutt (email) \(en Must be first configured by running \f(CWmw add\fP.
+.ITEM
+\f(CWMod+E\fP \(en abook (contacts, addressbook, emails)
+.ITEM
+\f(CWMod+m\fP \(en ncmpcpp (music player)
+.ITEM
+\f(CWMod+w\fP \(en Web browser (LibreWolf by default)
+.ITEM
+\f(CWMod+W\fP \(en nmtui (for connecting to wireless internet)
+.ITEM
+\f(CWMod+n\fP \(en vimwiki (for notes)
+.ITEM
+\f(CWMod+N\fP \(en newsboat (RSS feed reader)
+.ITEM
+\f(CWMod+F4\fP \(en pulsemixer (audio system control)
+.ITEM
+\f(CWMod+Shift+Enter\fP \(en Show/hide dropdown terminal
+.ITEM
+\f(CWMod+'\fP \(en Show/hide dropdown calculator
+.ITEM
+\f(CWMod+D\fP \(en passmenu (password manager)
+.LIST OFF
+.HEADING 2 "Tags/Workspaces"
+.PP
+There are nine tags, active tags are highlighted in the top left.
+.LI
+.ITEM
+\f(CWMod+(Number)\fP \(en Go to that number tag
+.ITEM
+\f(CWMod+Shift+(Number)\fP \(en Send window to that tag
+.ITEM
+\f(CWMod+Tab\fP \(en Go to previous tag (may also use \f(CW\\\fP for Tab)
+.ITEM
+\f(CWMod+g\fP \(en Go to left tag (hold shift to send window there)
+.ITEM
+\f(CWMod+;\fP \(en Go to right tag (hold shift to send window there)
+.ITEM
+\f(CWMod+Left/Right\fP \(en Go to another display
+.ITEM
+\f(CWMod+Shift+Left/+Right\fP \(en Move window to another display
+.LIST OFF
+.HEADING 2 "System"
+.LI
+.ITEM
+\f(CWMod+BackSpace\fP \(enChoose to lock screen, logout, shutdown, reboot, etc.
+.ITEM
+\f(CWMod+F1\fP \(en Show this document
+.ITEM
+\f(CWMod+F2\fP \(en Watch tutorial videos on a subject
+.ITEM
+\f(CWMod+F3\fP \(en Select screen/display to use
+.ITEM
+\f(CWMod+F4\fP \(en pulsemixer (audio control)
+.ITEM
+\f(CWMod+F6\fP \(en Transmission torrent client (not installed by default)
+.ITEM
+\f(CWMod+F7\fP \(en Toggle on/off transmission client via dmenu
+.ITEM
+\f(CWMod+F8\fP \(en Check mail, if mutt-wizard is configured. (Run \f(CWmw add\fP to set up.)
+.ITEM
+\f(CWMod+F9\fP \(en Mount a USB drive/hard drive or Android
+.ITEM
+\f(CWMod+F10\fP \(en Unmount a non-essential drive or Android
+.ITEM
+\f(CWMod+F11\fP \(en View webcam
+.ITEM
+\f(CWMod+F12\fP \(en Rerun keyboard mapping scripts if new keyboard is attached
+.ITEM
+\f(CWMod+`\fP \(en Select an emoji to copy to clipboard
+.ITEM
+\f(CWMod+Insert\fP \(en Pastes text you have saved in a file at ~/.local/share/larbs/snippets
+.LIST OFF
+.HEADING 2 "Audio"
+.PP
+I use ncmpcpp as a music player, which is a front end for mpd.
+.LI
+.ITEM
+\f(CWMod+m\fP \(en ncmpcpp, the music player
+.ITEM
+\f(CWMod+.\fP \(en Next track
+.ITEM
+\f(CWMod+,\fP \(en Previous track
+.ITEM
+\f(CWMod+<\fP \(en Restart track
+.ITEM
+\f(CWMod+>\fP \(en Toggle playlist looping
+.ITEM
+\f(CWMod+p\fP \(en Toggle pause
+.ITEM
+\f(CWMod+p\fP \(en Force pause music player daemon and all mpv videos
+.ITEM
+\f(CWMod+M\fP \(en Mute all audio
+.ITEM
+\f(CWMod+-\fP \(en Decrease volume (holding shift increases amount)
+.ITEM
+\f(CWMod++\fP \(en Increase volume (holding shift increases amount)
+.ITEM
+\f(CWMod+[\fP \(en Back 10 seconds (holding shift moves by one minute)
+.ITEM
+\f(CWMod+]\fP \(en Forward 10 seconds (holding shift moves by one minute)
+.ITEM
+\f(CWMod+F4\fP \(en pulsemixer (general audio/volume sink/source control)
+.LIST OFF
+.HEADING 2 "Recording"
+.PP
+I use maim and ffmpeg to make different recordings of the desktop and audio.
+All of these recording shortcuts will output into \f(CW~\fP, and will not overwrite
+previous recordings as their names are based on their exact times.
+.LI
+.ITEM
+\f(CWPrintScreen\fP \(en Take a screenshot
+.ITEM
+\f(CWShift+PrintScreen\fP \(en Select area to screenshot
+.ITEM
+\f(CWMod+PrintScreen\fP \(en Opens dmenu menu to select kind of audio/video recording
+.ITEM
+\f(CWMod+Delete\fP \(en Kills any recording started in the above way.
+.ITEM
+\f(CWMod+Shift+c\fP \(en Toggles a webcam in the bottom right for screencasting.
+.ITEM
+\f(CWMod+ScrollLock\fP \(en Toggle screenkey (if installed) to show keypresses
+.LIST OFF
+.HEADING 2 "Other buttons"
+.PP
+I've mapped those extra buttons that some keyboards have (play and pause
+buttons, screen brightness, email, web browsing buttons, etc.) to what you
+would expect.
+.HEADING 1 "Configuration"
+.PP
+Dotfiles/settings files are located in \f(CW~/.config/\fP.
+.PP
+Suckless programs, dwm (the window manager), st (the terminal) and dmenu among others do not have traditional config files, but have their source code location in \f(CW~/.local/src/\fP (press \f(CWrr\fP to jump to that directory).
+There you can modify their \f(CWconfig.h\fP files or other source code, then \f(CWsudo make install\fP to reinstall.
+.PP
+vim is set to automatically recompile and install these programs whenever you save changes to any \f(CWconfig.h\fP file
+(compilation will be nearly instantaneous).
+You'll have to restart the program to see its effects obviously.
+.HEADING 1 "Frequently Asked Questions (FAQs)"
+.HEADING 2 "My keyboard isn't working as expected!"
+.PP
+As mentioned above, LARBS makes some keyboard changes with the \f(CWremaps\fP script.
+These settings may override your preferred settings, so you should open this file and comment out troublesome lines if you have issues.
+.HEADING 2 "My audio isn't working!"
+.PP
+On fresh install, the Linux audio system often mutes outputs.
+You may also need to set your preferred default output sink which you can do by the command line, or by selecting one with \f(CWpulsemixer\fP (\f(CWMod+F4\fP).
+.HEADING 2 "How do I copy and paste?"
+.PP
+Copying and pasting is always program-specific on any system.
+In most graphical programs, copy and paste will be the same as they are on Windows: \f(CWctrl-c\fP and \f(CWctrl-v\fP.
+In the Linux terminal, those binds have other more important purposes, so you can run \f(CWman st\fP to see how to copy and paste in my terminal build.
+.PP
+Additionally, I've set vim to use the clipboard as the default buffer, which means when you yank or delete something in vim, it will be in your system clipboard as well, so you can \f(CWctrl-v\fP it into your browser instance, etc. You can also paste material copied from other programs into vim with the typical vim bindings.
+.HEADING 2 "How do I change the background/wallpaper?"
+.PP
+The system will always read the file \f(CW~/.local/share/bg\fP as the wallpaper.
+The script \f(CWsetbg\fP, if run on an image will set it as the persistent background.
+When using the file manager, you can simply hover over an image name and type \f(CWb\fP and this will run \f(CWsetbg\fP.
+.HEADING 2 "How I change the colorscheme?"
+.PP
+LARBS no longer deploys Xresources by default, but check \f(CW~/.config/x11/xresources\fP for a list of color schemes you can activate or add your own. When you save the file, vim will automatically update the colorscheme. If you'd like these colors activated by default on login, there is a line in \f(CW~/.config/x11/xprofile\fP you can uncomment to allow that.
+.PP
+Or, if you want to use \f(CWwal\fP to automatically generate colorschemes from your wallpapers, just install it and \f(CWsetbg\fP will automatically detect and run it on startup and wallpaper change.
+.HEADING 2 "How do I set up my email?"
+.PP
+LARBS comes with mutt-wizard, which gives the ability to receive and send all your email and keep an offline store of it all in your terminal, without the need for browser.
+You can add email accounts by running \f(CWmw -a [email protected]\fP.
+See \f(CWman mw\fP for all the information you need about mutt-wizard.
+.PP
+Once you have successfully added your email address(es), you can open your mail with \f(CWneomutt\fP which is also bound to \f(CWMod+e\fP.
+You can sync your mail by pressing \f(CWMod+F8\fP and you can set a cronjob to sync mail every 10 minutes by running \f(CWmw -t 10\fP.
+.PP
+You may also want to install \f(CWpam-gnupg-git\fP, which can be set up to automatically unlock your GPG key on login, which will allow you avoid having put in a password to sync and send, all while keeping your password safe and encrypted on your machine.
+.HEADING 2 "How do I set up my music?"
+.PP
+By default, mpd, the music daemon assumes that \f(CW~/Music\fP is your music directory.
+This can be changed in \f(CW~/.config/mpd/mpd.conf\fP.
+When you add music to your music folder, you may have to run \f(CWmpc up\fP in the terminal to update the database.
+mpd is controlled by ncmpcpp, which is accessible by \f(CWMod+m\fP.
+.HEADING 2 "How do I update LARBS?"
+.PP
+LARBS is deployed as a git repository in your home directory.
+You can use it as such to fetch, diff and merge changes from the remote repository.
+If you don't want to do that or don't know how to use git, you can actually just rerun the script (as root) and reinstall LARBS and it will automatically update an existing install if you select the same username.
+This will overwrite the original config files though, including changes you made for them, but this is an easier brute force approach that will also install any new dependencies.
+.HEADING 1 "Important Links"
+.PP
+You can follow links via the keyboard in this pdf reader by pressing \f(CWf\fP followed by the number that appears on the desired link.
+.LI
+.ITEM
+.PDF_WWW_LINK "mailto:[email protected]" "[email protected]"
+\(en For questions!
+.ITEM
+.PDF_WWW_LINK "http://lukesmith.xyz" "https://lukesmith.xyz"
+\(en For stalking!
+.ITEM
+.PDF_WWW_LINK "https://lukesmith.xyz/donate" "https://lukesmith.xyz/donate"
+\(en To incentivize more development of LARBS!
+.ITEM
+.PDF_WWW_LINK "https://github.com/LukeSmithxyz" "My Github Page"
+\(en For the code behind it!
+.ITEM
+.PDF_WWW_LINK "http://lukesmith.xyz/rss.xml" "RSS"
+\(en For updates!
+.LIST OFF
diff --git a/dwm/Repositories/luke-dwm/shiftview.c b/dwm/Repositories/luke-dwm/shiftview.c
new file mode 100644
index 0000000..bb43969
--- /dev/null
+++ b/dwm/Repositories/luke-dwm/shiftview.c
@@ -0,0 +1,65 @@
+/** Function to shift the current view to the left/right
+ *
+ * @param: "arg->i" stores the number of tags to shift right (positive value)
+ * or left (negative value)
+ */
+void
+shiftview(const Arg *arg)
+{
+ Arg shifted;
+ Client *c;
+ unsigned int tagmask = 0;
+
+ for (c = selmon->clients; c; c = c->next)
+ if (!(c->tags & SPTAGMASK))
+ tagmask = tagmask | c->tags;
+
+ shifted.ui = selmon->tagset[selmon->seltags] & ~SPTAGMASK;
+ if (arg->i > 0) /* left circular shift */
+ do {
+ shifted.ui = (shifted.ui << arg->i)
+ | (shifted.ui >> (LENGTH(tags) - arg->i));
+ shifted.ui &= ~SPTAGMASK;
+ } while (tagmask && !(shifted.ui & tagmask));
+ else /* right circular shift */
+ do {
+ shifted.ui = (shifted.ui >> (- arg->i)
+ | shifted.ui << (LENGTH(tags) + arg->i));
+ shifted.ui &= ~SPTAGMASK;
+ } while (tagmask && !(shifted.ui & tagmask));
+
+ view(&shifted);
+}
+
+void
+shifttag(const Arg *arg)
+{
+ Arg a;
+ Client *c;
+ unsigned visible = 0;
+ int i = arg->i;
+ int count = 0;
+ int nextseltags, curseltags = selmon->tagset[selmon->seltags];
+
+ do {
+ if(i > 0) // left circular shift
+ nextseltags = (curseltags << i) | (curseltags >> (LENGTH(tags) - i));
+
+ else // right circular shift
+ nextseltags = (curseltags >> - i) | (curseltags << (LENGTH(tags) + i));
+
+ // Check if tag is visible
+ for (c = selmon->clients; c && !visible; c = c->next)
+ if (nextseltags & c->tags) {
+ visible = 1;
+ break;
+ }
+ i += arg->i;
+ } while (!visible && ++count < 10);
+
+ if (count < 10) {
+ a.i = nextseltags;
+ tag(&a);
+ }
+}
+
diff --git a/dwm/Repositories/luke-dwm/transient.c b/dwm/Repositories/luke-dwm/transient.c
new file mode 100644
index 0000000..040adb5
--- /dev/null
+++ b/dwm/Repositories/luke-dwm/transient.c
@@ -0,0 +1,42 @@
+/* cc transient.c -o transient -lX11 */
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+int main(void) {
+ Display *d;
+ Window r, f, t = None;
+ XSizeHints h;
+ XEvent e;
+
+ d = XOpenDisplay(NULL);
+ if (!d)
+ exit(1);
+ r = DefaultRootWindow(d);
+
+ f = XCreateSimpleWindow(d, r, 100, 100, 400, 400, 0, 0, 0);
+ h.min_width = h.max_width = h.min_height = h.max_height = 400;
+ h.flags = PMinSize | PMaxSize;
+ XSetWMNormalHints(d, f, &h);
+ XStoreName(d, f, "floating");
+ XMapWindow(d, f);
+
+ XSelectInput(d, f, ExposureMask);
+ while (1) {
+ XNextEvent(d, &e);
+
+ if (t == None) {
+ sleep(5);
+ t = XCreateSimpleWindow(d, r, 50, 50, 100, 100, 0, 0, 0);
+ XSetTransientForHint(d, t, f);
+ XStoreName(d, t, "transient");
+ XMapWindow(d, t);
+ XSelectInput(d, t, ExposureMask);
+ }
+ }
+
+ XCloseDisplay(d);
+ exit(0);
+}
diff --git a/dwm/Repositories/luke-dwm/util.c b/dwm/Repositories/luke-dwm/util.c
new file mode 100644
index 0000000..96b82c9
--- /dev/null
+++ b/dwm/Repositories/luke-dwm/util.c
@@ -0,0 +1,36 @@
+/* See LICENSE file for copyright and license details. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "util.h"
+
+void
+die(const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+
+ if (fmt[0] && fmt[strlen(fmt)-1] == ':') {
+ fputc(' ', stderr);
+ perror(NULL);
+ } else {
+ fputc('\n', stderr);
+ }
+
+ exit(1);
+}
+
+void *
+ecalloc(size_t nmemb, size_t size)
+{
+ void *p;
+
+ if (!(p = calloc(nmemb, size)))
+ die("calloc:");
+ return p;
+}
diff --git a/dwm/Repositories/luke-dwm/util.h b/dwm/Repositories/luke-dwm/util.h
new file mode 100644
index 0000000..f633b51
--- /dev/null
+++ b/dwm/Repositories/luke-dwm/util.h
@@ -0,0 +1,8 @@
+/* See LICENSE file for copyright and license details. */
+
+#define MAX(A, B) ((A) > (B) ? (A) : (B))
+#define MIN(A, B) ((A) < (B) ? (A) : (B))
+#define BETWEEN(X, A, B) ((A) <= (X) && (X) <= (B))
+
+void die(const char *fmt, ...);
+void *ecalloc(size_t nmemb, size_t size);
diff --git a/dwm/Repositories/luke-dwm/util.o b/dwm/Repositories/luke-dwm/util.o
new file mode 100644
index 0000000..04ef62b
--- /dev/null
+++ b/dwm/Repositories/luke-dwm/util.o
Binary files differ
diff --git a/dwm/Repositories/luke-dwm/vanitygaps.c b/dwm/Repositories/luke-dwm/vanitygaps.c
new file mode 100644
index 0000000..4c98e69
--- /dev/null
+++ b/dwm/Repositories/luke-dwm/vanitygaps.c
@@ -0,0 +1,550 @@
+/* Key binding functions */
+static void defaultgaps(const Arg *arg);
+static void incrgaps(const Arg *arg);
+/* static void incrigaps(const Arg *arg); */
+/* static void incrogaps(const Arg *arg); */
+/* static void incrohgaps(const Arg *arg); */
+/* static void incrovgaps(const Arg *arg); */
+/* static void incrihgaps(const Arg *arg); */
+/* static void incrivgaps(const Arg *arg); */
+static void togglegaps(const Arg *arg);
+static void togglesmartgaps(const Arg *arg);
+
+/* Layouts */
+static void bstack(Monitor *m);
+static void centeredmaster(Monitor *m);
+static void centeredfloatingmaster(Monitor *m);
+static void deck(Monitor *m);
+static void dwindle(Monitor *m);
+static void fibonacci(Monitor *m, int s);
+static void spiral(Monitor *m);
+static void tile(Monitor *);
+
+/* Internals */
+static void getgaps(Monitor *m, int *oh, int *ov, int *ih, int *iv, unsigned int *nc);
+static void setgaps(int oh, int ov, int ih, int iv);
+
+/* Settings */
+static int enablegaps = 1;
+
+static void
+setgaps(int oh, int ov, int ih, int iv)
+{
+ if (oh < 0) oh = 0;
+ if (ov < 0) ov = 0;
+ if (ih < 0) ih = 0;
+ if (iv < 0) iv = 0;
+
+ selmon->gappoh = oh;
+ selmon->gappov = ov;
+ selmon->gappih = ih;
+ selmon->gappiv = iv;
+ arrange(selmon);
+}
+
+static void
+togglegaps(const Arg *arg)
+{
+ enablegaps = !enablegaps;
+ arrange(NULL);
+}
+
+static void
+togglesmartgaps(const Arg *arg)
+{
+ smartgaps = !smartgaps;
+ arrange(NULL);
+}
+
+static void
+defaultgaps(const Arg *arg)
+{
+ setgaps(gappoh, gappov, gappih, gappiv);
+}
+
+static void
+incrgaps(const Arg *arg)
+{
+ setgaps(
+ selmon->gappoh + arg->i,
+ selmon->gappov + arg->i,
+ selmon->gappih + arg->i,
+ selmon->gappiv + arg->i
+ );
+}
+
+/* static void */
+/* incrigaps(const Arg *arg) */
+/* { */
+/* setgaps( */
+/* selmon->gappoh, */
+/* selmon->gappov, */
+/* selmon->gappih + arg->i, */
+/* selmon->gappiv + arg->i */
+/* ); */
+/* } */
+
+/* static void */
+/* incrogaps(const Arg *arg) */
+/* { */
+/* setgaps( */
+/* selmon->gappoh + arg->i, */
+/* selmon->gappov + arg->i, */
+/* selmon->gappih, */
+/* selmon->gappiv */
+/* ); */
+/* } */
+
+/* static void */
+/* incrohgaps(const Arg *arg) */
+/* { */
+/* setgaps( */
+/* selmon->gappoh + arg->i, */
+/* selmon->gappov, */
+/* selmon->gappih, */
+/* selmon->gappiv */
+/* ); */
+/* } */
+
+/* static void */
+/* incrovgaps(const Arg *arg) */
+/* { */
+/* setgaps( */
+/* selmon->gappoh, */
+/* selmon->gappov + arg->i, */
+/* selmon->gappih, */
+/* selmon->gappiv */
+/* ); */
+/* } */
+
+/* static void */
+/* incrihgaps(const Arg *arg) */
+/* { */
+/* setgaps( */
+/* selmon->gappoh, */
+/* selmon->gappov, */
+/* selmon->gappih + arg->i, */
+/* selmon->gappiv */
+/* ); */
+/* } */
+
+/* static void */
+/* incrivgaps(const Arg *arg) */
+/* { */
+/* setgaps( */
+/* selmon->gappoh, */
+/* selmon->gappov, */
+/* selmon->gappih, */
+/* selmon->gappiv + arg->i */
+/* ); */
+/* } */
+
+static void
+getgaps(Monitor *m, int *oh, int *ov, int *ih, int *iv, unsigned int *nc)
+{
+ unsigned int n, oe, ie;
+ oe = ie = enablegaps;
+ Client *c;
+
+ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
+ if (smartgaps && n == 1) {
+ oe = 0; // outer gaps disabled when only one client
+ }
+
+ *oh = m->gappoh*oe; // outer horizontal gap
+ *ov = m->gappov*oe; // outer vertical gap
+ *ih = m->gappih*ie; // inner horizontal gap
+ *iv = m->gappiv*ie; // inner vertical gap
+ *nc = n; // number of clients
+}
+
+void
+getfacts(Monitor *m, int msize, int ssize, float *mf, float *sf, int *mr, int *sr)
+{
+ unsigned int n;
+ float mfacts, sfacts;
+ int mtotal = 0, stotal = 0;
+ Client *c;
+
+ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
+ mfacts = MIN(n, m->nmaster);
+ sfacts = n - m->nmaster;
+
+ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++)
+ if (n < m->nmaster)
+ mtotal += msize / mfacts;
+ else
+ stotal += ssize / sfacts;
+
+ *mf = mfacts; // total factor of master area
+ *sf = sfacts; // total factor of stack area
+ *mr = msize - mtotal; // the remainder (rest) of pixels after an even master split
+ *sr = ssize - stotal; // the remainder (rest) of pixels after an even stack split
+}
+
+/***
+ * Layouts
+ */
+
+/*
+ * Bottomstack layout + gaps
+ * https://dwm.suckless.org/patches/bottomstack/
+ */
+
+static void
+bstack(Monitor *m)
+{
+ unsigned int i, n;
+ int mx = 0, my = 0, mh = 0, mw = 0;
+ int sx = 0, sy = 0, sh = 0, sw = 0;
+ float mfacts, sfacts;
+ int mrest, srest;
+ Client *c;
+
+ int oh, ov, ih, iv;
+ getgaps(m, &oh, &ov, &ih, &iv, &n);
+
+ if (n == 0)
+ return;
+
+ sx = mx = m->wx + ov;
+ sy = my = m->wy + oh;
+ sh = mh = m->wh - 2*oh;
+ mw = m->ww - 2*ov - iv * (MIN(n, m->nmaster) - 1);
+ sw = m->ww - 2*ov - iv * (n - m->nmaster - 1);
+
+ if (m->nmaster && n > m->nmaster) {
+ sh = (mh - ih) * (1 - m->mfact);
+ mh = (mh - ih) * m->mfact;
+ sx = mx;
+ sy = my + mh + ih;
+ }
+
+ getfacts(m, mw, sw, &mfacts, &sfacts, &mrest, &srest);
+
+ for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
+ if (i < m->nmaster) {
+ resize(c, mx, my, (mw / mfacts) + (i < mrest ? 1 : 0) - (2*c->bw), mh - (2*c->bw), 0);
+ mx += WIDTH(c) + iv;
+ } else {
+ resize(c, sx, sy, (sw / sfacts) + ((i - m->nmaster) < srest ? 1 : 0) - (2*c->bw), sh - (2*c->bw), 0);
+ sx += WIDTH(c) + iv;
+ }
+ }
+}
+
+/*
+ * Centred master layout + gaps
+ * https://dwm.suckless.org/patches/centeredmaster/
+ */
+
+void
+centeredmaster(Monitor *m)
+{
+ unsigned int i, n;
+ int mx = 0, my = 0, mh = 0, mw = 0;
+ int lx = 0, ly = 0, lw = 0, lh = 0;
+ int rx = 0, ry = 0, rw = 0, rh = 0;
+ float mfacts = 0, lfacts = 0, rfacts = 0;
+ int mtotal = 0, ltotal = 0, rtotal = 0;
+ int mrest = 0, lrest = 0, rrest = 0;
+ Client *c;
+
+ int oh, ov, ih, iv;
+ getgaps(m, &oh, &ov, &ih, &iv, &n);
+
+ if (n == 0)
+ return;
+
+ /* initialize areas */
+ mx = m->wx + ov;
+ my = m->wy + oh;
+ mh = m->wh - 2*oh - ih * ((!m->nmaster ? n : MIN(n, m->nmaster)) - 1);
+ mw = m->ww - 2*ov;
+ lh = m->wh - 2*oh - ih * (((n - m->nmaster) / 2) - 1);
+ rh = m->wh - 2*oh - ih * (((n - m->nmaster) / 2) - ((n - m->nmaster) % 2 ? 0 : 1));
+
+ if (m->nmaster && n > m->nmaster) {
+ /* go mfact box in the center if more than nmaster clients */
+ if (n - m->nmaster > 1) {
+ /* ||<-S->|<---M--->|<-S->|| */
+ mw = (m->ww - 2*ov - 2*iv) * m->mfact;
+ lw = (m->ww - mw - 2*ov - 2*iv) / 2;
+ mx += lw + iv;
+ } else {
+ /* ||<---M--->|<-S->|| */
+ mw = (mw - iv) * m->mfact;
+ lw = m->ww - mw - iv - 2*ov;
+ }
+ rw = lw;
+ lx = m->wx + ov;
+ ly = m->wy + oh;
+ rx = mx + mw + iv;
+ ry = m->wy + oh;
+ }
+
+ /* calculate facts */
+ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++) {
+ if (!m->nmaster || n < m->nmaster)
+ mfacts += 1;
+ else if ((n - m->nmaster) % 2)
+ lfacts += 1; // total factor of left hand stack area
+ else
+ rfacts += 1; // total factor of right hand stack area
+ }
+
+ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++)
+ if (!m->nmaster || n < m->nmaster)
+ mtotal += mh / mfacts;
+ else if ((n - m->nmaster) % 2)
+ ltotal += lh / lfacts;
+ else
+ rtotal += rh / rfacts;
+
+ mrest = mh - mtotal;
+ lrest = lh - ltotal;
+ rrest = rh - rtotal;
+
+ for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
+ if (!m->nmaster || i < m->nmaster) {
+ /* nmaster clients are stacked vertically, in the center of the screen */
+ resize(c, mx, my, mw - (2*c->bw), (mh / mfacts) + (i < mrest ? 1 : 0) - (2*c->bw), 0);
+ my += HEIGHT(c) + ih;
+ } else {
+ /* stack clients are stacked vertically */
+ if ((i - m->nmaster) % 2 ) {
+ resize(c, lx, ly, lw - (2*c->bw), (lh / lfacts) + ((i - 2*m->nmaster) < 2*lrest ? 1 : 0) - (2*c->bw), 0);
+ ly += HEIGHT(c) + ih;
+ } else {
+ resize(c, rx, ry, rw - (2*c->bw), (rh / rfacts) + ((i - 2*m->nmaster) < 2*rrest ? 1 : 0) - (2*c->bw), 0);
+ ry += HEIGHT(c) + ih;
+ }
+ }
+ }
+}
+
+void
+centeredfloatingmaster(Monitor *m)
+{
+ unsigned int i, n;
+ float mfacts, sfacts;
+ int mrest, srest;
+ int mx = 0, my = 0, mh = 0, mw = 0;
+ int sx = 0, sy = 0, sh = 0, sw = 0;
+ Client *c;
+
+ float mivf = 1.0; // master inner vertical gap factor
+ int oh, ov, ih, iv;
+ getgaps(m, &oh, &ov, &ih, &iv, &n);
+
+ if (n == 0)
+ return;
+
+ sx = mx = m->wx + ov;
+ sy = my = m->wy + oh;
+ sh = mh = m->wh - 2*oh;
+ mw = m->ww - 2*ov - iv*(n - 1);
+ sw = m->ww - 2*ov - iv*(n - m->nmaster - 1);
+
+ if (m->nmaster && n > m->nmaster) {
+ mivf = 0.8;
+ /* go mfact box in the center if more than nmaster clients */
+ if (m->ww > m->wh) {
+ mw = m->ww * m->mfact - iv*mivf*(MIN(n, m->nmaster) - 1);
+ mh = m->wh * 0.9 - 2*oh;
+ } else {
+ mw = m->ww * 0.9 - iv*mivf*(MIN(n, m->nmaster) - 1);
+ mh = m->wh * m->mfact;
+ }
+ mx = m->wx + (m->ww - mw) / 2;
+ my = m->wy + (m->wh - mh) / 2;
+
+ sx = m->wx + ov;
+ sy = m->wy + oh;
+ sh = m->wh - 2*oh;
+ }
+
+ getfacts(m, mw, sw, &mfacts, &sfacts, &mrest, &srest);
+
+ for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
+ if (i < m->nmaster) {
+ /* nmaster clients are stacked horizontally, in the center of the screen */
+ resize(c, mx, my, (mw / mfacts) + (i < mrest ? 1 : 0) - (2*c->bw), mh - (2*c->bw), 0);
+ mx += WIDTH(c) + iv*mivf;
+ } else {
+ /* stack clients are stacked horizontally */
+ resize(c, sx, sy, (sw / sfacts) + ((i - m->nmaster) < srest ? 1 : 0) - (2*c->bw), sh - (2*c->bw), 0);
+ sx += WIDTH(c) + iv;
+ }
+}
+
+/*
+ * Deck layout + gaps
+ * https://dwm.suckless.org/patches/deck/
+ */
+
+static void
+deck(Monitor *m)
+{
+ unsigned int i, n;
+ int mx = 0, my = 0, mh = 0, mw = 0;
+ int sx = 0, sy = 0, sh = 0, sw = 0;
+ float mfacts, sfacts;
+ int mrest, srest;
+ Client *c;
+
+ int oh, ov, ih, iv;
+ getgaps(m, &oh, &ov, &ih, &iv, &n);
+
+ if (n == 0)
+ return;
+
+ sx = mx = m->wx + ov;
+ sy = my = m->wy + oh;
+ sh = mh = m->wh - 2*oh - ih * (MIN(n, m->nmaster) - 1);
+ sw = mw = m->ww - 2*ov;
+
+ if (m->nmaster && n > m->nmaster) {
+ sw = (mw - iv) * (1 - m->mfact);
+ mw = (mw - iv) * m->mfact;
+ sx = mx + mw + iv;
+ sh = m->wh - 2*oh;
+ }
+
+ getfacts(m, mh, sh, &mfacts, &sfacts, &mrest, &srest);
+
+ if (n - m->nmaster > 0) /* override layout symbol */
+ snprintf(m->ltsymbol, sizeof m->ltsymbol, "D %d", n - m->nmaster);
+
+ for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
+ if (i < m->nmaster) {
+ resize(c, mx, my, mw - (2*c->bw), (mh / mfacts) + (i < mrest ? 1 : 0) - (2*c->bw), 0);
+ my += HEIGHT(c) + ih;
+ } else {
+ resize(c, sx, sy, sw - (2*c->bw), sh - (2*c->bw), 0);
+ }
+}
+
+/*
+ * Fibonacci layout + gaps
+ * https://dwm.suckless.org/patches/fibonacci/
+ */
+
+static void
+fibonacci(Monitor *m, int s)
+{
+ unsigned int i, n;
+ int nx, ny, nw, nh;
+ int oh, ov, ih, iv;
+ Client *c;
+
+ getgaps(m, &oh, &ov, &ih, &iv, &n);
+
+ if (n == 0)
+ return;
+
+ nx = m->wx + ov;
+ ny = oh;
+ nw = m->ww - 2*ov;
+ nh = m->wh - 2*oh;
+
+ for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next)) {
+ if ((i % 2 && nh / 2 > 2*c->bw)
+ || (!(i % 2) && nw / 2 > 2*c->bw)) {
+ if (i < n - 1) {
+ if (i % 2)
+ nh = (nh - ih) / 2;
+ else
+ nw = (nw - iv) / 2;
+
+ if ((i % 4) == 2 && !s)
+ nx += nw + iv;
+ else if ((i % 4) == 3 && !s)
+ ny += nh + ih;
+ }
+ if ((i % 4) == 0) {
+ if (s)
+ ny += nh + ih;
+ else
+ ny -= nh + ih;
+ }
+ else if ((i % 4) == 1)
+ nx += nw + iv;
+ else if ((i % 4) == 2)
+ ny += nh + ih;
+ else if ((i % 4) == 3) {
+ if (s)
+ nx += nw + iv;
+ else
+ nx -= nw + iv;
+ }
+ if (i == 0) {
+ if (n != 1)
+ nw = (m->ww - 2*ov - iv) * m->mfact;
+ ny = m->wy + oh;
+ }
+ else if (i == 1)
+ nw = m->ww - nw - iv - 2*ov;
+ i++;
+ }
+
+ resize(c, nx, ny, nw - (2*c->bw), nh - (2*c->bw), False);
+ }
+}
+
+static void
+dwindle(Monitor *m)
+{
+ fibonacci(m, 1);
+}
+
+static void
+spiral(Monitor *m)
+{
+ fibonacci(m, 0);
+}
+
+/*
+ * Default tile layout + gaps
+ */
+
+static void
+tile(Monitor *m)
+{
+ unsigned int i, n;
+ int mx = 0, my = 0, mh = 0, mw = 0;
+ int sx = 0, sy = 0, sh = 0, sw = 0;
+ float mfacts, sfacts;
+ int mrest, srest;
+ Client *c;
+
+
+ int oh, ov, ih, iv;
+ getgaps(m, &oh, &ov, &ih, &iv, &n);
+
+ if (n == 0)
+ return;
+
+ sx = mx = m->wx + ov;
+ sy = my = m->wy + oh;
+ mh = m->wh - 2*oh - ih * (MIN(n, m->nmaster) - 1);
+ sh = m->wh - 2*oh - ih * (n - m->nmaster - 1);
+ sw = mw = m->ww - 2*ov;
+
+ if (m->nmaster && n > m->nmaster) {
+ sw = (mw - iv) * (1 - m->mfact);
+ mw = (mw - iv) * m->mfact;
+ sx = mx + mw + iv;
+ }
+
+ getfacts(m, mh, sh, &mfacts, &sfacts, &mrest, &srest);
+
+ for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
+ if (i < m->nmaster) {
+ resize(c, mx, my, mw - (2*c->bw), (mh / mfacts) + (i < mrest ? 1 : 0) - (2*c->bw), 0);
+ my += HEIGHT(c) + ih;
+ } else {
+ resize(c, sx, sy, sw - (2*c->bw), (sh / sfacts) + ((i - m->nmaster) < srest ? 1 : 0) - (2*c->bw), 0);
+ sy += HEIGHT(c) + ih;
+ }
+}
diff --git a/dwm/Repositories/luke-dwmblocks/.gitignore b/dwm/Repositories/luke-dwmblocks/.gitignore
new file mode 100644
index 0000000..c4bb970
--- /dev/null
+++ b/dwm/Repositories/luke-dwmblocks/.gitignore
@@ -0,0 +1,53 @@
+# Prerequisites
+*.d
+
+# Object files
+*.o
+*.ko
+*.obj
+*.elf
+
+# Linker output
+*.ilk
+*.map
+*.exp
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Libraries
+*.lib
+*.a
+*.la
+*.lo
+
+# Shared objects (inc. Windows DLLs)
+*.dll
+*.so
+*.so.*
+*.dylib
+
+# Executables
+*.exe
+*.out
+*.app
+*.i*86
+*.x86_64
+*.hex
+dwmblocks
+
+# Debug files
+*.dSYM/
+*.su
+*.idb
+*.pdb
+
+# Kernel Module Compile Results
+*.mod*
+*.cmd
+.tmp_versions/
+modules.order
+Module.symvers
+Mkfile.old
+dkms.conf
diff --git a/dwm/Repositories/luke-dwmblocks/FUNDING.yml b/dwm/Repositories/luke-dwmblocks/FUNDING.yml
new file mode 100644
index 0000000..f8e6076
--- /dev/null
+++ b/dwm/Repositories/luke-dwmblocks/FUNDING.yml
@@ -0,0 +1,3 @@
+github: lukesmithxyz
+custom: ["https://lukesmith.xyz/donate", "https://paypal.me/lukemsmith", "https://lukesmith.xyz/crypto"]
+patreon: lukesmith
diff --git a/dwm/Repositories/luke-dwmblocks/LICENSE b/dwm/Repositories/luke-dwmblocks/LICENSE
new file mode 100644
index 0000000..d159169
--- /dev/null
+++ b/dwm/Repositories/luke-dwmblocks/LICENSE
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/dwm/Repositories/luke-dwmblocks/Makefile b/dwm/Repositories/luke-dwmblocks/Makefile
new file mode 100644
index 0000000..5cfbb5a
--- /dev/null
+++ b/dwm/Repositories/luke-dwmblocks/Makefile
@@ -0,0 +1,19 @@
+.POSIX:
+
+PREFIX = /usr/local
+CC = gcc
+
+dwmblocks: dwmblocks.o
+ $(CC) dwmblocks.o -lX11 -o dwmblocks
+dwmblocks.o: dwmblocks.c config.h
+ $(CC) -c dwmblocks.c
+clean:
+ rm -f *.o *.gch dwmblocks
+install: dwmblocks
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ cp -f dwmblocks $(DESTDIR)$(PREFIX)/bin
+ chmod 755 $(DESTDIR)$(PREFIX)/bin/dwmblocks
+uninstall:
+ rm -f $(DESTDIR)$(PREFIX)/bin/dwmblocks
+
+.PHONY: clean install uninstall
diff --git a/dwm/Repositories/luke-dwmblocks/README.md b/dwm/Repositories/luke-dwmblocks/README.md
new file mode 100644
index 0000000..7d21e30
--- /dev/null
+++ b/dwm/Repositories/luke-dwmblocks/README.md
@@ -0,0 +1,44 @@
+# dwmblocks
+
+Modular status bar for dwm written in c.
+
+# Modifying blocks
+
+The statusbar is made from text output from commandline programs. Blocks are
+added and removed by editing the config.h file.
+
+# Luke's build
+
+I have dwmblocks read my preexisting scripts
+[here in my dotfiles repo](https://github.com/LukeSmithxyz/voidrice/tree/master/.local/bin/statusbar).
+So if you want my build out of the box, download those and put them in your
+`$PATH`. I do this to avoid redundancy in LARBS, both i3 and dwm use the same
+statusbar scripts.
+
+# Signaling changes
+
+Most statusbars constantly rerun every script every several seconds to update.
+This is an option here, but a superior choice is giving your module a signal
+that you can signal to it to update on a relevant event, rather than having it
+rerun idly.
+
+For example, the audio module has the update signal 10 by default. Thus,
+running `pkill -RTMIN+10 dwmblocks` will update it.
+
+You can also run `kill -44 $(pidof dwmblocks)` which will have the same effect,
+but is faster. Just add 34 to your typical signal number.
+
+My volume module *never* updates on its own, instead I have this command run
+along side my volume shortcuts in dwm to only update it when relevant.
+
+Note that all modules must have different signal numbers.
+
+# Clickable modules
+
+Like i3blocks, this build allows you to build in additional actions into your
+scripts in response to click events. See the above linked scripts for examples
+of this using the `$BLOCK_BUTTON` variable.
+
+For this feature to work, you need the appropriate patch in dwm as well. See
+[here](https://dwm.suckless.org/patches/statuscmd/).
+Credit for those patches goes to Daniel Bylinka ([email protected]).
diff --git a/dwm/Repositories/luke-dwmblocks/config.h b/dwm/Repositories/luke-dwmblocks/config.h
new file mode 100644
index 0000000..2893f5d
--- /dev/null
+++ b/dwm/Repositories/luke-dwmblocks/config.h
@@ -0,0 +1,47 @@
+//Modify this file to change what commands output to your statusbar, and recompile using the make command.
+static const Block blocks[] = {
+ /*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/
+ /* {"⌨", "sb-kbselect", 0, 30}, */
+ /* {"", "cat /tmp/recordingicon 2>/dev/null", 0, 9}, */
+ /* {"", "sb-tasks", 10, 26}, */
+ /* /\* {"", "sb-music", 0, 11}, *\/ */
+ /* {"", "sb-pacpackages", 0, 8}, */
+ /* {"", "sb-news", 0, 6}, */
+ /* /\* {"", "sb-price xmr-btc \"Monero to Bitcoin\" 🔒 25", 9000, 25}, *\/ */
+ /* {"", "sb-price xmr Monero 🔒 24", 9000, 24}, */
+ /* {"", "sb-price eth Ethereum 🍸 23", 9000, 23}, */
+ /* {"", "sb-price btc Bitcoin 💰 21", 9000, 21}, */
+ /* {"", "sb-torrent", 20, 7}, */
+ /* {"", "sb-memory", 10, 14}, */
+ /* {"", "sb-cpu", 10, 18}, */
+ /* {"", "sb-moonphase", 18000, 17}, */
+ /* {"", "sb-doppler", 0, 13}, */
+ /* {"", "sb-forecast", 18000, 5}, */
+ /* {"", "sb-mailbox", 180, 12}, */
+ /* {"", "sb-nettraf", 1, 16}, */
+ /* {"", "sb-volume", 0, 10}, */
+ /* {"", "sb-battery", 5, 3}, */
+ /* {"", "sb-clock", 60, 1}, */
+ /* {"", "sb-internet", 5, 4}, */
+ /* /\* {"", "sb-iplocate", 0, 27}, *\/ */
+ /* {"", "sb-help-icon", 0, 15}, */
+ /* {"Mem: ", "free -h | awk '/^Mem/ { print $3\"/\"$2 }' | sed s/i//g", 30, 0}, */
+ {"", "~/.local/bin/scripts/status/memory ", 10, 0},
+ {"", "~/.local/bin/scripts/status/internet", 10, 1},
+ {"", "~/.local/bin/scripts/status/weather", 10, 2},
+ {"", "~/.local/bin/scripts/status/volume-pulseaudio", 10, 3},
+ {"🎵 ", "~/.local/bin/scripts/status/mediaplayer", 5, 10},
+ {"", "date '+%Y-%m-%d (%A)'", 1, 4},
+ {"", "date '+%R:%S'", 1, 5},
+ /* {"", "~/.local/bin/scripts/status/battery.sh", 5, 0}, */
+ /* {"🔆: ", "~/.local/bin/scripts/status/brightness.sh", 0, 0}, */
+
+};
+
+//Sets delimiter between status commands. NULL character ('\0') means no delimiter.
+static char *delim = " | ";
+
+// Have dwmblocks automatically recompile and run when you edit this file in
+// vim with the following line in your vimrc/init.vim:
+
+// autocmd BufWritePost ~/.local/src/dwmblocks/config.h !cd ~/.local/src/dwmblocks/; sudo make install && { killall -q dwmblocks;setsid dwmblocks & }
diff --git a/dwm/Repositories/luke-dwmblocks/dwmblocks.c b/dwm/Repositories/luke-dwmblocks/dwmblocks.c
new file mode 100644
index 0000000..6983418
--- /dev/null
+++ b/dwm/Repositories/luke-dwmblocks/dwmblocks.c
@@ -0,0 +1,295 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <time.h>
+#include <signal.h>
+#include <errno.h>
+#include <X11/Xlib.h>
+#include <sys/signalfd.h>
+#include <poll.h>
+#define LENGTH(X) (sizeof(X) / sizeof (X[0]))
+#define CMDLENGTH 50
+
+typedef struct {
+ char* icon;
+ char* command;
+ unsigned int interval;
+ unsigned int signal;
+} Block;
+void sighandler();
+void buttonhandler(int ssi_int);
+void replace(char *str, char old, char new);
+void remove_all(char *str, char to_remove);
+void getcmds(int time);
+void getsigcmds(int signal);
+void setupsignals();
+int getstatus(char *str, char *last);
+void setroot();
+void statusloop();
+void termhandler(int signum);
+
+
+#include "config.h"
+
+static Display *dpy;
+static int screen;
+static Window root;
+static char statusbar[LENGTH(blocks)][CMDLENGTH] = {0};
+static char statusstr[2][256];
+static int statusContinue = 1;
+static int signalFD;
+static int timerInterval = -1;
+static void (*writestatus) () = setroot;
+
+void replace(char *str, char old, char new)
+{
+ for(char * c = str; *c; c++)
+ if(*c == old)
+ *c = new;
+}
+
+// the previous function looked nice but unfortunately it didnt work if to_remove was in any position other than the last character
+// theres probably still a better way of doing this
+void remove_all(char *str, char to_remove) {
+ char *read = str;
+ char *write = str;
+ while (*read) {
+ if (*read != to_remove) {
+ *write++ = *read;
+ }
+ ++read;
+ }
+ *write = '\0';
+}
+
+int gcd(int a, int b)
+{
+ int temp;
+ while (b > 0){
+ temp = a % b;
+
+ a = b;
+ b = temp;
+ }
+ return a;
+}
+
+
+//opens process *cmd and stores output in *output
+void getcmd(const Block *block, char *output)
+{
+ if (block->signal)
+ {
+ output[0] = block->signal;
+ output++;
+ }
+ char *cmd = block->command;
+ FILE *cmdf = popen(cmd,"r");
+ if (!cmdf){
+ //printf("failed to run: %s, %d\n", block->command, errno);
+ return;
+ }
+ char tmpstr[CMDLENGTH] = "";
+ // TODO decide whether its better to use the last value till next time or just keep trying while the error was the interrupt
+ // this keeps trying to read if it got nothing and the error was an interrupt
+ // could also just read to a separate buffer and not move the data over if interrupted
+ // this way will take longer trying to complete 1 thing but will get it done
+ // the other way will move on to keep going with everything and the part that failed to read will be wrong till its updated again
+ // either way you have to save the data to a temp buffer because when it fails it writes nothing and then then it gets displayed before this finishes
+ char * s;
+ int e;
+ do {
+ errno = 0;
+ s = fgets(tmpstr, CMDLENGTH-(strlen(delim)+1), cmdf);
+ e = errno;
+ } while (!s && e == EINTR);
+ pclose(cmdf);
+ int i = strlen(block->icon);
+ strcpy(output, block->icon);
+ strcpy(output+i, tmpstr);
+ remove_all(output, '\n');
+ i = strlen(output);
+ if ((i > 0 && block != &blocks[LENGTH(blocks) - 1])){
+ strcat(output, delim);
+ }
+ i+=strlen(delim);
+ output[i++] = '\0';
+}
+
+void getcmds(int time)
+{
+ const Block* current;
+ for(int i = 0; i < LENGTH(blocks); i++)
+ {
+ current = blocks + i;
+ if ((current->interval != 0 && time % current->interval == 0) || time == -1){
+ getcmd(current,statusbar[i]);
+ }
+ }
+}
+
+void getsigcmds(int signal)
+{
+ const Block *current;
+ for (int i = 0; i < LENGTH(blocks); i++)
+ {
+ current = blocks + i;
+ if (current->signal == signal){
+ getcmd(current,statusbar[i]);
+ }
+ }
+}
+
+void setupsignals()
+{
+ sigset_t signals;
+ sigemptyset(&signals);
+ sigaddset(&signals, SIGALRM); // Timer events
+ sigaddset(&signals, SIGUSR1); // Button events
+ // All signals assigned to blocks
+ for (size_t i = 0; i < LENGTH(blocks); i++)
+ if (blocks[i].signal > 0)
+ sigaddset(&signals, SIGRTMIN + blocks[i].signal);
+ // Create signal file descriptor for pooling
+ signalFD = signalfd(-1, &signals, 0);
+ // Block all real-time signals
+ for (int i = SIGRTMIN; i <= SIGRTMAX; i++) sigaddset(&signals, i);
+ sigprocmask(SIG_BLOCK, &signals, NULL);
+ // Do not transform children into zombies
+ struct sigaction sigchld_action = {
+ .sa_handler = SIG_DFL,
+ .sa_flags = SA_NOCLDWAIT
+ };
+ sigaction(SIGCHLD, &sigchld_action, NULL);
+
+}
+
+int getstatus(char *str, char *last)
+{
+ strcpy(last, str);
+ str[0] = '\0';
+ for(int i = 0; i < LENGTH(blocks); i++) {
+ strcat(str, statusbar[i]);
+ if (i == LENGTH(blocks) - 1)
+ strcat(str, " ");
+ }
+ str[strlen(str)-1] = '\0';
+ return strcmp(str, last);//0 if they are the same
+}
+
+void setroot()
+{
+ if (!getstatus(statusstr[0], statusstr[1]))//Only set root if text has changed.
+ return;
+ Display *d = XOpenDisplay(NULL);
+ if (d) {
+ dpy = d;
+ }
+ screen = DefaultScreen(dpy);
+ root = RootWindow(dpy, screen);
+ XStoreName(dpy, root, statusstr[0]);
+ XCloseDisplay(dpy);
+}
+
+void pstdout()
+{
+ if (!getstatus(statusstr[0], statusstr[1]))//Only write out if text has changed.
+ return;
+ printf("%s\n",statusstr[0]);
+ fflush(stdout);
+}
+
+
+void statusloop()
+{
+ setupsignals();
+ // first figure out the default wait interval by finding the
+ // greatest common denominator of the intervals
+ for(int i = 0; i < LENGTH(blocks); i++){
+ if(blocks[i].interval){
+ timerInterval = gcd(blocks[i].interval, timerInterval);
+ }
+ }
+ getcmds(-1); // Fist time run all commands
+ raise(SIGALRM); // Schedule first timer event
+ int ret;
+ struct pollfd pfd[] = {{.fd = signalFD, .events = POLLIN}};
+ while (statusContinue) {
+ // Wait for new signal
+ ret = poll(pfd, sizeof(pfd) / sizeof(pfd[0]), -1);
+ if (ret < 0 || !(pfd[0].revents & POLLIN)) break;
+ sighandler(); // Handle signal
+ }
+}
+
+void sighandler()
+{
+ static int time = 0;
+ struct signalfd_siginfo si;
+ int ret = read(signalFD, &si, sizeof(si));
+ if (ret < 0) return;
+ int signal = si.ssi_signo;
+ switch (signal) {
+ case SIGALRM:
+ // Execute blocks and schedule the next timer event
+ getcmds(time);
+ alarm(timerInterval);
+ time += timerInterval;
+ break;
+ case SIGUSR1:
+ // Handle buttons
+ buttonhandler(si.ssi_int);
+ return;
+ default:
+ // Execute the block that has the given signal
+ getsigcmds(signal - SIGRTMIN);
+ break;
+ }
+ writestatus();
+}
+
+void buttonhandler(int ssi_int)
+{
+ char button[2] = {'0' + ssi_int & 0xff, '\0'};
+ pid_t process_id = getpid();
+ int sig = ssi_int >> 8;
+ if (fork() == 0)
+ {
+ const Block *current;
+ for (int i = 0; i < LENGTH(blocks); i++)
+ {
+ current = blocks + i;
+ if (current->signal == sig)
+ break;
+ }
+ char shcmd[1024];
+ sprintf(shcmd,"%s && kill -%d %d",current->command, current->signal+34,process_id);
+ char *command[] = { "/bin/sh", "-c", shcmd, NULL };
+ setenv("BLOCK_BUTTON", button, 1);
+ setsid();
+ execvp(command[0], command);
+ exit(EXIT_SUCCESS);
+ }
+}
+
+
+void termhandler(int signum)
+{
+ statusContinue = 0;
+}
+
+int main(int argc, char** argv)
+{
+ for(int i = 0; i < argc; i++)
+ {
+ if (!strcmp("-d",argv[i]))
+ delim = argv[++i];
+ else if(!strcmp("-p",argv[i]))
+ writestatus = pstdout;
+ }
+ signal(SIGTERM, termhandler);
+ signal(SIGINT, termhandler);
+ statusloop();
+ close(signalFD);
+}
diff --git a/dwm/Repositories/luke-dwmblocks/patches/dwmblocks-statuscmd-fork.diff b/dwm/Repositories/luke-dwmblocks/patches/dwmblocks-statuscmd-fork.diff
new file mode 100644
index 0000000..1ae7d7a
--- /dev/null
+++ b/dwm/Repositories/luke-dwmblocks/patches/dwmblocks-statuscmd-fork.diff
@@ -0,0 +1,77 @@
+diff --git a/dwmblocks.c b/dwmblocks.c
+index 7d7a564..e2c5dd0 100644
+--- a/dwmblocks.c
++++ b/dwmblocks.c
+@@ -34,8 +34,6 @@ static int screen;
+ static Window root;
+ static char statusbar[LENGTH(blocks)][CMDLENGTH] = {0};
+ static char statusstr[2][256];
+-static char exportstring[CMDLENGTH + 22] = "export BLOCK_BUTTON=-;";
+-static int button = 0;
+ static int statusContinue = 1;
+ static void (*writestatus) () = setroot;
+
+@@ -55,21 +53,8 @@ void getcmd(const Block *block, char *output)
+ output[0] = block->signal;
+ output++;
+ }
+- char* cmd;
+- FILE *cmdf;
+- if (button)
+- {
+- cmd = strcat(exportstring, block->command);
+- cmd[20] = '0' + button;
+- button = 0;
+- cmdf = popen(cmd,"r");
+- cmd[22] = '\0';
+- }
+- else
+- {
+- cmd = block->command;
+- cmdf = popen(cmd,"r");
+- }
++ char *cmd = block->command;
++ FILE *cmdf = popen(cmd,"r");
+ if (!cmdf)
+ return;
+ fgets(output, CMDLENGTH, cmdf);
+@@ -117,6 +102,7 @@ void setupsignals()
+ sa.sa_sigaction = buttonhandler;
+ sa.sa_flags = SA_SIGINFO;
+ sigaction(SIGUSR1, &sa, NULL);
++ signal(SIGCHLD, SIG_IGN);
+
+ }
+ #endif
+@@ -179,9 +165,29 @@ void sighandler(int signum)
+
+ void buttonhandler(int sig, siginfo_t *si, void *ucontext)
+ {
+- button = si->si_value.sival_int & 0xff;
+- getsigcmds(si->si_value.sival_int >> 8);
++ int button = si->si_value.sival_int & 0xff;
++ sig = si->si_value.sival_int >> 8;
++ getsigcmds(sig);
+ writestatus();
++ if (fork() == 0)
++ {
++ static char exportstring[CMDLENGTH + 22] = "export BLOCK_BUTTON=-;";
++ const Block *current;
++ int i;
++ for (i = 0; i < LENGTH(blocks); i++)
++ {
++ current = blocks + i;
++ if (current->signal == sig)
++ break;
++ }
++ char *cmd = strcat(exportstring, blocks[i].command);
++ cmd[20] = '0' + button;
++ char *command[] = { "/bin/sh", "-c", cmd, NULL };
++ setsid();
++ execvp(command[0], command);
++ exit(EXIT_SUCCESS);
++ cmd[22] = '\0';
++ }
+ }
+
+ #endif
diff --git a/dwm/Repositories/luke-dwmblocks/patches/dwmblocks-statuscmd-signal.diff b/dwm/Repositories/luke-dwmblocks/patches/dwmblocks-statuscmd-signal.diff
new file mode 100644
index 0000000..c2092e7
--- /dev/null
+++ b/dwm/Repositories/luke-dwmblocks/patches/dwmblocks-statuscmd-signal.diff
@@ -0,0 +1,93 @@
+diff --git a/dwmblocks.c b/dwmblocks.c
+index 88bdfb0..7bd14df 100644
+--- a/dwmblocks.c
++++ b/dwmblocks.c
+@@ -14,6 +14,7 @@ typedef struct {
+ unsigned int signal;
+ } Block;
+ void sighandler(int num);
++void buttonhandler(int sig, siginfo_t *si, void *ucontext);
+ void replace(char *str, char old, char new);
+ void getcmds(int time);
+ #ifndef __OpenBSD__
+@@ -34,6 +35,8 @@ static int screen;
+ static Window root;
+ static char statusbar[LENGTH(blocks)][CMDLENGTH] = {0};
+ static char statusstr[2][256];
++static char exportstring[CMDLENGTH + 16] = "export BUTTON=-;";
++static int button = 0;
+ static int statusContinue = 1;
+ static void (*writestatus) () = setroot;
+
+@@ -48,16 +51,34 @@ void replace(char *str, char old, char new)
+ //opens process *cmd and stores output in *output
+ void getcmd(const Block *block, char *output)
+ {
++ if (block->signal)
++ {
++ output[0] = block->signal;
++ output++;
++ }
+ strcpy(output, block->icon);
+- char *cmd = block->command;
+- FILE *cmdf = popen(cmd,"r");
++ char* cmd;
++ FILE *cmdf;
++ if (button)
++ {
++ cmd = strcat(exportstring, block->command);
++ cmd[14] = '0' + button;
++ button = 0;
++ cmdf = popen(cmd,"r");
++ cmd[16] = '\0';
++ }
++ else
++ {
++ cmd = block->command;
++ cmdf = popen(cmd,"r");
++ }
+ if (!cmdf)
+ return;
+ char c;
+ int i = strlen(block->icon);
+ fgets(output+i, CMDLENGTH-i, cmdf);
+ i = strlen(output);
+- if (delim != '\0' && --i)
++ if (delim != '\0' && i)
+ output[i++] = delim;
+ output[i++] = '\0';
+ pclose(cmdf);
+@@ -88,11 +106,18 @@ void getsigcmds(int signal)
+
+ void setupsignals()
+ {
++ struct sigaction sa;
+ for(int i = 0; i < LENGTH(blocks); i++)
+ {
+ if (blocks[i].signal > 0)
++ {
+ signal(SIGRTMIN+blocks[i].signal, sighandler);
++ sigaddset(&sa.sa_mask, SIGRTMIN+blocks[i].signal);
++ }
+ }
++ sa.sa_sigaction = buttonhandler;
++ sa.sa_flags = SA_SIGINFO;
++ sigaction(SIGUSR1, &sa, NULL);
+
+ }
+ #endif
+@@ -152,6 +177,14 @@ void sighandler(int signum)
+ getsigcmds(signum-SIGRTMIN);
+ writestatus();
+ }
++
++void buttonhandler(int sig, siginfo_t *si, void *ucontext)
++{
++ button = si->si_value.sival_int & 0xff;
++ getsigcmds(si->si_value.sival_int >> 8);
++ writestatus();
++}
++
+ #endif
+
+ void termhandler(int signum)
diff --git a/dwm/Repositories/st/FUNDING.yml b/dwm/Repositories/st/FUNDING.yml
new file mode 100644
index 0000000..c7c9a22
--- /dev/null
+++ b/dwm/Repositories/st/FUNDING.yml
@@ -0,0 +1,2 @@
+custom: ["https://lukesmith.xyz/donate.html"]
+github: lukesmithxyz
diff --git a/dwm/Repositories/st/LICENSE b/dwm/Repositories/st/LICENSE
new file mode 100644
index 0000000..3cbf420
--- /dev/null
+++ b/dwm/Repositories/st/LICENSE
@@ -0,0 +1,34 @@
+MIT/X Consortium License
+
+© 2014-2022 Hiltjo Posthuma <hiltjo at codemadness dot org>
+© 2018 Devin J. Pohly <djpohly at gmail dot com>
+© 2014-2017 Quentin Rameau <quinq at fifth dot space>
+© 2009-2012 Aurélien APTEL <aurelien dot aptel at gmail dot com>
+© 2008-2017 Anselm R Garbe <garbeam at gmail dot com>
+© 2012-2017 Roberto E. Vargas Caballero <k0ga at shike2 dot com>
+© 2012-2016 Christoph Lohmann <20h at r-36 dot net>
+© 2013 Eon S. Jeon <esjeon at hyunmu dot am>
+© 2013 Alexander Sedov <alex0player at gmail dot com>
+© 2013 Mark Edgar <medgar123 at gmail dot com>
+© 2013-2014 Eric Pruitt <eric.pruitt at gmail dot com>
+© 2013 Michael Forney <mforney at mforney dot org>
+© 2013-2014 Markus Teich <markus dot teich at stusta dot mhn dot de>
+© 2014-2015 Laslo Hunhold <dev at frign dot de>
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/dwm/Repositories/st/Makefile b/dwm/Repositories/st/Makefile
new file mode 100644
index 0000000..02045f0
--- /dev/null
+++ b/dwm/Repositories/st/Makefile
@@ -0,0 +1,62 @@
+# st - simple terminal
+# See LICENSE file for copyright and license details.
+.POSIX:
+
+include config.mk
+
+SRC = st.c x.c boxdraw.c hb.c
+OBJ = $(SRC:.c=.o)
+
+all: options st
+
+options:
+ @echo st build options:
+ @echo "CFLAGS = $(STCFLAGS)"
+ @echo "LDFLAGS = $(STLDFLAGS)"
+ @echo "CC = $(CC)"
+
+.c.o:
+ $(CC) $(STCFLAGS) -c $<
+
+st.o: config.h st.h win.h
+x.o: arg.h config.h st.h win.h hb.h
+hb.o: st.h
+boxdraw.o: config.h st.h boxdraw_data.h
+
+$(OBJ): config.h config.mk
+
+st: $(OBJ)
+ $(CC) -o $@ $(OBJ) $(STLDFLAGS)
+
+clean:
+ rm -f st $(OBJ) st-$(VERSION).tar.gz *.rej *.orig *.o
+
+dist: clean
+ mkdir -p st-$(VERSION)
+ cp -R FAQ LEGACY TODO LICENSE Makefile README config.mk\
+ config.h st.info st.1 arg.h st.h win.h $(SRC)\
+ st-$(VERSION)
+ tar -cf - st-$(VERSION) | gzip > st-$(VERSION).tar.gz
+ rm -rf st-$(VERSION)
+
+install: st
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ cp -f st $(DESTDIR)$(PREFIX)/bin
+ cp -f st-copyout $(DESTDIR)$(PREFIX)/bin
+ cp -f st-urlhandler $(DESTDIR)$(PREFIX)/bin
+ chmod 755 $(DESTDIR)$(PREFIX)/bin/st
+ chmod 755 $(DESTDIR)$(PREFIX)/bin/st-copyout
+ chmod 755 $(DESTDIR)$(PREFIX)/bin/st-urlhandler
+ mkdir -p $(DESTDIR)$(MANPREFIX)/man1
+ sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1
+ chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1
+ tic -sx st.info
+ @echo Please see the README file regarding the terminfo entry of st.
+
+uninstall:
+ rm -f $(DESTDIR)$(PREFIX)/bin/st
+ rm -f $(DESTDIR)$(PREFIX)/bin/st-copyout
+ rm -f $(DESTDIR)$(PREFIX)/bin/st-urlhandler
+ rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1
+
+.PHONY: all options clean dist install uninstall
diff --git a/dwm/Repositories/st/PKGBUILD b/dwm/Repositories/st/PKGBUILD
new file mode 100644
index 0000000..66dd05e
--- /dev/null
+++ b/dwm/Repositories/st/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer:
+
+pkgname=st-luke-git
+_pkgname=st
+pkgver=0.8.2.r1062.2087ab9
+pkgrel=1
+epoch=1
+pkgdesc="Luke's simple (suckless) terminal with vim-bindings, transparency, xresources, etc. "
+url='https://github.com/LukeSmithxyz/st'
+arch=('i686' 'x86_64')
+license=('MIT')
+options=('zipman')
+depends=('libxft')
+makedepends=('ncurses' 'libxext' 'git')
+optdepends=('dmenu: feed urls to dmenu')
+source=(git+https://github.com/LukeSmithxyz/st)
+sha1sums=('SKIP')
+
+provides=("${_pkgname}")
+conflicts=("${_pkgname}")
+
+pkgver() {
+ cd "${_pkgname}"
+ printf "%s.r%s.%s" "$(awk '/^VERSION =/ {print $3}' config.mk)" \
+ "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd $srcdir/${_pkgname}
+ # skip terminfo which conflicts with ncurses
+ sed -i '/tic /d' Makefile
+}
+
+build() {
+ cd "${_pkgname}"
+ make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
+}
+
+package() {
+ cd "${_pkgname}"
+ make PREFIX=/usr DESTDIR="${pkgdir}" install
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
+ install -Dm644 Xdefaults "${pkgdir}/usr/share/doc/${pkgname}/Xdefaults.example"
+}
diff --git a/dwm/Repositories/st/README.md b/dwm/Repositories/st/README.md
new file mode 100644
index 0000000..a233146
--- /dev/null
+++ b/dwm/Repositories/st/README.md
@@ -0,0 +1,89 @@
+# Luke's build of st - the simple (suckless) terminal
+
+The [suckless terminal (st)](https://st.suckless.org/) with some additional
+features that make it literally the best terminal emulator ever:
+
+## Unique features (using dmenu)
+
++ **follow urls** by pressing `alt-l`
++ **copy urls** in the same way with `alt-y`
++ **copy the output of commands** with `alt-o`
+
+## Bindings for
+
++ **scrollback** with `alt-↑/↓` or `alt-pageup/down` or `shift` while scrolling the
+ mouse.
++ OR **vim-bindings**: scroll up/down in history with `alt-k` and `alt-j`.
+ Faster with `alt-u`/`alt-d`.
++ **zoom/change font size**: same bindings as above, but holding down shift as
+ well. `alt-home` returns to default
++ **copy text** with `alt-c`, **paste** is `alt-v` or `shift-insert`
+
+## Pretty stuff
+
++ Compatibility with `Xresources` and `pywal` for dynamic colors.
++ Default [gruvbox](https://github.com/morhetz/gruvbox) colors otherwise.
++ Transparency/alpha, which is also adjustable from your `Xresources`.
++ Default font is system "mono" at 14pt, meaning the font will match your
+ system font.
+
+## Other st patches
+
++ Boxdraw
++ Ligatures
++ font2
++ updated to latest version 0.8.5
+
+## Installation for newbs
+
+You should have xlib header files and libharfbuzz build files installed.
+
+```
+git clone https://github.com/LukeSmithxyz/st
+cd st
+sudo make install
+```
+
+Obviously, `make` is required to build. `fontconfig` is required for the
+default build, since it asks `fontconfig` for your system monospace font. It
+might be obvious, but `libX11` and `libXft` are required as well. Chances are,
+you have all of this installed already.
+
+On OpenBSD, be sure to edit `config.mk` first and remove `-lrt` from the
+`$LIBS` before compiling.
+
+Be sure to have a composite manager (`xcompmgr`, `picom`, etc.) running if you
+want transparency.
+
+## How to configure dynamically with Xresources
+
+For many key variables, this build of `st` will look for X settings set in
+either `~/.Xdefaults` or `~/.Xresources`. You must run `xrdb` on one of these
+files to load the settings.
+
+For example, you can define your desired fonts, transparency or colors:
+
+```
+*.font: Liberation Mono:pixelsize=12:antialias=true:autohint=true;
+*.alpha: 0.9
+*.color0: #111
+...
+```
+
+The `alpha` value (for transparency) goes from `0` (transparent) to `1`
+(opaque). There is an example `Xdefaults` file in this respository.
+
+### Colors
+
+To be clear about the color settings:
+
+- This build will use gruvbox colors by default and as a fallback.
+- If there are Xresources colors defined, those will take priority.
+- But if `wal` has run in your session, its colors will take priority.
+
+Note that when you run `wal`, it will negate the transparency of existing windows, but new windows will continue with the previously defined transparency.
+
+## Contact
+
+- Luke Smith <[email protected]>
+- [https://lukesmith.xyz](https://lukesmith.xyz)
diff --git a/dwm/Repositories/st/Xdefaults b/dwm/Repositories/st/Xdefaults
new file mode 100644
index 0000000..040c772
--- /dev/null
+++ b/dwm/Repositories/st/Xdefaults
@@ -0,0 +1,128 @@
+!! Transparency (0-1):
+st.alpha: 0.92
+st.alphaOffset: 0.3
+
+!! Set a default font and font size as below:
+st.font: Monospace-11;
+
+! st.termname: st-256color
+! st.borderpx: 2
+
+!! Set the background, foreground and cursor colors as below:
+
+!! gruvbox:
+*.color0: #1d2021
+*.color1: #cc241d
+*.color2: #98971a
+*.color3: #d79921
+*.color4: #458588
+*.color5: #b16286
+*.color6: #689d6a
+*.color7: #a89984
+*.color8: #928374
+*.color9: #fb4934
+*.color10: #b8bb26
+*.color11: #fabd2f
+*.color12: #83a598
+*.color13: #d3869b
+*.color14: #8ec07c
+*.color15: #ebdbb2
+*.background: #282828
+*.foreground: white
+*.cursorColor: white
+
+/* /1* !! gruvbox light: *1/ */
+/* *.color0: #fbf1c7 */
+/* *.color1: #cc241d */
+/* *.color2: #98971a */
+/* *.color3: #d79921 */
+/* *.color4: #458588 */
+/* *.color5: #b16286 */
+/* *.color6: #689d6a */
+/* *.color7: #7c6f64 */
+/* *.color8: #928374 */
+/* *.color9: #9d0006 */
+/* *.color10: #79740e */
+/* *.color11: #b57614 */
+/* *.color12: #076678 */
+/* *.color13: #8f3f71 */
+/* *.color14: #427b58 */
+/* *.color15: #3c3836 */
+/* *.background: #fbf1c7 */
+/* *.foreground: #282828 */
+/* *.cursorColor: #282828 */
+
+/* !! brogrammer: */
+/* *.foreground: #d6dbe5 */
+/* *.background: #131313 */
+/* *.color0: #1f1f1f */
+/* *.color8: #d6dbe5 */
+/* *.color1: #f81118 */
+/* *.color9: #de352e */
+/* *.color2: #2dc55e */
+/* *.color10: #1dd361 */
+/* *.color3: #ecba0f */
+/* *.color11: #f3bd09 */
+/* *.color4: #2a84d2 */
+/* *.color12: #1081d6 */
+/* *.color5: #4e5ab7 */
+/* *.color13: #5350b9 */
+/* *.color6: #1081d6 */
+/* *.color14: #0f7ddb */
+/* *.color7: #d6dbe5 */
+/* *.color15: #ffffff */
+/* *.colorBD: #d6dbe5 */
+
+/* ! base16 */
+/* *.color0: #181818 */
+/* *.color1: #ab4642 */
+/* *.color2: #a1b56c */
+/* *.color3: #f7ca88 */
+/* *.color4: #7cafc2 */
+/* *.color5: #ba8baf */
+/* *.color6: #86c1b9 */
+/* *.color7: #d8d8d8 */
+/* *.color8: #585858 */
+/* *.color9: #ab4642 */
+/* *.color10: #a1b56c */
+/* *.color11: #f7ca88 */
+/* *.color12: #7cafc2 */
+/* *.color13: #ba8baf */
+/* *.color14: #86c1b9 */
+/* *.color15: #f8f8f8 */
+
+/* !! solarized */
+/* *.color0: #073642 */
+/* *.color1: #dc322f */
+/* *.color2: #859900 */
+/* *.color3: #b58900 */
+/* *.color4: #268bd2 */
+/* *.color5: #d33682 */
+/* *.color6: #2aa198 */
+/* *.color7: #eee8d5 */
+/* *.color9: #cb4b16 */
+/* *.color8: #fdf6e3 */
+/* *.color10: #586e75 */
+/* *.color11: #657b83 */
+/* *.color12: #839496 */
+/* *.color13: #6c71c4 */
+/* *.color14: #93a1a1 */
+/* *.color15: #fdf6e3 */
+
+/* !! xterm */
+/* *.color0: #000000 */
+/* *.color1: #cd0000 */
+/* *.color2: #00cd00 */
+/* *.color3: #cdcd00 */
+/* *.color4: #0000cd */
+/* *.color5: #cd00cd */
+/* *.color6: #00cdcd */
+/* *.color7: #e5e5e5 */
+/* *.color8: #4d4d4d */
+/* *.color9: #ff0000 */
+/* *.color10: #00ff00 */
+/* *.color11: #ffff00 */
+/* *.color12: #0000ff */
+/* *.color13: #ff00ff */
+/* *.color14: #00ffff */
+/* *.color15: #aabac8 */
diff --git a/dwm/Repositories/st/arg.h b/dwm/Repositories/st/arg.h
new file mode 100644
index 0000000..a22e019
--- /dev/null
+++ b/dwm/Repositories/st/arg.h
@@ -0,0 +1,50 @@
+/*
+ * Copy me if you can.
+ * by 20h
+ */
+
+#ifndef ARG_H__
+#define ARG_H__
+
+extern char *argv0;
+
+/* use main(int argc, char *argv[]) */
+#define ARGBEGIN for (argv0 = *argv, argv++, argc--;\
+ argv[0] && argv[0][0] == '-'\
+ && argv[0][1];\
+ argc--, argv++) {\
+ char argc_;\
+ char **argv_;\
+ int brk_;\
+ if (argv[0][1] == '-' && argv[0][2] == '\0') {\
+ argv++;\
+ argc--;\
+ break;\
+ }\
+ int i_;\
+ for (i_ = 1, brk_ = 0, argv_ = argv;\
+ argv[0][i_] && !brk_;\
+ i_++) {\
+ if (argv_ != argv)\
+ break;\
+ argc_ = argv[0][i_];\
+ switch (argc_)
+
+#define ARGEND }\
+ }
+
+#define ARGC() argc_
+
+#define EARGF(x) ((argv[0][i_+1] == '\0' && argv[1] == NULL)?\
+ ((x), abort(), (char *)0) :\
+ (brk_ = 1, (argv[0][i_+1] != '\0')?\
+ (&argv[0][i_+1]) :\
+ (argc--, argv++, argv[0])))
+
+#define ARGF() ((argv[0][i_+1] == '\0' && argv[1] == NULL)?\
+ (char *)0 :\
+ (brk_ = 1, (argv[0][i_+1] != '\0')?\
+ (&argv[0][i_+1]) :\
+ (argc--, argv++, argv[0])))
+
+#endif
diff --git a/dwm/Repositories/st/boxdraw.c b/dwm/Repositories/st/boxdraw.c
new file mode 100644
index 0000000..28a92d0
--- /dev/null
+++ b/dwm/Repositories/st/boxdraw.c
@@ -0,0 +1,194 @@
+/*
+ * Copyright 2018 Avi Halachmi (:avih) [email protected] https://github.com/avih
+ * MIT/X Consortium License
+ */
+
+#include <X11/Xft/Xft.h>
+#include "st.h"
+#include "boxdraw_data.h"
+
+/* Rounded non-negative integers division of n / d */
+#define DIV(n, d) (((n) + (d) / 2) / (d))
+
+static Display *xdpy;
+static Colormap xcmap;
+static XftDraw *xd;
+static Visual *xvis;
+
+static void drawbox(int, int, int, int, XftColor *, XftColor *, ushort);
+static void drawboxlines(int, int, int, int, XftColor *, ushort);
+
+/* public API */
+
+void
+boxdraw_xinit(Display *dpy, Colormap cmap, XftDraw *draw, Visual *vis)
+{
+ xdpy = dpy; xcmap = cmap; xd = draw, xvis = vis;
+}
+
+int
+isboxdraw(Rune u)
+{
+ Rune block = u & ~0xff;
+ return (boxdraw && block == 0x2500 && boxdata[(uint8_t)u]) ||
+ (boxdraw_braille && block == 0x2800);
+}
+
+/* the "index" is actually the entire shape data encoded as ushort */
+ushort
+boxdrawindex(const Glyph *g)
+{
+ if (boxdraw_braille && (g->u & ~0xff) == 0x2800)
+ return BRL | (uint8_t)g->u;
+ if (boxdraw_bold && (g->mode & ATTR_BOLD))
+ return BDB | boxdata[(uint8_t)g->u];
+ return boxdata[(uint8_t)g->u];
+}
+
+void
+drawboxes(int x, int y, int cw, int ch, XftColor *fg, XftColor *bg,
+ const XftGlyphFontSpec *specs, int len)
+{
+ for ( ; len-- > 0; x += cw, specs++)
+ drawbox(x, y, cw, ch, fg, bg, (ushort)specs->glyph);
+}
+
+/* implementation */
+
+void
+drawbox(int x, int y, int w, int h, XftColor *fg, XftColor *bg, ushort bd)
+{
+ ushort cat = bd & ~(BDB | 0xff); /* mask out bold and data */
+ if (bd & (BDL | BDA)) {
+ /* lines (light/double/heavy/arcs) */
+ drawboxlines(x, y, w, h, fg, bd);
+
+ } else if (cat == BBD) {
+ /* lower (8-X)/8 block */
+ int d = DIV((uint8_t)bd * h, 8);
+ XftDrawRect(xd, fg, x, y + d, w, h - d);
+
+ } else if (cat == BBU) {
+ /* upper X/8 block */
+ XftDrawRect(xd, fg, x, y, w, DIV((uint8_t)bd * h, 8));
+
+ } else if (cat == BBL) {
+ /* left X/8 block */
+ XftDrawRect(xd, fg, x, y, DIV((uint8_t)bd * w, 8), h);
+
+ } else if (cat == BBR) {
+ /* right (8-X)/8 block */
+ int d = DIV((uint8_t)bd * w, 8);
+ XftDrawRect(xd, fg, x + d, y, w - d, h);
+
+ } else if (cat == BBQ) {
+ /* Quadrants */
+ int w2 = DIV(w, 2), h2 = DIV(h, 2);
+ if (bd & TL)
+ XftDrawRect(xd, fg, x, y, w2, h2);
+ if (bd & TR)
+ XftDrawRect(xd, fg, x + w2, y, w - w2, h2);
+ if (bd & BL)
+ XftDrawRect(xd, fg, x, y + h2, w2, h - h2);
+ if (bd & BR)
+ XftDrawRect(xd, fg, x + w2, y + h2, w - w2, h - h2);
+
+ } else if (bd & BBS) {
+ /* Shades - data is 1/2/3 for 25%/50%/75% alpha, respectively */
+ int d = (uint8_t)bd;
+ XftColor xfc;
+ XRenderColor xrc = { .alpha = 0xffff };
+
+ xrc.red = DIV(fg->color.red * d + bg->color.red * (4 - d), 4);
+ xrc.green = DIV(fg->color.green * d + bg->color.green * (4 - d), 4);
+ xrc.blue = DIV(fg->color.blue * d + bg->color.blue * (4 - d), 4);
+
+ XftColorAllocValue(xdpy, xvis, xcmap, &xrc, &xfc);
+ XftDrawRect(xd, &xfc, x, y, w, h);
+ XftColorFree(xdpy, xvis, xcmap, &xfc);
+
+ } else if (cat == BRL) {
+ /* braille, each data bit corresponds to one dot at 2x4 grid */
+ int w1 = DIV(w, 2);
+ int h1 = DIV(h, 4), h2 = DIV(h, 2), h3 = DIV(3 * h, 4);
+
+ if (bd & 1) XftDrawRect(xd, fg, x, y, w1, h1);
+ if (bd & 2) XftDrawRect(xd, fg, x, y + h1, w1, h2 - h1);
+ if (bd & 4) XftDrawRect(xd, fg, x, y + h2, w1, h3 - h2);
+ if (bd & 8) XftDrawRect(xd, fg, x + w1, y, w - w1, h1);
+ if (bd & 16) XftDrawRect(xd, fg, x + w1, y + h1, w - w1, h2 - h1);
+ if (bd & 32) XftDrawRect(xd, fg, x + w1, y + h2, w - w1, h3 - h2);
+ if (bd & 64) XftDrawRect(xd, fg, x, y + h3, w1, h - h3);
+ if (bd & 128) XftDrawRect(xd, fg, x + w1, y + h3, w - w1, h - h3);
+
+ }
+}
+
+void
+drawboxlines(int x, int y, int w, int h, XftColor *fg, ushort bd)
+{
+ /* s: stem thickness. width/8 roughly matches underscore thickness. */
+ /* We draw bold as 1.5 * normal-stem and at least 1px thicker. */
+ /* doubles draw at least 3px, even when w or h < 3. bold needs 6px. */
+ int mwh = MIN(w, h);
+ int base_s = MAX(1, DIV(mwh, 8));
+ int bold = (bd & BDB) && mwh >= 6; /* possibly ignore boldness */
+ int s = bold ? MAX(base_s + 1, DIV(3 * base_s, 2)) : base_s;
+ int w2 = DIV(w - s, 2), h2 = DIV(h - s, 2);
+ /* the s-by-s square (x + w2, y + h2, s, s) is the center texel. */
+ /* The base length (per direction till edge) includes this square. */
+
+ int light = bd & (LL | LU | LR | LD);
+ int double_ = bd & (DL | DU | DR | DD);
+
+ if (light) {
+ /* d: additional (negative) length to not-draw the center */
+ /* texel - at arcs and avoid drawing inside (some) doubles */
+ int arc = bd & BDA;
+ int multi_light = light & (light - 1);
+ int multi_double = double_ & (double_ - 1);
+ /* light crosses double only at DH+LV, DV+LH (ref. shapes) */
+ int d = arc || (multi_double && !multi_light) ? -s : 0;
+
+ if (bd & LL)
+ XftDrawRect(xd, fg, x, y + h2, w2 + s + d, s);
+ if (bd & LU)
+ XftDrawRect(xd, fg, x + w2, y, s, h2 + s + d);
+ if (bd & LR)
+ XftDrawRect(xd, fg, x + w2 - d, y + h2, w - w2 + d, s);
+ if (bd & LD)
+ XftDrawRect(xd, fg, x + w2, y + h2 - d, s, h - h2 + d);
+ }
+
+ /* double lines - also align with light to form heavy when combined */
+ if (double_) {
+ /*
+ * going clockwise, for each double-ray: p is additional length
+ * to the single-ray nearer to the previous direction, and n to
+ * the next. p and n adjust from the base length to lengths
+ * which consider other doubles - shorter to avoid intersections
+ * (p, n), or longer to draw the far-corner texel (n).
+ */
+ int dl = bd & DL, du = bd & DU, dr = bd & DR, dd = bd & DD;
+ if (dl) {
+ int p = dd ? -s : 0, n = du ? -s : dd ? s : 0;
+ XftDrawRect(xd, fg, x, y + h2 + s, w2 + s + p, s);
+ XftDrawRect(xd, fg, x, y + h2 - s, w2 + s + n, s);
+ }
+ if (du) {
+ int p = dl ? -s : 0, n = dr ? -s : dl ? s : 0;
+ XftDrawRect(xd, fg, x + w2 - s, y, s, h2 + s + p);
+ XftDrawRect(xd, fg, x + w2 + s, y, s, h2 + s + n);
+ }
+ if (dr) {
+ int p = du ? -s : 0, n = dd ? -s : du ? s : 0;
+ XftDrawRect(xd, fg, x + w2 - p, y + h2 - s, w - w2 + p, s);
+ XftDrawRect(xd, fg, x + w2 - n, y + h2 + s, w - w2 + n, s);
+ }
+ if (dd) {
+ int p = dr ? -s : 0, n = dl ? -s : dr ? s : 0;
+ XftDrawRect(xd, fg, x + w2 + s, y + h2 - p, s, h - h2 + p);
+ XftDrawRect(xd, fg, x + w2 - s, y + h2 - n, s, h - h2 + n);
+ }
+ }
+}
diff --git a/dwm/Repositories/st/boxdraw_data.h b/dwm/Repositories/st/boxdraw_data.h
new file mode 100644
index 0000000..7890500
--- /dev/null
+++ b/dwm/Repositories/st/boxdraw_data.h
@@ -0,0 +1,214 @@
+/*
+ * Copyright 2018 Avi Halachmi (:avih) [email protected] https://github.com/avih
+ * MIT/X Consortium License
+ */
+
+/*
+ * U+25XX codepoints data
+ *
+ * References:
+ * http://www.unicode.org/charts/PDF/U2500.pdf
+ * http://www.unicode.org/charts/PDF/U2580.pdf
+ *
+ * Test page:
+ * https://github.com/GNOME/vte/blob/master/doc/boxes.txt
+ */
+
+/* Each shape is encoded as 16-bits. Higher bits are category, lower are data */
+/* Categories (mutually exclusive except BDB): */
+/* For convenience, BDL/BDA/BBS/BDB are 1 bit each, the rest are enums */
+#define BDL (1<<8) /* Box Draw Lines (light/double/heavy) */
+#define BDA (1<<9) /* Box Draw Arc (light) */
+
+#define BBD (1<<10) /* Box Block Down (lower) X/8 */
+#define BBL (2<<10) /* Box Block Left X/8 */
+#define BBU (3<<10) /* Box Block Upper X/8 */
+#define BBR (4<<10) /* Box Block Right X/8 */
+#define BBQ (5<<10) /* Box Block Quadrants */
+#define BRL (6<<10) /* Box Braille (data is lower byte of U28XX) */
+
+#define BBS (1<<14) /* Box Block Shades */
+#define BDB (1<<15) /* Box Draw is Bold */
+
+/* (BDL/BDA) Light/Double/Heavy x Left/Up/Right/Down/Horizontal/Vertical */
+/* Heavy is light+double (literally drawing light+double align to form heavy) */
+#define LL (1<<0)
+#define LU (1<<1)
+#define LR (1<<2)
+#define LD (1<<3)
+#define LH (LL+LR)
+#define LV (LU+LD)
+
+#define DL (1<<4)
+#define DU (1<<5)
+#define DR (1<<6)
+#define DD (1<<7)
+#define DH (DL+DR)
+#define DV (DU+DD)
+
+#define HL (LL+DL)
+#define HU (LU+DU)
+#define HR (LR+DR)
+#define HD (LD+DD)
+#define HH (HL+HR)
+#define HV (HU+HD)
+
+/* (BBQ) Quadrants Top/Bottom x Left/Right */
+#define TL (1<<0)
+#define TR (1<<1)
+#define BL (1<<2)
+#define BR (1<<3)
+
+/* Data for U+2500 - U+259F except dashes/diagonals */
+static const unsigned short boxdata[256] = {
+ /* light lines */
+ [0x00] = BDL + LH, /* light horizontal */
+ [0x02] = BDL + LV, /* light vertical */
+ [0x0c] = BDL + LD + LR, /* light down and right */
+ [0x10] = BDL + LD + LL, /* light down and left */
+ [0x14] = BDL + LU + LR, /* light up and right */
+ [0x18] = BDL + LU + LL, /* light up and left */
+ [0x1c] = BDL + LV + LR, /* light vertical and right */
+ [0x24] = BDL + LV + LL, /* light vertical and left */
+ [0x2c] = BDL + LH + LD, /* light horizontal and down */
+ [0x34] = BDL + LH + LU, /* light horizontal and up */
+ [0x3c] = BDL + LV + LH, /* light vertical and horizontal */
+ [0x74] = BDL + LL, /* light left */
+ [0x75] = BDL + LU, /* light up */
+ [0x76] = BDL + LR, /* light right */
+ [0x77] = BDL + LD, /* light down */
+
+ /* heavy [+light] lines */
+ [0x01] = BDL + HH,
+ [0x03] = BDL + HV,
+ [0x0d] = BDL + HR + LD,
+ [0x0e] = BDL + HD + LR,
+ [0x0f] = BDL + HD + HR,
+ [0x11] = BDL + HL + LD,
+ [0x12] = BDL + HD + LL,
+ [0x13] = BDL + HD + HL,
+ [0x15] = BDL + HR + LU,
+ [0x16] = BDL + HU + LR,
+ [0x17] = BDL + HU + HR,
+ [0x19] = BDL + HL + LU,
+ [0x1a] = BDL + HU + LL,
+ [0x1b] = BDL + HU + HL,
+ [0x1d] = BDL + HR + LV,
+ [0x1e] = BDL + HU + LD + LR,
+ [0x1f] = BDL + HD + LR + LU,
+ [0x20] = BDL + HV + LR,
+ [0x21] = BDL + HU + HR + LD,
+ [0x22] = BDL + HD + HR + LU,
+ [0x23] = BDL + HV + HR,
+ [0x25] = BDL + HL + LV,
+ [0x26] = BDL + HU + LD + LL,
+ [0x27] = BDL + HD + LU + LL,
+ [0x28] = BDL + HV + LL,
+ [0x29] = BDL + HU + HL + LD,
+ [0x2a] = BDL + HD + HL + LU,
+ [0x2b] = BDL + HV + HL,
+ [0x2d] = BDL + HL + LD + LR,
+ [0x2e] = BDL + HR + LL + LD,
+ [0x2f] = BDL + HH + LD,
+ [0x30] = BDL + HD + LH,
+ [0x31] = BDL + HD + HL + LR,
+ [0x32] = BDL + HR + HD + LL,
+ [0x33] = BDL + HH + HD,
+ [0x35] = BDL + HL + LU + LR,
+ [0x36] = BDL + HR + LU + LL,
+ [0x37] = BDL + HH + LU,
+ [0x38] = BDL + HU + LH,
+ [0x39] = BDL + HU + HL + LR,
+ [0x3a] = BDL + HU + HR + LL,
+ [0x3b] = BDL + HH + HU,
+ [0x3d] = BDL + HL + LV + LR,
+ [0x3e] = BDL + HR + LV + LL,
+ [0x3f] = BDL + HH + LV,
+ [0x40] = BDL + HU + LH + LD,
+ [0x41] = BDL + HD + LH + LU,
+ [0x42] = BDL + HV + LH,
+ [0x43] = BDL + HU + HL + LD + LR,
+ [0x44] = BDL + HU + HR + LD + LL,
+ [0x45] = BDL + HD + HL + LU + LR,
+ [0x46] = BDL + HD + HR + LU + LL,
+ [0x47] = BDL + HH + HU + LD,
+ [0x48] = BDL + HH + HD + LU,
+ [0x49] = BDL + HV + HL + LR,
+ [0x4a] = BDL + HV + HR + LL,
+ [0x4b] = BDL + HV + HH,
+ [0x78] = BDL + HL,
+ [0x79] = BDL + HU,
+ [0x7a] = BDL + HR,
+ [0x7b] = BDL + HD,
+ [0x7c] = BDL + HR + LL,
+ [0x7d] = BDL + HD + LU,
+ [0x7e] = BDL + HL + LR,
+ [0x7f] = BDL + HU + LD,
+
+ /* double [+light] lines */
+ [0x50] = BDL + DH,
+ [0x51] = BDL + DV,
+ [0x52] = BDL + DR + LD,
+ [0x53] = BDL + DD + LR,
+ [0x54] = BDL + DR + DD,
+ [0x55] = BDL + DL + LD,
+ [0x56] = BDL + DD + LL,
+ [0x57] = BDL + DL + DD,
+ [0x58] = BDL + DR + LU,
+ [0x59] = BDL + DU + LR,
+ [0x5a] = BDL + DU + DR,
+ [0x5b] = BDL + DL + LU,
+ [0x5c] = BDL + DU + LL,
+ [0x5d] = BDL + DL + DU,
+ [0x5e] = BDL + DR + LV,
+ [0x5f] = BDL + DV + LR,
+ [0x60] = BDL + DV + DR,
+ [0x61] = BDL + DL + LV,
+ [0x62] = BDL + DV + LL,
+ [0x63] = BDL + DV + DL,
+ [0x64] = BDL + DH + LD,
+ [0x65] = BDL + DD + LH,
+ [0x66] = BDL + DD + DH,
+ [0x67] = BDL + DH + LU,
+ [0x68] = BDL + DU + LH,
+ [0x69] = BDL + DH + DU,
+ [0x6a] = BDL + DH + LV,
+ [0x6b] = BDL + DV + LH,
+ [0x6c] = BDL + DH + DV,
+
+ /* (light) arcs */
+ [0x6d] = BDA + LD + LR,
+ [0x6e] = BDA + LD + LL,
+ [0x6f] = BDA + LU + LL,
+ [0x70] = BDA + LU + LR,
+
+ /* Lower (Down) X/8 block (data is 8 - X) */
+ [0x81] = BBD + 7, [0x82] = BBD + 6, [0x83] = BBD + 5, [0x84] = BBD + 4,
+ [0x85] = BBD + 3, [0x86] = BBD + 2, [0x87] = BBD + 1, [0x88] = BBD + 0,
+
+ /* Left X/8 block (data is X) */
+ [0x89] = BBL + 7, [0x8a] = BBL + 6, [0x8b] = BBL + 5, [0x8c] = BBL + 4,
+ [0x8d] = BBL + 3, [0x8e] = BBL + 2, [0x8f] = BBL + 1,
+
+ /* upper 1/2 (4/8), 1/8 block (X), right 1/2, 1/8 block (8-X) */
+ [0x80] = BBU + 4, [0x94] = BBU + 1,
+ [0x90] = BBR + 4, [0x95] = BBR + 7,
+
+ /* Quadrants */
+ [0x96] = BBQ + BL,
+ [0x97] = BBQ + BR,
+ [0x98] = BBQ + TL,
+ [0x99] = BBQ + TL + BL + BR,
+ [0x9a] = BBQ + TL + BR,
+ [0x9b] = BBQ + TL + TR + BL,
+ [0x9c] = BBQ + TL + TR + BR,
+ [0x9d] = BBQ + TR,
+ [0x9e] = BBQ + BL + TR,
+ [0x9f] = BBQ + BL + TR + BR,
+
+ /* Shades, data is an alpha value in 25% units (1/4, 1/2, 3/4) */
+ [0x91] = BBS + 1, [0x92] = BBS + 2, [0x93] = BBS + 3,
+
+ /* U+2504 - U+250B, U+254C - U+254F: unsupported (dashes) */
+ /* U+2571 - U+2573: unsupported (diagonals) */
+};
diff --git a/dwm/Repositories/st/config.h b/dwm/Repositories/st/config.h
new file mode 100644
index 0000000..e9acd70
--- /dev/null
+++ b/dwm/Repositories/st/config.h
@@ -0,0 +1,558 @@
+/* See LICENSE file for copyright and license details. */
+
+/*
+ * appearance
+ *
+ * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
+ */
+static char *font = "Iosevka Comfy:pixelsize=22:antialias=true:autohint=true";
+static char *font2[] = { "NotoColorEmoji:pixelsize=20:antialias=true:autohint=true" };
+static int borderpx = 20;
+
+/*
+ * What program is execed by st depends of these precedence rules:
+ * 1: program passed with -e
+ * 2: scroll and/or utmp
+ * 3: SHELL environment variable
+ * 4: value of shell in /etc/passwd
+ * 5: value of shell in config.h
+ */
+static char *shell = "/bin/sh";
+char *utmp = NULL;
+/* scroll program: to enable use a string like "scroll" */
+char *scroll = NULL;
+char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
+
+/* identification sequence returned in DA and DECID */
+char *vtiden = "\033[?6c";
+
+/* Kerning / character bounding-box multipliers */
+static float cwscale = 1.0;
+static float chscale = 1.0;
+
+/*
+ * word delimiter string
+ *
+ * More advanced example: L" `'\"()[]{}"
+ */
+wchar_t *worddelimiters = L" ";
+
+/* selection timeouts (in milliseconds) */
+static unsigned int doubleclicktimeout = 300;
+static unsigned int tripleclicktimeout = 600;
+
+/* alt screens */
+int allowaltscreen = 1;
+
+/* allow certain non-interactive (insecure) window operations such as:
+ setting the clipboard text */
+int allowwindowops = 0;
+
+/*
+ * draw latency range in ms - from new content/keypress/etc until drawing.
+ * within this range, st draws when content stops arriving (idle). mostly it's
+ * near minlatency, but it waits longer for slow updates to avoid partial draw.
+ * low minlatency will tear/flicker more, as it can "detect" idle too early.
+ */
+static double minlatency = 8;
+static double maxlatency = 33;
+
+/*
+ * blinking timeout (set to 0 to disable blinking) for the terminal blinking
+ * attribute.
+ */
+static unsigned int blinktimeout = 800;
+
+/*
+ * thickness of underline and bar cursors
+ */
+static unsigned int cursorthickness = 2;
+
+/*
+ * 1: render most of the lines/blocks characters without using the font for
+ * perfect alignment between cells (U2500 - U259F except dashes/diagonals).
+ * Bold affects lines thickness if boxdraw_bold is not 0. Italic is ignored.
+ * 0: disable (render all U25XX glyphs normally from the font).
+ */
+const int boxdraw = 1;
+const int boxdraw_bold = 0;
+
+/* braille (U28XX): 1: render as adjacent "pixels", 0: use font */
+const int boxdraw_braille = 0;
+
+/*
+ * bell volume. It must be a value between -100 and 100. Use 0 for disabling
+ * it
+ */
+static int bellvolume = 0;
+
+/* default TERM value */
+char *termname = "st-256color";
+
+/*
+ * spaces per tab
+ *
+ * When you are changing this value, don't forget to adapt the »it« value in
+ * the st.info and appropriately install the st.info in the environment where
+ * you use this st version.
+ *
+ * it#$tabspaces,
+ *
+ * Secondly make sure your kernel is not expanding tabs. When running `stty
+ * -a` »tab0« should appear. You can tell the terminal to not expand tabs by
+ * running following command:
+ *
+ * stty tabs
+ */
+unsigned int tabspaces = 8;
+
+/* bg opacity */
+float alpha = 0.9;
+// float alpha = 1.0;
+float alphaOffset = 0.0;
+float alphaUnfocus;
+
+/* Terminal colors (16 first used in escape sequence) */
+static const char *colorname[] = {
+ "#282828", /* hard contrast: #1d2021 / soft contrast: #32302f */
+ "#9d1f1f",
+ "#70b900",
+ "#fec43f",
+ "#00d3d0",
+ "#caa6df",
+ "#689d6a",
+ "#989898",
+ "#535353",
+ "#fb4934",
+ "#44bc44",
+ "#efef00",
+ "#82b0ec",
+ "#b6a0ff",
+ "#88ca9f",
+ "#989898",
+ [255] = 0,
+ /* more colors can be added after 255 to use with DefaultXX */
+ "#ffffff", /* 256 -> cursor */
+ "#535353", /* 257 -> rev cursor*/
+ "#000000", /* 258 -> bg */
+ "#ffffff", /* 259 -> fg */
+};
+
+
+/*
+ * Default colors (colorname index)
+ * foreground, background, cursor, reverse cursor
+ */
+unsigned int defaultfg = 259;
+unsigned int defaultbg = 258;
+unsigned int defaultcs = 256;
+unsigned int defaultrcs = 257;
+unsigned int background = 258;
+
+/*
+ * Default shape of cursor
+ * 2: Block ("█")
+ * 4: Underline ("_")
+ * 6: Bar ("|")
+ * 7: Snowman ("☃")
+ */
+static unsigned int cursorshape = 2;
+
+/*
+ * Default columns and rows numbers
+ */
+
+static unsigned int cols = 80;
+static unsigned int rows = 24;
+
+/*
+ * Default colour and shape of the mouse cursor
+ */
+static unsigned int mouseshape = XC_xterm;
+static unsigned int mousefg = 7;
+static unsigned int mousebg = 0;
+
+/*
+ * Color used to display font attributes when fontconfig selected a font which
+ * doesn't match the ones requested.
+ */
+static unsigned int defaultattr = 11;
+
+/*
+ * Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set).
+ * Note that if you want to use ShiftMask with selmasks, set this to an other
+ * modifier, set to 0 to not use it.
+ */
+static uint forcemousemod = ShiftMask;
+
+/*
+ * Xresources preferences to load at startup
+ */
+
+ResourcePref resources[] = {
+ { "font", STRING, &font },
+ { "fontalt0", STRING, &font2[0] },
+ { "color0", STRING, &colorname[0] },
+ { "color1", STRING, &colorname[1] },
+ { "color2", STRING, &colorname[2] },
+ { "color3", STRING, &colorname[3] },
+ { "color4", STRING, &colorname[4] },
+ { "color5", STRING, &colorname[5] },
+ { "color6", STRING, &colorname[6] },
+ { "color7", STRING, &colorname[7] },
+ { "color8", STRING, &colorname[8] },
+ { "color9", STRING, &colorname[9] },
+ { "color10", STRING, &colorname[10] },
+ { "color11", STRING, &colorname[11] },
+ { "color12", STRING, &colorname[12] },
+ { "color13", STRING, &colorname[13] },
+ { "color14", STRING, &colorname[14] },
+ { "color15", STRING, &colorname[15] },
+ { "background", STRING, &colorname[258] },
+ { "foreground", STRING, &colorname[259] },
+ { "cursorColor", STRING, &colorname[256] },
+ { "termname", STRING, &termname },
+ { "shell", STRING, &shell },
+ { "minlatency", INTEGER, &minlatency },
+ { "maxlatency", INTEGER, &maxlatency },
+ { "blinktimeout", INTEGER, &blinktimeout },
+ { "bellvolume", INTEGER, &bellvolume },
+ { "tabspaces", INTEGER, &tabspaces },
+ { "borderpx", INTEGER, &borderpx },
+ { "cwscale", FLOAT, &cwscale },
+ { "chscale", FLOAT, &chscale },
+ { "alpha", FLOAT, &alpha },
+ { "alphaOffset", FLOAT, &alphaOffset },
+};
+
+/*
+ * Internal mouse shortcuts.
+ * Beware that overloading Button1 will disable the selection.
+ */
+static MouseShortcut mshortcuts[] = {
+ /* mask button function argument release */
+ { XK_NO_MOD, Button4, kscrollup, {.i = 1} },
+ { XK_NO_MOD, Button5, kscrolldown, {.i = 1} },
+ { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 },
+ { ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} },
+ { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} },
+ { ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} },
+ { XK_ANY_MOD, Button5, ttysend, {.s = "\005"} },
+};
+
+/* Internal keyboard shortcuts. */
+#define MODKEY Mod1Mask
+#define TERMMOD (Mod1Mask|ShiftMask)
+
+static char *openurlcmd[] = { "/bin/sh", "-c", "st-urlhandler -o", "externalpipe", NULL };
+static char *copyurlcmd[] = { "/bin/sh", "-c", "st-urlhandler -c", "externalpipe", NULL };
+static char *copyoutput[] = { "/bin/sh", "-c", "st-copyout", "externalpipe", NULL };
+
+static Shortcut shortcuts[] = {
+ /* mask keysym function argument */
+ { XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} },
+ { ControlMask, XK_Print, toggleprinter, {.i = 0} },
+ { ShiftMask, XK_Print, printscreen, {.i = 0} },
+ { XK_ANY_MOD, XK_Print, printsel, {.i = 0} },
+ { TERMMOD, XK_Prior, zoom, {.f = +1} },
+ { TERMMOD, XK_Next, zoom, {.f = -1} },
+ { TERMMOD, XK_Home, zoomreset, {.f = 0} },
+ { TERMMOD, XK_C, clipcopy, {.i = 0} },
+ { TERMMOD, XK_V, clippaste, {.i = 0} },
+ { MODKEY, XK_c, clipcopy, {.i = 0} },
+ { ShiftMask, XK_Insert, clippaste, {.i = 0} },
+ { MODKEY, XK_v, clippaste, {.i = 0} },
+ { ShiftMask, XK_Insert, selpaste, {.i = 0} },
+ { TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
+ { ShiftMask, XK_Page_Up, kscrollup, {.i = -1} },
+ { ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} },
+ { MODKEY, XK_Page_Up, kscrollup, {.i = -1} },
+ { MODKEY, XK_Page_Down, kscrolldown, {.i = -1} },
+ { MODKEY, XK_k, kscrollup, {.i = 1} },
+ { MODKEY, XK_j, kscrolldown, {.i = 1} },
+ { MODKEY, XK_Up, kscrollup, {.i = 1} },
+ { MODKEY, XK_Down, kscrolldown, {.i = 1} },
+ // { MODKEY, XK_u, kscrollup, {.i = -1} },
+ // { MODKEY, XK_d, kscrolldown, {.i = -1} },
+ { MODKEY, XK_s, changealpha, {.f = -0.05} },
+ { MODKEY, XK_a, changealpha, {.f = +0.05} },
+ { TERMMOD, XK_Up, zoom, {.f = +1} },
+ { TERMMOD, XK_Down, zoom, {.f = -1} },
+ { TERMMOD, XK_K, zoom, {.f = +1} },
+ { TERMMOD, XK_J, zoom, {.f = -1} },
+ { TERMMOD, XK_U, zoom, {.f = +2} },
+ { TERMMOD, XK_D, zoom, {.f = -2} },
+ { MODKEY, XK_l, externalpipe, {.v = openurlcmd } },
+ { MODKEY, XK_y, externalpipe, {.v = copyurlcmd } },
+ { MODKEY, XK_o, externalpipe, {.v = copyoutput } },
+};
+
+/*
+ * Special keys (change & recompile st.info accordingly)
+ *
+ * Mask value:
+ * * Use XK_ANY_MOD to match the key no matter modifiers state
+ * * Use XK_NO_MOD to match the key alone (no modifiers)
+ * appkey value:
+ * * 0: no value
+ * * > 0: keypad application mode enabled
+ * * = 2: term.numlock = 1
+ * * < 0: keypad application mode disabled
+ * appcursor value:
+ * * 0: no value
+ * * > 0: cursor application mode enabled
+ * * < 0: cursor application mode disabled
+ *
+ * Be careful with the order of the definitions because st searches in
+ * this table sequentially, so any XK_ANY_MOD must be in the last
+ * position for a key.
+ */
+
+/*
+ * If you want keys other than the X11 function keys (0xFD00 - 0xFFFF)
+ * to be mapped below, add them to this array.
+ */
+static KeySym mappedkeys[] = { -1 };
+
+/*
+ * State bits to ignore when matching key or button events. By default,
+ * numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored.
+ */
+static uint ignoremod = Mod2Mask|XK_SWITCH_MOD;
+
+/*
+ * This is the huge key array which defines all compatibility to the Linux
+ * world. Please decide about changes wisely.
+ */
+static Key key[] = {
+ /* keysym mask string appkey appcursor */
+ { XK_KP_Home, ShiftMask, "\033[2J", 0, -1},
+ { XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1},
+ { XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1},
+ { XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1},
+ { XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0},
+ { XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1},
+ { XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1},
+ { XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0},
+ { XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1},
+ { XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1},
+ { XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0},
+ { XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1},
+ { XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1},
+ { XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0},
+ { XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1},
+ { XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1},
+ { XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0},
+ { XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
+ { XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0},
+ { XK_KP_End, ControlMask, "\033[J", -1, 0},
+ { XK_KP_End, ControlMask, "\033[1;5F", +1, 0},
+ { XK_KP_End, ShiftMask, "\033[K", -1, 0},
+ { XK_KP_End, ShiftMask, "\033[1;2F", +1, 0},
+ { XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0},
+ { XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0},
+ { XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0},
+ { XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0},
+ { XK_KP_Insert, ShiftMask, "\033[4l", -1, 0},
+ { XK_KP_Insert, ControlMask, "\033[L", -1, 0},
+ { XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0},
+ { XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
+ { XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
+ { XK_KP_Delete, ControlMask, "\033[M", -1, 0},
+ { XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0},
+ { XK_KP_Delete, ShiftMask, "\033[2K", -1, 0},
+ { XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0},
+ { XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0},
+ { XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
+ { XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0},
+ { XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0},
+ { XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0},
+ { XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0},
+ { XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0},
+ { XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0},
+ { XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0},
+ { XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0},
+ { XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0},
+ { XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0},
+ { XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0},
+ { XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0},
+ { XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0},
+ { XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0},
+ { XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0},
+ { XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0},
+ { XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0},
+ { XK_Up, ShiftMask, "\033[1;2A", 0, 0},
+ { XK_Up, Mod1Mask, "\033[1;3A", 0, 0},
+ { XK_Up, ShiftMask|Mod1Mask,"\033[1;4A", 0, 0},
+ { XK_Up, ControlMask, "\033[1;5A", 0, 0},
+ { XK_Up, ShiftMask|ControlMask,"\033[1;6A", 0, 0},
+ { XK_Up, ControlMask|Mod1Mask,"\033[1;7A", 0, 0},
+ { XK_Up,ShiftMask|ControlMask|Mod1Mask,"\033[1;8A", 0, 0},
+ { XK_Up, XK_ANY_MOD, "\033[A", 0, -1},
+ { XK_Up, XK_ANY_MOD, "\033OA", 0, +1},
+ { XK_Down, ShiftMask, "\033[1;2B", 0, 0},
+ { XK_Down, Mod1Mask, "\033[1;3B", 0, 0},
+ { XK_Down, ShiftMask|Mod1Mask,"\033[1;4B", 0, 0},
+ { XK_Down, ControlMask, "\033[1;5B", 0, 0},
+ { XK_Down, ShiftMask|ControlMask,"\033[1;6B", 0, 0},
+ { XK_Down, ControlMask|Mod1Mask,"\033[1;7B", 0, 0},
+ { XK_Down,ShiftMask|ControlMask|Mod1Mask,"\033[1;8B",0, 0},
+ { XK_Down, XK_ANY_MOD, "\033[B", 0, -1},
+ { XK_Down, XK_ANY_MOD, "\033OB", 0, +1},
+ { XK_Left, ShiftMask, "\033[1;2D", 0, 0},
+ { XK_Left, Mod1Mask, "\033[1;3D", 0, 0},
+ { XK_Left, ShiftMask|Mod1Mask,"\033[1;4D", 0, 0},
+ { XK_Left, ControlMask, "\033[1;5D", 0, 0},
+ { XK_Left, ShiftMask|ControlMask,"\033[1;6D", 0, 0},
+ { XK_Left, ControlMask|Mod1Mask,"\033[1;7D", 0, 0},
+ { XK_Left,ShiftMask|ControlMask|Mod1Mask,"\033[1;8D",0, 0},
+ { XK_Left, XK_ANY_MOD, "\033[D", 0, -1},
+ { XK_Left, XK_ANY_MOD, "\033OD", 0, +1},
+ { XK_Right, ShiftMask, "\033[1;2C", 0, 0},
+ { XK_Right, Mod1Mask, "\033[1;3C", 0, 0},
+ { XK_Right, ShiftMask|Mod1Mask,"\033[1;4C", 0, 0},
+ { XK_Right, ControlMask, "\033[1;5C", 0, 0},
+ { XK_Right, ShiftMask|ControlMask,"\033[1;6C", 0, 0},
+ { XK_Right, ControlMask|Mod1Mask,"\033[1;7C", 0, 0},
+ { XK_Right,ShiftMask|ControlMask|Mod1Mask,"\033[1;8C",0, 0},
+ { XK_Right, XK_ANY_MOD, "\033[C", 0, -1},
+ { XK_Right, XK_ANY_MOD, "\033OC", 0, +1},
+ { XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0},
+ { XK_Return, Mod1Mask, "\033\r", 0, 0},
+ { XK_Return, XK_ANY_MOD, "\r", 0, 0},
+ { XK_Insert, ShiftMask, "\033[4l", -1, 0},
+ { XK_Insert, ShiftMask, "\033[2;2~", +1, 0},
+ { XK_Insert, ControlMask, "\033[L", -1, 0},
+ { XK_Insert, ControlMask, "\033[2;5~", +1, 0},
+ { XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
+ { XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
+ { XK_Delete, ControlMask, "\033[M", -1, 0},
+ { XK_Delete, ControlMask, "\033[3;5~", +1, 0},
+ { XK_Delete, ShiftMask, "\033[2K", -1, 0},
+ { XK_Delete, ShiftMask, "\033[3;2~", +1, 0},
+ { XK_Delete, XK_ANY_MOD, "\033[P", -1, 0},
+ { XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
+ { XK_BackSpace, XK_NO_MOD, "\177", 0, 0},
+ { XK_BackSpace, Mod1Mask, "\033\177", 0, 0},
+ { XK_Home, ShiftMask, "\033[2J", 0, -1},
+ { XK_Home, ShiftMask, "\033[1;2H", 0, +1},
+ { XK_Home, XK_ANY_MOD, "\033[H", 0, -1},
+ { XK_Home, XK_ANY_MOD, "\033[1~", 0, +1},
+ { XK_End, ControlMask, "\033[J", -1, 0},
+ { XK_End, ControlMask, "\033[1;5F", +1, 0},
+ { XK_End, ShiftMask, "\033[K", -1, 0},
+ { XK_End, ShiftMask, "\033[1;2F", +1, 0},
+ { XK_End, XK_ANY_MOD, "\033[4~", 0, 0},
+ { XK_Prior, ControlMask, "\033[5;5~", 0, 0},
+ { XK_Prior, ShiftMask, "\033[5;2~", 0, 0},
+ { XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
+ { XK_Next, ControlMask, "\033[6;5~", 0, 0},
+ { XK_Next, ShiftMask, "\033[6;2~", 0, 0},
+ { XK_Next, XK_ANY_MOD, "\033[6~", 0, 0},
+ { XK_F1, XK_NO_MOD, "\033OP" , 0, 0},
+ { XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0},
+ { XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0},
+ { XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0},
+ { XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0},
+ { XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0},
+ { XK_F2, XK_NO_MOD, "\033OQ" , 0, 0},
+ { XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0},
+ { XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0},
+ { XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0},
+ { XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0},
+ { XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0},
+ { XK_F3, XK_NO_MOD, "\033OR" , 0, 0},
+ { XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0},
+ { XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0},
+ { XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0},
+ { XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0},
+ { XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0},
+ { XK_F4, XK_NO_MOD, "\033OS" , 0, 0},
+ { XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0},
+ { XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0},
+ { XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0},
+ { XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0},
+ { XK_F5, XK_NO_MOD, "\033[15~", 0, 0},
+ { XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0},
+ { XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0},
+ { XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0},
+ { XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0},
+ { XK_F6, XK_NO_MOD, "\033[17~", 0, 0},
+ { XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0},
+ { XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0},
+ { XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0},
+ { XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0},
+ { XK_F7, XK_NO_MOD, "\033[18~", 0, 0},
+ { XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0},
+ { XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0},
+ { XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0},
+ { XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0},
+ { XK_F8, XK_NO_MOD, "\033[19~", 0, 0},
+ { XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0},
+ { XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0},
+ { XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0},
+ { XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0},
+ { XK_F9, XK_NO_MOD, "\033[20~", 0, 0},
+ { XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0},
+ { XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0},
+ { XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0},
+ { XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0},
+ { XK_F10, XK_NO_MOD, "\033[21~", 0, 0},
+ { XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0},
+ { XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0},
+ { XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0},
+ { XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0},
+ { XK_F11, XK_NO_MOD, "\033[23~", 0, 0},
+ { XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0},
+ { XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0},
+ { XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0},
+ { XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0},
+ { XK_F12, XK_NO_MOD, "\033[24~", 0, 0},
+ { XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0},
+ { XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0},
+ { XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0},
+ { XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0},
+ { XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0},
+ { XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0},
+ { XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0},
+ { XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0},
+ { XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0},
+ { XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0},
+ { XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0},
+ { XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0},
+ { XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0},
+ { XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0},
+ { XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0},
+ { XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0},
+ { XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0},
+ { XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0},
+ { XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0},
+ { XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0},
+ { XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0},
+ { XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0},
+ { XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0},
+ { XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0},
+ { XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0},
+ { XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0},
+ { XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0},
+};
+
+/*
+ * Selection types' masks.
+ * Use the same masks as usual.
+ * Button1Mask is always unset, to make masks match between ButtonPress.
+ * ButtonRelease and MotionNotify.
+ * If no match is found, regular selection is used.
+ */
+static uint selmasks[] = {
+ [SEL_RECTANGULAR] = Mod1Mask,
+};
+
+/*
+ * Printable characters in ASCII, used to estimate the advance width
+ * of single wide characters.
+ */
+static char ascii_printable[] =
+ " !\"#$%&'()*+,-./0123456789:;<=>?"
+ "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
+ "`abcdefghijklmnopqrstuvwxyz{|}~";
diff --git a/dwm/Repositories/st/config.mk b/dwm/Repositories/st/config.mk
new file mode 100644
index 0000000..ef6de39
--- /dev/null
+++ b/dwm/Repositories/st/config.mk
@@ -0,0 +1,37 @@
+# st version
+VERSION = 0.8.5
+
+# Customize below to fit your system
+
+# paths
+PREFIX = /usr/local
+MANPREFIX = $(PREFIX)/share/man
+
+X11INC = /usr/X11R6/include
+X11LIB = /usr/X11R6/lib
+
+PKG_CONFIG = pkg-config
+
+# includes and libs
+INCS = -I$(X11INC) \
+ `$(PKG_CONFIG) --cflags fontconfig` \
+ `$(PKG_CONFIG) --cflags freetype2` \
+ `$(PKG_CONFIG) --cflags harfbuzz`
+LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft -lXrender\
+ `$(PKG_CONFIG) --libs fontconfig` \
+ `$(PKG_CONFIG) --libs freetype2` \
+ `$(PKG_CONFIG) --libs harfbuzz`
+
+# flags
+STCPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600
+STCFLAGS = $(INCS) $(STCPPFLAGS) $(CPPFLAGS) $(CFLAGS)
+STLDFLAGS = $(LIBS) $(LDFLAGS)
+
+# OpenBSD:
+#CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
+#LIBS = -L$(X11LIB) -lm -lX11 -lutil -lXft \
+# `$(PKG_CONFIG) --libs fontconfig` \
+# `$(PKG_CONFIG) --libs freetype2`
+
+# compiler and linker
+# CC = c99
diff --git a/dwm/Repositories/st/hb.c b/dwm/Repositories/st/hb.c
new file mode 100644
index 0000000..8000afa
--- /dev/null
+++ b/dwm/Repositories/st/hb.c
@@ -0,0 +1,154 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+#include <X11/Xft/Xft.h>
+#include <X11/cursorfont.h>
+#include <hb.h>
+#include <hb-ft.h>
+
+#include "st.h"
+
+#define FEATURE(c1,c2,c3,c4) { .tag = HB_TAG(c1,c2,c3,c4), .value = 1, .start = HB_FEATURE_GLOBAL_START, .end = HB_FEATURE_GLOBAL_END }
+
+/*
+ * Replace 0 with a list of font features, wrapped in FEATURE macro, e.g.
+ * FEATURE('c', 'a', 'l', 't'), FEATURE('d', 'l', 'i', 'g')
+ *
+ * Uncomment either one of the 2 lines below. Uncomment the prior to disable (any) font features. Uncomment the
+ * latter to enable the (selected) font features.
+ */
+
+hb_feature_t features[] = { 0 };
+//hb_feature_t features[] = { FEATURE('s','s','0','1'), FEATURE('s','s','0','2'), FEATURE('s','s','0','3'), FEATURE('s','s','0','5'), FEATURE('s','s','0','6'), FEATURE('s','s','0','7'), FEATURE('s','s','0','8'), FEATURE('z','e','r','o') };
+
+void hbtransformsegment(XftFont *xfont, const Glyph *string, hb_codepoint_t *codepoints, int start, int length);
+hb_font_t *hbfindfont(XftFont *match);
+
+typedef struct {
+ XftFont *match;
+ hb_font_t *font;
+} HbFontMatch;
+
+static int hbfontslen = 0;
+static HbFontMatch *hbfontcache = NULL;
+
+void
+hbunloadfonts()
+{
+ for (int i = 0; i < hbfontslen; i++) {
+ hb_font_destroy(hbfontcache[i].font);
+ XftUnlockFace(hbfontcache[i].match);
+ }
+
+ if (hbfontcache != NULL) {
+ free(hbfontcache);
+ hbfontcache = NULL;
+ }
+ hbfontslen = 0;
+}
+
+hb_font_t *
+hbfindfont(XftFont *match)
+{
+ for (int i = 0; i < hbfontslen; i++) {
+ if (hbfontcache[i].match == match)
+ return hbfontcache[i].font;
+ }
+
+ /* Font not found in cache, caching it now. */
+ hbfontcache = realloc(hbfontcache, sizeof(HbFontMatch) * (hbfontslen + 1));
+ FT_Face face = XftLockFace(match);
+ hb_font_t *font = hb_ft_font_create(face, NULL);
+ if (font == NULL)
+ die("Failed to load Harfbuzz font.");
+
+ hbfontcache[hbfontslen].match = match;
+ hbfontcache[hbfontslen].font = font;
+ hbfontslen += 1;
+
+ return font;
+}
+
+void
+hbtransform(XftGlyphFontSpec *specs, const Glyph *glyphs, size_t len, int x, int y)
+{
+ int start = 0, length = 1, gstart = 0;
+ hb_codepoint_t *codepoints = calloc((unsigned int)len, sizeof(hb_codepoint_t));
+
+ for (int idx = 1, specidx = 1; idx < len; idx++) {
+ if (glyphs[idx].mode & ATTR_WDUMMY) {
+ length += 1;
+ continue;
+ }
+
+ if (specs[specidx].font != specs[start].font || ATTRCMP(glyphs[gstart], glyphs[idx]) || selected(x + idx, y) != selected(x + gstart, y)) {
+ hbtransformsegment(specs[start].font, glyphs, codepoints, gstart, length);
+
+ /* Reset the sequence. */
+ length = 1;
+ start = specidx;
+ gstart = idx;
+ } else {
+ length += 1;
+ }
+
+ specidx++;
+ }
+
+ /* EOL. */
+ hbtransformsegment(specs[start].font, glyphs, codepoints, gstart, length);
+
+ /* Apply the transformation to glyph specs. */
+ for (int i = 0, specidx = 0; i < len; i++) {
+ if (glyphs[i].mode & ATTR_WDUMMY)
+ continue;
+ if (glyphs[i].mode & ATTR_BOXDRAW) {
+ specidx++;
+ continue;
+ }
+
+ if (codepoints[i] != specs[specidx].glyph)
+ ((Glyph *)glyphs)[i].mode |= ATTR_LIGA;
+
+ specs[specidx++].glyph = codepoints[i];
+ }
+
+ free(codepoints);
+}
+
+void
+hbtransformsegment(XftFont *xfont, const Glyph *string, hb_codepoint_t *codepoints, int start, int length)
+{
+ hb_font_t *font = hbfindfont(xfont);
+ if (font == NULL)
+ return;
+
+ Rune rune;
+ ushort mode = USHRT_MAX;
+ hb_buffer_t *buffer = hb_buffer_create();
+ hb_buffer_set_direction(buffer, HB_DIRECTION_LTR);
+
+ /* Fill buffer with codepoints. */
+ for (int i = start; i < (start+length); i++) {
+ rune = string[i].u;
+ mode = string[i].mode;
+ if (mode & ATTR_WDUMMY)
+ rune = 0x0020;
+ hb_buffer_add_codepoints(buffer, &rune, 1, 0, 1);
+ }
+
+ /* Shape the segment. */
+ hb_shape(font, buffer, features, sizeof(features));
+
+ /* Get new glyph info. */
+ hb_glyph_info_t *info = hb_buffer_get_glyph_infos(buffer, NULL);
+
+ /* Write new codepoints. */
+ for (int i = 0; i < length; i++) {
+ hb_codepoint_t gid = info[i].codepoint;
+ codepoints[start+i] = gid;
+ }
+
+ /* Cleanup. */
+ hb_buffer_destroy(buffer);
+}
diff --git a/dwm/Repositories/st/hb.h b/dwm/Repositories/st/hb.h
new file mode 100644
index 0000000..b3e02d0
--- /dev/null
+++ b/dwm/Repositories/st/hb.h
@@ -0,0 +1,7 @@
+#include <X11/Xft/Xft.h>
+#include <hb.h>
+#include <hb-ft.h>
+
+void hbunloadfonts();
+void hbtransform(XftGlyphFontSpec *, const Glyph *, size_t, int, int);
+
diff --git a/dwm/Repositories/st/st-copyout b/dwm/Repositories/st/st-copyout
new file mode 100755
index 0000000..0d19e5a
--- /dev/null
+++ b/dwm/Repositories/st/st-copyout
@@ -0,0 +1,13 @@
+#!/bin/sh
+# Using external pipe with st, give a dmenu prompt of recent commands,
+# allowing the user to copy the output of one.
+# xclip required for this script.
+# By Jaywalker and Luke
+tmpfile=$(mktemp /tmp/st-cmd-output.XXXXXX)
+trap 'rm "$tmpfile"' 0 1 15
+sed -n "w $tmpfile"
+sed -i 's/\x0//g' "$tmpfile"
+ps1="$(grep "\S" "$tmpfile" | tail -n 1 | sed 's/^\s*//' | cut -d' ' -f1)"
+chosen="$(grep -F "$ps1" "$tmpfile" | sed '$ d' | tac | dmenu -p "Copy which command's output?" -i -l 10 | sed 's/[^^]/[&]/g; s/\^/\\^/g')"
+eps1="$(echo "$ps1" | sed 's/[^^]/[&]/g; s/\^/\\^/g')"
+awk "/^$chosen$/{p=1;print;next} p&&/$eps1/{p=0};p" "$tmpfile" | xclip -selection clipboard
diff --git a/dwm/Repositories/st/st-urlhandler b/dwm/Repositories/st/st-urlhandler
new file mode 100755
index 0000000..0eb4586
--- /dev/null
+++ b/dwm/Repositories/st/st-urlhandler
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+urlregex="(((http|https|gopher|gemini|ftp|ftps|git)://|www\\.)[a-zA-Z0-9.]*[:;a-zA-Z0-9./+@$&%?$\#=_~-]*)|((magnet:\\?xt=urn:btih:)[a-zA-Z0-9]*)"
+
+urls="$(sed 's/.*│//g' | tr -d '\n' | # First remove linebreaks and mutt sidebars:
+ grep -aEo "$urlregex" | # grep only urls as defined above.
+ uniq | # Ignore neighboring duplicates.
+ sed "s/\(\.\|,\|;\|\!\\|\?\)$//;
+ s/^www./http:\/\/www\./")" # xdg-open will not detect url without http
+
+[ -z "$urls" ] && exit 1
+
+while getopts "hoc" o; do case "${o}" in
+ h) printf "Optional arguments for custom use:\\n -c: copy\\n -o: xdg-open\\n -h: Show this message\\n" && exit 1 ;;
+ o) chosen="$(echo "$urls" | dmenu -i -p 'Follow which url?' -l 10)"
+ setsid xdg-open "$chosen" >/dev/null 2>&1 & ;;
+ c) echo "$urls" | dmenu -i -p 'Copy which url?' -l 10 | tr -d '\n' | xclip -selection clipboard ;;
+ *) printf "Invalid option: -%s\\n" "$OPTARG" && exit 1 ;;
+esac done
diff --git a/dwm/Repositories/st/st.1 b/dwm/Repositories/st/st.1
new file mode 100644
index 0000000..37f7e84
--- /dev/null
+++ b/dwm/Repositories/st/st.1
@@ -0,0 +1,193 @@
+.TH ST 1 st\-VERSION
+.SH NAME
+st \- simple terminal
+.SH SYNOPSIS
+.B st
+.RB [ \-aiv ]
+.RB [ \-c
+.IR class ]
+.RB [ \-f
+.IR font ]
+.RB [ \-g
+.IR geometry ]
+.RB [ \-n
+.IR name ]
+.RB [ \-o
+.IR iofile ]
+.RB [ \-T
+.IR title ]
+.RB [ \-t
+.IR title ]
+.RB [ \-l
+.IR line ]
+.RB [ \-w
+.IR windowid ]
+.RB [[ \-e ]
+.IR command
+.RI [ arguments ...]]
+.PP
+.B st
+.RB [ \-aiv ]
+.RB [ \-c
+.IR class ]
+.RB [ \-f
+.IR font ]
+.RB [ \-g
+.IR geometry ]
+.RB [ \-n
+.IR name ]
+.RB [ \-o
+.IR iofile ]
+.RB [ \-T
+.IR title ]
+.RB [ \-t
+.IR title ]
+.RB [ \-w
+.IR windowid ]
+.RB \-l
+.IR line
+.RI [ stty_args ...]
+.SH DESCRIPTION
+.B st
+is a simple terminal emulator.
+.SH OPTIONS
+.TP
+.B \-a
+disable alternate screens in terminal
+.TP
+.BI \-c " class"
+defines the window class (default $TERM).
+.TP
+.BI \-f " font"
+defines the
+.I font
+to use when st is run.
+.TP
+.BI \-g " geometry"
+defines the X11 geometry string.
+The form is [=][<cols>{xX}<rows>][{+-}<xoffset>{+-}<yoffset>]. See
+.BR XParseGeometry (3)
+for further details.
+.TP
+.B \-i
+will fixate the position given with the -g option.
+.TP
+.BI \-n " name"
+defines the window instance name (default $TERM).
+.TP
+.BI \-o " iofile"
+writes all the I/O to
+.I iofile.
+This feature is useful when recording st sessions. A value of "-" means
+standard output.
+.TP
+.BI \-T " title"
+defines the window title (default 'st').
+.TP
+.BI \-t " title"
+defines the window title (default 'st').
+.TP
+.BI \-w " windowid"
+embeds st within the window identified by
+.I windowid
+.TP
+.BI \-l " line"
+use a tty
+.I line
+instead of a pseudo terminal.
+.I line
+should be a (pseudo-)serial device (e.g. /dev/ttyS0 on Linux for serial port
+0).
+When this flag is given
+remaining arguments are used as flags for
+.BR stty(1).
+By default st initializes the serial line to 8 bits, no parity, 1 stop bit
+and a 38400 baud rate. The speed is set by appending it as last argument
+(e.g. 'st -l /dev/ttyS0 115200'). Arguments before the last one are
+.BR stty(1)
+flags. If you want to set odd parity on 115200 baud use for example 'st -l
+/dev/ttyS0 parenb parodd 115200'. Set the number of bits by using for
+example 'st -l /dev/ttyS0 cs7 115200'. See
+.BR stty(1)
+for more arguments and cases.
+.TP
+.B \-v
+prints version information to stderr, then exits.
+.TP
+.BI \-e " command " [ " arguments " "... ]"
+st executes
+.I command
+instead of the shell. If this is used it
+.B must be the last option
+on the command line, as in xterm / rxvt.
+This option is only intended for compatibility,
+and all the remaining arguments are used as a command
+even without it.
+.SH SHORTCUTS
+.TP
+.B Alt-j/k or Alt-Up/Down or Alt-Mouse Wheel
+Scroll up/down one line at a time.
+.TP
+.B Alt-u/d or Alt-Page Up/Page Down
+Scroll up/down one screen at a time.
+.TP
+.B Alt-Shift-k/j or Alt-Shift-Page Up/Page Down or Alt-Shift-Mouse Wheel
+Increase or decrease font size.
+.TP
+.B Alt-Home
+Reset to default font size.
+.TP
+.B Shift-Insert or Alt-v
+Paste from clipboard.
+.TP
+.B Alt-c
+Copy to clipboard.
+.TP
+.B Alt-p
+Paste/input primary selection.
+.TP
+.B Alt-l
+Show dmenu menu of all URLs on screen and choose one to open.
+.TP
+.B Alt-y
+Show dmenu menu of all URLs on screen and choose one to copy.
+.TP
+.B Alt-o
+Show dmenu menu of all recently run commands and copy the output of the chosen command to the clipboard.
+.I xclip
+required.
+.TP
+.B Alt-a/s
+Increase or decrease opacity/alpha value (make window more or less transparent).
+.TP
+.B Break
+Send a break in the serial line.
+Break key is obtained in PC keyboards
+pressing at the same time control and pause.
+.TP
+.B Ctrl-Print Screen
+Toggle if st should print to the
+.I iofile.
+.TP
+.B Shift-Print Screen
+Print the full screen to the
+.I iofile.
+.TP
+.B Print Screen
+Print the selection to the
+.I iofile.
+.SH CUSTOMIZATION
+.B st
+can be customized by creating a custom config.h and (re)compiling the source
+code. This keeps it fast, secure and simple.
+.SH AUTHORS
+See the LICENSE file for the authors.
+.SH LICENSE
+See the LICENSE file for the terms of redistribution.
+.SH SEE ALSO
+.BR tabbed (1),
+.BR utmp (1),
+.BR stty (1),
+.BR scroll (1)
+.SH BUGS
+See the TODO file in the distribution.
diff --git a/dwm/Repositories/st/st.c b/dwm/Repositories/st/st.c
new file mode 100644
index 0000000..0f4593e
--- /dev/null
+++ b/dwm/Repositories/st/st.c
@@ -0,0 +1,2816 @@
+/* See LICENSE for license details. */
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <pwd.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <signal.h>
+#include <sys/ioctl.h>
+#include <sys/select.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <termios.h>
+#include <unistd.h>
+#include <wchar.h>
+
+#include "st.h"
+#include "win.h"
+
+#if defined(__linux)
+ #include <pty.h>
+#elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
+ #include <util.h>
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
+ #include <libutil.h>
+#endif
+
+/* Arbitrary sizes */
+#define UTF_INVALID 0xFFFD
+#define UTF_SIZ 4
+#define ESC_BUF_SIZ (128*UTF_SIZ)
+#define ESC_ARG_SIZ 16
+#define STR_BUF_SIZ ESC_BUF_SIZ
+#define STR_ARG_SIZ ESC_ARG_SIZ
+#define HISTSIZE 2000
+
+/* macros */
+#define IS_SET(flag) ((term.mode & (flag)) != 0)
+#define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f) || (c) == 0x7f)
+#define ISCONTROLC1(c) (BETWEEN(c, 0x80, 0x9f))
+#define ISCONTROL(c) (ISCONTROLC0(c) || ISCONTROLC1(c))
+#define ISDELIM(u) (u && wcschr(worddelimiters, u))
+#define TLINE(y) ((y) < term.scr ? term.hist[((y) + term.histi - \
+ term.scr + HISTSIZE + 1) % HISTSIZE] : \
+ term.line[(y) - term.scr])
+#define TLINE_HIST(y) ((y) <= HISTSIZE-term.row+2 ? term.hist[(y)] : term.line[(y-HISTSIZE+term.row-3)])
+
+enum term_mode {
+ MODE_WRAP = 1 << 0,
+ MODE_INSERT = 1 << 1,
+ MODE_ALTSCREEN = 1 << 2,
+ MODE_CRLF = 1 << 3,
+ MODE_ECHO = 1 << 4,
+ MODE_PRINT = 1 << 5,
+ MODE_UTF8 = 1 << 6,
+};
+
+enum cursor_movement {
+ CURSOR_SAVE,
+ CURSOR_LOAD
+};
+
+enum cursor_state {
+ CURSOR_DEFAULT = 0,
+ CURSOR_WRAPNEXT = 1,
+ CURSOR_ORIGIN = 2
+};
+
+enum charset {
+ CS_GRAPHIC0,
+ CS_GRAPHIC1,
+ CS_UK,
+ CS_USA,
+ CS_MULTI,
+ CS_GER,
+ CS_FIN
+};
+
+enum escape_state {
+ ESC_START = 1,
+ ESC_CSI = 2,
+ ESC_STR = 4, /* DCS, OSC, PM, APC */
+ ESC_ALTCHARSET = 8,
+ ESC_STR_END = 16, /* a final string was encountered */
+ ESC_TEST = 32, /* Enter in test mode */
+ ESC_UTF8 = 64,
+};
+
+typedef struct {
+ Glyph attr; /* current char attributes */
+ int x;
+ int y;
+ char state;
+} TCursor;
+
+typedef struct {
+ int mode;
+ int type;
+ int snap;
+ /*
+ * Selection variables:
+ * nb – normalized coordinates of the beginning of the selection
+ * ne – normalized coordinates of the end of the selection
+ * ob – original coordinates of the beginning of the selection
+ * oe – original coordinates of the end of the selection
+ */
+ struct {
+ int x, y;
+ } nb, ne, ob, oe;
+
+ int alt;
+} Selection;
+
+/* Internal representation of the screen */
+typedef struct {
+ int row; /* nb row */
+ int col; /* nb col */
+ int maxcol;
+ Line *line; /* screen */
+ Line *alt; /* alternate screen */
+ Line hist[HISTSIZE]; /* history buffer */
+ int histi; /* history index */
+ int scr; /* scroll back */
+ int *dirty; /* dirtyness of lines */
+ TCursor c; /* cursor */
+ int ocx; /* old cursor col */
+ int ocy; /* old cursor row */
+ int top; /* top scroll limit */
+ int bot; /* bottom scroll limit */
+ int mode; /* terminal mode flags */
+ int esc; /* escape state flags */
+ char trantbl[4]; /* charset table translation */
+ int charset; /* current charset */
+ int icharset; /* selected charset for sequence */
+ int *tabs;
+ Rune lastc; /* last printed char outside of sequence, 0 if control */
+} Term;
+
+/* CSI Escape sequence structs */
+/* ESC '[' [[ [<priv>] <arg> [;]] <mode> [<mode>]] */
+typedef struct {
+ char buf[ESC_BUF_SIZ]; /* raw string */
+ size_t len; /* raw string length */
+ char priv;
+ int arg[ESC_ARG_SIZ];
+ int narg; /* nb of args */
+ char mode[2];
+} CSIEscape;
+
+/* STR Escape sequence structs */
+/* ESC type [[ [<priv>] <arg> [;]] <mode>] ESC '\' */
+typedef struct {
+ char type; /* ESC type ... */
+ char *buf; /* allocated raw string */
+ size_t siz; /* allocation size */
+ size_t len; /* raw string length */
+ char *args[STR_ARG_SIZ];
+ int narg; /* nb of args */
+} STREscape;
+
+static void execsh(char *, char **);
+static void stty(char **);
+static void sigchld(int);
+static void ttywriteraw(const char *, size_t);
+
+static void csidump(void);
+static void csihandle(void);
+static void csiparse(void);
+static void csireset(void);
+static void osc_color_response(int, int, int);
+static int eschandle(uchar);
+static void strdump(void);
+static void strhandle(void);
+static void strparse(void);
+static void strreset(void);
+
+static void tprinter(char *, size_t);
+static void tdumpsel(void);
+static void tdumpline(int);
+static void tdump(void);
+static void tclearregion(int, int, int, int);
+static void tcursor(int);
+static void tdeletechar(int);
+static void tdeleteline(int);
+static void tinsertblank(int);
+static void tinsertblankline(int);
+static int tlinelen(int);
+static void tmoveto(int, int);
+static void tmoveato(int, int);
+static void tnewline(int);
+static void tputtab(int);
+static void tputc(Rune);
+static void treset(void);
+static void tscrollup(int, int, int);
+static void tscrolldown(int, int, int);
+static void tsetattr(const int *, int);
+static void tsetchar(Rune, const Glyph *, int, int);
+static void tsetdirt(int, int);
+static void tsetscroll(int, int);
+static void tswapscreen(void);
+static void tsetmode(int, int, const int *, int);
+static int twrite(const char *, int, int);
+static void tcontrolcode(uchar );
+static void tdectest(char );
+static void tdefutf8(char);
+static int32_t tdefcolor(const int *, int *, int);
+static void tdeftran(char);
+static void tstrsequence(uchar);
+
+static void drawregion(int, int, int, int);
+
+static void selnormalize(void);
+static void selscroll(int, int);
+static void selsnap(int *, int *, int);
+
+static size_t utf8decode(const char *, Rune *, size_t);
+static Rune utf8decodebyte(char, size_t *);
+static char utf8encodebyte(Rune, size_t);
+static size_t utf8validate(Rune *, size_t);
+
+static char *base64dec(const char *);
+static char base64dec_getc(const char **);
+
+static ssize_t xwrite(int, const char *, size_t);
+
+/* Globals */
+static Term term;
+static Selection sel;
+static CSIEscape csiescseq;
+static STREscape strescseq;
+static int iofd = 1;
+static int cmdfd;
+static pid_t pid;
+
+static const uchar utfbyte[UTF_SIZ + 1] = {0x80, 0, 0xC0, 0xE0, 0xF0};
+static const uchar utfmask[UTF_SIZ + 1] = {0xC0, 0x80, 0xE0, 0xF0, 0xF8};
+static const Rune utfmin[UTF_SIZ + 1] = { 0, 0, 0x80, 0x800, 0x10000};
+static const Rune utfmax[UTF_SIZ + 1] = {0x10FFFF, 0x7F, 0x7FF, 0xFFFF, 0x10FFFF};
+
+ssize_t
+xwrite(int fd, const char *s, size_t len)
+{
+ size_t aux = len;
+ ssize_t r;
+
+ while (len > 0) {
+ r = write(fd, s, len);
+ if (r < 0)
+ return r;
+ len -= r;
+ s += r;
+ }
+
+ return aux;
+}
+
+void *
+xmalloc(size_t len)
+{
+ void *p;
+
+ if (!(p = malloc(len)))
+ die("malloc: %s\n", strerror(errno));
+
+ return p;
+}
+
+void *
+xrealloc(void *p, size_t len)
+{
+ if ((p = realloc(p, len)) == NULL)
+ die("realloc: %s\n", strerror(errno));
+
+ return p;
+}
+
+char *
+xstrdup(const char *s)
+{
+ if ((s = strdup(s)) == NULL)
+ die("strdup: %s\n", strerror(errno));
+ char *p;
+
+ if ((p = strdup(s)) == NULL)
+ die("strdup: %s\n", strerror(errno));
+
+ return p;
+}
+
+size_t
+utf8decode(const char *c, Rune *u, size_t clen)
+{
+ size_t i, j, len, type;
+ Rune udecoded;
+
+ *u = UTF_INVALID;
+ if (!clen)
+ return 0;
+ udecoded = utf8decodebyte(c[0], &len);
+ if (!BETWEEN(len, 1, UTF_SIZ))
+ return 1;
+ for (i = 1, j = 1; i < clen && j < len; ++i, ++j) {
+ udecoded = (udecoded << 6) | utf8decodebyte(c[i], &type);
+ if (type != 0)
+ return j;
+ }
+ if (j < len)
+ return 0;
+ *u = udecoded;
+ utf8validate(u, len);
+
+ return len;
+}
+
+Rune
+utf8decodebyte(char c, size_t *i)
+{
+ for (*i = 0; *i < LEN(utfmask); ++(*i))
+ if (((uchar)c & utfmask[*i]) == utfbyte[*i])
+ return (uchar)c & ~utfmask[*i];
+
+ return 0;
+}
+
+size_t
+utf8encode(Rune u, char *c)
+{
+ size_t len, i;
+
+ len = utf8validate(&u, 0);
+ if (len > UTF_SIZ)
+ return 0;
+
+ for (i = len - 1; i != 0; --i) {
+ c[i] = utf8encodebyte(u, 0);
+ u >>= 6;
+ }
+ c[0] = utf8encodebyte(u, len);
+
+ return len;
+}
+
+char
+utf8encodebyte(Rune u, size_t i)
+{
+ return utfbyte[i] | (u & ~utfmask[i]);
+}
+
+size_t
+utf8validate(Rune *u, size_t i)
+{
+ if (!BETWEEN(*u, utfmin[i], utfmax[i]) || BETWEEN(*u, 0xD800, 0xDFFF))
+ *u = UTF_INVALID;
+ for (i = 1; *u > utfmax[i]; ++i)
+ ;
+
+ return i;
+}
+
+char
+base64dec_getc(const char **src)
+{
+ while (**src && !isprint((unsigned char)**src))
+ (*src)++;
+ return **src ? *((*src)++) : '='; /* emulate padding if string ends */
+}
+
+char *
+base64dec(const char *src)
+{
+ size_t in_len = strlen(src);
+ char *result, *dst;
+ static const char base64_digits[256] = {
+ [43] = 62, 0, 0, 0, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
+ 0, 0, 0, -1, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 0, 0, 0,
+ 0, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51
+ };
+
+ if (in_len % 4)
+ in_len += 4 - (in_len % 4);
+ result = dst = xmalloc(in_len / 4 * 3 + 1);
+ while (*src) {
+ int a = base64_digits[(unsigned char) base64dec_getc(&src)];
+ int b = base64_digits[(unsigned char) base64dec_getc(&src)];
+ int c = base64_digits[(unsigned char) base64dec_getc(&src)];
+ int d = base64_digits[(unsigned char) base64dec_getc(&src)];
+
+ /* invalid input. 'a' can be -1, e.g. if src is "\n" (c-str) */
+ if (a == -1 || b == -1)
+ break;
+
+ *dst++ = (a << 2) | ((b & 0x30) >> 4);
+ if (c == -1)
+ break;
+ *dst++ = ((b & 0x0f) << 4) | ((c & 0x3c) >> 2);
+ if (d == -1)
+ break;
+ *dst++ = ((c & 0x03) << 6) | d;
+ }
+ *dst = '\0';
+ return result;
+}
+
+void
+selinit(void)
+{
+ sel.mode = SEL_IDLE;
+ sel.snap = 0;
+ sel.ob.x = -1;
+}
+
+int
+tlinelen(int y)
+{
+ int i = term.col;
+
+ if (TLINE(y)[i - 1].mode & ATTR_WRAP)
+ return i;
+
+ while (i > 0 && TLINE(y)[i - 1].u == ' ')
+ --i;
+
+ return i;
+}
+
+int
+tlinehistlen(int y)
+{
+ int i = term.col;
+
+ if (TLINE_HIST(y)[i - 1].mode & ATTR_WRAP)
+ return i;
+
+ while (i > 0 && TLINE_HIST(y)[i - 1].u == ' ')
+ --i;
+
+ return i;
+}
+
+void
+selstart(int col, int row, int snap)
+{
+ selclear();
+ sel.mode = SEL_EMPTY;
+ sel.type = SEL_REGULAR;
+ sel.alt = IS_SET(MODE_ALTSCREEN);
+ sel.snap = snap;
+ sel.oe.x = sel.ob.x = col;
+ sel.oe.y = sel.ob.y = row;
+ selnormalize();
+
+ if (sel.snap != 0)
+ sel.mode = SEL_READY;
+ tsetdirt(sel.nb.y, sel.ne.y);
+}
+
+void
+selextend(int col, int row, int type, int done)
+{
+ int oldey, oldex, oldsby, oldsey, oldtype;
+
+ if (sel.mode == SEL_IDLE)
+ return;
+ if (done && sel.mode == SEL_EMPTY) {
+ selclear();
+ return;
+ }
+
+ oldey = sel.oe.y;
+ oldex = sel.oe.x;
+ oldsby = sel.nb.y;
+ oldsey = sel.ne.y;
+ oldtype = sel.type;
+
+ sel.oe.x = col;
+ sel.oe.y = row;
+ selnormalize();
+ sel.type = type;
+
+ if (oldey != sel.oe.y || oldex != sel.oe.x || oldtype != sel.type || sel.mode == SEL_EMPTY)
+ tsetdirt(MIN(sel.nb.y, oldsby), MAX(sel.ne.y, oldsey));
+
+ sel.mode = done ? SEL_IDLE : SEL_READY;
+}
+
+
+void
+selnormalize(void)
+{
+ int i;
+
+ if (sel.type == SEL_REGULAR && sel.ob.y != sel.oe.y) {
+ sel.nb.x = sel.ob.y < sel.oe.y ? sel.ob.x : sel.oe.x;
+ sel.ne.x = sel.ob.y < sel.oe.y ? sel.oe.x : sel.ob.x;
+ } else {
+ sel.nb.x = MIN(sel.ob.x, sel.oe.x);
+ sel.ne.x = MAX(sel.ob.x, sel.oe.x);
+ }
+ sel.nb.y = MIN(sel.ob.y, sel.oe.y);
+ sel.ne.y = MAX(sel.ob.y, sel.oe.y);
+
+ selsnap(&sel.nb.x, &sel.nb.y, -1);
+ selsnap(&sel.ne.x, &sel.ne.y, +1);
+
+ /* expand selection over line breaks */
+ if (sel.type == SEL_RECTANGULAR)
+ return;
+ i = tlinelen(sel.nb.y);
+ if (i < sel.nb.x)
+ sel.nb.x = i;
+ if (tlinelen(sel.ne.y) <= sel.ne.x)
+ sel.ne.x = term.col - 1;
+}
+
+int
+selected(int x, int y)
+{
+ if (sel.mode == SEL_EMPTY || sel.ob.x == -1 ||
+ sel.alt != IS_SET(MODE_ALTSCREEN))
+ return 0;
+
+ if (sel.type == SEL_RECTANGULAR)
+ return BETWEEN(y, sel.nb.y, sel.ne.y)
+ && BETWEEN(x, sel.nb.x, sel.ne.x);
+
+ return BETWEEN(y, sel.nb.y, sel.ne.y)
+ && (y != sel.nb.y || x >= sel.nb.x)
+ && (y != sel.ne.y || x <= sel.ne.x);
+}
+
+void
+selsnap(int *x, int *y, int direction)
+{
+ int newx, newy, xt, yt;
+ int delim, prevdelim;
+ const Glyph *gp, *prevgp;
+
+ switch (sel.snap) {
+ case SNAP_WORD:
+ /*
+ * Snap around if the word wraps around at the end or
+ * beginning of a line.
+ */
+ prevgp = &TLINE(*y)[*x];
+ prevdelim = ISDELIM(prevgp->u);
+ for (;;) {
+ newx = *x + direction;
+ newy = *y;
+ if (!BETWEEN(newx, 0, term.col - 1)) {
+ newy += direction;
+ newx = (newx + term.col) % term.col;
+ if (!BETWEEN(newy, 0, term.row - 1))
+ break;
+
+ if (direction > 0)
+ yt = *y, xt = *x;
+ else
+ yt = newy, xt = newx;
+ if (!(TLINE(yt)[xt].mode & ATTR_WRAP))
+ break;
+ }
+
+ if (newx >= tlinelen(newy))
+ break;
+
+ gp = &TLINE(newy)[newx];
+ delim = ISDELIM(gp->u);
+ if (!(gp->mode & ATTR_WDUMMY) && (delim != prevdelim
+ || (delim && gp->u != prevgp->u)))
+ break;
+
+ *x = newx;
+ *y = newy;
+ prevgp = gp;
+ prevdelim = delim;
+ }
+ break;
+ case SNAP_LINE:
+ /*
+ * Snap around if the the previous line or the current one
+ * has set ATTR_WRAP at its end. Then the whole next or
+ * previous line will be selected.
+ */
+ *x = (direction < 0) ? 0 : term.col - 1;
+ if (direction < 0) {
+ for (; *y > 0; *y += direction) {
+ if (!(TLINE(*y-1)[term.col-1].mode
+ & ATTR_WRAP)) {
+ break;
+ }
+ }
+ } else if (direction > 0) {
+ for (; *y < term.row-1; *y += direction) {
+ if (!(TLINE(*y)[term.col-1].mode
+ & ATTR_WRAP)) {
+ break;
+ }
+ }
+ }
+ break;
+ }
+}
+
+char *
+getsel(void)
+{
+ char *str, *ptr;
+ int y, bufsize, lastx, linelen;
+ const Glyph *gp, *last;
+
+ if (sel.ob.x == -1)
+ return NULL;
+
+ bufsize = (term.col+1) * (sel.ne.y-sel.nb.y+1) * UTF_SIZ;
+ ptr = str = xmalloc(bufsize);
+
+ /* append every set & selected glyph to the selection */
+ for (y = sel.nb.y; y <= sel.ne.y; y++) {
+ if ((linelen = tlinelen(y)) == 0) {
+ *ptr++ = '\n';
+ continue;
+ }
+
+ if (sel.type == SEL_RECTANGULAR) {
+ gp = &TLINE(y)[sel.nb.x];
+ lastx = sel.ne.x;
+ } else {
+ gp = &TLINE(y)[sel.nb.y == y ? sel.nb.x : 0];
+ lastx = (sel.ne.y == y) ? sel.ne.x : term.col-1;
+ }
+ last = &TLINE(y)[MIN(lastx, linelen-1)];
+ while (last >= gp && last->u == ' ')
+ --last;
+
+ for ( ; gp <= last; ++gp) {
+ if (gp->mode & ATTR_WDUMMY)
+ continue;
+
+ ptr += utf8encode(gp->u, ptr);
+ }
+
+ /*
+ * Copy and pasting of line endings is inconsistent
+ * in the inconsistent terminal and GUI world.
+ * The best solution seems like to produce '\n' when
+ * something is copied from st and convert '\n' to
+ * '\r', when something to be pasted is received by
+ * st.
+ * FIXME: Fix the computer world.
+ */
+ if ((y < sel.ne.y || lastx >= linelen) &&
+ (!(last->mode & ATTR_WRAP) || sel.type == SEL_RECTANGULAR))
+ *ptr++ = '\n';
+ }
+ *ptr = 0;
+ return str;
+}
+
+void
+selclear(void)
+{
+ if (sel.ob.x == -1)
+ return;
+ sel.mode = SEL_IDLE;
+ sel.ob.x = -1;
+ tsetdirt(sel.nb.y, sel.ne.y);
+}
+
+void
+die(const char *errstr, ...)
+{
+ va_list ap;
+
+ va_start(ap, errstr);
+ vfprintf(stderr, errstr, ap);
+ va_end(ap);
+ exit(1);
+}
+
+void
+execsh(char *cmd, char **args)
+{
+ char *sh, *prog, *arg;
+ const struct passwd *pw;
+
+ errno = 0;
+ if ((pw = getpwuid(getuid())) == NULL) {
+ if (errno)
+ die("getpwuid: %s\n", strerror(errno));
+ else
+ die("who are you?\n");
+ }
+
+ if ((sh = getenv("SHELL")) == NULL)
+ sh = (pw->pw_shell[0]) ? pw->pw_shell : cmd;
+
+ if (args) {
+ prog = args[0];
+ arg = NULL;
+ } else if (scroll) {
+ prog = scroll;
+ arg = utmp ? utmp : sh;
+ } else if (utmp) {
+ prog = utmp;
+ arg = NULL;
+ } else {
+ prog = sh;
+ arg = NULL;
+ }
+ DEFAULT(args, ((char *[]) {prog, arg, NULL}));
+
+ unsetenv("COLUMNS");
+ unsetenv("LINES");
+ unsetenv("TERMCAP");
+ setenv("LOGNAME", pw->pw_name, 1);
+ setenv("USER", pw->pw_name, 1);
+ setenv("SHELL", sh, 1);
+ setenv("HOME", pw->pw_dir, 1);
+ setenv("TERM", termname, 1);
+
+ signal(SIGCHLD, SIG_DFL);
+ signal(SIGHUP, SIG_DFL);
+ signal(SIGINT, SIG_DFL);
+ signal(SIGQUIT, SIG_DFL);
+ signal(SIGTERM, SIG_DFL);
+ signal(SIGALRM, SIG_DFL);
+
+ execvp(prog, args);
+ _exit(1);
+}
+
+void
+sigchld(int a)
+{
+ int stat;
+ pid_t p;
+
+ if ((p = waitpid(pid, &stat, WNOHANG)) < 0)
+ die("waiting for pid %hd failed: %s\n", pid, strerror(errno));
+
+ if (pid != p)
+ return;
+
+ if (WIFEXITED(stat) && WEXITSTATUS(stat))
+ die("child exited with status %d\n", WEXITSTATUS(stat));
+ else if (WIFSIGNALED(stat))
+ die("child terminated due to signal %d\n", WTERMSIG(stat));
+ _exit(0);
+}
+
+void
+stty(char **args)
+{
+ char cmd[_POSIX_ARG_MAX], **p, *q, *s;
+ size_t n, siz;
+
+ if ((n = strlen(stty_args)) > sizeof(cmd)-1)
+ die("incorrect stty parameters\n");
+ memcpy(cmd, stty_args, n);
+ q = cmd + n;
+ siz = sizeof(cmd) - n;
+ for (p = args; p && (s = *p); ++p) {
+ if ((n = strlen(s)) > siz-1)
+ die("stty parameter length too long\n");
+ *q++ = ' ';
+ memcpy(q, s, n);
+ q += n;
+ siz -= n + 1;
+ }
+ *q = '\0';
+ if (system(cmd) != 0)
+ perror("Couldn't call stty");
+}
+
+int
+ttynew(const char *line, char *cmd, const char *out, char **args)
+{
+ int m, s;
+
+ if (out) {
+ term.mode |= MODE_PRINT;
+ iofd = (!strcmp(out, "-")) ?
+ 1 : open(out, O_WRONLY | O_CREAT, 0666);
+ if (iofd < 0) {
+ fprintf(stderr, "Error opening %s:%s\n",
+ out, strerror(errno));
+ }
+ }
+
+ if (line) {
+ if ((cmdfd = open(line, O_RDWR)) < 0)
+ die("open line '%s' failed: %s\n",
+ line, strerror(errno));
+ dup2(cmdfd, 0);
+ stty(args);
+ return cmdfd;
+ }
+
+ /* seems to work fine on linux, openbsd and freebsd */
+ if (openpty(&m, &s, NULL, NULL, NULL) < 0)
+ die("openpty failed: %s\n", strerror(errno));
+
+ switch (pid = fork()) {
+ case -1:
+ die("fork failed: %s\n", strerror(errno));
+ break;
+ case 0:
+ close(iofd);
+ close(m);
+ setsid(); /* create a new process group */
+ dup2(s, 0);
+ dup2(s, 1);
+ dup2(s, 2);
+ if (ioctl(s, TIOCSCTTY, NULL) < 0)
+ die("ioctl TIOCSCTTY failed: %s\n", strerror(errno));
+ if (s > 2)
+ close(s);
+#ifdef __OpenBSD__
+ if (pledge("stdio getpw proc exec", NULL) == -1)
+ die("pledge\n");
+#endif
+ execsh(cmd, args);
+ break;
+ default:
+#ifdef __OpenBSD__
+ if (pledge("stdio rpath tty proc", NULL) == -1)
+ die("pledge\n");
+#endif
+ close(s);
+ cmdfd = m;
+ signal(SIGCHLD, sigchld);
+ break;
+ }
+ return cmdfd;
+}
+
+size_t
+ttyread(void)
+{
+ static char buf[BUFSIZ];
+ static int buflen = 0;
+ int ret, written;
+
+ /* append read bytes to unprocessed bytes */
+ ret = read(cmdfd, buf+buflen, LEN(buf)-buflen);
+
+ switch (ret) {
+ case 0:
+ exit(0);
+ case -1:
+ die("couldn't read from shell: %s\n", strerror(errno));
+ default:
+ buflen += ret;
+ written = twrite(buf, buflen, 0);
+ buflen -= written;
+ /* keep any incomplete UTF-8 byte sequence for the next call */
+ if (buflen > 0)
+ memmove(buf, buf + written, buflen);
+ return ret;
+ }
+}
+
+void
+ttywrite(const char *s, size_t n, int may_echo)
+{
+ const char *next;
+ Arg arg = (Arg) { .i = term.scr };
+
+ kscrolldown(&arg);
+
+ if (may_echo && IS_SET(MODE_ECHO))
+ twrite(s, n, 1);
+
+ if (!IS_SET(MODE_CRLF)) {
+ ttywriteraw(s, n);
+ return;
+ }
+
+ /* This is similar to how the kernel handles ONLCR for ttys */
+ while (n > 0) {
+ if (*s == '\r') {
+ next = s + 1;
+ ttywriteraw("\r\n", 2);
+ } else {
+ next = memchr(s, '\r', n);
+ DEFAULT(next, s + n);
+ ttywriteraw(s, next - s);
+ }
+ n -= next - s;
+ s = next;
+ }
+}
+
+void
+ttywriteraw(const char *s, size_t n)
+{
+ fd_set wfd, rfd;
+ ssize_t r;
+ size_t lim = 256;
+
+ /*
+ * Remember that we are using a pty, which might be a modem line.
+ * Writing too much will clog the line. That's why we are doing this
+ * dance.
+ * FIXME: Migrate the world to Plan 9.
+ */
+ while (n > 0) {
+ FD_ZERO(&wfd);
+ FD_ZERO(&rfd);
+ FD_SET(cmdfd, &wfd);
+ FD_SET(cmdfd, &rfd);
+
+ /* Check if we can write. */
+ if (pselect(cmdfd+1, &rfd, &wfd, NULL, NULL, NULL) < 0) {
+ if (errno == EINTR)
+ continue;
+ die("select failed: %s\n", strerror(errno));
+ }
+ if (FD_ISSET(cmdfd, &wfd)) {
+ /*
+ * Only write the bytes written by ttywrite() or the
+ * default of 256. This seems to be a reasonable value
+ * for a serial line. Bigger values might clog the I/O.
+ */
+ if ((r = write(cmdfd, s, (n < lim)? n : lim)) < 0)
+ goto write_error;
+ if (r < n) {
+ /*
+ * We weren't able to write out everything.
+ * This means the buffer is getting full
+ * again. Empty it.
+ */
+ if (n < lim)
+ lim = ttyread();
+ n -= r;
+ s += r;
+ } else {
+ /* All bytes have been written. */
+ break;
+ }
+ }
+ if (FD_ISSET(cmdfd, &rfd))
+ lim = ttyread();
+ }
+ return;
+
+write_error:
+ die("write error on tty: %s\n", strerror(errno));
+}
+
+void
+ttyresize(int tw, int th)
+{
+ struct winsize w;
+
+ w.ws_row = term.row;
+ w.ws_col = term.col;
+ w.ws_xpixel = tw;
+ w.ws_ypixel = th;
+ if (ioctl(cmdfd, TIOCSWINSZ, &w) < 0)
+ fprintf(stderr, "Couldn't set window size: %s\n", strerror(errno));
+}
+
+void
+ttyhangup(void)
+{
+ /* Send SIGHUP to shell */
+ kill(pid, SIGHUP);
+}
+
+int
+tattrset(int attr)
+{
+ int i, j;
+
+ for (i = 0; i < term.row-1; i++) {
+ for (j = 0; j < term.col-1; j++) {
+ if (term.line[i][j].mode & attr)
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+void
+tsetdirt(int top, int bot)
+{
+ int i;
+
+ LIMIT(top, 0, term.row-1);
+ LIMIT(bot, 0, term.row-1);
+
+ for (i = top; i <= bot; i++)
+ term.dirty[i] = 1;
+}
+
+void
+tsetdirtattr(int attr)
+{
+ int i, j;
+
+ for (i = 0; i < term.row-1; i++) {
+ for (j = 0; j < term.col-1; j++) {
+ if (term.line[i][j].mode & attr) {
+ tsetdirt(i, i);
+ break;
+ }
+ }
+ }
+}
+
+void
+tfulldirt(void)
+{
+ tsetdirt(0, term.row-1);
+}
+
+void
+tcursor(int mode)
+{
+ static TCursor c[2];
+ int alt = IS_SET(MODE_ALTSCREEN);
+
+ if (mode == CURSOR_SAVE) {
+ c[alt] = term.c;
+ } else if (mode == CURSOR_LOAD) {
+ term.c = c[alt];
+ tmoveto(c[alt].x, c[alt].y);
+ }
+}
+
+void
+treset(void)
+{
+ uint i;
+
+ term.c = (TCursor){{
+ .mode = ATTR_NULL,
+ .fg = defaultfg,
+ .bg = defaultbg
+ }, .x = 0, .y = 0, .state = CURSOR_DEFAULT};
+
+ memset(term.tabs, 0, term.col * sizeof(*term.tabs));
+ for (i = tabspaces; i < term.col; i += tabspaces)
+ term.tabs[i] = 1;
+ term.top = 0;
+ term.bot = term.row - 1;
+ term.mode = MODE_WRAP|MODE_UTF8;
+ memset(term.trantbl, CS_USA, sizeof(term.trantbl));
+ term.charset = 0;
+
+ for (i = 0; i < 2; i++) {
+ tmoveto(0, 0);
+ tcursor(CURSOR_SAVE);
+ tclearregion(0, 0, term.col-1, term.row-1);
+ tswapscreen();
+ }
+}
+
+void
+tnew(int col, int row)
+{
+ term = (Term){ .c = { .attr = { .fg = defaultfg, .bg = defaultbg } } };
+ tresize(col, row);
+ treset();
+}
+
+void
+tswapscreen(void)
+{
+ Line *tmp = term.line;
+
+ term.line = term.alt;
+ term.alt = tmp;
+ term.mode ^= MODE_ALTSCREEN;
+ tfulldirt();
+}
+
+void
+kscrolldown(const Arg* a)
+{
+ int n = a->i;
+
+ if (n < 0)
+ n = term.row + n;
+
+ if (n > term.scr)
+ n = term.scr;
+
+ if (term.scr > 0) {
+ term.scr -= n;
+ selscroll(0, -n);
+ tfulldirt();
+ }
+}
+
+void
+kscrollup(const Arg* a)
+{
+ int n = a->i;
+
+ if (n < 0)
+ n = term.row + n;
+
+ if (term.scr <= HISTSIZE-n) {
+ term.scr += n;
+ selscroll(0, n);
+ tfulldirt();
+ }
+}
+
+void
+tscrolldown(int orig, int n, int copyhist)
+{
+ int i;
+ Line temp;
+
+ LIMIT(n, 0, term.bot-orig+1);
+
+ if (copyhist) {
+ term.histi = (term.histi - 1 + HISTSIZE) % HISTSIZE;
+ temp = term.hist[term.histi];
+ term.hist[term.histi] = term.line[term.bot];
+ term.line[term.bot] = temp;
+ }
+
+ tsetdirt(orig, term.bot-n);
+ tclearregion(0, term.bot-n+1, term.col-1, term.bot);
+
+ for (i = term.bot; i >= orig+n; i--) {
+ temp = term.line[i];
+ term.line[i] = term.line[i-n];
+ term.line[i-n] = temp;
+ }
+
+ if (term.scr == 0)
+ selscroll(orig, n);
+}
+
+void
+tscrollup(int orig, int n, int copyhist)
+{
+ int i;
+ Line temp;
+
+ LIMIT(n, 0, term.bot-orig+1);
+
+ if (copyhist) {
+ term.histi = (term.histi + 1) % HISTSIZE;
+ temp = term.hist[term.histi];
+ term.hist[term.histi] = term.line[orig];
+ term.line[orig] = temp;
+ }
+
+ if (term.scr > 0 && term.scr < HISTSIZE)
+ term.scr = MIN(term.scr + n, HISTSIZE-1);
+
+ tclearregion(0, orig, term.col-1, orig+n-1);
+ tsetdirt(orig+n, term.bot);
+
+ for (i = orig; i <= term.bot-n; i++) {
+ temp = term.line[i];
+ term.line[i] = term.line[i+n];
+ term.line[i+n] = temp;
+ }
+
+ if (term.scr == 0)
+ selscroll(orig, -n);
+}
+
+void
+selscroll(int orig, int n)
+{
+ if (sel.ob.x == -1)
+ return;
+
+ if (BETWEEN(sel.nb.y, orig, term.bot) != BETWEEN(sel.ne.y, orig, term.bot)) {
+ selclear();
+ } else if (BETWEEN(sel.nb.y, orig, term.bot)) {
+ sel.ob.y += n;
+ sel.oe.y += n;
+ if (sel.ob.y < term.top || sel.ob.y > term.bot ||
+ sel.oe.y < term.top || sel.oe.y > term.bot) {
+ selclear();
+ } else {
+ selnormalize();
+ }
+ }
+}
+
+void
+tnewline(int first_col)
+{
+ int y = term.c.y;
+
+ if (y == term.bot) {
+ tscrollup(term.top, 1, 1);
+ } else {
+ y++;
+ }
+ tmoveto(first_col ? 0 : term.c.x, y);
+}
+
+void
+csiparse(void)
+{
+ char *p = csiescseq.buf, *np;
+ long int v;
+
+ csiescseq.narg = 0;
+ if (*p == '?') {
+ csiescseq.priv = 1;
+ p++;
+ }
+
+ csiescseq.buf[csiescseq.len] = '\0';
+ while (p < csiescseq.buf+csiescseq.len) {
+ np = NULL;
+ v = strtol(p, &np, 10);
+ if (np == p)
+ v = 0;
+ if (v == LONG_MAX || v == LONG_MIN)
+ v = -1;
+ csiescseq.arg[csiescseq.narg++] = v;
+ p = np;
+ if (*p != ';' || csiescseq.narg == ESC_ARG_SIZ)
+ break;
+ p++;
+ }
+ csiescseq.mode[0] = *p++;
+ csiescseq.mode[1] = (p < csiescseq.buf+csiescseq.len) ? *p : '\0';
+}
+
+/* for absolute user moves, when decom is set */
+void
+tmoveato(int x, int y)
+{
+ tmoveto(x, y + ((term.c.state & CURSOR_ORIGIN) ? term.top: 0));
+}
+
+void
+tmoveto(int x, int y)
+{
+ int miny, maxy;
+
+ if (term.c.state & CURSOR_ORIGIN) {
+ miny = term.top;
+ maxy = term.bot;
+ } else {
+ miny = 0;
+ maxy = term.row - 1;
+ }
+ term.c.state &= ~CURSOR_WRAPNEXT;
+ term.c.x = LIMIT(x, 0, term.col-1);
+ term.c.y = LIMIT(y, miny, maxy);
+}
+
+void
+tsetchar(Rune u, const Glyph *attr, int x, int y)
+{
+ static const char *vt100_0[62] = { /* 0x41 - 0x7e */
+ "↑", "↓", "→", "←", "█", "▚", "☃", /* A - G */
+ 0, 0, 0, 0, 0, 0, 0, 0, /* H - O */
+ 0, 0, 0, 0, 0, 0, 0, 0, /* P - W */
+ 0, 0, 0, 0, 0, 0, 0, " ", /* X - _ */
+ "◆", "▒", "␉", "␌", "␍", "␊", "°", "±", /* ` - g */
+ "␤", "␋", "┘", "┐", "┌", "└", "┼", "⎺", /* h - o */
+ "⎻", "─", "⎼", "⎽", "├", "┤", "┴", "┬", /* p - w */
+ "│", "≤", "≥", "π", "≠", "£", "·", /* x - ~ */
+ };
+
+ /*
+ * The table is proudly stolen from rxvt.
+ */
+ if (term.trantbl[term.charset] == CS_GRAPHIC0 &&
+ BETWEEN(u, 0x41, 0x7e) && vt100_0[u - 0x41])
+ utf8decode(vt100_0[u - 0x41], &u, UTF_SIZ);
+
+ if (term.line[y][x].mode & ATTR_WIDE) {
+ if (x+1 < term.col) {
+ term.line[y][x+1].u = ' ';
+ term.line[y][x+1].mode &= ~ATTR_WDUMMY;
+ }
+ } else if (term.line[y][x].mode & ATTR_WDUMMY) {
+ term.line[y][x-1].u = ' ';
+ term.line[y][x-1].mode &= ~ATTR_WIDE;
+ }
+
+ term.dirty[y] = 1;
+ term.line[y][x] = *attr;
+ term.line[y][x].u = u;
+
+ if (isboxdraw(u))
+ term.line[y][x].mode |= ATTR_BOXDRAW;
+}
+
+void
+tclearregion(int x1, int y1, int x2, int y2)
+{
+ int x, y, temp;
+ Glyph *gp;
+
+ if (x1 > x2)
+ temp = x1, x1 = x2, x2 = temp;
+ if (y1 > y2)
+ temp = y1, y1 = y2, y2 = temp;
+
+ LIMIT(x1, 0, term.maxcol-1);
+ LIMIT(x2, 0, term.maxcol-1);
+ LIMIT(y1, 0, term.row-1);
+ LIMIT(y2, 0, term.row-1);
+
+ for (y = y1; y <= y2; y++) {
+ term.dirty[y] = 1;
+ for (x = x1; x <= x2; x++) {
+ gp = &term.line[y][x];
+ if (selected(x, y))
+ selclear();
+ gp->fg = term.c.attr.fg;
+ gp->bg = term.c.attr.bg;
+ gp->mode = 0;
+ gp->u = ' ';
+ }
+ }
+}
+
+void
+tdeletechar(int n)
+{
+ int dst, src, size;
+ Glyph *line;
+
+ LIMIT(n, 0, term.col - term.c.x);
+
+ dst = term.c.x;
+ src = term.c.x + n;
+ size = term.col - src;
+ line = term.line[term.c.y];
+
+ memmove(&line[dst], &line[src], size * sizeof(Glyph));
+ tclearregion(term.col-n, term.c.y, term.col-1, term.c.y);
+}
+
+void
+tinsertblank(int n)
+{
+ int dst, src, size;
+ Glyph *line;
+
+ LIMIT(n, 0, term.col - term.c.x);
+
+ dst = term.c.x + n;
+ src = term.c.x;
+ size = term.col - dst;
+ line = term.line[term.c.y];
+
+ memmove(&line[dst], &line[src], size * sizeof(Glyph));
+ tclearregion(src, term.c.y, dst - 1, term.c.y);
+}
+
+void
+tinsertblankline(int n)
+{
+ if (BETWEEN(term.c.y, term.top, term.bot))
+ tscrolldown(term.c.y, n, 0);
+}
+
+void
+tdeleteline(int n)
+{
+ if (BETWEEN(term.c.y, term.top, term.bot))
+ tscrollup(term.c.y, n, 0);
+}
+
+int32_t
+tdefcolor(const int *attr, int *npar, int l)
+{
+ int32_t idx = -1;
+ uint r, g, b;
+
+ switch (attr[*npar + 1]) {
+ case 2: /* direct color in RGB space */
+ if (*npar + 4 >= l) {
+ fprintf(stderr,
+ "erresc(38): Incorrect number of parameters (%d)\n",
+ *npar);
+ break;
+ }
+ r = attr[*npar + 2];
+ g = attr[*npar + 3];
+ b = attr[*npar + 4];
+ *npar += 4;
+ if (!BETWEEN(r, 0, 255) || !BETWEEN(g, 0, 255) || !BETWEEN(b, 0, 255))
+ fprintf(stderr, "erresc: bad rgb color (%u,%u,%u)\n",
+ r, g, b);
+ else
+ idx = TRUECOLOR(r, g, b);
+ break;
+ case 5: /* indexed color */
+ if (*npar + 2 >= l) {
+ fprintf(stderr,
+ "erresc(38): Incorrect number of parameters (%d)\n",
+ *npar);
+ break;
+ }
+ *npar += 2;
+ if (!BETWEEN(attr[*npar], 0, 255))
+ fprintf(stderr, "erresc: bad fgcolor %d\n", attr[*npar]);
+ else
+ idx = attr[*npar];
+ break;
+ case 0: /* implemented defined (only foreground) */
+ case 1: /* transparent */
+ case 3: /* direct color in CMY space */
+ case 4: /* direct color in CMYK space */
+ default:
+ fprintf(stderr,
+ "erresc(38): gfx attr %d unknown\n", attr[*npar]);
+ break;
+ }
+
+ return idx;
+}
+
+void
+tsetattr(const int *attr, int l)
+{
+ int i;
+ int32_t idx;
+
+ for (i = 0; i < l; i++) {
+ switch (attr[i]) {
+ case 0:
+ term.c.attr.mode &= ~(
+ ATTR_BOLD |
+ ATTR_FAINT |
+ ATTR_ITALIC |
+ ATTR_UNDERLINE |
+ ATTR_BLINK |
+ ATTR_REVERSE |
+ ATTR_INVISIBLE |
+ ATTR_STRUCK );
+ term.c.attr.fg = defaultfg;
+ term.c.attr.bg = defaultbg;
+ break;
+ case 1:
+ term.c.attr.mode |= ATTR_BOLD;
+ break;
+ case 2:
+ term.c.attr.mode |= ATTR_FAINT;
+ break;
+ case 3:
+ term.c.attr.mode |= ATTR_ITALIC;
+ break;
+ case 4:
+ term.c.attr.mode |= ATTR_UNDERLINE;
+ break;
+ case 5: /* slow blink */
+ /* FALLTHROUGH */
+ case 6: /* rapid blink */
+ term.c.attr.mode |= ATTR_BLINK;
+ break;
+ case 7:
+ term.c.attr.mode |= ATTR_REVERSE;
+ break;
+ case 8:
+ term.c.attr.mode |= ATTR_INVISIBLE;
+ break;
+ case 9:
+ term.c.attr.mode |= ATTR_STRUCK;
+ break;
+ case 22:
+ term.c.attr.mode &= ~(ATTR_BOLD | ATTR_FAINT);
+ break;
+ case 23:
+ term.c.attr.mode &= ~ATTR_ITALIC;
+ break;
+ case 24:
+ term.c.attr.mode &= ~ATTR_UNDERLINE;
+ break;
+ case 25:
+ term.c.attr.mode &= ~ATTR_BLINK;
+ break;
+ case 27:
+ term.c.attr.mode &= ~ATTR_REVERSE;
+ break;
+ case 28:
+ term.c.attr.mode &= ~ATTR_INVISIBLE;
+ break;
+ case 29:
+ term.c.attr.mode &= ~ATTR_STRUCK;
+ break;
+ case 38:
+ if ((idx = tdefcolor(attr, &i, l)) >= 0)
+ term.c.attr.fg = idx;
+ break;
+ case 39:
+ term.c.attr.fg = defaultfg;
+ break;
+ case 48:
+ if ((idx = tdefcolor(attr, &i, l)) >= 0)
+ term.c.attr.bg = idx;
+ break;
+ case 49:
+ term.c.attr.bg = defaultbg;
+ break;
+ default:
+ if (BETWEEN(attr[i], 30, 37)) {
+ term.c.attr.fg = attr[i] - 30;
+ } else if (BETWEEN(attr[i], 40, 47)) {
+ term.c.attr.bg = attr[i] - 40;
+ } else if (BETWEEN(attr[i], 90, 97)) {
+ term.c.attr.fg = attr[i] - 90 + 8;
+ } else if (BETWEEN(attr[i], 100, 107)) {
+ term.c.attr.bg = attr[i] - 100 + 8;
+ } else {
+ fprintf(stderr,
+ "erresc(default): gfx attr %d unknown\n",
+ attr[i]);
+ csidump();
+ }
+ break;
+ }
+ }
+}
+
+void
+tsetscroll(int t, int b)
+{
+ int temp;
+
+ LIMIT(t, 0, term.row-1);
+ LIMIT(b, 0, term.row-1);
+ if (t > b) {
+ temp = t;
+ t = b;
+ b = temp;
+ }
+ term.top = t;
+ term.bot = b;
+}
+
+void
+tsetmode(int priv, int set, const int *args, int narg)
+{
+ int alt; const int *lim;
+
+ for (lim = args + narg; args < lim; ++args) {
+ if (priv) {
+ switch (*args) {
+ case 1: /* DECCKM -- Cursor key */
+ xsetmode(set, MODE_APPCURSOR);
+ break;
+ case 5: /* DECSCNM -- Reverse video */
+ xsetmode(set, MODE_REVERSE);
+ break;
+ case 6: /* DECOM -- Origin */
+ MODBIT(term.c.state, set, CURSOR_ORIGIN);
+ tmoveato(0, 0);
+ break;
+ case 7: /* DECAWM -- Auto wrap */
+ MODBIT(term.mode, set, MODE_WRAP);
+ break;
+ case 0: /* Error (IGNORED) */
+ case 2: /* DECANM -- ANSI/VT52 (IGNORED) */
+ case 3: /* DECCOLM -- Column (IGNORED) */
+ case 4: /* DECSCLM -- Scroll (IGNORED) */
+ case 8: /* DECARM -- Auto repeat (IGNORED) */
+ case 18: /* DECPFF -- Printer feed (IGNORED) */
+ case 19: /* DECPEX -- Printer extent (IGNORED) */
+ case 42: /* DECNRCM -- National characters (IGNORED) */
+ case 12: /* att610 -- Start blinking cursor (IGNORED) */
+ break;
+ case 25: /* DECTCEM -- Text Cursor Enable Mode */
+ xsetmode(!set, MODE_HIDE);
+ break;
+ case 9: /* X10 mouse compatibility mode */
+ xsetpointermotion(0);
+ xsetmode(0, MODE_MOUSE);
+ xsetmode(set, MODE_MOUSEX10);
+ break;
+ case 1000: /* 1000: report button press */
+ xsetpointermotion(0);
+ xsetmode(0, MODE_MOUSE);
+ xsetmode(set, MODE_MOUSEBTN);
+ break;
+ case 1002: /* 1002: report motion on button press */
+ xsetpointermotion(0);
+ xsetmode(0, MODE_MOUSE);
+ xsetmode(set, MODE_MOUSEMOTION);
+ break;
+ case 1003: /* 1003: enable all mouse motions */
+ xsetpointermotion(set);
+ xsetmode(0, MODE_MOUSE);
+ xsetmode(set, MODE_MOUSEMANY);
+ break;
+ case 1004: /* 1004: send focus events to tty */
+ xsetmode(set, MODE_FOCUS);
+ break;
+ case 1006: /* 1006: extended reporting mode */
+ xsetmode(set, MODE_MOUSESGR);
+ break;
+ case 1034:
+ xsetmode(set, MODE_8BIT);
+ break;
+ case 1049: /* swap screen & set/restore cursor as xterm */
+ if (!allowaltscreen)
+ break;
+ tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD);
+ /* FALLTHROUGH */
+ case 47: /* swap screen */
+ case 1047:
+ if (!allowaltscreen)
+ break;
+ alt = IS_SET(MODE_ALTSCREEN);
+ if (alt) {
+ tclearregion(0, 0, term.col-1,
+ term.row-1);
+ }
+ if (set ^ alt) /* set is always 1 or 0 */
+ tswapscreen();
+ if (*args != 1049)
+ break;
+ /* FALLTHROUGH */
+ case 1048:
+ tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD);
+ break;
+ case 2004: /* 2004: bracketed paste mode */
+ xsetmode(set, MODE_BRCKTPASTE);
+ break;
+ /* Not implemented mouse modes. See comments there. */
+ case 1001: /* mouse highlight mode; can hang the
+ terminal by design when implemented. */
+ case 1005: /* UTF-8 mouse mode; will confuse
+ applications not supporting UTF-8
+ and luit. */
+ case 1015: /* urxvt mangled mouse mode; incompatible
+ and can be mistaken for other control
+ codes. */
+ break;
+ default:
+ fprintf(stderr,
+ "erresc: unknown private set/reset mode %d\n",
+ *args);
+ break;
+ }
+ } else {
+ switch (*args) {
+ case 0: /* Error (IGNORED) */
+ break;
+ case 2:
+ xsetmode(set, MODE_KBDLOCK);
+ break;
+ case 4: /* IRM -- Insertion-replacement */
+ MODBIT(term.mode, set, MODE_INSERT);
+ break;
+ case 12: /* SRM -- Send/Receive */
+ MODBIT(term.mode, !set, MODE_ECHO);
+ break;
+ case 20: /* LNM -- Linefeed/new line */
+ MODBIT(term.mode, set, MODE_CRLF);
+ break;
+ default:
+ fprintf(stderr,
+ "erresc: unknown set/reset mode %d\n",
+ *args);
+ break;
+ }
+ }
+ }
+}
+
+void
+csihandle(void)
+{
+ char buf[40];
+ int len;
+
+ switch (csiescseq.mode[0]) {
+ default:
+ unknown:
+ fprintf(stderr, "erresc: unknown csi ");
+ csidump();
+ /* die(""); */
+ break;
+ case '@': /* ICH -- Insert <n> blank char */
+ DEFAULT(csiescseq.arg[0], 1);
+ tinsertblank(csiescseq.arg[0]);
+ break;
+ case 'A': /* CUU -- Cursor <n> Up */
+ DEFAULT(csiescseq.arg[0], 1);
+ tmoveto(term.c.x, term.c.y-csiescseq.arg[0]);
+ break;
+ case 'B': /* CUD -- Cursor <n> Down */
+ case 'e': /* VPR --Cursor <n> Down */
+ DEFAULT(csiescseq.arg[0], 1);
+ tmoveto(term.c.x, term.c.y+csiescseq.arg[0]);
+ break;
+ case 'i': /* MC -- Media Copy */
+ switch (csiescseq.arg[0]) {
+ case 0:
+ tdump();
+ break;
+ case 1:
+ tdumpline(term.c.y);
+ break;
+ case 2:
+ tdumpsel();
+ break;
+ case 4:
+ term.mode &= ~MODE_PRINT;
+ break;
+ case 5:
+ term.mode |= MODE_PRINT;
+ break;
+ }
+ break;
+ case 'c': /* DA -- Device Attributes */
+ if (csiescseq.arg[0] == 0)
+ ttywrite(vtiden, strlen(vtiden), 0);
+ break;
+ case 'b': /* REP -- if last char is printable print it <n> more times */
+ DEFAULT(csiescseq.arg[0], 1);
+ if (term.lastc)
+ while (csiescseq.arg[0]-- > 0)
+ tputc(term.lastc);
+ break;
+ case 'C': /* CUF -- Cursor <n> Forward */
+ case 'a': /* HPR -- Cursor <n> Forward */
+ DEFAULT(csiescseq.arg[0], 1);
+ tmoveto(term.c.x+csiescseq.arg[0], term.c.y);
+ break;
+ case 'D': /* CUB -- Cursor <n> Backward */
+ DEFAULT(csiescseq.arg[0], 1);
+ tmoveto(term.c.x-csiescseq.arg[0], term.c.y);
+ break;
+ case 'E': /* CNL -- Cursor <n> Down and first col */
+ DEFAULT(csiescseq.arg[0], 1);
+ tmoveto(0, term.c.y+csiescseq.arg[0]);
+ break;
+ case 'F': /* CPL -- Cursor <n> Up and first col */
+ DEFAULT(csiescseq.arg[0], 1);
+ tmoveto(0, term.c.y-csiescseq.arg[0]);
+ break;
+ case 'g': /* TBC -- Tabulation clear */
+ switch (csiescseq.arg[0]) {
+ case 0: /* clear current tab stop */
+ term.tabs[term.c.x] = 0;
+ break;
+ case 3: /* clear all the tabs */
+ memset(term.tabs, 0, term.col * sizeof(*term.tabs));
+ break;
+ default:
+ goto unknown;
+ }
+ break;
+ case 'G': /* CHA -- Move to <col> */
+ case '`': /* HPA */
+ DEFAULT(csiescseq.arg[0], 1);
+ tmoveto(csiescseq.arg[0]-1, term.c.y);
+ break;
+ case 'H': /* CUP -- Move to <row> <col> */
+ case 'f': /* HVP */
+ DEFAULT(csiescseq.arg[0], 1);
+ DEFAULT(csiescseq.arg[1], 1);
+ tmoveato(csiescseq.arg[1]-1, csiescseq.arg[0]-1);
+ break;
+ case 'I': /* CHT -- Cursor Forward Tabulation <n> tab stops */
+ DEFAULT(csiescseq.arg[0], 1);
+ tputtab(csiescseq.arg[0]);
+ break;
+ case 'J': /* ED -- Clear screen */
+ switch (csiescseq.arg[0]) {
+ case 0: /* below */
+ tclearregion(term.c.x, term.c.y, term.col-1, term.c.y);
+ if (term.c.y < term.row-1) {
+ tclearregion(0, term.c.y+1, term.col-1,
+ term.row-1);
+ }
+ break;
+ case 1: /* above */
+ if (term.c.y > 1)
+ tclearregion(0, 0, term.col-1, term.c.y-1);
+ tclearregion(0, term.c.y, term.c.x, term.c.y);
+ break;
+ case 2: /* all */
+ tclearregion(0, 0, term.col-1, term.row-1);
+ break;
+ default:
+ goto unknown;
+ }
+ break;
+ case 'K': /* EL -- Clear line */
+ switch (csiescseq.arg[0]) {
+ case 0: /* right */
+ tclearregion(term.c.x, term.c.y, term.col-1,
+ term.c.y);
+ break;
+ case 1: /* left */
+ tclearregion(0, term.c.y, term.c.x, term.c.y);
+ break;
+ case 2: /* all */
+ tclearregion(0, term.c.y, term.col-1, term.c.y);
+ break;
+ }
+ break;
+ case 'S': /* SU -- Scroll <n> line up */
+ DEFAULT(csiescseq.arg[0], 1);
+ tscrollup(term.top, csiescseq.arg[0], 0);
+ break;
+ case 'T': /* SD -- Scroll <n> line down */
+ DEFAULT(csiescseq.arg[0], 1);
+ tscrolldown(term.top, csiescseq.arg[0], 0);
+ break;
+ case 'L': /* IL -- Insert <n> blank lines */
+ DEFAULT(csiescseq.arg[0], 1);
+ tinsertblankline(csiescseq.arg[0]);
+ break;
+ case 'l': /* RM -- Reset Mode */
+ tsetmode(csiescseq.priv, 0, csiescseq.arg, csiescseq.narg);
+ break;
+ case 'M': /* DL -- Delete <n> lines */
+ DEFAULT(csiescseq.arg[0], 1);
+ tdeleteline(csiescseq.arg[0]);
+ break;
+ case 'X': /* ECH -- Erase <n> char */
+ DEFAULT(csiescseq.arg[0], 1);
+ tclearregion(term.c.x, term.c.y,
+ term.c.x + csiescseq.arg[0] - 1, term.c.y);
+ break;
+ case 'P': /* DCH -- Delete <n> char */
+ DEFAULT(csiescseq.arg[0], 1);
+ tdeletechar(csiescseq.arg[0]);
+ break;
+ case 'Z': /* CBT -- Cursor Backward Tabulation <n> tab stops */
+ DEFAULT(csiescseq.arg[0], 1);
+ tputtab(-csiescseq.arg[0]);
+ break;
+ case 'd': /* VPA -- Move to <row> */
+ DEFAULT(csiescseq.arg[0], 1);
+ tmoveato(term.c.x, csiescseq.arg[0]-1);
+ break;
+ case 'h': /* SM -- Set terminal mode */
+ tsetmode(csiescseq.priv, 1, csiescseq.arg, csiescseq.narg);
+ break;
+ case 'm': /* SGR -- Terminal attribute (color) */
+ tsetattr(csiescseq.arg, csiescseq.narg);
+ break;
+ case 'n': /* DSR – Device Status Report (cursor position) */
+ if (csiescseq.arg[0] == 6) {
+ len = snprintf(buf, sizeof(buf), "\033[%i;%iR",
+ term.c.y+1, term.c.x+1);
+ ttywrite(buf, len, 0);
+ }
+ break;
+ case 'r': /* DECSTBM -- Set Scrolling Region */
+ if (csiescseq.priv) {
+ goto unknown;
+ } else {
+ DEFAULT(csiescseq.arg[0], 1);
+ DEFAULT(csiescseq.arg[1], term.row);
+ tsetscroll(csiescseq.arg[0]-1, csiescseq.arg[1]-1);
+ tmoveato(0, 0);
+ }
+ break;
+ case 's': /* DECSC -- Save cursor position (ANSI.SYS) */
+ tcursor(CURSOR_SAVE);
+ break;
+ case 'u': /* DECRC -- Restore cursor position (ANSI.SYS) */
+ tcursor(CURSOR_LOAD);
+ break;
+ case ' ':
+ switch (csiescseq.mode[1]) {
+ case 'q': /* DECSCUSR -- Set Cursor Style */
+ if (xsetcursor(csiescseq.arg[0]))
+ goto unknown;
+ break;
+ default:
+ goto unknown;
+ }
+ break;
+ }
+}
+
+void
+csidump(void)
+{
+ size_t i;
+ uint c;
+
+ fprintf(stderr, "ESC[");
+ for (i = 0; i < csiescseq.len; i++) {
+ c = csiescseq.buf[i] & 0xff;
+ if (isprint(c)) {
+ putc(c, stderr);
+ } else if (c == '\n') {
+ fprintf(stderr, "(\\n)");
+ } else if (c == '\r') {
+ fprintf(stderr, "(\\r)");
+ } else if (c == 0x1b) {
+ fprintf(stderr, "(\\e)");
+ } else {
+ fprintf(stderr, "(%02x)", c);
+ }
+ }
+ putc('\n', stderr);
+}
+
+void
+csireset(void)
+{
+ memset(&csiescseq, 0, sizeof(csiescseq));
+}
+
+void
+osc_color_response(int num, int index, int is_osc4)
+{
+ int n;
+ char buf[32];
+ unsigned char r, g, b;
+
+ if (xgetcolor(is_osc4 ? num : index, &r, &g, &b)) {
+ fprintf(stderr, "erresc: failed to fetch %s color %d\n",
+ is_osc4 ? "osc4" : "osc",
+ is_osc4 ? num : index);
+ return;
+ }
+
+ n = snprintf(buf, sizeof buf, "\033]%s%d;rgb:%02x%02x/%02x%02x/%02x%02x\007",
+ is_osc4 ? "4;" : "", num, r, r, g, g, b, b);
+ if (n < 0 || n >= sizeof(buf)) {
+ fprintf(stderr, "error: %s while printing %s response\n",
+ n < 0 ? "snprintf failed" : "truncation occurred",
+ is_osc4 ? "osc4" : "osc");
+ } else {
+ ttywrite(buf, n, 1);
+ }
+}
+
+void
+strhandle(void)
+{
+ char *p = NULL, *dec;
+ int j, narg, par;
+ const struct { int idx; char *str; } osc_table[] = {
+ { defaultfg, "foreground" },
+ { defaultbg, "background" },
+ { defaultcs, "cursor" }
+ };
+
+ term.esc &= ~(ESC_STR_END|ESC_STR);
+ strparse();
+ par = (narg = strescseq.narg) ? atoi(strescseq.args[0]) : 0;
+
+ switch (strescseq.type) {
+ case ']': /* OSC -- Operating System Command */
+ switch (par) {
+ case 0:
+ if (narg > 1) {
+ xsettitle(strescseq.args[1]);
+ xseticontitle(strescseq.args[1]);
+ }
+ return;
+ case 1:
+ if (narg > 1)
+ xseticontitle(strescseq.args[1]);
+ return;
+ case 2:
+ if (narg > 1)
+ xsettitle(strescseq.args[1]);
+ return;
+ case 52:
+ if (narg > 2 && allowwindowops) {
+ dec = base64dec(strescseq.args[2]);
+ if (dec) {
+ xsetsel(dec);
+ xclipcopy();
+ } else {
+ fprintf(stderr, "erresc: invalid base64\n");
+ }
+ }
+ return;
+ case 10:
+ case 11:
+ case 12:
+ if (narg < 2)
+ break;
+ p = strescseq.args[1];
+ if ((j = par - 10) < 0 || j >= LEN(osc_table))
+ break; /* shouldn't be possible */
+
+ if (!strcmp(p, "?")) {
+ osc_color_response(par, osc_table[j].idx, 0);
+ } else if (xsetcolorname(osc_table[j].idx, p)) {
+ fprintf(stderr, "erresc: invalid %s color: %s\n",
+ osc_table[j].str, p);
+ } else {
+ tfulldirt();
+ }
+ return;
+ case 4: /* color set */
+ if (narg < 3)
+ break;
+ p = strescseq.args[2];
+ /* FALLTHROUGH */
+ case 104: /* color reset */
+ j = (narg > 1) ? atoi(strescseq.args[1]) : -1;
+
+ if (p && !strcmp(p, "?")) {
+ osc_color_response(j, 0, 1);
+ } else if (xsetcolorname(j, p)) {
+ if (par == 104 && narg <= 1)
+ return; /* color reset without parameter */
+ fprintf(stderr, "erresc: invalid color j=%d, p=%s\n",
+ j, p ? p : "(null)");
+ } else {
+ /*
+ * TODO if defaultbg color is changed, borders
+ * are dirty
+ */
+ tfulldirt();
+ }
+ return;
+ }
+ break;
+ case 'k': /* old title set compatibility */
+ xsettitle(strescseq.args[0]);
+ return;
+ case 'P': /* DCS -- Device Control String */
+ case '_': /* APC -- Application Program Command */
+ case '^': /* PM -- Privacy Message */
+ return;
+ }
+
+ fprintf(stderr, "erresc: unknown str ");
+ strdump();
+}
+
+void
+strparse(void)
+{
+ int c;
+ char *p = strescseq.buf;
+
+ strescseq.narg = 0;
+ strescseq.buf[strescseq.len] = '\0';
+
+ if (*p == '\0')
+ return;
+
+ while (strescseq.narg < STR_ARG_SIZ) {
+ strescseq.args[strescseq.narg++] = p;
+ while ((c = *p) != ';' && c != '\0')
+ ++p;
+ if (c == '\0')
+ return;
+ *p++ = '\0';
+ }
+}
+
+void
+externalpipe(const Arg *arg)
+{
+ int to[2];
+ char buf[UTF_SIZ];
+ void (*oldsigpipe)(int);
+ Glyph *bp, *end;
+ int lastpos, n, newline;
+
+ if (pipe(to) == -1)
+ return;
+
+ switch (fork()) {
+ case -1:
+ close(to[0]);
+ close(to[1]);
+ return;
+ case 0:
+ dup2(to[0], STDIN_FILENO);
+ close(to[0]);
+ close(to[1]);
+ execvp(((char **)arg->v)[0], (char **)arg->v);
+ fprintf(stderr, "st: execvp %s\n", ((char **)arg->v)[0]);
+ perror("failed");
+ exit(0);
+ }
+
+ close(to[0]);
+ /* ignore sigpipe for now, in case child exists early */
+ oldsigpipe = signal(SIGPIPE, SIG_IGN);
+ newline = 0;
+ for (n = 0; n <= HISTSIZE + 2; n++) {
+ bp = TLINE_HIST(n);
+ lastpos = MIN(tlinehistlen(n) + 1, term.col) - 1;
+ if (lastpos < 0)
+ break;
+ if (lastpos == 0)
+ continue;
+ end = &bp[lastpos + 1];
+ for (; bp < end; ++bp)
+ if (xwrite(to[1], buf, utf8encode(bp->u, buf)) < 0)
+ break;
+ if ((newline = TLINE_HIST(n)[lastpos].mode & ATTR_WRAP))
+ continue;
+ if (xwrite(to[1], "\n", 1) < 0)
+ break;
+ newline = 0;
+ }
+ if (newline)
+ (void)xwrite(to[1], "\n", 1);
+ close(to[1]);
+ /* restore */
+ signal(SIGPIPE, oldsigpipe);
+}
+
+void
+strdump(void)
+{
+ size_t i;
+ uint c;
+
+ fprintf(stderr, "ESC%c", strescseq.type);
+ for (i = 0; i < strescseq.len; i++) {
+ c = strescseq.buf[i] & 0xff;
+ if (c == '\0') {
+ putc('\n', stderr);
+ return;
+ } else if (isprint(c)) {
+ putc(c, stderr);
+ } else if (c == '\n') {
+ fprintf(stderr, "(\\n)");
+ } else if (c == '\r') {
+ fprintf(stderr, "(\\r)");
+ } else if (c == 0x1b) {
+ fprintf(stderr, "(\\e)");
+ } else {
+ fprintf(stderr, "(%02x)", c);
+ }
+ }
+ fprintf(stderr, "ESC\\\n");
+}
+
+void
+strreset(void)
+{
+ strescseq = (STREscape){
+ .buf = xrealloc(strescseq.buf, STR_BUF_SIZ),
+ .siz = STR_BUF_SIZ,
+ };
+}
+
+void
+sendbreak(const Arg *arg)
+{
+ if (tcsendbreak(cmdfd, 0))
+ perror("Error sending break");
+}
+
+void
+tprinter(char *s, size_t len)
+{
+ if (iofd != -1 && xwrite(iofd, s, len) < 0) {
+ perror("Error writing to output file");
+ close(iofd);
+ iofd = -1;
+ }
+}
+
+void
+toggleprinter(const Arg *arg)
+{
+ term.mode ^= MODE_PRINT;
+}
+
+void
+printscreen(const Arg *arg)
+{
+ tdump();
+}
+
+void
+printsel(const Arg *arg)
+{
+ tdumpsel();
+}
+
+void
+tdumpsel(void)
+{
+ char *ptr;
+
+ if ((ptr = getsel())) {
+ tprinter(ptr, strlen(ptr));
+ free(ptr);
+ }
+}
+
+void
+tdumpline(int n)
+{
+ char buf[UTF_SIZ];
+ const Glyph *bp, *end;
+
+ bp = &term.line[n][0];
+ end = &bp[MIN(tlinelen(n), term.col) - 1];
+ if (bp != end || bp->u != ' ') {
+ for ( ; bp <= end; ++bp)
+ tprinter(buf, utf8encode(bp->u, buf));
+ }
+ tprinter("\n", 1);
+}
+
+void
+tdump(void)
+{
+ int i;
+
+ for (i = 0; i < term.row; ++i)
+ tdumpline(i);
+}
+
+void
+tputtab(int n)
+{
+ uint x = term.c.x;
+
+ if (n > 0) {
+ while (x < term.col && n--)
+ for (++x; x < term.col && !term.tabs[x]; ++x)
+ /* nothing */ ;
+ } else if (n < 0) {
+ while (x > 0 && n++)
+ for (--x; x > 0 && !term.tabs[x]; --x)
+ /* nothing */ ;
+ }
+ term.c.x = LIMIT(x, 0, term.col-1);
+}
+
+void
+tdefutf8(char ascii)
+{
+ if (ascii == 'G')
+ term.mode |= MODE_UTF8;
+ else if (ascii == '@')
+ term.mode &= ~MODE_UTF8;
+}
+
+void
+tdeftran(char ascii)
+{
+ static char cs[] = "0B";
+ static int vcs[] = {CS_GRAPHIC0, CS_USA};
+ char *p;
+
+ if ((p = strchr(cs, ascii)) == NULL) {
+ fprintf(stderr, "esc unhandled charset: ESC ( %c\n", ascii);
+ } else {
+ term.trantbl[term.icharset] = vcs[p - cs];
+ }
+}
+
+void
+tdectest(char c)
+{
+ int x, y;
+
+ if (c == '8') { /* DEC screen alignment test. */
+ for (x = 0; x < term.col; ++x) {
+ for (y = 0; y < term.row; ++y)
+ tsetchar('E', &term.c.attr, x, y);
+ }
+ }
+}
+
+void
+tstrsequence(uchar c)
+{
+ switch (c) {
+ case 0x90: /* DCS -- Device Control String */
+ c = 'P';
+ break;
+ case 0x9f: /* APC -- Application Program Command */
+ c = '_';
+ break;
+ case 0x9e: /* PM -- Privacy Message */
+ c = '^';
+ break;
+ case 0x9d: /* OSC -- Operating System Command */
+ c = ']';
+ break;
+ }
+ strreset();
+ strescseq.type = c;
+ term.esc |= ESC_STR;
+}
+
+void
+tcontrolcode(uchar ascii)
+{
+ switch (ascii) {
+ case '\t': /* HT */
+ tputtab(1);
+ return;
+ case '\b': /* BS */
+ tmoveto(term.c.x-1, term.c.y);
+ return;
+ case '\r': /* CR */
+ tmoveto(0, term.c.y);
+ return;
+ case '\f': /* LF */
+ case '\v': /* VT */
+ case '\n': /* LF */
+ /* go to first col if the mode is set */
+ tnewline(IS_SET(MODE_CRLF));
+ return;
+ case '\a': /* BEL */
+ if (term.esc & ESC_STR_END) {
+ /* backwards compatibility to xterm */
+ strhandle();
+ } else {
+ xbell();
+ }
+ break;
+ case '\033': /* ESC */
+ csireset();
+ term.esc &= ~(ESC_CSI|ESC_ALTCHARSET|ESC_TEST);
+ term.esc |= ESC_START;
+ return;
+ case '\016': /* SO (LS1 -- Locking shift 1) */
+ case '\017': /* SI (LS0 -- Locking shift 0) */
+ term.charset = 1 - (ascii - '\016');
+ return;
+ case '\032': /* SUB */
+ tsetchar('?', &term.c.attr, term.c.x, term.c.y);
+ /* FALLTHROUGH */
+ case '\030': /* CAN */
+ csireset();
+ break;
+ case '\005': /* ENQ (IGNORED) */
+ case '\000': /* NUL (IGNORED) */
+ case '\021': /* XON (IGNORED) */
+ case '\023': /* XOFF (IGNORED) */
+ case 0177: /* DEL (IGNORED) */
+ return;
+ case 0x80: /* TODO: PAD */
+ case 0x81: /* TODO: HOP */
+ case 0x82: /* TODO: BPH */
+ case 0x83: /* TODO: NBH */
+ case 0x84: /* TODO: IND */
+ break;
+ case 0x85: /* NEL -- Next line */
+ tnewline(1); /* always go to first col */
+ break;
+ case 0x86: /* TODO: SSA */
+ case 0x87: /* TODO: ESA */
+ break;
+ case 0x88: /* HTS -- Horizontal tab stop */
+ term.tabs[term.c.x] = 1;
+ break;
+ case 0x89: /* TODO: HTJ */
+ case 0x8a: /* TODO: VTS */
+ case 0x8b: /* TODO: PLD */
+ case 0x8c: /* TODO: PLU */
+ case 0x8d: /* TODO: RI */
+ case 0x8e: /* TODO: SS2 */
+ case 0x8f: /* TODO: SS3 */
+ case 0x91: /* TODO: PU1 */
+ case 0x92: /* TODO: PU2 */
+ case 0x93: /* TODO: STS */
+ case 0x94: /* TODO: CCH */
+ case 0x95: /* TODO: MW */
+ case 0x96: /* TODO: SPA */
+ case 0x97: /* TODO: EPA */
+ case 0x98: /* TODO: SOS */
+ case 0x99: /* TODO: SGCI */
+ break;
+ case 0x9a: /* DECID -- Identify Terminal */
+ ttywrite(vtiden, strlen(vtiden), 0);
+ break;
+ case 0x9b: /* TODO: CSI */
+ case 0x9c: /* TODO: ST */
+ break;
+ case 0x90: /* DCS -- Device Control String */
+ case 0x9d: /* OSC -- Operating System Command */
+ case 0x9e: /* PM -- Privacy Message */
+ case 0x9f: /* APC -- Application Program Command */
+ tstrsequence(ascii);
+ return;
+ }
+ /* only CAN, SUB, \a and C1 chars interrupt a sequence */
+ term.esc &= ~(ESC_STR_END|ESC_STR);
+}
+
+/*
+ * returns 1 when the sequence is finished and it hasn't to read
+ * more characters for this sequence, otherwise 0
+ */
+int
+eschandle(uchar ascii)
+{
+ switch (ascii) {
+ case '[':
+ term.esc |= ESC_CSI;
+ return 0;
+ case '#':
+ term.esc |= ESC_TEST;
+ return 0;
+ case '%':
+ term.esc |= ESC_UTF8;
+ return 0;
+ case 'P': /* DCS -- Device Control String */
+ case '_': /* APC -- Application Program Command */
+ case '^': /* PM -- Privacy Message */
+ case ']': /* OSC -- Operating System Command */
+ case 'k': /* old title set compatibility */
+ tstrsequence(ascii);
+ return 0;
+ case 'n': /* LS2 -- Locking shift 2 */
+ case 'o': /* LS3 -- Locking shift 3 */
+ term.charset = 2 + (ascii - 'n');
+ break;
+ case '(': /* GZD4 -- set primary charset G0 */
+ case ')': /* G1D4 -- set secondary charset G1 */
+ case '*': /* G2D4 -- set tertiary charset G2 */
+ case '+': /* G3D4 -- set quaternary charset G3 */
+ term.icharset = ascii - '(';
+ term.esc |= ESC_ALTCHARSET;
+ return 0;
+ case 'D': /* IND -- Linefeed */
+ if (term.c.y == term.bot) {
+ tscrollup(term.top, 1, 1);
+ } else {
+ tmoveto(term.c.x, term.c.y+1);
+ }
+ break;
+ case 'E': /* NEL -- Next line */
+ tnewline(1); /* always go to first col */
+ break;
+ case 'H': /* HTS -- Horizontal tab stop */
+ term.tabs[term.c.x] = 1;
+ break;
+ case 'M': /* RI -- Reverse index */
+ if (term.c.y == term.top) {
+ tscrolldown(term.top, 1, 1);
+ } else {
+ tmoveto(term.c.x, term.c.y-1);
+ }
+ break;
+ case 'Z': /* DECID -- Identify Terminal */
+ ttywrite(vtiden, strlen(vtiden), 0);
+ break;
+ case 'c': /* RIS -- Reset to initial state */
+ treset();
+ resettitle();
+ xloadcols();
+ break;
+ case '=': /* DECPAM -- Application keypad */
+ xsetmode(1, MODE_APPKEYPAD);
+ break;
+ case '>': /* DECPNM -- Normal keypad */
+ xsetmode(0, MODE_APPKEYPAD);
+ break;
+ case '7': /* DECSC -- Save Cursor */
+ tcursor(CURSOR_SAVE);
+ break;
+ case '8': /* DECRC -- Restore Cursor */
+ tcursor(CURSOR_LOAD);
+ break;
+ case '\\': /* ST -- String Terminator */
+ if (term.esc & ESC_STR_END)
+ strhandle();
+ break;
+ default:
+ fprintf(stderr, "erresc: unknown sequence ESC 0x%02X '%c'\n",
+ (uchar) ascii, isprint(ascii)? ascii:'.');
+ break;
+ }
+ return 1;
+}
+
+void
+tputc(Rune u)
+{
+ char c[UTF_SIZ];
+ int control;
+ int width, len;
+ Glyph *gp;
+
+ control = ISCONTROL(u);
+ if (u < 127 || !IS_SET(MODE_UTF8)) {
+ c[0] = u;
+ width = len = 1;
+ } else {
+ len = utf8encode(u, c);
+ if (!control && (width = wcwidth(u)) == -1)
+ width = 1;
+ }
+
+ if (IS_SET(MODE_PRINT))
+ tprinter(c, len);
+
+ /*
+ * STR sequence must be checked before anything else
+ * because it uses all following characters until it
+ * receives a ESC, a SUB, a ST or any other C1 control
+ * character.
+ */
+ if (term.esc & ESC_STR) {
+ if (u == '\a' || u == 030 || u == 032 || u == 033 ||
+ ISCONTROLC1(u)) {
+ term.esc &= ~(ESC_START|ESC_STR);
+ term.esc |= ESC_STR_END;
+ goto check_control_code;
+ }
+
+ if (strescseq.len+len >= strescseq.siz) {
+ /*
+ * Here is a bug in terminals. If the user never sends
+ * some code to stop the str or esc command, then st
+ * will stop responding. But this is better than
+ * silently failing with unknown characters. At least
+ * then users will report back.
+ *
+ * In the case users ever get fixed, here is the code:
+ */
+ /*
+ * term.esc = 0;
+ * strhandle();
+ */
+ if (strescseq.siz > (SIZE_MAX - UTF_SIZ) / 2)
+ return;
+ strescseq.siz *= 2;
+ strescseq.buf = xrealloc(strescseq.buf, strescseq.siz);
+ }
+
+ memmove(&strescseq.buf[strescseq.len], c, len);
+ strescseq.len += len;
+ return;
+ }
+
+check_control_code:
+ /*
+ * Actions of control codes must be performed as soon they arrive
+ * because they can be embedded inside a control sequence, and
+ * they must not cause conflicts with sequences.
+ */
+ if (control) {
+ tcontrolcode(u);
+ /*
+ * control codes are not shown ever
+ */
+ if (!term.esc)
+ term.lastc = 0;
+ return;
+ } else if (term.esc & ESC_START) {
+ if (term.esc & ESC_CSI) {
+ csiescseq.buf[csiescseq.len++] = u;
+ if (BETWEEN(u, 0x40, 0x7E)
+ || csiescseq.len >= \
+ sizeof(csiescseq.buf)-1) {
+ term.esc = 0;
+ csiparse();
+ csihandle();
+ }
+ return;
+ } else if (term.esc & ESC_UTF8) {
+ tdefutf8(u);
+ } else if (term.esc & ESC_ALTCHARSET) {
+ tdeftran(u);
+ } else if (term.esc & ESC_TEST) {
+ tdectest(u);
+ } else {
+ if (!eschandle(u))
+ return;
+ /* sequence already finished */
+ }
+ term.esc = 0;
+ /*
+ * All characters which form part of a sequence are not
+ * printed
+ */
+ return;
+ }
+ if (selected(term.c.x, term.c.y))
+ selclear();
+
+ gp = &term.line[term.c.y][term.c.x];
+ if (IS_SET(MODE_WRAP) && (term.c.state & CURSOR_WRAPNEXT)) {
+ gp->mode |= ATTR_WRAP;
+ tnewline(1);
+ gp = &term.line[term.c.y][term.c.x];
+ }
+
+ if (IS_SET(MODE_INSERT) && term.c.x+width < term.col)
+ memmove(gp+width, gp, (term.col - term.c.x - width) * sizeof(Glyph));
+
+ if (term.c.x+width > term.col) {
+ tnewline(1);
+ gp = &term.line[term.c.y][term.c.x];
+ }
+
+ tsetchar(u, &term.c.attr, term.c.x, term.c.y);
+ term.lastc = u;
+
+ if (width == 2) {
+ gp->mode |= ATTR_WIDE;
+ if (term.c.x+1 < term.col) {
+ if (gp[1].mode == ATTR_WIDE && term.c.x+2 < term.col) {
+ gp[2].u = ' ';
+ gp[2].mode &= ~ATTR_WDUMMY;
+ }
+ gp[1].u = '\0';
+ gp[1].mode = ATTR_WDUMMY;
+ }
+ }
+ if (term.c.x+width < term.col) {
+ tmoveto(term.c.x+width, term.c.y);
+ } else {
+ term.c.state |= CURSOR_WRAPNEXT;
+ }
+}
+
+int
+twrite(const char *buf, int buflen, int show_ctrl)
+{
+ int charsize;
+ Rune u;
+ int n;
+
+ for (n = 0; n < buflen; n += charsize) {
+ if (IS_SET(MODE_UTF8)) {
+ /* process a complete utf8 char */
+ charsize = utf8decode(buf + n, &u, buflen - n);
+ if (charsize == 0)
+ break;
+ } else {
+ u = buf[n] & 0xFF;
+ charsize = 1;
+ }
+ if (show_ctrl && ISCONTROL(u)) {
+ if (u & 0x80) {
+ u &= 0x7f;
+ tputc('^');
+ tputc('[');
+ } else if (u != '\n' && u != '\r' && u != '\t') {
+ u ^= 0x40;
+ tputc('^');
+ }
+ }
+ tputc(u);
+ }
+ return n;
+}
+
+void
+tresize(int col, int row)
+{
+ int i, j;
+ int tmp;
+ int minrow, mincol;
+ int *bp;
+ TCursor c;
+
+ tmp = col;
+ if (!term.maxcol)
+ term.maxcol = term.col;
+ col = MAX(col, term.maxcol);
+ minrow = MIN(row, term.row);
+ mincol = MIN(col, term.maxcol);
+
+ if (col < 1 || row < 1) {
+ fprintf(stderr,
+ "tresize: error resizing to %dx%d\n", col, row);
+ return;
+ }
+
+ /*
+ * slide screen to keep cursor where we expect it -
+ * tscrollup would work here, but we can optimize to
+ * memmove because we're freeing the earlier lines
+ */
+ for (i = 0; i <= term.c.y - row; i++) {
+ free(term.line[i]);
+ free(term.alt[i]);
+ }
+ /* ensure that both src and dst are not NULL */
+ if (i > 0) {
+ memmove(term.line, term.line + i, row * sizeof(Line));
+ memmove(term.alt, term.alt + i, row * sizeof(Line));
+ }
+ for (i += row; i < term.row; i++) {
+ free(term.line[i]);
+ free(term.alt[i]);
+ }
+
+ /* resize to new height */
+ term.line = xrealloc(term.line, row * sizeof(Line));
+ term.alt = xrealloc(term.alt, row * sizeof(Line));
+ term.dirty = xrealloc(term.dirty, row * sizeof(*term.dirty));
+ term.tabs = xrealloc(term.tabs, col * sizeof(*term.tabs));
+
+ for (i = 0; i < HISTSIZE; i++) {
+ term.hist[i] = xrealloc(term.hist[i], col * sizeof(Glyph));
+ for (j = mincol; j < col; j++) {
+ term.hist[i][j] = term.c.attr;
+ term.hist[i][j].u = ' ';
+ }
+ }
+
+ /* resize each row to new width, zero-pad if needed */
+ for (i = 0; i < minrow; i++) {
+ term.line[i] = xrealloc(term.line[i], col * sizeof(Glyph));
+ term.alt[i] = xrealloc(term.alt[i], col * sizeof(Glyph));
+ }
+
+ /* allocate any new rows */
+ for (/* i = minrow */; i < row; i++) {
+ term.line[i] = xmalloc(col * sizeof(Glyph));
+ term.alt[i] = xmalloc(col * sizeof(Glyph));
+ }
+ if (col > term.maxcol) {
+ bp = term.tabs + term.maxcol;
+
+ memset(bp, 0, sizeof(*term.tabs) * (col - term.maxcol));
+ while (--bp > term.tabs && !*bp)
+ /* nothing */ ;
+ for (bp += tabspaces; bp < term.tabs + col; bp += tabspaces)
+ *bp = 1;
+ }
+ /* update terminal size */
+ term.col = tmp;
+ term.maxcol = col;
+ term.row = row;
+ /* reset scrolling region */
+ tsetscroll(0, row-1);
+ /* make use of the LIMIT in tmoveto */
+ tmoveto(term.c.x, term.c.y);
+ /* Clearing both screens (it makes dirty all lines) */
+ c = term.c;
+ for (i = 0; i < 2; i++) {
+ if (mincol < col && 0 < minrow) {
+ tclearregion(mincol, 0, col - 1, minrow - 1);
+ }
+ if (0 < col && minrow < row) {
+ tclearregion(0, minrow, col - 1, row - 1);
+ }
+ tswapscreen();
+ tcursor(CURSOR_LOAD);
+ }
+ term.c = c;
+}
+
+void
+resettitle(void)
+{
+ xsettitle(NULL);
+}
+
+void
+drawregion(int x1, int y1, int x2, int y2)
+{
+ int y;
+
+ for (y = y1; y < y2; y++) {
+ if (!term.dirty[y])
+ continue;
+
+ term.dirty[y] = 0;
+ xdrawline(TLINE(y), x1, y, x2);
+ }
+}
+
+void
+draw(void)
+{
+ int cx = term.c.x, ocx = term.ocx, ocy = term.ocy;
+
+ if (!xstartdraw())
+ return;
+
+ /* adjust cursor position */
+ LIMIT(term.ocx, 0, term.col-1);
+ LIMIT(term.ocy, 0, term.row-1);
+ if (term.line[term.ocy][term.ocx].mode & ATTR_WDUMMY)
+ term.ocx--;
+ if (term.line[term.c.y][cx].mode & ATTR_WDUMMY)
+ cx--;
+
+ drawregion(0, 0, term.col, term.row);
+ if (term.scr == 0)
+ xdrawcursor(cx, term.c.y, term.line[term.c.y][cx],
+ term.ocx, term.ocy, term.line[term.ocy][term.ocx],
+ term.line[term.ocy], term.col);
+ /* xdrawcursor(cx, term.c.y, term.line[term.c.y][cx], */
+ /* term.ocx, term.ocy, term.line[term.ocy][term.ocx], */
+ /* term.line[term.ocy], term.col); */
+ term.ocx = cx;
+ term.ocy = term.c.y;
+ xfinishdraw();
+ if (ocx != term.ocx || ocy != term.ocy)
+ xximspot(term.ocx, term.ocy);
+}
+
+void
+redraw(void)
+{
+ tfulldirt();
+ draw();
+}
+
diff --git a/dwm/Repositories/st/st.h b/dwm/Repositories/st/st.h
new file mode 100644
index 0000000..60d973a
--- /dev/null
+++ b/dwm/Repositories/st/st.h
@@ -0,0 +1,146 @@
+/* See LICENSE for license details. */
+
+#include <stdint.h>
+#include <sys/types.h>
+
+/* macros */
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#define MAX(a, b) ((a) < (b) ? (b) : (a))
+#define LEN(a) (sizeof(a) / sizeof(a)[0])
+#define BETWEEN(x, a, b) ((a) <= (x) && (x) <= (b))
+#define DIVCEIL(n, d) (((n) + ((d) - 1)) / (d))
+#define DEFAULT(a, b) (a) = (a) ? (a) : (b)
+#define LIMIT(x, a, b) (x) = (x) < (a) ? (a) : (x) > (b) ? (b) : (x)
+#define ATTRCMP(a, b) (((a).mode & (~ATTR_WRAP) & (~ATTR_LIGA)) != ((b).mode & (~ATTR_WRAP) & (~ATTR_LIGA)) || \
+ (a).fg != (b).fg || \
+ (a).bg != (b).bg)
+#define TIMEDIFF(t1, t2) ((t1.tv_sec-t2.tv_sec)*1000 + \
+ (t1.tv_nsec-t2.tv_nsec)/1E6)
+#define MODBIT(x, set, bit) ((set) ? ((x) |= (bit)) : ((x) &= ~(bit)))
+
+#define TRUECOLOR(r,g,b) (1 << 24 | (r) << 16 | (g) << 8 | (b))
+#define IS_TRUECOL(x) (1 << 24 & (x))
+
+enum glyph_attribute {
+ ATTR_NULL = 0,
+ ATTR_BOLD = 1 << 0,
+ ATTR_FAINT = 1 << 1,
+ ATTR_ITALIC = 1 << 2,
+ ATTR_UNDERLINE = 1 << 3,
+ ATTR_BLINK = 1 << 4,
+ ATTR_REVERSE = 1 << 5,
+ ATTR_INVISIBLE = 1 << 6,
+ ATTR_STRUCK = 1 << 7,
+ ATTR_WRAP = 1 << 8,
+ ATTR_WIDE = 1 << 9,
+ ATTR_WDUMMY = 1 << 10,
+ ATTR_BOXDRAW = 1 << 11,
+ ATTR_LIGA = 1 << 12,
+ ATTR_BOLD_FAINT = ATTR_BOLD | ATTR_FAINT,
+};
+
+enum selection_mode {
+ SEL_IDLE = 0,
+ SEL_EMPTY = 1,
+ SEL_READY = 2
+};
+
+enum selection_type {
+ SEL_REGULAR = 1,
+ SEL_RECTANGULAR = 2
+};
+
+enum selection_snap {
+ SNAP_WORD = 1,
+ SNAP_LINE = 2
+};
+
+typedef unsigned char uchar;
+typedef unsigned int uint;
+typedef unsigned long ulong;
+typedef unsigned short ushort;
+
+typedef uint_least32_t Rune;
+
+#define Glyph Glyph_
+typedef struct {
+ Rune u; /* character code */
+ ushort mode; /* attribute flags */
+ uint32_t fg; /* foreground */
+ uint32_t bg; /* background */
+} Glyph;
+
+typedef Glyph *Line;
+
+typedef union {
+ int i;
+ uint ui;
+ float f;
+ const void *v;
+ const char *s;
+} Arg;
+
+void die(const char *, ...);
+void redraw(void);
+void tfulldirt(void);
+void draw(void);
+
+void externalpipe(const Arg *);
+void kscrolldown(const Arg *);
+void kscrollup(const Arg *);
+
+void printscreen(const Arg *);
+void printsel(const Arg *);
+void sendbreak(const Arg *);
+void toggleprinter(const Arg *);
+
+int tattrset(int);
+void tnew(int, int);
+void tresize(int, int);
+void tsetdirtattr(int);
+void ttyhangup(void);
+int ttynew(const char *, char *, const char *, char **);
+size_t ttyread(void);
+void ttyresize(int, int);
+void ttywrite(const char *, size_t, int);
+
+void resettitle(void);
+
+void selclear(void);
+void selinit(void);
+void selstart(int, int, int);
+void selextend(int, int, int, int);
+int selected(int, int);
+char *getsel(void);
+
+size_t utf8encode(Rune, char *);
+
+void *xmalloc(size_t);
+void *xrealloc(void *, size_t);
+char *xstrdup(const char *);
+
+int isboxdraw(Rune);
+ushort boxdrawindex(const Glyph *);
+#ifdef XFT_VERSION
+/* only exposed to x.c, otherwise we'll need Xft.h for the types */
+void boxdraw_xinit(Display *, Colormap, XftDraw *, Visual *);
+void drawboxes(int, int, int, int, XftColor *, XftColor *, const XftGlyphFontSpec *, int);
+#endif
+
+/* config.h globals */
+extern char *utmp;
+extern char *scroll;
+extern char *stty_args;
+extern char *vtiden;
+extern wchar_t *worddelimiters;
+extern int allowaltscreen;
+extern int allowwindowops;
+extern char *termname;
+extern unsigned int tabspaces;
+extern unsigned int defaultfg;
+extern unsigned int defaultbg;
+extern float alpha;
+extern float alphaUnfocus;
+extern const int boxdraw, boxdraw_bold, boxdraw_braille;
+extern unsigned int defaultcs;
+
diff --git a/dwm/Repositories/st/st.info b/dwm/Repositories/st/st.info
new file mode 100644
index 0000000..8201ad6
--- /dev/null
+++ b/dwm/Repositories/st/st.info
@@ -0,0 +1,239 @@
+st-mono| simpleterm monocolor,
+ acsc=+C\,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
+ am,
+ bce,
+ bel=^G,
+ blink=\E[5m,
+ bold=\E[1m,
+ cbt=\E[Z,
+ cvvis=\E[?25h,
+ civis=\E[?25l,
+ clear=\E[H\E[2J,
+ cnorm=\E[?12l\E[?25h,
+ colors#2,
+ cols#80,
+ cr=^M,
+ csr=\E[%i%p1%d;%p2%dr,
+ cub=\E[%p1%dD,
+ cub1=^H,
+ cud1=^J,
+ cud=\E[%p1%dB,
+ cuf1=\E[C,
+ cuf=\E[%p1%dC,
+ cup=\E[%i%p1%d;%p2%dH,
+ cuu1=\E[A,
+ cuu=\E[%p1%dA,
+ dch=\E[%p1%dP,
+ dch1=\E[P,
+ dim=\E[2m,
+ dl=\E[%p1%dM,
+ dl1=\E[M,
+ ech=\E[%p1%dX,
+ ed=\E[J,
+ el=\E[K,
+ el1=\E[1K,
+ enacs=\E)0,
+ flash=\E[?5h$<80/>\E[?5l,
+ fsl=^G,
+ home=\E[H,
+ hpa=\E[%i%p1%dG,
+ hs,
+ ht=^I,
+ hts=\EH,
+ ich=\E[%p1%d@,
+ il1=\E[L,
+ il=\E[%p1%dL,
+ ind=^J,
+ indn=\E[%p1%dS,
+ invis=\E[8m,
+ is2=\E[4l\E>\E[?1034l,
+ it#8,
+ kel=\E[1;2F,
+ ked=\E[1;5F,
+ ka1=\E[1~,
+ ka3=\E[5~,
+ kc1=\E[4~,
+ kc3=\E[6~,
+ kbs=\177,
+ kcbt=\E[Z,
+ kb2=\EOu,
+ kcub1=\EOD,
+ kcud1=\EOB,
+ kcuf1=\EOC,
+ kcuu1=\EOA,
+ kDC=\E[3;2~,
+ kent=\EOM,
+ kEND=\E[1;2F,
+ kIC=\E[2;2~,
+ kNXT=\E[6;2~,
+ kPRV=\E[5;2~,
+ kHOM=\E[1;2H,
+ kLFT=\E[1;2D,
+ kRIT=\E[1;2C,
+ kind=\E[1;2B,
+ kri=\E[1;2A,
+ kclr=\E[3;5~,
+ kdl1=\E[3;2~,
+ kdch1=\E[3~,
+ kich1=\E[2~,
+ kend=\E[4~,
+ kf1=\EOP,
+ kf2=\EOQ,
+ kf3=\EOR,
+ kf4=\EOS,
+ kf5=\E[15~,
+ kf6=\E[17~,
+ kf7=\E[18~,
+ kf8=\E[19~,
+ kf9=\E[20~,
+ kf10=\E[21~,
+ kf11=\E[23~,
+ kf12=\E[24~,
+ kf13=\E[1;2P,
+ kf14=\E[1;2Q,
+ kf15=\E[1;2R,
+ kf16=\E[1;2S,
+ kf17=\E[15;2~,
+ kf18=\E[17;2~,
+ kf19=\E[18;2~,
+ kf20=\E[19;2~,
+ kf21=\E[20;2~,
+ kf22=\E[21;2~,
+ kf23=\E[23;2~,
+ kf24=\E[24;2~,
+ kf25=\E[1;5P,
+ kf26=\E[1;5Q,
+ kf27=\E[1;5R,
+ kf28=\E[1;5S,
+ kf29=\E[15;5~,
+ kf30=\E[17;5~,
+ kf31=\E[18;5~,
+ kf32=\E[19;5~,
+ kf33=\E[20;5~,
+ kf34=\E[21;5~,
+ kf35=\E[23;5~,
+ kf36=\E[24;5~,
+ kf37=\E[1;6P,
+ kf38=\E[1;6Q,
+ kf39=\E[1;6R,
+ kf40=\E[1;6S,
+ kf41=\E[15;6~,
+ kf42=\E[17;6~,
+ kf43=\E[18;6~,
+ kf44=\E[19;6~,
+ kf45=\E[20;6~,
+ kf46=\E[21;6~,
+ kf47=\E[23;6~,
+ kf48=\E[24;6~,
+ kf49=\E[1;3P,
+ kf50=\E[1;3Q,
+ kf51=\E[1;3R,
+ kf52=\E[1;3S,
+ kf53=\E[15;3~,
+ kf54=\E[17;3~,
+ kf55=\E[18;3~,
+ kf56=\E[19;3~,
+ kf57=\E[20;3~,
+ kf58=\E[21;3~,
+ kf59=\E[23;3~,
+ kf60=\E[24;3~,
+ kf61=\E[1;4P,
+ kf62=\E[1;4Q,
+ kf63=\E[1;4R,
+ khome=\E[1~,
+ kil1=\E[2;5~,
+ krmir=\E[2;2~,
+ knp=\E[6~,
+ kmous=\E[M,
+ kpp=\E[5~,
+ lines#24,
+ mir,
+ msgr,
+ npc,
+ op=\E[39;49m,
+ pairs#64,
+ mc0=\E[i,
+ mc4=\E[4i,
+ mc5=\E[5i,
+ rc=\E8,
+ rev=\E[7m,
+ ri=\EM,
+ rin=\E[%p1%dT,
+ ritm=\E[23m,
+ rmacs=\E(B,
+ rmcup=\E[?1049l,
+ rmir=\E[4l,
+ rmkx=\E[?1l\E>,
+ rmso=\E[27m,
+ rmul=\E[24m,
+ rs1=\Ec,
+ rs2=\E[4l\E>\E[?1034l,
+ sc=\E7,
+ sitm=\E[3m,
+ sgr0=\E[0m,
+ smacs=\E(0,
+ smcup=\E[?1049h,
+ smir=\E[4h,
+ smkx=\E[?1h\E=,
+ smso=\E[7m,
+ smul=\E[4m,
+ tbc=\E[3g,
+ tsl=\E]0;,
+ xenl,
+ vpa=\E[%i%p1%dd,
+# XTerm extensions
+ rmxx=\E[29m,
+ smxx=\E[9m,
+# disabled rep for now: causes some issues with older ncurses versions.
+# rep=%p1%c\E[%p2%{1}%-%db,
+# tmux extensions, see TERMINFO EXTENSIONS in tmux(1)
+ Tc,
+ Ms=\E]52;%p1%s;%p2%s\007,
+ Se=\E[2 q,
+ Ss=\E[%p1%d q,
+
+st| simpleterm,
+ use=st-mono,
+ colors#8,
+ setab=\E[4%p1%dm,
+ setaf=\E[3%p1%dm,
+ setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
+ setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
+ sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
+
+st-256color| simpleterm with 256 colors,
+ use=st,
+ ccc,
+ colors#256,
+ oc=\E]104\007,
+ pairs#32767,
+# Nicked from xterm-256color
+ initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
+ setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m,
+ setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
+
+st-meta| simpleterm with meta key,
+ use=st,
+ km,
+ rmm=\E[?1034l,
+ smm=\E[?1034h,
+ rs2=\E[4l\E>\E[?1034h,
+ is2=\E[4l\E>\E[?1034h,
+
+st-meta-256color| simpleterm with meta key and 256 colors,
+ use=st-256color,
+ km,
+ rmm=\E[?1034l,
+ smm=\E[?1034h,
+ rs2=\E[4l\E>\E[?1034h,
+ is2=\E[4l\E>\E[?1034h,
+
+st-bs| simpleterm with backspace as backspace,
+ use=st,
+ kbs=\010,
+ kdch1=\177,
+
+st-bs-256color| simpleterm with backspace as backspace and 256colors,
+ use=st-256color,
+ kbs=\010,
+ kdch1=\177,
diff --git a/dwm/Repositories/st/win.h b/dwm/Repositories/st/win.h
new file mode 100644
index 0000000..8839e31
--- /dev/null
+++ b/dwm/Repositories/st/win.h
@@ -0,0 +1,42 @@
+/* See LICENSE for license details. */
+
+enum win_mode {
+ MODE_VISIBLE = 1 << 0,
+ MODE_FOCUSED = 1 << 1,
+ MODE_APPKEYPAD = 1 << 2,
+ MODE_MOUSEBTN = 1 << 3,
+ MODE_MOUSEMOTION = 1 << 4,
+ MODE_REVERSE = 1 << 5,
+ MODE_KBDLOCK = 1 << 6,
+ MODE_HIDE = 1 << 7,
+ MODE_APPCURSOR = 1 << 8,
+ MODE_MOUSESGR = 1 << 9,
+ MODE_8BIT = 1 << 10,
+ MODE_BLINK = 1 << 11,
+ MODE_FBLINK = 1 << 12,
+ MODE_FOCUS = 1 << 13,
+ MODE_MOUSEX10 = 1 << 14,
+ MODE_MOUSEMANY = 1 << 15,
+ MODE_BRCKTPASTE = 1 << 16,
+ MODE_NUMLOCK = 1 << 17,
+ MODE_MOUSE = MODE_MOUSEBTN|MODE_MOUSEMOTION|MODE_MOUSEX10\
+ |MODE_MOUSEMANY,
+};
+
+void xbell(void);
+void xclipcopy(void);
+void xdrawcursor(int, int, Glyph, int, int, Glyph, Line, int);
+void xdrawline(Line, int, int, int);
+void xfinishdraw(void);
+void xloadcols(void);
+int xsetcolorname(int, const char *);
+int xgetcolor(int, unsigned char *, unsigned char *, unsigned char *);
+void xseticontitle(char *);
+void xsettitle(char *);
+int xsetcursor(int);
+void xsetmode(int, unsigned int);
+void xsetpointermotion(int);
+void xsetsel(char *);
+int xstartdraw(void);
+void xximspot(int, int);
+
diff --git a/dwm/Repositories/st/x.c b/dwm/Repositories/st/x.c
new file mode 100644
index 0000000..e2ec9db
--- /dev/null
+++ b/dwm/Repositories/st/x.c
@@ -0,0 +1,2366 @@
+/* See LICENSE for license details. */
+#include <errno.h>
+#include <math.h>
+#include <limits.h>
+#include <locale.h>
+#include <signal.h>
+#include <sys/select.h>
+#include <time.h>
+#include <unistd.h>
+#include <libgen.h>
+#include <X11/Xatom.h>
+#include <X11/Xlib.h>
+#include <X11/cursorfont.h>
+#include <X11/keysym.h>
+#include <X11/Xft/Xft.h>
+#include <X11/XKBlib.h>
+#include <X11/Xresource.h>
+
+char *argv0;
+#include "arg.h"
+#include "st.h"
+#include "win.h"
+#include "hb.h"
+
+/* types used in config.h */
+typedef struct {
+ uint mod;
+ KeySym keysym;
+ void (*func)(const Arg *);
+ const Arg arg;
+} Shortcut;
+
+typedef struct {
+ uint mod;
+ uint button;
+ void (*func)(const Arg *);
+ const Arg arg;
+ uint release;
+} MouseShortcut;
+
+typedef struct {
+ KeySym k;
+ uint mask;
+ char *s;
+ /* three-valued logic variables: 0 indifferent, 1 on, -1 off */
+ signed char appkey; /* application keypad */
+ signed char appcursor; /* application cursor */
+} Key;
+
+/* Xresources preferences */
+enum resource_type {
+ STRING = 0,
+ INTEGER = 1,
+ FLOAT = 2
+};
+
+typedef struct {
+ char *name;
+ enum resource_type type;
+ void *dst;
+} ResourcePref;
+
+/* X modifiers */
+#define XK_ANY_MOD UINT_MAX
+#define XK_NO_MOD 0
+#define XK_SWITCH_MOD (1<<13|1<<14)
+
+/* function definitions used in config.h */
+static void clipcopy(const Arg *);
+static void clippaste(const Arg *);
+static void numlock(const Arg *);
+static void selpaste(const Arg *);
+static void changealpha(const Arg *);
+static void zoom(const Arg *);
+static void zoomabs(const Arg *);
+static void zoomreset(const Arg *);
+static void ttysend(const Arg *);
+
+/* config.h for applying patches and the configuration. */
+#include "config.h"
+
+/* XEMBED messages */
+#define XEMBED_FOCUS_IN 4
+#define XEMBED_FOCUS_OUT 5
+
+/* macros */
+#define IS_SET(flag) ((win.mode & (flag)) != 0)
+#define TRUERED(x) (((x) & 0xff0000) >> 8)
+#define TRUEGREEN(x) (((x) & 0xff00))
+#define TRUEBLUE(x) (((x) & 0xff) << 8)
+
+typedef XftDraw *Draw;
+typedef XftColor Color;
+typedef XftGlyphFontSpec GlyphFontSpec;
+
+/* Purely graphic info */
+typedef struct {
+ int tw, th; /* tty width and height */
+ int w, h; /* window width and height */
+ int ch; /* char height */
+ int cw; /* char width */
+ int mode; /* window state/mode flags */
+ int cursor; /* cursor style */
+} TermWindow;
+
+typedef struct {
+ Display *dpy;
+ Colormap cmap;
+ Window win;
+ Drawable buf;
+ GlyphFontSpec *specbuf; /* font spec buffer used for rendering */
+ Atom xembed, wmdeletewin, netwmname, netwmiconname, netwmpid;
+ struct {
+ XIM xim;
+ XIC xic;
+ XPoint spot;
+ XVaNestedList spotlist;
+ } ime;
+ Draw draw;
+ Visual *vis;
+ XSetWindowAttributes attrs;
+ int scr;
+ int isfixed; /* is fixed geometry? */
+ int depth; /* bit depth */
+ int l, t; /* left and top offset */
+ int gm; /* geometry mask */
+} XWindow;
+
+typedef struct {
+ Atom xtarget;
+ char *primary, *clipboard;
+ struct timespec tclick1;
+ struct timespec tclick2;
+} XSelection;
+
+/* Font structure */
+#define Font Font_
+typedef struct {
+ int height;
+ int width;
+ int ascent;
+ int descent;
+ int badslant;
+ int badweight;
+ short lbearing;
+ short rbearing;
+ XftFont *match;
+ FcFontSet *set;
+ FcPattern *pattern;
+} Font;
+
+/* Drawing Context */
+typedef struct {
+ Color *col;
+ size_t collen;
+ Font font, bfont, ifont, ibfont;
+ GC gc;
+} DC;
+
+static inline ushort sixd_to_16bit(int);
+static int xmakeglyphfontspecs(XftGlyphFontSpec *, const Glyph *, int, int, int);
+static void xdrawglyphfontspecs(const XftGlyphFontSpec *, Glyph, int, int, int);
+static void xdrawglyph(Glyph, int, int);
+static void xclear(int, int, int, int);
+static int xgeommasktogravity(int);
+static int ximopen(Display *);
+static void ximinstantiate(Display *, XPointer, XPointer);
+static void ximdestroy(XIM, XPointer, XPointer);
+static int xicdestroy(XIC, XPointer, XPointer);
+static void xinit(int, int);
+static void cresize(int, int);
+static void xresize(int, int);
+static void xhints(void);
+static int xloadcolor(int, const char *, Color *);
+static int xloadfont(Font *, FcPattern *);
+static int xloadsparefont(FcPattern *, int);
+static void xloadsparefonts(void);
+static void xloadfonts(const char *, double);
+static void xunloadfont(Font *);
+static void xunloadfonts(void);
+static void xsetenv(void);
+static void xseturgency(int);
+static int evcol(XEvent *);
+static int evrow(XEvent *);
+static float clamp(float, float, float);
+
+static void expose(XEvent *);
+static void visibility(XEvent *);
+static void unmap(XEvent *);
+static void kpress(XEvent *);
+static void cmessage(XEvent *);
+static void resize(XEvent *);
+static void focus(XEvent *);
+static uint buttonmask(uint);
+static int mouseaction(XEvent *, uint);
+static void brelease(XEvent *);
+static void bpress(XEvent *);
+static void bmotion(XEvent *);
+static void propnotify(XEvent *);
+static void selnotify(XEvent *);
+static void selclear_(XEvent *);
+static void selrequest(XEvent *);
+static void setsel(char *, Time);
+static void mousesel(XEvent *, int);
+static void mousereport(XEvent *);
+static char *kmap(KeySym, uint);
+static int match(uint, uint);
+
+static void run(void);
+static void usage(void);
+
+static void (*handler[LASTEvent])(XEvent *) = {
+ [KeyPress] = kpress,
+ [ClientMessage] = cmessage,
+ [ConfigureNotify] = resize,
+ [VisibilityNotify] = visibility,
+ [UnmapNotify] = unmap,
+ [Expose] = expose,
+ [FocusIn] = focus,
+ [FocusOut] = focus,
+ [MotionNotify] = bmotion,
+ [ButtonPress] = bpress,
+ [ButtonRelease] = brelease,
+/*
+ * Uncomment if you want the selection to disappear when you select something
+ * different in another window.
+ */
+/* [SelectionClear] = selclear_, */
+ [SelectionNotify] = selnotify,
+/*
+ * PropertyNotify is only turned on when there is some INCR transfer happening
+ * for the selection retrieval.
+ */
+ [PropertyNotify] = propnotify,
+ [SelectionRequest] = selrequest,
+};
+
+/* Globals */
+static DC dc;
+static XWindow xw;
+static XSelection xsel;
+static TermWindow win;
+
+/* Font Ring Cache */
+enum {
+ FRC_NORMAL,
+ FRC_ITALIC,
+ FRC_BOLD,
+ FRC_ITALICBOLD
+};
+
+typedef struct {
+ XftFont *font;
+ int flags;
+ Rune unicodep;
+} Fontcache;
+
+/* Fontcache is an array now. A new font will be appended to the array. */
+static Fontcache *frc = NULL;
+static int frclen = 0;
+static int frccap = 0;
+static char *usedfont = NULL;
+static double usedfontsize = 0;
+static double defaultfontsize = 0;
+
+static char *opt_alpha = NULL;
+static char *opt_class = NULL;
+static char **opt_cmd = NULL;
+static char *opt_embed = NULL;
+static char *opt_font = NULL;
+static char *opt_io = NULL;
+static char *opt_line = NULL;
+static char *opt_name = NULL;
+static char *opt_title = NULL;
+
+static int focused = 0;
+
+static int oldbutton = 3; /* button event on startup: 3 = release */
+static uint buttons; /* bit field of pressed buttons */
+
+void
+clipcopy(const Arg *dummy)
+{
+ Atom clipboard;
+
+ free(xsel.clipboard);
+ xsel.clipboard = NULL;
+
+ if (xsel.primary != NULL) {
+ xsel.clipboard = xstrdup(xsel.primary);
+ clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0);
+ XSetSelectionOwner(xw.dpy, clipboard, xw.win, CurrentTime);
+ }
+}
+
+void
+clippaste(const Arg *dummy)
+{
+ Atom clipboard;
+
+ clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0);
+ XConvertSelection(xw.dpy, clipboard, xsel.xtarget, clipboard,
+ xw.win, CurrentTime);
+}
+
+void
+selpaste(const Arg *dummy)
+{
+ XConvertSelection(xw.dpy, XA_PRIMARY, xsel.xtarget, XA_PRIMARY,
+ xw.win, CurrentTime);
+}
+
+void
+numlock(const Arg *dummy)
+{
+ win.mode ^= MODE_NUMLOCK;
+}
+
+void
+changealpha(const Arg *arg)
+{
+ if((alpha > 0 && arg->f < 0) || (alpha < 1 && arg->f > 0))
+ alpha += arg->f;
+ alpha = clamp(alpha, 0.0, 1.0);
+ alphaUnfocus = clamp(alpha-alphaOffset, 0.0, 1.0);
+
+ xloadcols();
+ redraw();
+}
+
+void
+zoom(const Arg *arg)
+{
+ Arg larg;
+
+ larg.f = usedfontsize + arg->f;
+ zoomabs(&larg);
+}
+
+void
+zoomabs(const Arg *arg)
+{
+ xunloadfonts();
+ xloadfonts(usedfont, arg->f);
+ xloadsparefonts();
+ cresize(0, 0);
+ redraw();
+ xhints();
+}
+
+void
+zoomreset(const Arg *arg)
+{
+ Arg larg;
+
+ if (defaultfontsize > 0) {
+ larg.f = defaultfontsize;
+ zoomabs(&larg);
+ }
+}
+
+void
+ttysend(const Arg *arg)
+{
+ ttywrite(arg->s, strlen(arg->s), 1);
+}
+
+int
+evcol(XEvent *e)
+{
+ int x = e->xbutton.x - borderpx;
+ LIMIT(x, 0, win.tw - 1);
+ return x / win.cw;
+}
+
+int
+evrow(XEvent *e)
+{
+ int y = e->xbutton.y - borderpx;
+ LIMIT(y, 0, win.th - 1);
+ return y / win.ch;
+}
+
+float
+clamp(float value, float lower, float upper) {
+ if(value < lower)
+ return lower;
+ if(value > upper)
+ return upper;
+ return value;
+}
+
+void
+mousesel(XEvent *e, int done)
+{
+ int type, seltype = SEL_REGULAR;
+ uint state = e->xbutton.state & ~(Button1Mask | forcemousemod);
+
+ for (type = 1; type < LEN(selmasks); ++type) {
+ if (match(selmasks[type], state)) {
+ seltype = type;
+ break;
+ }
+ }
+ selextend(evcol(e), evrow(e), seltype, done);
+ if (done)
+ setsel(getsel(), e->xbutton.time);
+}
+
+void
+mousereport(XEvent *e)
+{
+ int len, x = evcol(e), y = evrow(e),
+ button = e->xbutton.button, state = e->xbutton.state;
+ char buf[40];
+ static int ox, oy;
+
+ /* from urxvt */
+ if (e->xbutton.type == MotionNotify) {
+ if (x == ox && y == oy)
+ return;
+ if (!IS_SET(MODE_MOUSEMOTION) && !IS_SET(MODE_MOUSEMANY))
+ return;
+ /* MOUSE_MOTION: no reporting if no button is pressed */
+ if (IS_SET(MODE_MOUSEMOTION) && oldbutton == 3)
+ return;
+
+ button = oldbutton + 32;
+ ox = x;
+ oy = y;
+ } else {
+ if (!IS_SET(MODE_MOUSESGR) && e->xbutton.type == ButtonRelease) {
+ button = 3;
+ } else {
+ button -= Button1;
+ if (button >= 3)
+ button += 64 - 3;
+ }
+ if (e->xbutton.type == ButtonPress) {
+ oldbutton = button;
+ ox = x;
+ oy = y;
+ } else if (e->xbutton.type == ButtonRelease) {
+ oldbutton = 3;
+ /* MODE_MOUSEX10: no button release reporting */
+ if (IS_SET(MODE_MOUSEX10))
+ return;
+ if (button == 64 || button == 65)
+ return;
+ }
+ }
+
+ if (!IS_SET(MODE_MOUSEX10)) {
+ button += ((state & ShiftMask ) ? 4 : 0)
+ + ((state & Mod4Mask ) ? 8 : 0)
+ + ((state & ControlMask) ? 16 : 0);
+ }
+
+ if (IS_SET(MODE_MOUSESGR)) {
+ len = snprintf(buf, sizeof(buf), "\033[<%d;%d;%d%c",
+ button, x+1, y+1,
+ e->type == ButtonRelease ? 'm' : 'M');
+ } else if (x < 223 && y < 223) {
+ len = snprintf(buf, sizeof(buf), "\033[M%c%c%c",
+ 32+button, 32+x+1, 32+y+1);
+ } else {
+ return;
+ }
+
+ ttywrite(buf, len, 0);
+}
+
+uint
+buttonmask(uint button)
+{
+ return button == Button1 ? Button1Mask
+ : button == Button2 ? Button2Mask
+ : button == Button3 ? Button3Mask
+ : button == Button4 ? Button4Mask
+ : button == Button5 ? Button5Mask
+ : 0;
+}
+
+int
+mouseaction(XEvent *e, uint release)
+{
+ MouseShortcut *ms;
+
+ /* ignore Button<N>mask for Button<N> - it's set on release */
+ uint state = e->xbutton.state & ~buttonmask(e->xbutton.button);
+
+ for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) {
+ if (ms->release == release &&
+ ms->button == e->xbutton.button &&
+ (match(ms->mod, state) || /* exact or forced */
+ match(ms->mod, state & ~forcemousemod))) {
+ ms->func(&(ms->arg));
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+void
+bpress(XEvent *e)
+{
+ int btn = e->xbutton.button;
+ struct timespec now;
+ int snap;
+
+ if (1 <= btn && btn <= 11)
+ buttons |= 1 << (btn-1);
+
+ if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forcemousemod)) {
+ mousereport(e);
+ return;
+ }
+
+ if (mouseaction(e, 0))
+ return;
+
+ if (btn == Button1) {
+ /*
+ * If the user clicks below predefined timeouts specific
+ * snapping behaviour is exposed.
+ */
+ clock_gettime(CLOCK_MONOTONIC, &now);
+ if (TIMEDIFF(now, xsel.tclick2) <= tripleclicktimeout) {
+ snap = SNAP_LINE;
+ } else if (TIMEDIFF(now, xsel.tclick1) <= doubleclicktimeout) {
+ snap = SNAP_WORD;
+ } else {
+ snap = 0;
+ }
+ xsel.tclick2 = xsel.tclick1;
+ xsel.tclick1 = now;
+
+ selstart(evcol(e), evrow(e), snap);
+ }
+}
+
+void
+propnotify(XEvent *e)
+{
+ XPropertyEvent *xpev;
+ Atom clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0);
+
+ xpev = &e->xproperty;
+ if (xpev->state == PropertyNewValue &&
+ (xpev->atom == XA_PRIMARY ||
+ xpev->atom == clipboard)) {
+ selnotify(e);
+ }
+}
+
+void
+selnotify(XEvent *e)
+{
+ ulong nitems, ofs, rem;
+ int format;
+ uchar *data, *last, *repl;
+ Atom type, incratom, property = None;
+
+ incratom = XInternAtom(xw.dpy, "INCR", 0);
+
+ ofs = 0;
+ if (e->type == SelectionNotify)
+ property = e->xselection.property;
+ else if (e->type == PropertyNotify)
+ property = e->xproperty.atom;
+
+ if (property == None)
+ return;
+
+ do {
+ if (XGetWindowProperty(xw.dpy, xw.win, property, ofs,
+ BUFSIZ/4, False, AnyPropertyType,
+ &type, &format, &nitems, &rem,
+ &data)) {
+ fprintf(stderr, "Clipboard allocation failed\n");
+ return;
+ }
+
+ if (e->type == PropertyNotify && nitems == 0 && rem == 0) {
+ /*
+ * If there is some PropertyNotify with no data, then
+ * this is the signal of the selection owner that all
+ * data has been transferred. We won't need to receive
+ * PropertyNotify events anymore.
+ */
+ MODBIT(xw.attrs.event_mask, 0, PropertyChangeMask);
+ XChangeWindowAttributes(xw.dpy, xw.win, CWEventMask,
+ &xw.attrs);
+ }
+
+ if (type == incratom) {
+ /*
+ * Activate the PropertyNotify events so we receive
+ * when the selection owner does send us the next
+ * chunk of data.
+ */
+ MODBIT(xw.attrs.event_mask, 1, PropertyChangeMask);
+ XChangeWindowAttributes(xw.dpy, xw.win, CWEventMask,
+ &xw.attrs);
+
+ /*
+ * Deleting the property is the transfer start signal.
+ */
+ XDeleteProperty(xw.dpy, xw.win, (int)property);
+ continue;
+ }
+
+ /*
+ * As seen in getsel:
+ * Line endings are inconsistent in the terminal and GUI world
+ * copy and pasting. When receiving some selection data,
+ * replace all '\n' with '\r'.
+ * FIXME: Fix the computer world.
+ */
+ repl = data;
+ last = data + nitems * format / 8;
+ while ((repl = memchr(repl, '\n', last - repl))) {
+ *repl++ = '\r';
+ }
+
+ if (IS_SET(MODE_BRCKTPASTE) && ofs == 0)
+ ttywrite("\033[200~", 6, 0);
+ ttywrite((char *)data, nitems * format / 8, 1);
+ if (IS_SET(MODE_BRCKTPASTE) && rem == 0)
+ ttywrite("\033[201~", 6, 0);
+ XFree(data);
+ /* number of 32-bit chunks returned */
+ ofs += nitems * format / 32;
+ } while (rem > 0);
+
+ /*
+ * Deleting the property again tells the selection owner to send the
+ * next data chunk in the property.
+ */
+ XDeleteProperty(xw.dpy, xw.win, (int)property);
+}
+
+void
+xclipcopy(void)
+{
+ clipcopy(NULL);
+}
+
+void
+selclear_(XEvent *e)
+{
+ selclear();
+}
+
+void
+selrequest(XEvent *e)
+{
+ XSelectionRequestEvent *xsre;
+ XSelectionEvent xev;
+ Atom xa_targets, string, clipboard;
+ char *seltext;
+
+ xsre = (XSelectionRequestEvent *) e;
+ xev.type = SelectionNotify;
+ xev.requestor = xsre->requestor;
+ xev.selection = xsre->selection;
+ xev.target = xsre->target;
+ xev.time = xsre->time;
+ if (xsre->property == None)
+ xsre->property = xsre->target;
+
+ /* reject */
+ xev.property = None;
+
+ xa_targets = XInternAtom(xw.dpy, "TARGETS", 0);
+ if (xsre->target == xa_targets) {
+ /* respond with the supported type */
+ string = xsel.xtarget;
+ XChangeProperty(xsre->display, xsre->requestor, xsre->property,
+ XA_ATOM, 32, PropModeReplace,
+ (uchar *) &string, 1);
+ xev.property = xsre->property;
+ } else if (xsre->target == xsel.xtarget || xsre->target == XA_STRING) {
+ /*
+ * xith XA_STRING non ascii characters may be incorrect in the
+ * requestor. It is not our problem, use utf8.
+ */
+ clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0);
+ if (xsre->selection == XA_PRIMARY) {
+ seltext = xsel.primary;
+ } else if (xsre->selection == clipboard) {
+ seltext = xsel.clipboard;
+ } else {
+ fprintf(stderr,
+ "Unhandled clipboard selection 0x%lx\n",
+ xsre->selection);
+ return;
+ }
+ if (seltext != NULL) {
+ XChangeProperty(xsre->display, xsre->requestor,
+ xsre->property, xsre->target,
+ 8, PropModeReplace,
+ (uchar *)seltext, strlen(seltext));
+ xev.property = xsre->property;
+ }
+ }
+
+ /* all done, send a notification to the listener */
+ if (!XSendEvent(xsre->display, xsre->requestor, 1, 0, (XEvent *) &xev))
+ fprintf(stderr, "Error sending SelectionNotify event\n");
+}
+
+void
+setsel(char *str, Time t)
+{
+ if (!str)
+ return;
+
+ free(xsel.primary);
+ xsel.primary = str;
+
+ XSetSelectionOwner(xw.dpy, XA_PRIMARY, xw.win, t);
+ if (XGetSelectionOwner(xw.dpy, XA_PRIMARY) != xw.win)
+ selclear();
+}
+
+void
+xsetsel(char *str)
+{
+ setsel(str, CurrentTime);
+}
+
+void
+brelease(XEvent *e)
+{
+ int btn = e->xbutton.button;
+
+ if (1 <= btn && btn <= 11)
+ buttons &= ~(1 << (btn-1));
+
+ if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forcemousemod)) {
+ mousereport(e);
+ return;
+ }
+
+ if (mouseaction(e, 1))
+ return;
+ if (btn == Button1)
+ mousesel(e, 1);
+}
+
+void
+bmotion(XEvent *e)
+{
+ if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forcemousemod)) {
+ mousereport(e);
+ return;
+ }
+
+ mousesel(e, 0);
+}
+
+void
+cresize(int width, int height)
+{
+ int col, row;
+
+ if (width != 0)
+ win.w = width;
+ if (height != 0)
+ win.h = height;
+
+ col = (win.w - 2 * borderpx) / win.cw;
+ row = (win.h - 2 * borderpx) / win.ch;
+ col = MAX(1, col);
+ row = MAX(1, row);
+
+ tresize(col, row);
+ xresize(col, row);
+ ttyresize(win.tw, win.th);
+}
+
+void
+xresize(int col, int row)
+{
+ win.tw = col * win.cw;
+ win.th = row * win.ch;
+
+ XFreePixmap(xw.dpy, xw.buf);
+ xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h,
+ xw.depth);
+ XftDrawChange(xw.draw, xw.buf);
+ xclear(0, 0, win.w, win.h);
+
+ /* resize to new width */
+ xw.specbuf = xrealloc(xw.specbuf, col * sizeof(GlyphFontSpec));
+}
+
+ushort
+sixd_to_16bit(int x)
+{
+ return x == 0 ? 0 : 0x3737 + 0x2828 * x;
+}
+
+int
+xloadcolor(int i, const char *name, Color *ncolor)
+{
+ XRenderColor color = { .alpha = 0xffff };
+
+ if (!name) {
+ if (BETWEEN(i, 16, 255)) { /* 256 color */
+ if (i < 6*6*6+16) { /* same colors as xterm */
+ color.red = sixd_to_16bit( ((i-16)/36)%6 );
+ color.green = sixd_to_16bit( ((i-16)/6) %6 );
+ color.blue = sixd_to_16bit( ((i-16)/1) %6 );
+ } else { /* greyscale */
+ color.red = 0x0808 + 0x0a0a * (i - (6*6*6+16));
+ color.green = color.blue = color.red;
+ }
+ return XftColorAllocValue(xw.dpy, xw.vis,
+ xw.cmap, &color, ncolor);
+ } else
+ name = colorname[i];
+ }
+
+ return XftColorAllocName(xw.dpy, xw.vis, xw.cmap, name, ncolor);
+}
+
+void
+xloadalpha(void)
+{
+ float const usedAlpha = focused ? alpha : alphaUnfocus;
+ if (opt_alpha) alpha = strtof(opt_alpha, NULL);
+ dc.col[defaultbg].color.alpha = (unsigned short)(0xffff * usedAlpha);
+ dc.col[defaultbg].pixel &= 0x00FFFFFF;
+ dc.col[defaultbg].pixel |= (unsigned char)(0xff * usedAlpha) << 24;
+}
+
+void
+xloadcols(void)
+{
+ int i;
+ static int loaded;
+ Color *cp;
+
+ if (!loaded) {
+ dc.collen = 1 + (defaultbg = MAX(LEN(colorname), 256));
+ dc.col = xmalloc(dc.collen * sizeof(Color));
+ }
+
+ for (i = 0; i+1 < dc.collen; i++)
+ if (!xloadcolor(i, NULL, &dc.col[i])) {
+ if (colorname[i])
+ die("could not allocate color '%s'\n", colorname[i]);
+ else
+ die("could not allocate color %d\n", i);
+ }
+
+ if (dc.collen) // cannot die, as the color is already loaded.
+ xloadcolor(background, NULL, &dc.col[defaultbg]);
+
+ xloadalpha();
+ loaded = 1;
+}
+
+int
+xgetcolor(int x, unsigned char *r, unsigned char *g, unsigned char *b)
+{
+ if (!BETWEEN(x, 0, dc.collen))
+ return 1;
+
+ *r = dc.col[x].color.red >> 8;
+ *g = dc.col[x].color.green >> 8;
+ *b = dc.col[x].color.blue >> 8;
+
+ return 0;
+}
+
+int
+xsetcolorname(int x, const char *name)
+{
+ Color ncolor;
+
+ if (!BETWEEN(x, 0, dc.collen))
+ return 1;
+
+ if (!xloadcolor(x, name, &ncolor))
+ return 1;
+
+ XftColorFree(xw.dpy, xw.vis, xw.cmap, &dc.col[x]);
+ dc.col[x] = ncolor;
+
+ return 0;
+}
+
+/*
+ * Absolute coordinates.
+ */
+void
+xclear(int x1, int y1, int x2, int y2)
+{
+ XftDrawRect(xw.draw,
+ &dc.col[IS_SET(MODE_REVERSE)? defaultfg : defaultbg],
+ x1, y1, x2-x1, y2-y1);
+}
+
+void
+xhints(void)
+{
+ XClassHint class = {opt_name ? opt_name : "st",
+ opt_class ? opt_class : "St"};
+ XWMHints wm = {.flags = InputHint, .input = 1};
+ XSizeHints *sizeh;
+
+ sizeh = XAllocSizeHints();
+
+ sizeh->flags = PSize | PResizeInc | PBaseSize | PMinSize;
+ sizeh->height = win.h;
+ sizeh->width = win.w;
+ sizeh->height_inc = win.ch;
+ sizeh->width_inc = win.cw;
+ sizeh->base_height = 2 * borderpx;
+ sizeh->base_width = 2 * borderpx;
+ sizeh->min_height = win.ch + 2 * borderpx;
+ sizeh->min_width = win.cw + 2 * borderpx;
+ if (xw.isfixed) {
+ sizeh->flags |= PMaxSize;
+ sizeh->min_width = sizeh->max_width = win.w;
+ sizeh->min_height = sizeh->max_height = win.h;
+ }
+ if (xw.gm & (XValue|YValue)) {
+ sizeh->flags |= USPosition | PWinGravity;
+ sizeh->x = xw.l;
+ sizeh->y = xw.t;
+ sizeh->win_gravity = xgeommasktogravity(xw.gm);
+ }
+
+ XSetWMProperties(xw.dpy, xw.win, NULL, NULL, NULL, 0, sizeh, &wm,
+ &class);
+ XFree(sizeh);
+}
+
+int
+xgeommasktogravity(int mask)
+{
+ switch (mask & (XNegative|YNegative)) {
+ case 0:
+ return NorthWestGravity;
+ case XNegative:
+ return NorthEastGravity;
+ case YNegative:
+ return SouthWestGravity;
+ }
+
+ return SouthEastGravity;
+}
+
+int
+xloadfont(Font *f, FcPattern *pattern)
+{
+ FcPattern *configured;
+ FcPattern *match;
+ FcResult result;
+ XGlyphInfo extents;
+ int wantattr, haveattr;
+
+ /*
+ * Manually configure instead of calling XftMatchFont
+ * so that we can use the configured pattern for
+ * "missing glyph" lookups.
+ */
+ configured = FcPatternDuplicate(pattern);
+ if (!configured)
+ return 1;
+
+ FcConfigSubstitute(NULL, configured, FcMatchPattern);
+ XftDefaultSubstitute(xw.dpy, xw.scr, configured);
+
+ match = FcFontMatch(NULL, configured, &result);
+ if (!match) {
+ FcPatternDestroy(configured);
+ return 1;
+ }
+
+ if (!(f->match = XftFontOpenPattern(xw.dpy, match))) {
+ FcPatternDestroy(configured);
+ FcPatternDestroy(match);
+ return 1;
+ }
+
+ if ((XftPatternGetInteger(pattern, "slant", 0, &wantattr) ==
+ XftResultMatch)) {
+ /*
+ * Check if xft was unable to find a font with the appropriate
+ * slant but gave us one anyway. Try to mitigate.
+ */
+ if ((XftPatternGetInteger(f->match->pattern, "slant", 0,
+ &haveattr) != XftResultMatch) || haveattr < wantattr) {
+ f->badslant = 1;
+ fputs("font slant does not match\n", stderr);
+ }
+ }
+
+ if ((XftPatternGetInteger(pattern, "weight", 0, &wantattr) ==
+ XftResultMatch)) {
+ if ((XftPatternGetInteger(f->match->pattern, "weight", 0,
+ &haveattr) != XftResultMatch) || haveattr != wantattr) {
+ f->badweight = 1;
+ fputs("font weight does not match\n", stderr);
+ }
+ }
+
+ XftTextExtentsUtf8(xw.dpy, f->match,
+ (const FcChar8 *) ascii_printable,
+ strlen(ascii_printable), &extents);
+
+ f->set = NULL;
+ f->pattern = configured;
+
+ f->ascent = f->match->ascent;
+ f->descent = f->match->descent;
+ f->lbearing = 0;
+ f->rbearing = f->match->max_advance_width;
+
+ f->height = f->ascent + f->descent;
+ f->width = DIVCEIL(extents.xOff, strlen(ascii_printable));
+
+ return 0;
+}
+
+void
+xloadfonts(const char *fontstr, double fontsize)
+{
+ FcPattern *pattern;
+ double fontval;
+
+ if (fontstr[0] == '-')
+ pattern = XftXlfdParse(fontstr, False, False);
+ else
+ pattern = FcNameParse((const FcChar8 *)fontstr);
+
+ if (!pattern)
+ die("can't open font %s\n", fontstr);
+
+ if (fontsize > 1) {
+ FcPatternDel(pattern, FC_PIXEL_SIZE);
+ FcPatternDel(pattern, FC_SIZE);
+ FcPatternAddDouble(pattern, FC_PIXEL_SIZE, (double)fontsize);
+ usedfontsize = fontsize;
+ } else {
+ if (FcPatternGetDouble(pattern, FC_PIXEL_SIZE, 0, &fontval) ==
+ FcResultMatch) {
+ usedfontsize = fontval;
+ } else if (FcPatternGetDouble(pattern, FC_SIZE, 0, &fontval) ==
+ FcResultMatch) {
+ usedfontsize = -1;
+ } else {
+ /*
+ * Default font size is 12, if none given. This is to
+ * have a known usedfontsize value.
+ */
+ FcPatternAddDouble(pattern, FC_PIXEL_SIZE, 12);
+ usedfontsize = 12;
+ }
+ defaultfontsize = usedfontsize;
+ }
+
+ if (xloadfont(&dc.font, pattern))
+ die("can't open font %s\n", fontstr);
+
+ if (usedfontsize < 0) {
+ FcPatternGetDouble(dc.font.match->pattern,
+ FC_PIXEL_SIZE, 0, &fontval);
+ usedfontsize = fontval;
+ if (fontsize == 0)
+ defaultfontsize = fontval;
+ }
+
+ /* Setting character width and height. */
+ win.cw = ceilf(dc.font.width * cwscale);
+ win.ch = ceilf(dc.font.height * chscale);
+
+ FcPatternDel(pattern, FC_SLANT);
+ FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ITALIC);
+ if (xloadfont(&dc.ifont, pattern))
+ die("can't open font %s\n", fontstr);
+
+ FcPatternDel(pattern, FC_WEIGHT);
+ FcPatternAddInteger(pattern, FC_WEIGHT, FC_WEIGHT_BOLD);
+ if (xloadfont(&dc.ibfont, pattern))
+ die("can't open font %s\n", fontstr);
+
+ FcPatternDel(pattern, FC_SLANT);
+ FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ROMAN);
+ if (xloadfont(&dc.bfont, pattern))
+ die("can't open font %s\n", fontstr);
+
+ FcPatternDestroy(pattern);
+}
+
+int
+xloadsparefont(FcPattern *pattern, int flags)
+{
+ FcPattern *match;
+ FcResult result;
+
+ match = FcFontMatch(NULL, pattern, &result);
+ if (!match) {
+ return 1;
+ }
+
+ if (!(frc[frclen].font = XftFontOpenPattern(xw.dpy, match))) {
+ FcPatternDestroy(match);
+ return 1;
+ }
+
+ frc[frclen].flags = flags;
+ /* Believe U+0000 glyph will present in each default font */
+ frc[frclen].unicodep = 0;
+ frclen++;
+
+ return 0;
+}
+
+void
+xloadsparefonts(void)
+{
+ FcPattern *pattern;
+ double sizeshift, fontval;
+ int fc;
+ char **fp;
+
+ if (frclen != 0)
+ die("can't embed spare fonts. cache isn't empty");
+
+ /* Calculate count of spare fonts */
+ fc = sizeof(font2) / sizeof(*font2);
+ if (fc == 0)
+ return;
+
+ /* Allocate memory for cache entries. */
+ if (frccap < 4 * fc) {
+ frccap += 4 * fc - frccap;
+ frc = xrealloc(frc, frccap * sizeof(Fontcache));
+ }
+
+ for (fp = font2; fp - font2 < fc; ++fp) {
+
+ if (**fp == '-')
+ pattern = XftXlfdParse(*fp, False, False);
+ else
+ pattern = FcNameParse((FcChar8 *)*fp);
+
+ if (!pattern)
+ die("can't open spare font %s\n", *fp);
+
+ if (defaultfontsize > 0) {
+ sizeshift = usedfontsize - defaultfontsize;
+ if (sizeshift != 0 &&
+ FcPatternGetDouble(pattern, FC_PIXEL_SIZE, 0, &fontval) ==
+ FcResultMatch) {
+ fontval += sizeshift;
+ FcPatternDel(pattern, FC_PIXEL_SIZE);
+ FcPatternDel(pattern, FC_SIZE);
+ FcPatternAddDouble(pattern, FC_PIXEL_SIZE, fontval);
+ }
+ }
+
+ FcPatternAddBool(pattern, FC_SCALABLE, 1);
+
+ FcConfigSubstitute(NULL, pattern, FcMatchPattern);
+ XftDefaultSubstitute(xw.dpy, xw.scr, pattern);
+
+ if (xloadsparefont(pattern, FRC_NORMAL))
+ die("can't open spare font %s\n", *fp);
+
+ FcPatternDel(pattern, FC_SLANT);
+ FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ITALIC);
+ if (xloadsparefont(pattern, FRC_ITALIC))
+ die("can't open spare font %s\n", *fp);
+
+ FcPatternDel(pattern, FC_WEIGHT);
+ FcPatternAddInteger(pattern, FC_WEIGHT, FC_WEIGHT_BOLD);
+ if (xloadsparefont(pattern, FRC_ITALICBOLD))
+ die("can't open spare font %s\n", *fp);
+
+ FcPatternDel(pattern, FC_SLANT);
+ FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ROMAN);
+ if (xloadsparefont(pattern, FRC_BOLD))
+ die("can't open spare font %s\n", *fp);
+
+ FcPatternDestroy(pattern);
+ }
+}
+
+void
+xunloadfont(Font *f)
+{
+ XftFontClose(xw.dpy, f->match);
+ FcPatternDestroy(f->pattern);
+ if (f->set)
+ FcFontSetDestroy(f->set);
+}
+
+void
+xunloadfonts(void)
+{
+ /* Clear Harfbuzz font cache. */
+ hbunloadfonts();
+
+ /* Free the loaded fonts in the font cache. */
+ while (frclen > 0)
+ XftFontClose(xw.dpy, frc[--frclen].font);
+
+ xunloadfont(&dc.font);
+ xunloadfont(&dc.bfont);
+ xunloadfont(&dc.ifont);
+ xunloadfont(&dc.ibfont);
+}
+
+int
+ximopen(Display *dpy)
+{
+ XIMCallback imdestroy = { .client_data = NULL, .callback = ximdestroy };
+ XICCallback icdestroy = { .client_data = NULL, .callback = xicdestroy };
+
+ xw.ime.xim = XOpenIM(xw.dpy, NULL, NULL, NULL);
+ if (xw.ime.xim == NULL)
+ return 0;
+
+ if (XSetIMValues(xw.ime.xim, XNDestroyCallback, &imdestroy, NULL))
+ fprintf(stderr, "XSetIMValues: "
+ "Could not set XNDestroyCallback.\n");
+
+ xw.ime.spotlist = XVaCreateNestedList(0, XNSpotLocation, &xw.ime.spot,
+ NULL);
+
+ if (xw.ime.xic == NULL) {
+ xw.ime.xic = XCreateIC(xw.ime.xim, XNInputStyle,
+ XIMPreeditNothing | XIMStatusNothing,
+ XNClientWindow, xw.win,
+ XNDestroyCallback, &icdestroy,
+ NULL);
+ }
+ if (xw.ime.xic == NULL)
+ fprintf(stderr, "XCreateIC: Could not create input context.\n");
+
+ return 1;
+}
+
+void
+ximinstantiate(Display *dpy, XPointer client, XPointer call)
+{
+ if (ximopen(dpy))
+ XUnregisterIMInstantiateCallback(xw.dpy, NULL, NULL, NULL,
+ ximinstantiate, NULL);
+}
+
+void
+ximdestroy(XIM xim, XPointer client, XPointer call)
+{
+ xw.ime.xim = NULL;
+ XRegisterIMInstantiateCallback(xw.dpy, NULL, NULL, NULL,
+ ximinstantiate, NULL);
+ XFree(xw.ime.spotlist);
+}
+
+int
+xicdestroy(XIC xim, XPointer client, XPointer call)
+{
+ xw.ime.xic = NULL;
+ return 1;
+}
+
+void
+xinit(int cols, int rows)
+{
+ XGCValues gcvalues;
+ Cursor cursor;
+ Window parent;
+ pid_t thispid = getpid();
+ XColor xmousefg, xmousebg;
+ XWindowAttributes attr;
+ XVisualInfo vis;
+
+ xw.scr = XDefaultScreen(xw.dpy);
+
+ if (!(opt_embed && (parent = strtol(opt_embed, NULL, 0)))) {
+ parent = XRootWindow(xw.dpy, xw.scr);
+ xw.depth = 32;
+ } else {
+ XGetWindowAttributes(xw.dpy, parent, &attr);
+ xw.depth = attr.depth;
+ }
+
+ XMatchVisualInfo(xw.dpy, xw.scr, xw.depth, TrueColor, &vis);
+ xw.vis = vis.visual;
+
+ /* font */
+ if (!FcInit())
+ die("could not init fontconfig.\n");
+
+ usedfont = (opt_font == NULL)? font : opt_font;
+ xloadfonts(usedfont, 0);
+
+ /* spare fonts */
+ xloadsparefonts();
+
+ /* colors */
+ xw.cmap = XCreateColormap(xw.dpy, parent, xw.vis, None);
+ xloadcols();
+
+ /* adjust fixed window geometry */
+ win.w = 2 * borderpx + cols * win.cw;
+ win.h = 2 * borderpx + rows * win.ch;
+ if (xw.gm & XNegative)
+ xw.l += DisplayWidth(xw.dpy, xw.scr) - win.w - 2;
+ if (xw.gm & YNegative)
+ xw.t += DisplayHeight(xw.dpy, xw.scr) - win.h - 2;
+
+ /* Events */
+ xw.attrs.background_pixel = dc.col[defaultbg].pixel;
+ xw.attrs.border_pixel = dc.col[defaultbg].pixel;
+ xw.attrs.bit_gravity = NorthWestGravity;
+ xw.attrs.event_mask = FocusChangeMask | KeyPressMask | KeyReleaseMask
+ | ExposureMask | VisibilityChangeMask | StructureNotifyMask
+ | ButtonMotionMask | ButtonPressMask | ButtonReleaseMask;
+ xw.attrs.colormap = xw.cmap;
+
+ xw.win = XCreateWindow(xw.dpy, parent, xw.l, xw.t,
+ win.w, win.h, 0, xw.depth, InputOutput,
+ xw.vis, CWBackPixel | CWBorderPixel | CWBitGravity
+ | CWEventMask | CWColormap, &xw.attrs);
+
+ memset(&gcvalues, 0, sizeof(gcvalues));
+ gcvalues.graphics_exposures = False;
+ xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h, xw.depth);
+ dc.gc = XCreateGC(xw.dpy, xw.buf, GCGraphicsExposures, &gcvalues);
+ XSetForeground(xw.dpy, dc.gc, dc.col[defaultbg].pixel);
+ XFillRectangle(xw.dpy, xw.buf, dc.gc, 0, 0, win.w, win.h);
+
+ /* font spec buffer */
+ xw.specbuf = xmalloc(cols * sizeof(GlyphFontSpec));
+
+ /* Xft rendering context */
+ xw.draw = XftDrawCreate(xw.dpy, xw.buf, xw.vis, xw.cmap);
+
+ /* input methods */
+ if (!ximopen(xw.dpy)) {
+ XRegisterIMInstantiateCallback(xw.dpy, NULL, NULL, NULL,
+ ximinstantiate, NULL);
+ }
+
+ /* white cursor, black outline */
+ cursor = XCreateFontCursor(xw.dpy, mouseshape);
+ XDefineCursor(xw.dpy, xw.win, cursor);
+
+ if (XParseColor(xw.dpy, xw.cmap, colorname[mousefg], &xmousefg) == 0) {
+ xmousefg.red = 0xffff;
+ xmousefg.green = 0xffff;
+ xmousefg.blue = 0xffff;
+ }
+
+ if (XParseColor(xw.dpy, xw.cmap, colorname[mousebg], &xmousebg) == 0) {
+ xmousebg.red = 0x0000;
+ xmousebg.green = 0x0000;
+ xmousebg.blue = 0x0000;
+ }
+
+ XRecolorCursor(xw.dpy, cursor, &xmousefg, &xmousebg);
+
+ xw.xembed = XInternAtom(xw.dpy, "_XEMBED", False);
+ xw.wmdeletewin = XInternAtom(xw.dpy, "WM_DELETE_WINDOW", False);
+ xw.netwmname = XInternAtom(xw.dpy, "_NET_WM_NAME", False);
+ xw.netwmiconname = XInternAtom(xw.dpy, "_NET_WM_ICON_NAME", False);
+ XSetWMProtocols(xw.dpy, xw.win, &xw.wmdeletewin, 1);
+
+ xw.netwmpid = XInternAtom(xw.dpy, "_NET_WM_PID", False);
+ XChangeProperty(xw.dpy, xw.win, xw.netwmpid, XA_CARDINAL, 32,
+ PropModeReplace, (uchar *)&thispid, 1);
+
+ win.mode = MODE_NUMLOCK;
+ resettitle();
+ xhints();
+ XMapWindow(xw.dpy, xw.win);
+ XSync(xw.dpy, False);
+
+ clock_gettime(CLOCK_MONOTONIC, &xsel.tclick1);
+ clock_gettime(CLOCK_MONOTONIC, &xsel.tclick2);
+ xsel.primary = NULL;
+ xsel.clipboard = NULL;
+ xsel.xtarget = XInternAtom(xw.dpy, "UTF8_STRING", 0);
+ if (xsel.xtarget == None)
+ xsel.xtarget = XA_STRING;
+
+ boxdraw_xinit(xw.dpy, xw.cmap, xw.draw, xw.vis);
+}
+
+int
+xmakeglyphfontspecs(XftGlyphFontSpec *specs, const Glyph *glyphs, int len, int x, int y)
+{
+ float winx = borderpx + x * win.cw, winy = borderpx + y * win.ch, xp, yp;
+ ushort mode, prevmode = USHRT_MAX;
+ Font *font = &dc.font;
+ int frcflags = FRC_NORMAL;
+ float runewidth = win.cw;
+ Rune rune;
+ FT_UInt glyphidx;
+ FcResult fcres;
+ FcPattern *fcpattern, *fontpattern;
+ FcFontSet *fcsets[] = { NULL };
+ FcCharSet *fccharset;
+ int i, f, numspecs = 0;
+
+ for (i = 0, xp = winx, yp = winy + font->ascent; i < len; ++i) {
+ /* Fetch rune and mode for current glyph. */
+ rune = glyphs[i].u;
+ mode = glyphs[i].mode;
+
+ /* Skip dummy wide-character spacing. */
+ if (mode & ATTR_WDUMMY)
+ continue;
+
+ /* Determine font for glyph if different from previous glyph. */
+ if (prevmode != mode) {
+ prevmode = mode;
+ font = &dc.font;
+ frcflags = FRC_NORMAL;
+ runewidth = win.cw * ((mode & ATTR_WIDE) ? 2.0f : 1.0f);
+ if ((mode & ATTR_ITALIC) && (mode & ATTR_BOLD)) {
+ font = &dc.ibfont;
+ frcflags = FRC_ITALICBOLD;
+ } else if (mode & ATTR_ITALIC) {
+ font = &dc.ifont;
+ frcflags = FRC_ITALIC;
+ } else if (mode & ATTR_BOLD) {
+ font = &dc.bfont;
+ frcflags = FRC_BOLD;
+ }
+ yp = winy + font->ascent;
+ }
+
+ if (mode & ATTR_BOXDRAW) {
+ /* minor shoehorning: boxdraw uses only this ushort */
+ glyphidx = boxdrawindex(&glyphs[i]);
+ } else {
+ /* Lookup character index with default font. */
+ glyphidx = XftCharIndex(xw.dpy, font->match, rune);
+ }
+ if (glyphidx) {
+ specs[numspecs].font = font->match;
+ specs[numspecs].glyph = glyphidx;
+ specs[numspecs].x = (short)xp;
+ specs[numspecs].y = (short)yp;
+ xp += runewidth;
+ numspecs++;
+ continue;
+ }
+
+ /* Fallback on font cache, search the font cache for match. */
+ for (f = 0; f < frclen; f++) {
+ glyphidx = XftCharIndex(xw.dpy, frc[f].font, rune);
+ /* Everything correct. */
+ if (glyphidx && frc[f].flags == frcflags)
+ break;
+ /* We got a default font for a not found glyph. */
+ if (!glyphidx && frc[f].flags == frcflags
+ && frc[f].unicodep == rune) {
+ break;
+ }
+ }
+
+ /* Nothing was found. Use fontconfig to find matching font. */
+ if (f >= frclen) {
+ if (!font->set)
+ font->set = FcFontSort(0, font->pattern,
+ 1, 0, &fcres);
+ fcsets[0] = font->set;
+
+ /*
+ * Nothing was found in the cache. Now use
+ * some dozen of Fontconfig calls to get the
+ * font for one single character.
+ *
+ * Xft and fontconfig are design failures.
+ */
+ fcpattern = FcPatternDuplicate(font->pattern);
+ fccharset = FcCharSetCreate();
+
+ FcCharSetAddChar(fccharset, rune);
+ FcPatternAddCharSet(fcpattern, FC_CHARSET,
+ fccharset);
+ FcPatternAddBool(fcpattern, FC_SCALABLE, 1);
+
+ FcConfigSubstitute(0, fcpattern,
+ FcMatchPattern);
+ FcDefaultSubstitute(fcpattern);
+
+ fontpattern = FcFontSetMatch(0, fcsets, 1,
+ fcpattern, &fcres);
+
+ /* Allocate memory for the new cache entry. */
+ if (frclen >= frccap) {
+ frccap += 16;
+ frc = xrealloc(frc, frccap * sizeof(Fontcache));
+ }
+
+ frc[frclen].font = XftFontOpenPattern(xw.dpy,
+ fontpattern);
+ if (!frc[frclen].font)
+ die("XftFontOpenPattern failed seeking fallback font: %s\n",
+ strerror(errno));
+ frc[frclen].flags = frcflags;
+ frc[frclen].unicodep = rune;
+
+ glyphidx = XftCharIndex(xw.dpy, frc[frclen].font, rune);
+
+ f = frclen;
+ frclen++;
+
+ FcPatternDestroy(fcpattern);
+ FcCharSetDestroy(fccharset);
+ }
+
+ specs[numspecs].font = frc[f].font;
+ specs[numspecs].glyph = glyphidx;
+ specs[numspecs].x = (short)xp;
+ specs[numspecs].y = (short)yp;
+ xp += runewidth;
+ numspecs++;
+ }
+
+ /* Harfbuzz transformation for ligatures. */
+ hbtransform(specs, glyphs, len, x, y);
+
+ return numspecs;
+}
+
+void
+xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, int y)
+{
+ int charlen = len * ((base.mode & ATTR_WIDE) ? 2 : 1);
+ int winx = borderpx + x * win.cw, winy = borderpx + y * win.ch,
+ width = charlen * win.cw;
+ Color *fg, *bg, *temp, revfg, revbg, truefg, truebg;
+ XRenderColor colfg, colbg;
+ XRectangle r;
+
+ /* Fallback on color display for attributes not supported by the font */
+ if (base.mode & ATTR_ITALIC && base.mode & ATTR_BOLD) {
+ if (dc.ibfont.badslant || dc.ibfont.badweight)
+ base.fg = defaultattr;
+ } else if ((base.mode & ATTR_ITALIC && dc.ifont.badslant) ||
+ (base.mode & ATTR_BOLD && dc.bfont.badweight)) {
+ base.fg = defaultattr;
+ }
+
+ if (IS_TRUECOL(base.fg)) {
+ colfg.alpha = 0xffff;
+ colfg.red = TRUERED(base.fg);
+ colfg.green = TRUEGREEN(base.fg);
+ colfg.blue = TRUEBLUE(base.fg);
+ XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colfg, &truefg);
+ fg = &truefg;
+ } else {
+ fg = &dc.col[base.fg];
+ }
+
+ if (IS_TRUECOL(base.bg)) {
+ colbg.alpha = 0xffff;
+ colbg.green = TRUEGREEN(base.bg);
+ colbg.red = TRUERED(base.bg);
+ colbg.blue = TRUEBLUE(base.bg);
+ XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colbg, &truebg);
+ bg = &truebg;
+ } else {
+ bg = &dc.col[base.bg];
+ }
+
+ /* Change basic system colors [0-7] to bright system colors [8-15] */
+ if ((base.mode & ATTR_BOLD_FAINT) == ATTR_BOLD && BETWEEN(base.fg, 0, 7))
+ fg = &dc.col[base.fg + 8];
+
+ if (IS_SET(MODE_REVERSE)) {
+ if (fg == &dc.col[defaultfg]) {
+ fg = &dc.col[defaultbg];
+ } else {
+ colfg.red = ~fg->color.red;
+ colfg.green = ~fg->color.green;
+ colfg.blue = ~fg->color.blue;
+ colfg.alpha = fg->color.alpha;
+ XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colfg,
+ &revfg);
+ fg = &revfg;
+ }
+
+ if (bg == &dc.col[defaultbg]) {
+ bg = &dc.col[defaultfg];
+ } else {
+ colbg.red = ~bg->color.red;
+ colbg.green = ~bg->color.green;
+ colbg.blue = ~bg->color.blue;
+ colbg.alpha = bg->color.alpha;
+ XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colbg,
+ &revbg);
+ bg = &revbg;
+ }
+ }
+
+ if ((base.mode & ATTR_BOLD_FAINT) == ATTR_FAINT) {
+ colfg.red = fg->color.red / 2;
+ colfg.green = fg->color.green / 2;
+ colfg.blue = fg->color.blue / 2;
+ colfg.alpha = fg->color.alpha;
+ XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colfg, &revfg);
+ fg = &revfg;
+ }
+
+ if (base.mode & ATTR_REVERSE) {
+ temp = fg;
+ fg = bg;
+ bg = temp;
+ }
+
+ if (base.mode & ATTR_BLINK && win.mode & MODE_BLINK)
+ fg = bg;
+
+ if (base.mode & ATTR_INVISIBLE)
+ fg = bg;
+
+ /* Intelligent cleaning up of the borders. */
+ if (x == 0) {
+ xclear(0, (y == 0)? 0 : winy, borderpx,
+ winy + win.ch +
+ ((winy + win.ch >= borderpx + win.th)? win.h : 0));
+ }
+ if (winx + width >= borderpx + win.tw) {
+ xclear(winx + width, (y == 0)? 0 : winy, win.w,
+ ((winy + win.ch >= borderpx + win.th)? win.h : (winy + win.ch)));
+ }
+ if (y == 0)
+ xclear(winx, 0, winx + width, borderpx);
+ if (winy + win.ch >= borderpx + win.th)
+ xclear(winx, winy + win.ch, winx + width, win.h);
+
+ /* Clean up the region we want to draw to. */
+ XftDrawRect(xw.draw, bg, winx, winy, width, win.ch);
+
+ /* Set the clip region because Xft is sometimes dirty. */
+ r.x = 0;
+ r.y = 0;
+ r.height = win.ch;
+ r.width = width;
+ XftDrawSetClipRectangles(xw.draw, winx, winy, &r, 1);
+
+ if (base.mode & ATTR_BOXDRAW) {
+ drawboxes(winx, winy, width / len, win.ch, fg, bg, specs, len);
+ } else {
+ /* Render the glyphs. */
+ XftDrawGlyphFontSpec(xw.draw, fg, specs, len);
+ }
+
+ /* Render underline and strikethrough. */
+ if (base.mode & ATTR_UNDERLINE) {
+ XftDrawRect(xw.draw, fg, winx, winy + dc.font.ascent + 1,
+ width, 1);
+ }
+
+ if (base.mode & ATTR_STRUCK) {
+ XftDrawRect(xw.draw, fg, winx, winy + 2 * dc.font.ascent * chscale / 3,
+ width, 1);
+ }
+
+ /* Reset clip to none. */
+ XftDrawSetClip(xw.draw, 0);
+}
+
+void
+xdrawglyph(Glyph g, int x, int y)
+{
+ int numspecs;
+ XftGlyphFontSpec spec;
+
+ numspecs = xmakeglyphfontspecs(&spec, &g, 1, x, y);
+ xdrawglyphfontspecs(&spec, g, numspecs, x, y);
+}
+
+void
+xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og, Line line, int len)
+{
+ Color drawcol;
+
+ /* remove the old cursor */
+ if (selected(ox, oy))
+ og.mode ^= ATTR_REVERSE;
+
+ /* Redraw the line where cursor was previously.
+ * It will restore the ligatures broken by the cursor. */
+ xdrawline(line, 0, oy, len);
+
+ if (IS_SET(MODE_HIDE))
+ return;
+
+ /*
+ * Select the right color for the right mode.
+ */
+ g.mode &= ATTR_BOLD|ATTR_ITALIC|ATTR_UNDERLINE|ATTR_STRUCK|ATTR_WIDE|ATTR_BOXDRAW;
+
+ if (IS_SET(MODE_REVERSE)) {
+ g.mode |= ATTR_REVERSE;
+ g.bg = defaultfg;
+ if (selected(cx, cy)) {
+ drawcol = dc.col[defaultcs];
+ g.fg = defaultrcs;
+ } else {
+ drawcol = dc.col[defaultrcs];
+ g.fg = defaultcs;
+ }
+ } else {
+ if (selected(cx, cy)) {
+ g.fg = defaultfg;
+ g.bg = defaultrcs;
+ } else {
+ g.fg = defaultbg;
+ g.bg = defaultcs;
+ }
+ drawcol = dc.col[g.bg];
+ }
+
+ /* draw the new one */
+ if (IS_SET(MODE_FOCUSED)) {
+ switch (win.cursor) {
+ case 7: /* st extension */
+ g.u = 0x2603; /* snowman (U+2603) */
+ /* FALLTHROUGH */
+ case 0: /* Blinking Block */
+ case 1: /* Blinking Block (Default) */
+ case 2: /* Steady Block */
+ xdrawglyph(g, cx, cy);
+ break;
+ case 3: /* Blinking Underline */
+ case 4: /* Steady Underline */
+ XftDrawRect(xw.draw, &drawcol,
+ borderpx + cx * win.cw,
+ borderpx + (cy + 1) * win.ch - \
+ cursorthickness,
+ win.cw, cursorthickness);
+ break;
+ case 5: /* Blinking bar */
+ case 6: /* Steady bar */
+ XftDrawRect(xw.draw, &drawcol,
+ borderpx + cx * win.cw,
+ borderpx + cy * win.ch,
+ cursorthickness, win.ch);
+ break;
+ }
+ } else {
+ XftDrawRect(xw.draw, &drawcol,
+ borderpx + cx * win.cw,
+ borderpx + cy * win.ch,
+ win.cw - 1, 1);
+ XftDrawRect(xw.draw, &drawcol,
+ borderpx + cx * win.cw,
+ borderpx + cy * win.ch,
+ 1, win.ch - 1);
+ XftDrawRect(xw.draw, &drawcol,
+ borderpx + (cx + 1) * win.cw - 1,
+ borderpx + cy * win.ch,
+ 1, win.ch - 1);
+ XftDrawRect(xw.draw, &drawcol,
+ borderpx + cx * win.cw,
+ borderpx + (cy + 1) * win.ch - 1,
+ win.cw, 1);
+ }
+}
+
+void
+xsetenv(void)
+{
+ char buf[sizeof(long) * 8 + 1];
+
+ snprintf(buf, sizeof(buf), "%lu", xw.win);
+ setenv("WINDOWID", buf, 1);
+}
+
+void
+xseticontitle(char *p)
+{
+ XTextProperty prop;
+ DEFAULT(p, opt_title);
+
+ if (Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle,
+ &prop) != Success)
+ return;
+ XSetWMIconName(xw.dpy, xw.win, &prop);
+ XSetTextProperty(xw.dpy, xw.win, &prop, xw.netwmiconname);
+ XFree(prop.value);
+}
+
+void
+xsettitle(char *p)
+{
+ XTextProperty prop;
+ DEFAULT(p, opt_title);
+
+ if (Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle,
+ &prop) != Success)
+ return;
+ XSetWMName(xw.dpy, xw.win, &prop);
+ XSetTextProperty(xw.dpy, xw.win, &prop, xw.netwmname);
+ XFree(prop.value);
+}
+
+int
+xstartdraw(void)
+{
+ return IS_SET(MODE_VISIBLE);
+}
+
+void
+xdrawline(Line line, int x1, int y1, int x2)
+{
+ int i, x, ox, numspecs;
+ Glyph base, new;
+ XftGlyphFontSpec *specs = xw.specbuf;
+
+ numspecs = xmakeglyphfontspecs(specs, &line[x1], x2 - x1, x1, y1);
+ i = ox = 0;
+ for (x = x1; x < x2 && i < numspecs; x++) {
+ new = line[x];
+ if (new.mode == ATTR_WDUMMY)
+ continue;
+ if (selected(x, y1))
+ new.mode ^= ATTR_REVERSE;
+ if (i > 0 && ATTRCMP(base, new)) {
+ xdrawglyphfontspecs(specs, base, i, ox, y1);
+ specs += i;
+ numspecs -= i;
+ i = 0;
+ }
+ if (i == 0) {
+ ox = x;
+ base = new;
+ }
+ i++;
+ }
+ if (i > 0)
+ xdrawglyphfontspecs(specs, base, i, ox, y1);
+}
+
+void
+xfinishdraw(void)
+{
+ XCopyArea(xw.dpy, xw.buf, xw.win, dc.gc, 0, 0, win.w,
+ win.h, 0, 0);
+ XSetForeground(xw.dpy, dc.gc,
+ dc.col[IS_SET(MODE_REVERSE)?
+ defaultfg : defaultbg].pixel);
+}
+
+void
+xximspot(int x, int y)
+{
+ if (xw.ime.xic == NULL)
+ return;
+
+ xw.ime.spot.x = borderpx + x * win.cw;
+ xw.ime.spot.y = borderpx + (y + 1) * win.ch;
+
+ XSetICValues(xw.ime.xic, XNPreeditAttributes, xw.ime.spotlist, NULL);
+}
+
+void
+expose(XEvent *ev)
+{
+ redraw();
+}
+
+void
+visibility(XEvent *ev)
+{
+ XVisibilityEvent *e = &ev->xvisibility;
+
+ MODBIT(win.mode, e->state != VisibilityFullyObscured, MODE_VISIBLE);
+}
+
+void
+unmap(XEvent *ev)
+{
+ win.mode &= ~MODE_VISIBLE;
+}
+
+void
+xsetpointermotion(int set)
+{
+ MODBIT(xw.attrs.event_mask, set, PointerMotionMask);
+ XChangeWindowAttributes(xw.dpy, xw.win, CWEventMask, &xw.attrs);
+}
+
+void
+xsetmode(int set, unsigned int flags)
+{
+ int mode = win.mode;
+ MODBIT(win.mode, set, flags);
+ if ((win.mode & MODE_REVERSE) != (mode & MODE_REVERSE))
+ redraw();
+}
+
+int
+xsetcursor(int cursor)
+{
+ if (!BETWEEN(cursor, 0, 7)) /* 7: st extension */
+ return 1;
+ win.cursor = cursor;
+ return 0;
+}
+
+void
+xseturgency(int add)
+{
+ XWMHints *h = XGetWMHints(xw.dpy, xw.win);
+
+ MODBIT(h->flags, add, XUrgencyHint);
+ XSetWMHints(xw.dpy, xw.win, h);
+ XFree(h);
+}
+
+void
+xbell(void)
+{
+ if (!(IS_SET(MODE_FOCUSED)))
+ xseturgency(1);
+ if (bellvolume)
+ XkbBell(xw.dpy, xw.win, bellvolume, (Atom)NULL);
+}
+
+void
+focus(XEvent *ev)
+{
+ XFocusChangeEvent *e = &ev->xfocus;
+
+ if (e->mode == NotifyGrab)
+ return;
+
+ if (ev->type == FocusIn) {
+ if (xw.ime.xic)
+ XSetICFocus(xw.ime.xic);
+ win.mode |= MODE_FOCUSED;
+ xseturgency(0);
+ if (IS_SET(MODE_FOCUS))
+ ttywrite("\033[I", 3, 0);
+ if (!focused) {
+ focused = 1;
+ xloadcols();
+ tfulldirt();
+ }
+ } else {
+ if (xw.ime.xic)
+ XUnsetICFocus(xw.ime.xic);
+ win.mode &= ~MODE_FOCUSED;
+ if (IS_SET(MODE_FOCUS))
+ ttywrite("\033[O", 3, 0);
+ if (focused) {
+ focused = 0;
+ xloadcols();
+ tfulldirt();
+ }
+ }
+}
+
+int
+match(uint mask, uint state)
+{
+ return mask == XK_ANY_MOD || mask == (state & ~ignoremod);
+}
+
+char*
+kmap(KeySym k, uint state)
+{
+ Key *kp;
+ int i;
+
+ /* Check for mapped keys out of X11 function keys. */
+ for (i = 0; i < LEN(mappedkeys); i++) {
+ if (mappedkeys[i] == k)
+ break;
+ }
+ if (i == LEN(mappedkeys)) {
+ if ((k & 0xFFFF) < 0xFD00)
+ return NULL;
+ }
+
+ for (kp = key; kp < key + LEN(key); kp++) {
+ if (kp->k != k)
+ continue;
+
+ if (!match(kp->mask, state))
+ continue;
+
+ if (IS_SET(MODE_APPKEYPAD) ? kp->appkey < 0 : kp->appkey > 0)
+ continue;
+ if (IS_SET(MODE_NUMLOCK) && kp->appkey == 2)
+ continue;
+
+ if (IS_SET(MODE_APPCURSOR) ? kp->appcursor < 0 : kp->appcursor > 0)
+ continue;
+
+ return kp->s;
+ }
+
+ return NULL;
+}
+
+void
+kpress(XEvent *ev)
+{
+ XKeyEvent *e = &ev->xkey;
+ KeySym ksym;
+ char *buf = NULL, *customkey;
+ int len = 0;
+ int buf_size = 64;
+ int critical = - 1;
+ Rune c;
+ Status status;
+ Shortcut *bp;
+
+ if (IS_SET(MODE_KBDLOCK))
+ return;
+
+reallocbuf:
+ if (critical > 0)
+ goto cleanup;
+ if (buf)
+ free(buf);
+
+ buf = xmalloc((buf_size) * sizeof(char));
+ critical += 1;
+
+ if (xw.ime.xic) {
+ len = XmbLookupString(xw.ime.xic, e, buf, buf_size, &ksym, &status);
+ if (status == XBufferOverflow) {
+ buf_size = len;
+ goto reallocbuf;
+ }
+ } else {
+ // Not sure how to fix this and if it is fixable
+ // but at least it does write something into the buffer
+ // so it is not as critical
+ len = XLookupString(e, buf, buf_size, &ksym, NULL);
+ }
+ /* 1. shortcuts */
+ for (bp = shortcuts; bp < shortcuts + LEN(shortcuts); bp++) {
+ if (ksym == bp->keysym && match(bp->mod, e->state)) {
+ bp->func(&(bp->arg));
+ goto cleanup;
+ }
+ }
+
+ /* 2. custom keys from config.h */
+ if ((customkey = kmap(ksym, e->state))) {
+ ttywrite(customkey, strlen(customkey), 1);
+ goto cleanup;
+ }
+
+ /* 3. composed string from input method */
+ if (len == 0)
+ goto cleanup;
+ if (len == 1 && e->state & Mod1Mask) {
+ if (IS_SET(MODE_8BIT)) {
+ if (*buf < 0177) {
+ c = *buf | 0x80;
+ len = utf8encode(c, buf);
+ }
+ } else {
+ buf[1] = buf[0];
+ buf[0] = '\033';
+ len = 2;
+ }
+ }
+ if (len <= buf_size)
+ ttywrite(buf, len, 1);
+cleanup:
+ if (buf)
+ free(buf);
+}
+
+void
+cmessage(XEvent *e)
+{
+ /*
+ * See xembed specs
+ * http://standards.freedesktop.org/xembed-spec/xembed-spec-latest.html
+ */
+ if (e->xclient.message_type == xw.xembed && e->xclient.format == 32) {
+ if (e->xclient.data.l[1] == XEMBED_FOCUS_IN) {
+ win.mode |= MODE_FOCUSED;
+ xseturgency(0);
+ } else if (e->xclient.data.l[1] == XEMBED_FOCUS_OUT) {
+ win.mode &= ~MODE_FOCUSED;
+ }
+ } else if (e->xclient.data.l[0] == xw.wmdeletewin) {
+ ttyhangup();
+ exit(0);
+ }
+}
+
+void
+resize(XEvent *e)
+{
+ if (e->xconfigure.width == win.w && e->xconfigure.height == win.h)
+ return;
+
+ cresize(e->xconfigure.width, e->xconfigure.height);
+}
+
+void
+run(void)
+{
+ XEvent ev;
+ int w = win.w, h = win.h;
+ fd_set rfd;
+ int xfd = XConnectionNumber(xw.dpy), ttyfd, xev, drawing;
+ struct timespec seltv, *tv, now, lastblink, trigger;
+ double timeout;
+
+ /* Waiting for window mapping */
+ do {
+ XNextEvent(xw.dpy, &ev);
+ /*
+ * This XFilterEvent call is required because of XOpenIM. It
+ * does filter out the key event and some client message for
+ * the input method too.
+ */
+ if (XFilterEvent(&ev, None))
+ continue;
+ if (ev.type == ConfigureNotify) {
+ w = ev.xconfigure.width;
+ h = ev.xconfigure.height;
+ }
+ } while (ev.type != MapNotify);
+
+ ttyfd = ttynew(opt_line, shell, opt_io, opt_cmd);
+ cresize(w, h);
+
+ for (timeout = -1, drawing = 0, lastblink = (struct timespec){0};;) {
+ FD_ZERO(&rfd);
+ FD_SET(ttyfd, &rfd);
+ FD_SET(xfd, &rfd);
+
+ if (XPending(xw.dpy))
+ timeout = 0; /* existing events might not set xfd */
+
+ seltv.tv_sec = timeout / 1E3;
+ seltv.tv_nsec = 1E6 * (timeout - 1E3 * seltv.tv_sec);
+ tv = timeout >= 0 ? &seltv : NULL;
+
+ if (pselect(MAX(xfd, ttyfd)+1, &rfd, NULL, NULL, tv, NULL) < 0) {
+ if (errno == EINTR)
+ continue;
+ die("select failed: %s\n", strerror(errno));
+ }
+ clock_gettime(CLOCK_MONOTONIC, &now);
+
+ if (FD_ISSET(ttyfd, &rfd))
+ ttyread();
+
+ xev = 0;
+ while (XPending(xw.dpy)) {
+ xev = 1;
+ XNextEvent(xw.dpy, &ev);
+ if (XFilterEvent(&ev, None))
+ continue;
+ if (handler[ev.type])
+ (handler[ev.type])(&ev);
+ }
+
+ /*
+ * To reduce flicker and tearing, when new content or event
+ * triggers drawing, we first wait a bit to ensure we got
+ * everything, and if nothing new arrives - we draw.
+ * We start with trying to wait minlatency ms. If more content
+ * arrives sooner, we retry with shorter and shorter periods,
+ * and eventually draw even without idle after maxlatency ms.
+ * Typically this results in low latency while interacting,
+ * maximum latency intervals during `cat huge.txt`, and perfect
+ * sync with periodic updates from animations/key-repeats/etc.
+ */
+ if (FD_ISSET(ttyfd, &rfd) || xev) {
+ if (!drawing) {
+ trigger = now;
+ drawing = 1;
+ }
+ timeout = (maxlatency - TIMEDIFF(now, trigger)) \
+ / maxlatency * minlatency;
+ if (timeout > 0)
+ continue; /* we have time, try to find idle */
+ }
+
+ /* idle detected or maxlatency exhausted -> draw */
+ timeout = -1;
+ if (blinktimeout && tattrset(ATTR_BLINK)) {
+ timeout = blinktimeout - TIMEDIFF(now, lastblink);
+ if (timeout <= 0) {
+ if (-timeout > blinktimeout) /* start visible */
+ win.mode |= MODE_BLINK;
+ win.mode ^= MODE_BLINK;
+ tsetdirtattr(ATTR_BLINK);
+ lastblink = now;
+ timeout = blinktimeout;
+ }
+ }
+
+ draw();
+ XFlush(xw.dpy);
+ drawing = 0;
+ }
+}
+
+int
+resource_load(XrmDatabase db, char *name, enum resource_type rtype, void *dst)
+{
+ char **sdst = dst;
+ int *idst = dst;
+ float *fdst = dst;
+
+ char fullname[256];
+ char fullclass[256];
+ char *type;
+ XrmValue ret;
+
+ snprintf(fullname, sizeof(fullname), "%s.%s",
+ opt_name ? opt_name : "st", name);
+ snprintf(fullclass, sizeof(fullclass), "%s.%s",
+ opt_class ? opt_class : "St", name);
+ fullname[sizeof(fullname) - 1] = fullclass[sizeof(fullclass) - 1] = '\0';
+
+ XrmGetResource(db, fullname, fullclass, &type, &ret);
+ if (ret.addr == NULL || strncmp("String", type, 64))
+ return 1;
+
+ switch (rtype) {
+ case STRING:
+ *sdst = ret.addr;
+ break;
+ case INTEGER:
+ *idst = strtoul(ret.addr, NULL, 10);
+ break;
+ case FLOAT:
+ *fdst = strtof(ret.addr, NULL);
+ break;
+ }
+ return 0;
+}
+
+void
+config_init(void)
+{
+ char *resm;
+ XrmDatabase db;
+ ResourcePref *p;
+
+ XrmInitialize();
+ resm = XResourceManagerString(xw.dpy);
+ if (!resm)
+ return;
+
+ db = XrmGetStringDatabase(resm);
+ for (p = resources; p < resources + LEN(resources); p++)
+ resource_load(db, p->name, p->type, p->dst);
+}
+
+void
+usage(void)
+{
+ die("usage: %s [-aiv] [-c class] [-f font] [-g geometry]"
+ " [-n name] [-o file]\n"
+ " [-T title] [-t title] [-w windowid]"
+ " [[-e] command [args ...]]\n"
+ " %s [-aiv] [-c class] [-f font] [-g geometry]"
+ " [-n name] [-o file]\n"
+ " [-T title] [-t title] [-w windowid] -l line"
+ " [stty_args ...]\n", argv0, argv0);
+}
+
+int
+main(int argc, char *argv[])
+{
+ xw.l = xw.t = 0;
+ xw.isfixed = False;
+ xsetcursor(cursorshape);
+
+ ARGBEGIN {
+ case 'a':
+ allowaltscreen = 0;
+ break;
+ case 'A':
+ opt_alpha = EARGF(usage());
+ break;
+ case 'c':
+ opt_class = EARGF(usage());
+ break;
+ case 'e':
+ if (argc > 0)
+ --argc, ++argv;
+ goto run;
+ case 'f':
+ opt_font = EARGF(usage());
+ break;
+ case 'g':
+ xw.gm = XParseGeometry(EARGF(usage()),
+ &xw.l, &xw.t, &cols, &rows);
+ break;
+ case 'i':
+ xw.isfixed = 1;
+ break;
+ case 'o':
+ opt_io = EARGF(usage());
+ break;
+ case 'l':
+ opt_line = EARGF(usage());
+ break;
+ case 'n':
+ opt_name = EARGF(usage());
+ break;
+ case 't':
+ case 'T':
+ opt_title = EARGF(usage());
+ break;
+ case 'w':
+ opt_embed = EARGF(usage());
+ break;
+ case 'v':
+ die("%s " VERSION "\n", argv0);
+ break;
+ default:
+ usage();
+ } ARGEND;
+
+run:
+ if (argc > 0) /* eat all remaining arguments */
+ opt_cmd = argv;
+
+ if (!opt_title)
+ opt_title = (opt_line || !opt_cmd) ? "st" : opt_cmd[0];
+
+ setlocale(LC_CTYPE, "");
+ XSetLocaleModifiers("");
+
+ if(!(xw.dpy = XOpenDisplay(NULL)))
+ die("Can't open display\n");
+
+ config_init();
+ cols = MAX(cols, 1);
+ rows = MAX(rows, 1);
+ defaultbg = MAX(LEN(colorname), 256);
+ alphaUnfocus = alpha-alphaOffset;
+ tnew(cols, rows);
+ xinit(cols, rows);
+ xsetenv();
+ selinit();
+ run();
+
+ return 0;
+}
+
diff --git a/fonts/iosevka-comfy/LICENSE.md b/fonts/iosevka-comfy/LICENSE.md
new file mode 100644
index 0000000..37cf243
--- /dev/null
+++ b/fonts/iosevka-comfy/LICENSE.md
@@ -0,0 +1,135 @@
+Shared under the same terms of Iosevka (https://github.com/be5invis/Iosevka). Its LICENSE.md is produced below.
+
+
+
+
+The font is licensed under SIL OFL Version 1.1.
+
+The support code is licensed under Berkeley Software Distribution license.
+
+---
+---
+
+Copyright (c) 2015-2020 Belleve Invis ([email protected]).
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+* Neither the name of Belleve Invis nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BELLEVE INVIS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-----------------------
+
+---
+
+Copyright 2015-2020, Belleve Invis ([email protected]).
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+--------------------------
+
+
+SIL Open Font License v1.1
+====================================================
+
+
+Preamble
+----------
+
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+
+Definitions
+-------------
+
+`"Font Software"` refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+`"Reserved Font Name"` refers to any names specified as such after the
+copyright statement(s).
+
+`"Original Version"` refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+`"Modified Version"` refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+`"Author"` refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+
+Permission & Conditions
+------------------------
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1. Neither the Font Software nor any of its individual components,
+ in Original or Modified Versions, may be sold by itself.
+
+2. Original or Modified Versions of the Font Software may be bundled,
+ redistributed and/or sold with any software, provided that each copy
+ contains the above copyright notice and this license. These can be
+ included either as stand-alone text files, human-readable headers or
+ in the appropriate machine-readable metadata fields within text or
+ binary files as long as those fields can be easily viewed by the user.
+
+3. No Modified Version of the Font Software may use the Reserved Font
+ Name(s) unless explicit written permission is granted by the corresponding
+ Copyright Holder. This restriction only applies to the primary font name as
+ presented to the users.
+
+4. The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+ Software shall not be used to promote, endorse or advertise any
+ Modified Version, except to acknowledge the contribution(s) of the
+ Copyright Holder(s) and the Author(s) or with their explicit written
+ permission.
+
+5. The Font Software, modified or unmodified, in part or in whole,
+ must be distributed entirely under this license, and must not be
+ distributed under any other license. The requirement for fonts to
+ remain under this license does not apply to any document created
+ using the Font Software.
+
+
+
+Termination
+-----------
+
+This license becomes null and void if any of the above conditions are
+not met.
+
+
+ DISCLAIMER
+
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+ OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/fonts/iosevka-comfy/README.md b/fonts/iosevka-comfy/README.md
new file mode 100644
index 0000000..3698e08
--- /dev/null
+++ b/fonts/iosevka-comfy/README.md
@@ -0,0 +1,177 @@
+# Iosevka Comfy
+
+IMAGES HERE: <https://protesilaos.com/emacs/iosevka-comfy-pictures>.
+
+Customised build of the [Iosevka
+typeface](https://github.com/be5invis/Iosevka), with a consistent
+rounded style and overrides for almost all individual glyphs in both
+roman (upright) and italic (slanted) variants.
+
++ Git repo on SourceHut: <https://git.sr.ht/~protesilaos/iosevka-comfy>
+ - Mirrors:
+ + GitHub: <https://github.com/protesilaos/iosevka-comfy>
+ + GitLab: <https://gitlab.com/protesilaos/iosevka-comfy>
++ Mailing list: <https://lists.sr.ht/~protesilaos/general-issues>
++ Sample pictures: <https://protesilaos.com/emacs/iosevka-comfy-pictures>
++ Backronym: Iosevka ... Could Only Modify a Font, Yes
+
+## Principles of the design
+
+Iosevka Comfy optimises for inter-glyph and inter-style consistency
+within the overarching constraint of usability at small point sizes.
+The shapes are round and are designed in concert to both impose a
+predictable rhythm and keep characters distinct from each other.
+
+Roman and italic styles are made to look more consistent than the
+default upstream Iosevka while retaining their unique features. Unlike
+the default Iosevka style, the upright glyphs do not have a mixture of
+straight/blocky and curved or serified characters (special exceptions
+notwithstanding). While the italics do not have calligraphic tendencies
+that greatly contrast with their counterparts. The differences within
+each style set and between the styles themselves are more nuanced. The
+intent is to make everything feel part of the same aesthetic.
+Distinctions are drawn on the premise of contributing to the demands of
+the design in light of usability, without ever calling attention to
+themselves (as opposed to sporadic calligraphic glyphs amid an otherwise
+austere presentation which seem to say "look how pretty I am!").
+
+To achieve consistency between roman and italic styles we remove
+elements of roundedness in the latter's glyphs to make them look a bit
+sturdier. Otherwise they would feel more rounded than their roman
+counterparts given the added slant. We do not want that added implicit
+emphasis of extra roundedness because the slant is already sufficient:
+to emphasise the emphasis is the kind of exaggeration that Iosevka Comfy
+strives to eliminate.
+
+## Variants
+
+```
+| Family | Shapes | Spacing | Style | Ligatures |
+|---------------------------------+--------+---------+------------+-----------|
+| Iosevka Comfy | Sans | Compact | Monospaced | Yes |
+| Iosevka Comfy Fixed | Sans | Compact | Monospaced | No |
+| Iosevka Comfy Duo | Sans | Compact | Duospaced | Yes |
+|---------------------------------+--------+---------+------------+-----------|
+| Iosevka Comfy Motion | Slab | Compact | Monospaced | Yes |
+| Iosevka Comfy Motion Fixed | Slab | Compact | Monospaced | No |
+| Iosevka Comfy Motion Duo | Slab | Compact | Duospaced | Yes |
+|---------------------------------+--------+---------+------------+-----------|
+| Iosevka Comfy Wide | Sans | Wide | Monospaced | Yes |
+| Iosevka Comfy Wide Fixed | Sans | Wide | Monospaced | No |
+| Iosevka Comfy Wide Duo | Sans | Wide | Duospaced | Yes |
+|---------------------------------+--------+---------+------------+-----------|
+| Iosevka Comfy Wide Motion | Slab | Wide | Monospaced | Yes |
+| Iosevka Comfy Wide Motion Fixed | Slab | Wide | Monospaced | No |
+| Iosevka Comfy Wide Motion Duo | Slab | Wide | Duospaced | Yes |
+```
+
+Iosevka Comfy comes in four sets of three: two sans-serif and two
+serif supersets. The triplets in each set follow the naming scheme
+`NAME{,-fixed,-duo}`. The base name is monospaced and supports
+ligatures. The "fixed" one is strictly monospaced so as to work with
+all terminal emulators: it does not support ligatures or any wider
+glyphs. And the "duo" is quasi-proportionately spaced, while
+supporting ligatures.
+
+Here "quasi-proportional" means that certain glyphs are allowed to
+occupy their natural width, instead of being strictly monospaced,
+while other remain monospaced. This combination results in a style
+that feels like fixed spacing but reads like variable spacing.
+
+1. The **compact, sans-serif** set:
+
+ - `iosevka-comfy` is monospaced and supports ligatures. Apart from
+ ligatures, it allows certain special glyphs, such as arrows, to
+ occupy more than one block.
+
+ - `iosevka-comfy-fixed` is like `iosevka-comfy` albeit strictly
+ monospaced and thus does not support ligatures. All glyphs are
+ exactly the same width. Use this if you prefer it or if your
+ application (e.g. terminal emulator) does not recognise
+ `iosevka-comfy` as a monospaced font.
+
+ - `iosevka-comfy-duo` is quasi-proportional and supports ligatures. The
+ naturally narrow glyphs, such as `i`, are allowed to occupy their
+ natural width instead of one space.
+
+2. The **compact, serif** set:
+
+ - `iosevka-comfy-motion` is monospaced and supports ligatures. It is
+ like `iosevka-comfy` but with lots of small tweaks that add serifs
+ and tailed ends to relevant glyphs. Put simply, it is the serified
+ counterpart of `iosevka-comfy`.
+
+ - `iosevka-comfy-motion-fixed` is the serif equivalent of the
+ aforementioned `iosevka-comfy-fixed`.
+
+ - `iosevka-comfy-motion-duo` is the serif equivalent of
+ `iosevka-comfy-duo`.
+
+3. The **wide, sans-serif** set:
+
+ - `iosevka-comfy-wide` is the same as `iosevka-comfy` except it is
+ noticeably wider. It also looks taller than `iosevka-comfy` even
+ though both variants fit the same number of lines on a screen.
+
+ - `iosevka-comfy-wide-fixed` is the "wide" counterpart of the
+ `iosevka-comfy-fixed` family.
+
+ - `iosevka-comfy-wide-duo` is the "wide" counterpart of the
+ `iosevka-comfy-duo` family.
+
+4. The **wide, serif** set:
+
+ - `iosevka-comfy-wide-motion` is the same as `iosevka-comfy-motion`
+ except it is noticeably wider. It also looks taller than
+ `iosevka-comfy-motion` even though both variants fit the same
+ number of lines on a screen.
+
+ - `iosevka-comfy-wide-motion-fixed` is the "wide" counterpart of the
+ `iosevka-comfy-motion-fixed` family.
+
+ - `iosevka-comfy-wide-motion-duo` is the "wide" counterpart of the
+ `iosevka-comfy-motion-duo` family.
+
+## Install on GNU/Linux
+
+Unless you have some exotic system, in which case you know what you are
+doing, you can install fonts for your local user by copying the `.ttf`
+files or their directories in `~/.local/share/fonts/`. For system-wide
+installation, place them in `/usr/share/fonts/`.
+
+Depending on your system, you may need to delete the `ttf` or
+`ttf-unhinted` builds. Though this is not strictly necessary, as the
+system knows which one to pick.
+
+When in doubt, install locally.
+
+**Perform a shallow clone** of this repository to speed things up:
+
+```sh
+git clone --depth 1 https://git.sr.ht/~protesilaos/iosevka-comfy
+```
+
+## Build information
+
+Iosevka Comfy is configured in accordance with the documentation of
+the upstream project. This practically means that (i) [we clone the
+official repo](https://github.com/be5invis/iosevka), (ii) define our
+`private-build-plans.toml` at its root, (iii) install the `npm`
+dependencies, and (iv) build the `.ttf` files with something like the
+following for each variant (run from the root of the project):
+
+```sh
+npm run build -- ttf::iosevka-comfy
+```
+
+Or this loop:
+
+```sh
+for i in iosevka-comfy{,-motion,-wide,-wide-motion}{,-fixed,-duo} ; do npm run build -- ttf::$i ; done
+```
+
+The last update to Iosevka Comfy was done on 2023-05-15 using upstream
+version `v21.1.2`, commit `7ef24b8d`.
+
+Each file is provided as-is in the hope that it may prove useful, but
+is otherwise intended only for my private use.
diff --git a/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-bold.ttf
new file mode 100644
index 0000000..568d8a9
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-bolditalic.ttf
new file mode 100644
index 0000000..2dd5c28
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-extrabold.ttf
new file mode 100644
index 0000000..63876c8
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-extrabolditalic.ttf
new file mode 100644
index 0000000..728edde
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-italic.ttf
new file mode 100644
index 0000000..7893b68
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-light.ttf b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-light.ttf
new file mode 100644
index 0000000..44bc0be
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-lightitalic.ttf
new file mode 100644
index 0000000..68320d5
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-regular.ttf
new file mode 100644
index 0000000..2980374
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-semilight.ttf
new file mode 100644
index 0000000..ffcd037
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-semilightitalic.ttf
new file mode 100644
index 0000000..bcda7e7
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf-unhinted/iosevka-comfy-duo-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-bold.ttf
new file mode 100644
index 0000000..bea2fd6
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-bolditalic.ttf
new file mode 100644
index 0000000..b0af58c
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-extrabold.ttf
new file mode 100644
index 0000000..618303c
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-extrabolditalic.ttf
new file mode 100644
index 0000000..c21614f
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-italic.ttf
new file mode 100644
index 0000000..368cd74
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-light.ttf b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-light.ttf
new file mode 100644
index 0000000..2247648
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-lightitalic.ttf
new file mode 100644
index 0000000..16b80f7
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-regular.ttf
new file mode 100644
index 0000000..d2354d0
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-semilight.ttf
new file mode 100644
index 0000000..c70c023
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-semilightitalic.ttf
new file mode 100644
index 0000000..8efa9c2
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-duo/ttf/iosevka-comfy-duo-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-bold.ttf
new file mode 100644
index 0000000..abf1cfd
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-bolditalic.ttf
new file mode 100644
index 0000000..17ba768
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-extrabold.ttf
new file mode 100644
index 0000000..bdf4db2
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-extrabolditalic.ttf
new file mode 100644
index 0000000..04dca14
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-italic.ttf
new file mode 100644
index 0000000..0b0a68e
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-light.ttf b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-light.ttf
new file mode 100644
index 0000000..3c813af
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-lightitalic.ttf
new file mode 100644
index 0000000..8893ac0
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-regular.ttf
new file mode 100644
index 0000000..7048677
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-semilight.ttf
new file mode 100644
index 0000000..ebd1b66
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-semilightitalic.ttf
new file mode 100644
index 0000000..a89b50b
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf-unhinted/iosevka-comfy-fixed-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-bold.ttf
new file mode 100644
index 0000000..a73ade2
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-bolditalic.ttf
new file mode 100644
index 0000000..93cec3b
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-extrabold.ttf
new file mode 100644
index 0000000..f533cb3
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-extrabolditalic.ttf
new file mode 100644
index 0000000..9ff4c44
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-italic.ttf
new file mode 100644
index 0000000..2ef4423
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-light.ttf b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-light.ttf
new file mode 100644
index 0000000..3f4d4a2
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-lightitalic.ttf
new file mode 100644
index 0000000..88c7fde
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-regular.ttf
new file mode 100644
index 0000000..850e2d2
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-semilight.ttf
new file mode 100644
index 0000000..f00585c
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-semilightitalic.ttf
new file mode 100644
index 0000000..208439f
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-fixed/ttf/iosevka-comfy-fixed-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-bold.ttf
new file mode 100644
index 0000000..456d218
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-bolditalic.ttf
new file mode 100644
index 0000000..ea54ea1
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-extrabold.ttf
new file mode 100644
index 0000000..2ac1671
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-extrabolditalic.ttf
new file mode 100644
index 0000000..f0741ed
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-italic.ttf
new file mode 100644
index 0000000..b002860
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-light.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-light.ttf
new file mode 100644
index 0000000..9965f53
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-lightitalic.ttf
new file mode 100644
index 0000000..020834b
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-regular.ttf
new file mode 100644
index 0000000..d542fc8
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-semilight.ttf
new file mode 100644
index 0000000..7dc64b0
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-semilightitalic.ttf
new file mode 100644
index 0000000..b3f005d
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf-unhinted/iosevka-comfy-motion-duo-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-bold.ttf
new file mode 100644
index 0000000..21df635
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-bolditalic.ttf
new file mode 100644
index 0000000..c3c7303
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-extrabold.ttf
new file mode 100644
index 0000000..1169f8b
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-extrabolditalic.ttf
new file mode 100644
index 0000000..b2d7d82
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-italic.ttf
new file mode 100644
index 0000000..20bde67
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-light.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-light.ttf
new file mode 100644
index 0000000..3a501db
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-lightitalic.ttf
new file mode 100644
index 0000000..b57c727
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-regular.ttf
new file mode 100644
index 0000000..de583c6
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-semilight.ttf
new file mode 100644
index 0000000..018cb8a
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-semilightitalic.ttf
new file mode 100644
index 0000000..6b33598
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-duo/ttf/iosevka-comfy-motion-duo-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-bold.ttf
new file mode 100644
index 0000000..10f8d13
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-bolditalic.ttf
new file mode 100644
index 0000000..16bed7d
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-extrabold.ttf
new file mode 100644
index 0000000..9f24553
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-extrabolditalic.ttf
new file mode 100644
index 0000000..54333c9
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-italic.ttf
new file mode 100644
index 0000000..407d7c1
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-light.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-light.ttf
new file mode 100644
index 0000000..c381c76
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-lightitalic.ttf
new file mode 100644
index 0000000..49b66e3
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-regular.ttf
new file mode 100644
index 0000000..5cc9312
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-semilight.ttf
new file mode 100644
index 0000000..b7f096b
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-semilightitalic.ttf
new file mode 100644
index 0000000..62bde94
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf-unhinted/iosevka-comfy-motion-fixed-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-bold.ttf
new file mode 100644
index 0000000..c788d0e
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-bolditalic.ttf
new file mode 100644
index 0000000..84da2f9
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-extrabold.ttf
new file mode 100644
index 0000000..205252e
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-extrabolditalic.ttf
new file mode 100644
index 0000000..1516e44
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-italic.ttf
new file mode 100644
index 0000000..b3b13d9
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-light.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-light.ttf
new file mode 100644
index 0000000..5bc7860
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-lightitalic.ttf
new file mode 100644
index 0000000..701faa0
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-regular.ttf
new file mode 100644
index 0000000..0825ffc
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-semilight.ttf
new file mode 100644
index 0000000..e4da759
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-semilightitalic.ttf
new file mode 100644
index 0000000..b9d7048
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion-fixed/ttf/iosevka-comfy-motion-fixed-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-bold.ttf
new file mode 100644
index 0000000..a793d1f
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-bolditalic.ttf
new file mode 100644
index 0000000..681fa5e
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-extrabold.ttf
new file mode 100644
index 0000000..eb9a58f
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-extrabolditalic.ttf
new file mode 100644
index 0000000..23ab6c8
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-italic.ttf
new file mode 100644
index 0000000..9a277be
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-light.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-light.ttf
new file mode 100644
index 0000000..6aafbe3
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-lightitalic.ttf
new file mode 100644
index 0000000..51f2571
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-regular.ttf
new file mode 100644
index 0000000..f7a9696
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-semilight.ttf
new file mode 100644
index 0000000..5f8fa30
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-semilightitalic.ttf
new file mode 100644
index 0000000..e76da7f
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf-unhinted/iosevka-comfy-motion-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-bold.ttf
new file mode 100644
index 0000000..4659651
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-bolditalic.ttf
new file mode 100644
index 0000000..44e5a64
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-extrabold.ttf
new file mode 100644
index 0000000..38f9fc5
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-extrabolditalic.ttf
new file mode 100644
index 0000000..4802ca2
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-italic.ttf
new file mode 100644
index 0000000..ca8224d
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-light.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-light.ttf
new file mode 100644
index 0000000..8ee65be
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-lightitalic.ttf
new file mode 100644
index 0000000..a0e402f
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-regular.ttf
new file mode 100644
index 0000000..eb86bfe
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-semilight.ttf
new file mode 100644
index 0000000..baf10ba
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-semilightitalic.ttf
new file mode 100644
index 0000000..e42dc53
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-motion/ttf/iosevka-comfy-motion-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-bold.ttf
new file mode 100644
index 0000000..f4c2473
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-bolditalic.ttf
new file mode 100644
index 0000000..ccafda3
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-extrabold.ttf
new file mode 100644
index 0000000..43f342a
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-extrabolditalic.ttf
new file mode 100644
index 0000000..6acf6da
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-italic.ttf
new file mode 100644
index 0000000..dcce3cc
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-light.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-light.ttf
new file mode 100644
index 0000000..315fc7c
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-lightitalic.ttf
new file mode 100644
index 0000000..7289f33
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-regular.ttf
new file mode 100644
index 0000000..d4eec5a
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-semilight.ttf
new file mode 100644
index 0000000..5b8fc58
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-semilightitalic.ttf
new file mode 100644
index 0000000..0ff1773
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf-unhinted/iosevka-comfy-wide-duo-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-bold.ttf
new file mode 100644
index 0000000..afc0b58
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-bolditalic.ttf
new file mode 100644
index 0000000..7c00392
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-extrabold.ttf
new file mode 100644
index 0000000..c88d766
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-extrabolditalic.ttf
new file mode 100644
index 0000000..5da967e
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-italic.ttf
new file mode 100644
index 0000000..0b64596
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-light.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-light.ttf
new file mode 100644
index 0000000..63fa55c
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-lightitalic.ttf
new file mode 100644
index 0000000..82fa888
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-regular.ttf
new file mode 100644
index 0000000..5da3819
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-semilight.ttf
new file mode 100644
index 0000000..79a7ab8
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-semilightitalic.ttf
new file mode 100644
index 0000000..88293a3
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-duo/ttf/iosevka-comfy-wide-duo-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-bold.ttf
new file mode 100644
index 0000000..f671aca
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-bolditalic.ttf
new file mode 100644
index 0000000..2ff8f5a
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-extrabold.ttf
new file mode 100644
index 0000000..5427f14
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-extrabolditalic.ttf
new file mode 100644
index 0000000..ff57481
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-italic.ttf
new file mode 100644
index 0000000..ef2045f
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-light.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-light.ttf
new file mode 100644
index 0000000..42710b3
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-lightitalic.ttf
new file mode 100644
index 0000000..794907c
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-regular.ttf
new file mode 100644
index 0000000..d940e02
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-semilight.ttf
new file mode 100644
index 0000000..0d63554
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-semilightitalic.ttf
new file mode 100644
index 0000000..9bb40fe
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf-unhinted/iosevka-comfy-wide-fixed-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-bold.ttf
new file mode 100644
index 0000000..26fbb32
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-bolditalic.ttf
new file mode 100644
index 0000000..0181f67
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-extrabold.ttf
new file mode 100644
index 0000000..f5eefc2
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-extrabolditalic.ttf
new file mode 100644
index 0000000..e3bae21
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-italic.ttf
new file mode 100644
index 0000000..9d23bb6
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-light.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-light.ttf
new file mode 100644
index 0000000..45c0428
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-lightitalic.ttf
new file mode 100644
index 0000000..cc73864
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-regular.ttf
new file mode 100644
index 0000000..d4881af
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-semilight.ttf
new file mode 100644
index 0000000..a563376
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-semilightitalic.ttf
new file mode 100644
index 0000000..b2b642a
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-fixed/ttf/iosevka-comfy-wide-fixed-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-bold.ttf
new file mode 100644
index 0000000..b82e4eb
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-bolditalic.ttf
new file mode 100644
index 0000000..d1f27f9
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-extrabold.ttf
new file mode 100644
index 0000000..c1e11ce
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-extrabolditalic.ttf
new file mode 100644
index 0000000..7280473
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-italic.ttf
new file mode 100644
index 0000000..2a4bc00
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-light.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-light.ttf
new file mode 100644
index 0000000..f6e437e
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-lightitalic.ttf
new file mode 100644
index 0000000..92a1123
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-regular.ttf
new file mode 100644
index 0000000..1a04246
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-semilight.ttf
new file mode 100644
index 0000000..103681b
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-semilightitalic.ttf
new file mode 100644
index 0000000..a3e9964
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf-unhinted/iosevka-comfy-wide-motion-duo-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-bold.ttf
new file mode 100644
index 0000000..9d359a4
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-bolditalic.ttf
new file mode 100644
index 0000000..f552dd7
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-extrabold.ttf
new file mode 100644
index 0000000..b9b0ddb
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-extrabolditalic.ttf
new file mode 100644
index 0000000..8cc4d7a
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-italic.ttf
new file mode 100644
index 0000000..d84f514
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-light.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-light.ttf
new file mode 100644
index 0000000..d26f33e
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-lightitalic.ttf
new file mode 100644
index 0000000..b42cdd5
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-regular.ttf
new file mode 100644
index 0000000..aad02e9
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-semilight.ttf
new file mode 100644
index 0000000..db36cf8
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-semilightitalic.ttf
new file mode 100644
index 0000000..ce7d193
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-duo/ttf/iosevka-comfy-wide-motion-duo-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-bold.ttf
new file mode 100644
index 0000000..d391aff
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-bolditalic.ttf
new file mode 100644
index 0000000..07f0297
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-extrabold.ttf
new file mode 100644
index 0000000..13ccf06
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-extrabolditalic.ttf
new file mode 100644
index 0000000..b504e82
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-italic.ttf
new file mode 100644
index 0000000..2661919
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-light.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-light.ttf
new file mode 100644
index 0000000..5b34d35
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-lightitalic.ttf
new file mode 100644
index 0000000..8f20ea9
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-regular.ttf
new file mode 100644
index 0000000..214c658
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-semilight.ttf
new file mode 100644
index 0000000..8aba160
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-semilightitalic.ttf
new file mode 100644
index 0000000..c881c61
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf-unhinted/iosevka-comfy-wide-motion-fixed-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-bold.ttf
new file mode 100644
index 0000000..781f559
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-bolditalic.ttf
new file mode 100644
index 0000000..748acd5
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-extrabold.ttf
new file mode 100644
index 0000000..fed1ba9
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-extrabolditalic.ttf
new file mode 100644
index 0000000..439e428
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-italic.ttf
new file mode 100644
index 0000000..39a753f
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-light.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-light.ttf
new file mode 100644
index 0000000..e1b3173
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-lightitalic.ttf
new file mode 100644
index 0000000..d36cf0a
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-regular.ttf
new file mode 100644
index 0000000..96163da
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-semilight.ttf
new file mode 100644
index 0000000..daf29f4
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-semilightitalic.ttf
new file mode 100644
index 0000000..9565ce1
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion-fixed/ttf/iosevka-comfy-wide-motion-fixed-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-bold.ttf
new file mode 100644
index 0000000..c052752
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-bolditalic.ttf
new file mode 100644
index 0000000..df7bd48
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-extrabold.ttf
new file mode 100644
index 0000000..b5f4e4b
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-extrabolditalic.ttf
new file mode 100644
index 0000000..e9a19c6
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-italic.ttf
new file mode 100644
index 0000000..099510d
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-light.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-light.ttf
new file mode 100644
index 0000000..65bec33
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-lightitalic.ttf
new file mode 100644
index 0000000..7889e5b
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-regular.ttf
new file mode 100644
index 0000000..b0e1d27
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-semilight.ttf
new file mode 100644
index 0000000..01e86fc
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-semilightitalic.ttf
new file mode 100644
index 0000000..c3d070f
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf-unhinted/iosevka-comfy-wide-motion-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-bold.ttf
new file mode 100644
index 0000000..c6486a2
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-bolditalic.ttf
new file mode 100644
index 0000000..1513170
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-extrabold.ttf
new file mode 100644
index 0000000..5e162ad
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-extrabolditalic.ttf
new file mode 100644
index 0000000..27eaac7
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-italic.ttf
new file mode 100644
index 0000000..d2266a1
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-light.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-light.ttf
new file mode 100644
index 0000000..6692405
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-lightitalic.ttf
new file mode 100644
index 0000000..e402b9c
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-regular.ttf
new file mode 100644
index 0000000..b5503a6
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-semilight.ttf
new file mode 100644
index 0000000..8ebbef7
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-semilightitalic.ttf
new file mode 100644
index 0000000..6f19173
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide-motion/ttf/iosevka-comfy-wide-motion-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-bold.ttf
new file mode 100644
index 0000000..9bdebe0
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-bolditalic.ttf
new file mode 100644
index 0000000..0f40bf2
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-extrabold.ttf
new file mode 100644
index 0000000..26b71f6
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-extrabolditalic.ttf
new file mode 100644
index 0000000..2210ed1
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-italic.ttf
new file mode 100644
index 0000000..5db2921
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-light.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-light.ttf
new file mode 100644
index 0000000..8bc1b32
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-lightitalic.ttf
new file mode 100644
index 0000000..767e985
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-regular.ttf
new file mode 100644
index 0000000..07c7a35
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-semilight.ttf
new file mode 100644
index 0000000..e13c0c2
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-semilightitalic.ttf
new file mode 100644
index 0000000..7289ece
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf-unhinted/iosevka-comfy-wide-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-bold.ttf
new file mode 100644
index 0000000..c5aca75
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-bolditalic.ttf
new file mode 100644
index 0000000..2c6fd5e
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-extrabold.ttf
new file mode 100644
index 0000000..4f8f5a7
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-extrabolditalic.ttf
new file mode 100644
index 0000000..f4fba1f
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-italic.ttf
new file mode 100644
index 0000000..68b51fe
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-light.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-light.ttf
new file mode 100644
index 0000000..4424486
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-lightitalic.ttf
new file mode 100644
index 0000000..1422f06
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-regular.ttf
new file mode 100644
index 0000000..3e68a79
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-semilight.ttf
new file mode 100644
index 0000000..7d592b7
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-semilightitalic.ttf
new file mode 100644
index 0000000..379c11a
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy-wide/ttf/iosevka-comfy-wide-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-bold.ttf
new file mode 100644
index 0000000..e7bfc1c
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-bolditalic.ttf
new file mode 100644
index 0000000..1e53d3f
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-extrabold.ttf
new file mode 100644
index 0000000..55d4e83
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-extrabolditalic.ttf
new file mode 100644
index 0000000..9f45727
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-italic.ttf
new file mode 100644
index 0000000..eec357b
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-light.ttf b/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-light.ttf
new file mode 100644
index 0000000..ae2d304
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-lightitalic.ttf
new file mode 100644
index 0000000..6ac6ad4
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-regular.ttf
new file mode 100644
index 0000000..45f77f3
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-semilight.ttf
new file mode 100644
index 0000000..613647f
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-semilightitalic.ttf
new file mode 100644
index 0000000..032eb0d
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy/ttf-unhinted/iosevka-comfy-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-bold.ttf b/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-bold.ttf
new file mode 100644
index 0000000..724a07d
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-bold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-bolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-bolditalic.ttf
new file mode 100644
index 0000000..8b7cef9
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-bolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-extrabold.ttf b/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-extrabold.ttf
new file mode 100644
index 0000000..ec41d48
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-extrabold.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-extrabolditalic.ttf b/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-extrabolditalic.ttf
new file mode 100644
index 0000000..b22e6b4
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-extrabolditalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-italic.ttf b/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-italic.ttf
new file mode 100644
index 0000000..5632b5e
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-italic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-light.ttf b/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-light.ttf
new file mode 100644
index 0000000..3912633
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-light.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-lightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-lightitalic.ttf
new file mode 100644
index 0000000..16d0db2
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-lightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-regular.ttf b/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-regular.ttf
new file mode 100644
index 0000000..1054420
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-regular.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-semilight.ttf b/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-semilight.ttf
new file mode 100644
index 0000000..73fd12f
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-semilight.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-semilightitalic.ttf b/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-semilightitalic.ttf
new file mode 100644
index 0000000..51d6d70
--- /dev/null
+++ b/fonts/iosevka-comfy/iosevka-comfy/ttf/iosevka-comfy-semilightitalic.ttf
Binary files differ
diff --git a/fonts/iosevka-comfy/private-build-plans.toml b/fonts/iosevka-comfy/private-build-plans.toml
new file mode 100644
index 0000000..9d0e380
--- /dev/null
+++ b/fonts/iosevka-comfy/private-build-plans.toml
@@ -0,0 +1,898 @@
+### Compact + Sans
+### ==============
+
+# Iosevka Comfy main style
+# ------------------------
+[buildPlans.iosevka-comfy] # <iosevka-comfy> is your plan name
+family = "Iosevka Comfy" # Font menu family name
+spacing = "normal" # Optional; Values: `normal`, `quasi-proportional`, `quasi-proportional-extension-only`, `term`, `fontconfig-mono`, or `fixed`
+serifs = "sans" # Optional; Values: `sans` or `slab`
+export-glyph-names = false # Set this to true for ligature support in Kitty (increased file size)
+
+[buildPlans.iosevka-comfy.variants.design]
+cv01 = 1 # A cap straight
+cv02 = 1 # B cap symmetric
+cv03 = 1 # C cap serifless
+cv04 = 6 # D cap curly with top and bottom serif (without serifs TODO reads like TOOO at small point sizes)
+cv05 = 1 # E cap serifless
+cv06 = 1 # F cap serifless
+cv07 = 2 # G cap toothed serifless
+cv08 = 1 # H cap serifless
+cv09 = 1 # I cap long serifs
+cv10 = 2 # J cap serified asymmetric
+cv11 = 6 # K cap curly
+cv12 = 1 # L cap serifless
+cv13 = 3 # M cap short middle leg slanted sides
+cv14 = 1 # N cap symmetric
+cv15 = 1 # P cap straight
+cv16 = 4 # Q cap crossing tail
+cv17 = 1 # R cap straight
+cv18 = 1 # S cap serifless
+cv19 = 1 # T cap serifless
+cv20 = 6 # U cap rounded
+cv21 = 1 # V cap straight
+cv22 = 1 # W cap straight
+cv23 = 1 # X cap straight
+cv24 = 1 # Y cap straight
+cv25 = 1 # Z cap straight
+cv28 = 1 # c serifless
+cv33 = 1 # h straight
+cv34 = 10 # i serified flat tailed
+cv35 = 6 # j flat hook serified
+cv37 = 10 # l serified flat tailed
+cv42 = 9 # r compact
+cv43 = 1 # s serifless
+cv44 = 2 # t flat hook
+cv46 = 1 # v straight
+cv47 = 1 # w straight short middle top
+cv48 = 1 # x straight
+cv49 = 11 # y cursive flat terminal hook
+cv50 = 1 # z straight
+cv53 = 1 # Λ, Δ lambda and delta cap straight
+cv54 = 2 # α alpha straight tailed
+cv55 = 1 # δ delta rounded top
+cv56 = 1 # Γ gamma cap straight
+cv57 = 6 # ι iota serified flat tailed
+cv58 = 2 # λ lambda top tailed
+cv59 = 1 # μ me tailless
+cv60 = 2 # ξ xe flat top
+cv76 = 13 # 0 oval dashed forward slash
+cv79 = 2 # 3 arched
+cv81 = 2 # 5 open contour
+cv83 = 1 # 7 straight
+cv84 = 3 # 8 two asymmetric circles
+cv86 = 2 # ijäöü square diacretics
+cv87 = 2 # .:; square punctuation marks
+cv88 = 2 # ~ tilde low
+cv89 = 3 # * asterisk five-pointed low
+cv90 = 2 # _ underscore right below baseline
+cv91 = 2 # ^ uptick medium
+cv92 = 1 # ( parentheses normal slope
+cv93 = 2 # { braces curly
+cv94 = 1 # # column straight
+cv96 = 4 # @ three-fold, tall height
+cv97 = 2 # $ dollar strike through
+cv98 = 1 # % percent dots
+cv99 = 2 # | bar force upright
+VXSA = 1 # ' single quote straight
+VXSB = 1 # ` grave/backtick straight
+VXSC = 1 # ? smooth
+VXSE = 2 # ¢ cent strike through
+VXLA = 2 # ≥ equal-or-{higher,lower} slanted
+
+[buildPlans.iosevka-comfy.variants.upright]
+cv26 = 3 # a double storey toothless
+cv27 = 3 # b rounded
+cv29 = 4 # d rounded
+cv30 = 1 # e straight
+cv31 = 16 # f serifless bottom flat with top crossbar at x height
+cv32 = 9 # g single storey flat hook earless cornered top
+cv36 = 6 # k curly
+cv38 = 17 # m earless double arch short middle leg
+cv39 = 6 # n earless straight
+cv40 = 2 # p earless
+cv41 = 7 # q earless
+cv45 = 6 # u toothless
+cv77 = 3 # 1 serified with base
+cv78 = 1 # 2 straight
+cv80 = 3 # 4 semi-open contour
+cv82 = 3 # 6 straight
+cv85 = 3 # 9 straight
+cv95 = 2 # & et open top (ampersand)
+
+[buildPlans.iosevka-comfy.variants.italic]
+cv26 = 1 # a double storey straight
+cv27 = 1 # b straight
+cv29 = 1 # d straight
+cv30 = 2 # e curly
+cv31 = 19 # f serifless extended bottom with flat top and crossbar at x height
+cv32 = 7 # g single storey flat hook
+cv36 = 1 # k straight
+cv38 = 12 # m straight short middle leg
+cv39 = 1 # n straight
+cv40 = 1 # p straight
+cv41 = 1 # q straight
+cv45 = 1 # u straight
+cv77 = 2 # 1 serified no base
+cv78 = 2 # 2 curly
+cv80 = 1 # 4 closed contour crossing
+cv82 = 1 # 6 closed contour
+cv85 = 1 # 9 closed contour
+cv95 = 4 # & et open top toothed (ampersand)
+
+[buildPlans.iosevka-comfy.weights.light]
+shape = 300
+menu = 300
+css = 300
+
+[buildPlans.iosevka-comfy.weights.semilight]
+shape = 350
+menu = 350
+css = 350
+
+[buildPlans.iosevka-comfy.weights.regular]
+shape = 400
+menu = 400
+css = 400
+
+[buildPlans.iosevka-comfy.weights.bold]
+shape = 700
+menu = 700
+css = 700
+
+[buildPlans.iosevka-comfy.weights.extrabold]
+shape = 800
+menu = 800
+css = 800
+
+[buildPlans.iosevka-comfy.slopes.upright]
+angle = 0
+shape = "upright"
+menu = "upright"
+css = "normal"
+
+[buildPlans.iosevka-comfy.slopes.italic]
+angle = 9.4
+shape = "italic"
+menu = "italic"
+css = "italic"
+
+[buildPlans.iosevka-comfy.widths.normal]
+shape = 525
+menu = 5
+css = "normal"
+
+
+# Fixed spacing (no ligatures)
+# ----------------------------
+[buildPlans.iosevka-comfy-fixed]
+family = "Iosevka Comfy Fixed"
+spacing = "fixed"
+serifs = "sans"
+export-glyph-names = false
+
+# It seems we can inherit variants, but not weights, slopes, widths,
+# metric-override...
+[buildPlans.iosevka-comfy-fixed.variants]
+inherits = "buildPlans.iosevka-comfy"
+
+[buildPlans.iosevka-comfy-fixed.weights.light]
+shape = 300
+menu = 300
+css = 300
+
+[buildPlans.iosevka-comfy-fixed.weights.semilight]
+shape = 350
+menu = 350
+css = 350
+
+[buildPlans.iosevka-comfy-fixed.weights.regular]
+shape = 400
+menu = 400
+css = 400
+
+[buildPlans.iosevka-comfy-fixed.weights.bold]
+shape = 700
+menu = 700
+css = 700
+
+[buildPlans.iosevka-comfy-fixed.weights.extrabold]
+shape = 800
+menu = 800
+css = 800
+
+[buildPlans.iosevka-comfy-fixed.slopes.upright]
+angle = 0
+shape = "upright"
+menu = "upright"
+css = "normal"
+
+[buildPlans.iosevka-comfy-fixed.slopes.italic]
+angle = 9.4
+shape = "italic"
+menu = "italic"
+css = "italic"
+
+[buildPlans.iosevka-comfy-fixed.widths.normal]
+shape = 525
+menu = 5
+css = "normal"
+
+
+# Duo spacing (quasi-proportional)
+# --------------------------------
+[buildPlans.iosevka-comfy-duo]
+family = "Iosevka Comfy Duo"
+spacing = "quasi-proportional"
+serifs = "sans"
+export-glyph-names = false
+
+# It seems we can inherit variants, but not weights, slopes, widths,
+# metric-override...
+[buildPlans.iosevka-comfy-duo.variants]
+inherits = "buildPlans.iosevka-comfy"
+
+# The '0' has a forward slash that cuts diagonally through the middle of
+# the circle, connecting the bottom left part to the top right of the
+# oval shape. Whereas the narrow variants have a dashed forward slash
+# which does not connect the two sides as it is positioned inside the
+# oval shape.
+[buildPlans.iosevka-comfy-duo.variants.design]
+cv76 = 9 # 0 oval forward slash
+cv96 = 2 # @ traditional four-fold style
+cv98 = 2 # % with two circles
+
+# The 'm' character has three legs of equal length, insetad of a shorter
+# middle leg. The short middle leg in the narrow variants is necessary
+# for legibility, especially at small point sizes (otherwise the
+# character's legs visually blend into what appears to be a solid
+# block).
+[buildPlans.iosevka-comfy-duo.variants.upright]
+cv38 = 6 # m earless normal middle leg
+
+[buildPlans.iosevka-comfy-duo.variants.italic]
+cv38 = 1 # m straight normal middle leg
+
+[buildPlans.iosevka-comfy-duo.weights.light]
+shape = 300
+menu = 300
+css = 300
+
+[buildPlans.iosevka-comfy-duo.weights.semilight]
+shape = 350
+menu = 350
+css = 350
+
+[buildPlans.iosevka-comfy-duo.weights.regular]
+shape = 400
+menu = 400
+css = 400
+
+[buildPlans.iosevka-comfy-duo.weights.bold]
+shape = 700
+menu = 700
+css = 700
+
+[buildPlans.iosevka-comfy-duo.weights.extrabold]
+shape = 800
+menu = 800
+css = 800
+
+[buildPlans.iosevka-comfy-duo.slopes.upright]
+angle = 0
+shape = "upright"
+menu = "upright"
+css = "normal"
+
+[buildPlans.iosevka-comfy-duo.slopes.italic]
+angle = 9.4
+shape = "italic"
+menu = "italic"
+css = "italic"
+
+[buildPlans.iosevka-comfy-duo.widths.normal]
+shape = 525
+menu = 5
+css = "normal"
+
+
+### Compact + Serif
+### ===============
+
+# More serified, "motion" shapes
+# ------------------------------
+
+[buildPlans.iosevka-comfy-motion]
+family = "Iosevka Comfy Motion"
+spacing = "normal"
+serifs = "slab"
+export-glyph-names = false
+
+# It seems we can inherit variants, but not weights, slopes, widths,
+# metric-override...
+[buildPlans.iosevka-comfy-motion.variants]
+inherits = "buildPlans.iosevka-comfy"
+
+[buildPlans.iosevka-comfy-motion.variants.design]
+cv01 = 2 # A cap straight top serif
+cv02 = 2 # B cap symmetric with top serif
+cv03 = 4 # C cap top inward serif
+cv05 = 2 # E cap top-left serif
+cv06 = 2 # F cap top-left serif
+cv08 = 2 # H cap top-left serif
+cv12 = 2 # L cap bottom right serif
+cv13 = 4 # M cap slanted sides top serif short middle joint
+cv14 = 2 # N cap symmetric top serif
+cv15 = 2 # P cap closed top serif
+cv17 = 2 # R cap straight top serif
+cv18 = 4 # S cap top inward serif
+cv20 = 4 # U cap toothless top serif
+cv21 = 2 # V cap straight top serif
+cv22 = 2 # W cap straight top serif short middle joint
+cv23 = 2 # X cap straight top serif
+cv24 = 3 # Y cap straight top serif
+cv25 = 10 # Z cap straight top serif
+cv26 = 2 # a double storey tailed
+cv27 = 2 # b toothed top serif
+cv28 = 4 # c top inward serif
+cv29 = 2 # d tailed top serif
+cv32 = 8 # g single storey flat hook serified top
+cv33 = 4 # h tailed top serif
+cv34 = 8 # i serified tailed
+cv36 = 7 # k curly top serif
+cv37 = 8 # l serified tailed
+cv38 = 14 # m top serif tailed with short middle leg
+cv39 = 5 # n top serif tailed
+cv40 = 4 # p top serif
+cv41 = 2 # q top serif
+cv42 = 15 # r top serif hooked
+cv43 = 4 # s top inward serif
+cv45 = 5 # u top serif tailed
+cv46 = 2 # v top serif
+cv47 = 6 # w top serif symmetric
+cv48 = 5 # x top serif
+cv49 = 12 # y cursive flat terminal hook serified
+cv50 = 10 # z top serif
+
+[buildPlans.iosevka-comfy-motion.variants.italic]
+cv44 = 1 # t curly
+
+[buildPlans.iosevka-comfy-motion.weights.light]
+shape = 300
+menu = 300
+css = 300
+
+[buildPlans.iosevka-comfy-motion.weights.semilight]
+shape = 350
+menu = 350
+css = 350
+
+[buildPlans.iosevka-comfy-motion.weights.regular]
+shape = 400
+menu = 400
+css = 400
+
+[buildPlans.iosevka-comfy-motion.weights.bold]
+shape = 700
+menu = 700
+css = 700
+
+[buildPlans.iosevka-comfy-motion.weights.extrabold]
+shape = 800
+menu = 800
+css = 800
+
+[buildPlans.iosevka-comfy-motion.slopes.upright]
+angle = 0
+shape = "upright"
+menu = "upright"
+css = "normal"
+
+[buildPlans.iosevka-comfy-motion.slopes.italic]
+angle = 9.4
+shape = "italic"
+menu = "italic"
+css = "italic"
+
+[buildPlans.iosevka-comfy-motion.widths.normal]
+shape = 525
+menu = 5
+css = "normal"
+
+
+# "Motion" variant with fixed spacing (no ligatures)
+# --------------------------------------------------
+[buildPlans.iosevka-comfy-motion-fixed]
+family = "Iosevka Comfy Motion Fixed"
+spacing = "fixed"
+serifs = "slab"
+export-glyph-names = false
+
+# It seems we can inherit variants, but not weights, slopes, widths,
+# metric-override...
+[buildPlans.iosevka-comfy-motion-fixed.variants]
+inherits = "buildPlans.iosevka-comfy-motion"
+
+[buildPlans.iosevka-comfy-motion-fixed.weights.light]
+shape = 300
+menu = 300
+css = 300
+
+[buildPlans.iosevka-comfy-motion-fixed.weights.semilight]
+shape = 350
+menu = 350
+css = 350
+
+[buildPlans.iosevka-comfy-motion-fixed.weights.regular]
+shape = 400
+menu = 400
+css = 400
+
+[buildPlans.iosevka-comfy-motion-fixed.weights.bold]
+shape = 700
+menu = 700
+css = 700
+
+[buildPlans.iosevka-comfy-motion-fixed.weights.extrabold]
+shape = 800
+menu = 800
+css = 800
+
+[buildPlans.iosevka-comfy-motion-fixed.slopes.upright]
+angle = 0
+shape = "upright"
+menu = "upright"
+css = "normal"
+
+[buildPlans.iosevka-comfy-motion-fixed.slopes.italic]
+angle = 9.4
+shape = "italic"
+menu = "italic"
+css = "italic"
+
+[buildPlans.iosevka-comfy-motion-fixed.widths.normal]
+shape = 525
+menu = 5
+css = "normal"
+
+
+# Iosevka Comfy Motion with Duo spacing (quasi-proportional)
+# ----------------------------------------------------------
+[buildPlans.iosevka-comfy-motion-duo]
+family = "Iosevka Comfy Motion Duo"
+spacing = "quasi-proportional"
+serifs = "slab"
+export-glyph-names = false
+
+# It seems we can inherit variants, but not weights, slopes, widths,
+# metric-override...
+[buildPlans.iosevka-comfy-motion-duo.variants]
+inherits = "buildPlans.iosevka-comfy-motion"
+
+[buildPlans.iosevka-comfy-motion-duo.variants.design]
+cv38 = 5 # m top serif tailed with normal middle leg
+cv76 = 9 # 0 oval forward slash
+cv96 = 2 # @ traditional four-fold style
+cv98 = 3 # % with two circles
+
+[buildPlans.iosevka-comfy-motion-duo.weights.light]
+shape = 300
+menu = 300
+css = 300
+
+[buildPlans.iosevka-comfy-motion-duo.weights.semilight]
+shape = 350
+menu = 350
+css = 350
+
+[buildPlans.iosevka-comfy-motion-duo.weights.regular]
+shape = 400
+menu = 400
+css = 400
+
+[buildPlans.iosevka-comfy-motion-duo.weights.bold]
+shape = 700
+menu = 700
+css = 700
+
+[buildPlans.iosevka-comfy-motion-duo.weights.extrabold]
+shape = 800
+menu = 800
+css = 800
+
+[buildPlans.iosevka-comfy-motion-duo.slopes.upright]
+angle = 0
+shape = "upright"
+menu = "upright"
+css = "normal"
+
+[buildPlans.iosevka-comfy-motion-duo.slopes.italic]
+angle = 9.4
+shape = "italic"
+menu = "italic"
+css = "italic"
+
+[buildPlans.iosevka-comfy-motion-duo.widths.normal]
+shape = 525
+menu = 5
+css = "normal"
+
+
+### Wide + Sans
+### ===========
+
+# Like iosevka-comfy but expanded
+# -------------------------------
+[buildPlans.iosevka-comfy-wide]
+family = "Iosevka Comfy Wide"
+spacing = "normal"
+serifs = "sans"
+export-glyph-names = false
+
+# It seems we can inherit variants, but not weights, slopes, widths,
+# metric-override...
+[buildPlans.iosevka-comfy-wide.variants]
+inherits = "buildPlans.iosevka-comfy"
+
+# The '0' has a forward slash that cuts diagonally through the middle of
+# the circle, connecting the bottom left part to the top right of the
+# oval shape. Whereas the narrow variants have a dashed forward slash
+# which does not connect the two sides as it is positioned inside the
+# oval shape.
+[buildPlans.iosevka-comfy-wide.variants.design]
+cv76 = 9 # 0 oval forward slash
+cv96 = 2 # @ traditional four-fold style
+cv98 = 2 # % with two circles
+
+# The 'm' character has three legs of equal length, insetad of a shorter
+# middle leg. The short middle leg in the narrow variants is necessary
+# for legibility, especially at small point sizes (otherwise the
+# character's legs visually blend into what appears to be a solid
+# block).
+[buildPlans.iosevka-comfy-wide.variants.upright]
+cv38 = 6 # m earless normal middle leg
+
+[buildPlans.iosevka-comfy-wide.variants.italic]
+cv38 = 1 # m straight normal middle leg
+
+[buildPlans.iosevka-comfy-wide.weights.light]
+shape = 300
+menu = 300
+css = 300
+
+[buildPlans.iosevka-comfy-wide.weights.semilight]
+shape = 350
+menu = 350
+css = 350
+
+[buildPlans.iosevka-comfy-wide.weights.regular]
+shape = 400
+menu = 400
+css = 400
+
+[buildPlans.iosevka-comfy-wide.weights.bold]
+shape = 700
+menu = 700
+css = 700
+
+[buildPlans.iosevka-comfy-wide.weights.extrabold]
+shape = 800
+menu = 800
+css = 800
+
+[buildPlans.iosevka-comfy-wide.slopes.upright]
+angle = 0
+shape = "upright"
+menu = "upright"
+css = "normal"
+
+[buildPlans.iosevka-comfy-wide.slopes.italic]
+angle = 9.4
+shape = "italic"
+menu = "italic"
+css = "italic"
+
+[buildPlans.iosevka-comfy-wide.widths.normal]
+shape = 625
+menu = 7
+css = "normal"
+
+
+# Like iosevka-comfy-wide but fixed monospace (no ligatures)
+# ----------------------------------------------------------
+[buildPlans.iosevka-comfy-wide-fixed]
+family = "Iosevka Comfy Wide Fixed"
+spacing = "fixed"
+serifs = "sans"
+export-glyph-names = false
+
+# It seems we can inherit variants, but not weights, slopes, widths,
+# metric-override...
+[buildPlans.iosevka-comfy-wide-fixed.variants]
+inherits = "buildPlans.iosevka-comfy-wide"
+
+[buildPlans.iosevka-comfy-wide-fixed.weights.light]
+shape = 300
+menu = 300
+css = 300
+
+[buildPlans.iosevka-comfy-wide-fixed.weights.semilight]
+shape = 350
+menu = 350
+css = 350
+
+[buildPlans.iosevka-comfy-wide-fixed.weights.regular]
+shape = 400
+menu = 400
+css = 400
+
+[buildPlans.iosevka-comfy-wide-fixed.weights.bold]
+shape = 700
+menu = 700
+css = 700
+
+[buildPlans.iosevka-comfy-wide-fixed.weights.extrabold]
+shape = 800
+menu = 800
+css = 800
+
+[buildPlans.iosevka-comfy-wide-fixed.slopes.upright]
+angle = 0
+shape = "upright"
+menu = "upright"
+css = "normal"
+
+[buildPlans.iosevka-comfy-wide-fixed.slopes.italic]
+angle = 9.4
+shape = "italic"
+menu = "italic"
+css = "italic"
+
+[buildPlans.iosevka-comfy-wide-fixed.widths.normal]
+shape = 625
+menu = 7
+css = "normal"
+
+
+# Duo spacing but wider (quasi-proportional)
+# ------------------------------------------
+[buildPlans.iosevka-comfy-wide-duo]
+family = "Iosevka Comfy Wide Duo"
+spacing = "quasi-proportional"
+serifs = "sans"
+export-glyph-names = false
+
+# It seems we can inherit variants, but not weights, slopes, widths,
+# metric-override...
+[buildPlans.iosevka-comfy-wide-duo.variants]
+inherits = "buildPlans.iosevka-comfy-wide"
+
+[buildPlans.iosevka-comfy-wide-duo.weights.light]
+shape = 300
+menu = 300
+css = 300
+
+[buildPlans.iosevka-comfy-wide-duo.weights.semilight]
+shape = 350
+menu = 350
+css = 350
+
+[buildPlans.iosevka-comfy-wide-duo.weights.regular]
+shape = 400
+menu = 400
+css = 400
+
+[buildPlans.iosevka-comfy-wide-duo.weights.bold]
+shape = 700
+menu = 700
+css = 700
+
+[buildPlans.iosevka-comfy-wide-duo.weights.extrabold]
+shape = 800
+menu = 800
+css = 800
+
+[buildPlans.iosevka-comfy-wide-duo.slopes.upright]
+angle = 0
+shape = "upright"
+menu = "upright"
+css = "normal"
+
+[buildPlans.iosevka-comfy-wide-duo.slopes.italic]
+angle = 9.4
+shape = "italic"
+menu = "italic"
+css = "italic"
+
+[buildPlans.iosevka-comfy-wide-duo.widths.normal]
+shape = 625
+menu = 7
+css = "normal"
+
+
+### Wide + Serif
+### ============
+
+# Like iosevka-comfy-motion but expanded
+# --------------------------------------
+[buildPlans.iosevka-comfy-wide-motion]
+family = "Iosevka Comfy Wide Motion"
+spacing = "normal"
+serifs = "slab"
+export-glyph-names = false
+
+# It seems we can inherit variants, but not weights, slopes, widths,
+# metric-override...
+[buildPlans.iosevka-comfy-wide-motion.variants]
+inherits = "buildPlans.iosevka-comfy-motion"
+
+# The '0' has a forward slash that cuts diagonally through the middle of
+# the circle, connecting the bottom left part to the top right of the
+# oval shape. Whereas the narrow variants have a dashed forward slash
+# which does not connect the two sides as it is positioned inside the
+# oval shape.
+#
+# The 'm' character has three legs of equal length, insetad of a shorter
+# middle leg. The short middle leg in the narrow variants is necessary
+# for legibility, especially at small point sizes (otherwise the
+# character's legs visually blend into what appears to be a solid
+# block).
+[buildPlans.iosevka-comfy-wide-motion.variants.design]
+cv38 = 5 # m top serif tailed with normal middle leg
+cv76 = 9 # 0 oval forward slash
+cv96 = 2 # @ traditional four-fold style
+cv98 = 3 # % with two circles
+
+[buildPlans.iosevka-comfy-wide-motion.weights.light]
+shape = 300
+menu = 300
+css = 300
+
+[buildPlans.iosevka-comfy-wide-motion.weights.semilight]
+shape = 350
+menu = 350
+css = 350
+
+[buildPlans.iosevka-comfy-wide-motion.weights.regular]
+shape = 400
+menu = 400
+css = 400
+
+[buildPlans.iosevka-comfy-wide-motion.weights.bold]
+shape = 700
+menu = 700
+css = 700
+
+[buildPlans.iosevka-comfy-wide-motion.weights.extrabold]
+shape = 800
+menu = 800
+css = 800
+
+[buildPlans.iosevka-comfy-wide-motion.slopes.upright]
+angle = 0
+shape = "upright"
+menu = "upright"
+css = "normal"
+
+[buildPlans.iosevka-comfy-wide-motion.slopes.italic]
+angle = 9.4
+shape = "italic"
+menu = "italic"
+css = "italic"
+
+[buildPlans.iosevka-comfy-wide-motion.widths.normal]
+shape = 625
+menu = 7
+css = "normal"
+
+
+# Like iosevka-comfy-wide-motion but fixed monospace (no ligatures)
+# -----------------------------------------------------------------
+[buildPlans.iosevka-comfy-wide-motion-fixed]
+family = "Iosevka Comfy Wide Motion Fixed"
+spacing = "fixed"
+serifs = "slab"
+export-glyph-names = false
+
+# It seems we can inherit variants, but not weights, slopes, widths,
+# metric-override...
+[buildPlans.iosevka-comfy-wide-motion-fixed.variants]
+inherits = "buildPlans.iosevka-comfy-wide-motion"
+
+[buildPlans.iosevka-comfy-wide-motion-fixed.weights.light]
+shape = 300
+menu = 300
+css = 300
+
+[buildPlans.iosevka-comfy-wide-motion-fixed.weights.semilight]
+shape = 350
+menu = 350
+css = 350
+
+[buildPlans.iosevka-comfy-wide-motion-fixed.weights.regular]
+shape = 400
+menu = 400
+css = 400
+
+[buildPlans.iosevka-comfy-wide-motion-fixed.weights.bold]
+shape = 700
+menu = 700
+css = 700
+
+[buildPlans.iosevka-comfy-wide-motion-fixed.weights.extrabold]
+shape = 800
+menu = 800
+css = 800
+
+[buildPlans.iosevka-comfy-wide-motion-fixed.slopes.upright]
+angle = 0
+shape = "upright"
+menu = "upright"
+css = "normal"
+
+[buildPlans.iosevka-comfy-wide-motion-fixed.slopes.italic]
+angle = 9.4
+shape = "italic"
+menu = "italic"
+css = "italic"
+
+[buildPlans.iosevka-comfy-wide-motion-fixed.widths.normal]
+shape = 625
+menu = 7
+css = "normal"
+
+
+# Motion duo spacing but wider (quasi-proportional)
+# -------------------------------------------------
+[buildPlans.iosevka-comfy-wide-motion-duo]
+family = "Iosevka Comfy Wide Motion Duo"
+spacing = "quasi-proportional"
+serifs = "slab"
+export-glyph-names = false
+
+# It seems we can inherit variants, but not weights, slopes, widths,
+# metric-override...
+[buildPlans.iosevka-comfy-wide-motion-duo.variants]
+inherits = "buildPlans.iosevka-comfy-wide-motion"
+
+[buildPlans.iosevka-comfy-wide-motion-duo.weights.light]
+shape = 300
+menu = 300
+css = 300
+
+[buildPlans.iosevka-comfy-wide-motion-duo.weights.semilight]
+shape = 350
+menu = 350
+css = 350
+
+[buildPlans.iosevka-comfy-wide-motion-duo.weights.regular]
+shape = 400
+menu = 400
+css = 400
+
+[buildPlans.iosevka-comfy-wide-motion-duo.weights.bold]
+shape = 700
+menu = 700
+css = 700
+
+[buildPlans.iosevka-comfy-wide-motion-duo.weights.extrabold]
+shape = 800
+menu = 800
+css = 800
+
+[buildPlans.iosevka-comfy-wide-motion-duo.slopes.upright]
+angle = 0
+shape = "upright"
+menu = "upright"
+css = "normal"
+
+[buildPlans.iosevka-comfy-wide-motion-duo.slopes.italic]
+angle = 9.4
+shape = "italic"
+menu = "italic"
+css = "italic"
+
+[buildPlans.iosevka-comfy-wide-motion-duo.widths.normal]
+shape = 625
+menu = 7
+css = "normal" \ No newline at end of file
diff --git a/i3/.config/i3/autostart b/i3/.config/i3/autostart
new file mode 100644
index 0000000..0fdc188
--- /dev/null
+++ b/i3/.config/i3/autostart
@@ -0,0 +1,16 @@
+# Autostart!
+
+# Xmodmap
+# exec --no-startup-id xmodmap $HOME/.xmodmap
+# Screen saver
+# exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
+# Network Manager
+exec --no-startup-id nm-applet
+# Wallpaper
+exec --no-startup-id nitrogen --restore
+# Compositor
+exec --no-startup-id picom --experimental-backends --daemon
+# emacs daemon
+exec --no-startup-id emacs --daemon
+# urxvt daemon
+exec --no-startup-id urxvtd \ No newline at end of file
diff --git a/i3/.config/i3/colors b/i3/.config/i3/colors
new file mode 100644
index 0000000..8e63e69
--- /dev/null
+++ b/i3/.config/i3/colors
@@ -0,0 +1,36 @@
+# theme setting
+set $bg #000000
+set $fg #ffffff
+set $space #ffffff
+set $red #ff5f59
+set $green #44bc44
+set $yellow #fec43f
+set $blue #2fafff
+set $aqua #00d3d0
+set $purple #b6a0ff
+set $border #ffffff
+
+
+# class border background text indicator border
+client.focused $bg $fg $bg $fg $border
+client.focused_inactive $bg $bg $fg $bg $bg
+client.unfocused $bg $bg $fg $fg $bg
+client.urgent $red $red $fg $red $red
+
+bar {
+ position top
+ status_command i3status
+ # status_command SCRIPT_DIR=~/.local/bin/i3blocks i3blocks
+ colors {
+ # switch these when switching between dark and light mode
+ background $bg
+ statusline $fg
+ # workspaces section
+ # border background text
+ focused_workspace $space $space $bg
+ inactive_workspace $bg $bg $fg
+ active_workspace $bg $bg $fg
+ urgent_workspace $red $red $bg
+
+ }
+}
diff --git a/i3/.config/i3/config b/i3/.config/i3/config
new file mode 100644
index 0000000..c3e42c7
--- /dev/null
+++ b/i3/.config/i3/config
@@ -0,0 +1,69 @@
+set $mod Mod4
+font pango: Iosevka Comfy 12
+
+# Including other files
+include ~/.config/i3/colors
+include ~/.config/i3/autostart
+include ~/.config/i3/keybinds
+include ~/.config/i3/winsettings
+include ~/.config/i3/gaps
+
+exec --no-startup-id dex --autostart --environment i3
+
+# Use Mouse+$mod to drag floating windows to their wanted position
+floating_modifier $mod
+
+bindsym $mod+[any key] exec i3-dmenu-desktop
+for_window [class="^Pavucontrol$"] floating enable
+
+# resize window (you can also use the mouse for that)
+mode "resize" {
+
+ # vim keys for resizing
+ bindsym h resize shrink width 10 px or 10 ppt
+ bindsym j resize grow height 10 px or 10 ppt
+ bindsym k resize shrink height 10 px or 10 ppt
+ bindsym l resize grow width 10 px or 10 ppt
+
+ # same bindings, but for the arrow keys
+ bindsym Left resize shrink width 10 px or 10 ppt
+ bindsym Down resize grow height 10 px or 10 ppt
+ bindsym Up resize shrink height 10 px or 10 ppt
+ bindsym Right resize grow width 10 px or 10 ppt
+
+ # back to normal: Escape
+ bindsym Escape mode "default"
+}
+
+bindsym $mod+space mode "resize"
+
+# Launcher mode, (you execute the keybind to start the mode [found below] and then the keybinds defined in the mode)
+bindsym $mod+o mode "$mode_launcher"
+
+mode "$mode_launcher" {
+ bindsym f exec librewolf
+ bindsym e exec emacsclient -c
+ bindsym Escape mode "default"
+}
+
+for_window [class="^.*"] border pixel 5
+
+no_focus [window_role="pop-up"]
+
+# bar {
+# position top
+# status_command i3status
+# # status_command SCRIPT_DIR=~/.local/bin/i3blocks i3blocks
+# # colors {
+# # # switch these when switching between dark and light mode
+# # background $bg
+# # statusline $fg
+# # # workspaces section
+# # # border background text
+# # focused_workspace $space $space $bg
+# # inactive_workspace $bg $bg $fg
+# # active_workspace $bg $bg $fg
+# # urgent_workspace $red $red $bg
+
+# # }
+# }
diff --git a/i3/.config/i3/gaps b/i3/.config/i3/gaps
new file mode 100644
index 0000000..dbd0002
--- /dev/null
+++ b/i3/.config/i3/gaps
@@ -0,0 +1,5 @@
+gaps top 0
+gaps left 10
+gaps right 10
+gaps bottom 10
+gaps inner 10
diff --git a/i3/.config/i3/keybinds b/i3/.config/i3/keybinds
new file mode 100644
index 0000000..b1d162e
--- /dev/null
+++ b/i3/.config/i3/keybinds
@@ -0,0 +1,65 @@
+# Keybinds!
+set $term st
+set $term2 urxvtc
+
+# start term (defined at the top of the file)
+bindsym $mod+Return exec $term
+bindsym $mod+Shift+Return exec $term2
+
+# Scratchpad
+bindsym $mod+minus move scratchpad
+bindsym $mod+plus scratchpad show
+
+# emacs
+bindsym $mod+x exec ~/.local/bin/scripts/emacs/emacs-daemon.sh start
+bindsym $mod+Shift+x exec ~/.local/bin/scripts/emacs/emacs-daemon.sh kill
+bindsym $mod+Ctrl+a exec emacsclient --eval "(emacs-everywhere)"
+bindsym $mod+Shift+a exec emacsclient -c -e "(emms)"
+
+# theme switching
+bindsym $mod+Shift+t exec ~/.local/bin/scripts/theme-switch.sh
+
+# adjust volume in PulseAudio
+set $refresh_i3status killall -SIGUSR1 i3status
+bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status && pkill -RTMIN+1 i3blocks
+bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status && pkill -RTMIN+1 i3blocks
+bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status && pkill -RTMIN+1 i3blocks
+bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status && pkill -RTMIN+1 i3blocks
+
+# Media player controls
+bindsym XF86AudioPlay exec playerctl play
+bindsym XF86AudioPause exec playerctl pause
+bindsym XF86AudioNext exec playerctl next
+bindsym XF86AudioPrev exec playerctl previous
+
+# bindsym XF86AudioRaiseVolume exec amixer -q -D pulse sset Master 5%+ && pkill -RTMIN+1 i3blocks
+# bindsym XF86AudioLowerVolume exec amixer -q -D pulse sset Master 5%- && pkill -RTMIN+1 i3blocks
+# bindsym XF86AudioMute exec amixer -q -D pulse sset Master toggle && pkill -RTMIN+1 i3blocks
+
+# Brightness
+# bindsym XF86MonBrightnessUp exec xbacklight -inc 10
+# bindsym XF86MonBrightnessDown exec xbacklight -dec 10
+
+# power menu
+# bindsym $mod+shift+p exec --no-startup-id ~/.config/rofi/powermenu/type-1/powermenu.sh
+
+# kill focused window
+bindsym $mod+q kill
+
+# screen shot
+bindsym Print exec $HOME/.local/bin/scripts/maimpick
+
+# audio controls
+bindsym $mod+p exec pavucontrol
+
+# start dmenu
+# bindsym $mod+d exec --no-startup-id dmenu_run
+# Customised dmenu with colours
+bindsym $mod+d exec "dmenu_run -p 'dmenu >'"
+
+# Reloads i3 configuration
+bindsym $mod+Shift+c reload
+# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
+bindsym $mod+Shift+r restart
+# exit i3 (logs you out of your X session)
+bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
diff --git a/i3/.config/i3/winsettings b/i3/.config/i3/winsettings
new file mode 100644
index 0000000..9c7e882
--- /dev/null
+++ b/i3/.config/i3/winsettings
@@ -0,0 +1,91 @@
+# Window Manipulation Seetings
+
+# borders
+for_window [class="^.*"] border pixel 3
+default_border pixel 3
+default_floating_border pixel 3
+# hide_edge_borders smart
+
+# change focus vim keys
+bindsym $mod+h focus left
+bindsym $mod+j focus down
+bindsym $mod+k focus up
+bindsym $mod+l focus right
+
+#arryowkeys
+bindsym $mod+Left focus left
+bindsym $mod+Down focus down
+bindsym $mod+Up focus up
+bindsym $mod+Right focus right
+
+# move focused window vim keys
+bindsym $mod+Shift+h move left
+bindsym $mod+Shift+j move down
+bindsym $mod+Shift+k move up
+bindsym $mod+Shift+l move right
+
+# enter fullscreen mode for the focused container
+bindsym $mod+f fullscreen toggle
+
+# change container layout (stacked, tabbed, toggle split)
+bindsym $mod+s layout stacking
+bindsym $mod+w layout tabbed
+bindsym $mod+t layout toggle split
+
+# toggle tiling / floating
+bindsym $mod+Shift+space floating toggle
+
+# focus the parent container
+bindsym $mod+a focus parent
+
+# Name the workspaces
+set $workspace1 "1"
+set $workspace2 "2"
+set $workspace3 "3"
+set $workspace4 "4"
+set $workspace5 "5"
+set $workspace6 "6"
+set $workspace7 "7"
+set $workspace8 "8"
+set $workspace9 "9"
+set $workspace0 "10"
+
+# Switch to workspace
+bindsym $mod+1 workspace $workspace1
+bindsym $mod+2 workspace $workspace2
+bindsym $mod+3 workspace $workspace3
+bindsym $mod+4 workspace $workspace4
+bindsym $mod+5 workspace $workspace5
+bindsym $mod+6 workspace $workspace6
+bindsym $mod+7 workspace $workspace7
+bindsym $mod+8 workspace $workspace8
+bindsym $mod+9 workspace $workspace9
+bindsym $mod+0 workspace $workspace0
+
+# Move focused container to workspace
+bindsym $mod+Shift+1 move container to workspace $workspace1
+bindsym $mod+Shift+2 move container to workspace $workspace2
+bindsym $mod+Shift+3 move container to workspace $workspace3
+bindsym $mod+Shift+4 move container to workspace $workspace4
+bindsym $mod+Shift+5 move container to workspace $workspace5
+bindsym $mod+Shift+6 move container to workspace $workspace6
+bindsym $mod+Shift+7 move container to workspace $workspace7
+bindsym $mod+Shift+8 move container to workspace $workspace8
+bindsym $mod+Shift+9 move container to workspace $workspace9
+bindsym $mod+Shift+0 move container to workspace $workspace0
+
+# Keys for Microsoft Wireless Keyboard
+bindsym XF86Documents workspace $workspace4
+bindsym XF86Phone workspace $workspace5
+bindsym XF86Mail workspace $workspace6
+bindsym XF86Messenger workspace $workspace7
+bindsym XF86HomePage workspace $workspace8
+
+# laptop monitor
+bindsym XF86Launch5 exec xrandr --output eDP1 --mode 1920x1080 --output HDMI2 --off && nitrogen --restore
+# monitor
+bindsym XF86Launch6 exec xrandr --output eDP1 --off --output HDMI2 --mode 1920x1080 --left-of eDP1 --rate 165 && nitrogen --restore
+# monitor and laptop screen
+bindsym XF86Launch7 exec xrandr --output eDP1 --mode 1920x1080 --output HDMI2 --mode 1920x1080 --above eDP1 && nitrogen --restore
+# bindsym XF86Launch8 workspace $workspace7
+# bindsym XF86Launch9 workspace $workspace8
diff --git a/i3/.config/i3status/config b/i3/.config/i3status/config
new file mode 100644
index 0000000..1599ed2
--- /dev/null
+++ b/i3/.config/i3status/config
@@ -0,0 +1,56 @@
+general {
+ colors = true
+ interval = 5
+}
+
+order += "wireless _first_"
+# order += "ethernet _first"
+order += "disk /"
+# order += "battery 0"
+order += "cpu_usage"
+order += "memory"
+order += "volume master"
+order += "tztime local"
+order += "time"
+
+ethernet _first_ {
+ format_up = "E: %ip (%speed)"
+ format_down = "E: Down"
+}
+
+wireless _first_ {
+ format_up = "W: (%quality, %bitrate) Leaked ip: %ip"
+ format_down = "no wifi (sadge)"
+}
+
+disk "/" {
+ format = "Disk: %free"
+}
+
+# battery 0 {
+
+# }
+
+cpu_usage {
+ format = "CPU: %usage "
+}
+
+memory {
+ format = "Mem: %used "
+}
+
+volume master {
+ format = "Sound: %volume" format_muted = "Sound Muted"
+ device = "default"
+ mixer = "Master"
+ mixer_idx = 0
+}
+
+tztime local {
+ # format = "⏲ %a %d-%m-%Y "
+ format = "⏲ %Y-%m-%d %a"
+}
+
+time {
+ format = "%H:%M:%S "
+}
diff --git a/mbsync/.mbsyncrc b/mbsync/.mbsyncrc
new file mode 100644
index 0000000..d889482
--- /dev/null
+++ b/mbsync/.mbsyncrc
@@ -0,0 +1,42 @@
+IMAPAccount home
+Host imap.gmail.com
+UserCmd "gpg -q --for-your-eyes-only -d ~/.authinfo.gpg | awk -F ' ' '/ACCOUNT_NAME/ { print $(NF-2); exit; }'"
+PassCmd "gpg -q --for-your-eyes-only -d ~/.authinfo.gpg | awk -F ' ' '/ACCOUNT_NAME/ { print $NF; exit; }'"
+SSLType IMAPS
+AuthMechs LOGIN
+
+IMAPStore home-remote
+Account home
+
+MaildirStore home-local
+Subfolders Verbatim
+# The trailing "/" is important
+Path ~/Mail/[email protected]/
+Inbox ~/Mail/[email protected]/Inbox
+
+Channel home-inbox
+Far :home-remote:
+Near :home-local:
+Patterns "INBOX"
+
+Channel home-sent
+Far :home-remote:"[Gmail]/Sent Mail"
+Near :home-local:sent
+
+Channel home-trash
+Far :home-remote:"[Gmail]/Trash"
+Near :home-local:trash
+
+Group home
+Channel home-inbox
+Channel home-sent
+Channel home-trash
+
+# Gmail mailboxes:
+# "All Mail"
+# "Drafts"
+# "Important"
+# "Sent Mail"
+# "Spam"
+# "Starred"
+# "Trash" \ No newline at end of file
diff --git a/misc/userChrome.css b/misc/userChrome.css
new file mode 100644
index 0000000..754f429
--- /dev/null
+++ b/misc/userChrome.css
@@ -0,0 +1,267 @@
+:root {
+ --tab-active-bg-color: #535353;
+ --tab-inactive-bg-color: #1e1e1e;
+ --tab-active-fg-fallback-color: #ffffff; /* color of text in an active tab without a container */
+ --tab-inactive-fg-fallback-color: #989898; /* color of text in an inactive tab without a container */
+ --urlbar-focused-bg-color: #41404c;
+ --urlbar-not-focused-bg-color: #1c1b22;
+ --toolbar-bgcolor: #2b2a33 !important;
+ --tab-font: 'Iosevka Comfy';
+ --urlbar-font: 'Iosevka Comfy';
+
+ /* try increasing if you encounter problems */
+ --urlbar-height-setting: 24px;
+ --tab-min-height: 20px !important;
+
+ /* I don't recommend you touch this unless you know what you're doing */
+ --arrowpanel-menuitem-padding: 2px !important;
+ --arrowpanel-border-radius: 0px !important;
+ --arrowpanel-menuitem-border-radius: 0px !important;
+ --toolbarbutton-border-radius: 0px !important;
+ --toolbarbutton-inner-padding: 0px 2px !important;
+ --toolbar-field-focus-background-color: var(--urlbar-focused-bg-color) !important;
+ --toolbar-field-background-color: var(--urlbar-not-focused-bg-color) !important;
+ --toolbar-field-focus-border-color: transparent !important;
+}
+
+/* --- GENERAL DEBLOAT ---------------------------------- */
+
+/* Bottom left page loading status or url preview */
+#statuspanel { display: none !important; }
+
+/* Hide dropdown that appears when you type in search bar */
+.autocomplete-history-popup, panel[type=autocomplete-richlistbox], panel[type=autocomplete] {
+ display: none !important;
+}
+
+/* remove radius from right-click popup */
+menupopup, panel { --panel-border-radius: 0px !important; }
+menu, menuitem, menucaption { border-radius: 0px !important; }
+
+/* no stupid large buttons in right-click menu */
+menupopup > #context-navigation { display: none !important; }
+menupopup > #context-sep-navigation { display: none !important; }
+
+/* --- DEBLOAT NAVBAR ----------------------------------- */
+
+#back-button { display: none; }
+#forward-button { display: none; }
+#reload-button { display: none; }
+#stop-button { display: none; }
+#home-button { display: none; }
+#library-button { display: none; }
+#fxa-toolbar-menu-button { display: none; }
+/* empty space before and after the url bar */
+#customizableui-special-spring1, #customizableui-special-spring2 { display: none; }
+
+/* --- STYLE NAVBAR ------------------------------------ */
+
+/* remove padding between toolbar buttons */
+toolbar .toolbarbutton-1 { padding: 0 0 !important; }
+
+/* add padding to the right of the last button so that it doesn't touch the edge of the window */
+#PanelUI-menu-button {
+ padding: 0px 4px 0px 0px !important;
+}
+
+#urlbar-container {
+ --urlbar-container-height: var(--urlbar-height-setting) !important;
+ margin-left: 0 !important;
+ margin-right: 0 !important;
+ padding-top: 0 !important;
+ padding-bottom: 0 !important;
+ font-family: var(--urlbar-font, 'monospace');
+ font-size: 14px;
+}
+
+#urlbar {
+ --urlbar-height: var(--urlbar-height-setting) !important;
+ --urlbar-toolbar-height: var(--urlbar-height-setting) !important;
+ min-height: var(--urlbar-height-setting) !important;
+ border-color: var(--lwt-toolbar-field-border-color, hsla(240,5%,5%,.25)) !important;
+}
+
+#urlbar-input {
+ margin-left: 0.8em !important;
+ margin-right: 0.4em !important;
+}
+
+#navigator-toolbox {
+ border: none !important;
+}
+
+/* keep pop-up menus from overlapping with navbar */
+#widget-overflow { margin: 0 !important; }
+#appMenu-popup { margin: 0 !important; }
+#customizationui-widget-panel { margin: 0 !important; }
+#unified-extensions-panel { margin: 0 !important; }
+
+/* --- UNIFIED EXTENSIONS BUTTON ------------------------ */
+
+/* make extension icons smaller */
+#unified-extensions-view {
+ --uei-icon-size: 16px;
+}
+
+/* hide bloat */
+.unified-extensions-item-message-deck,
+#unified-extensions-view > .panel-header,
+#unified-extensions-view > toolbarseparator,
+#unified-extensions-manage-extensions {
+ display: none !important;
+}
+
+/* add 3px padding on the top and the bottom of the box */
+.panel-subview-body {
+ padding: 3px 0px !important;
+}
+
+#unified-extensions-view .unified-extensions-item-menu-button {
+ margin-inline-end: 0 !important;
+}
+
+#unified-extensions-view .toolbarbutton-icon {
+ padding: 0 !important;
+}
+
+.unified-extensions-item-contents {
+ line-height: 1 !important;
+ white-space: nowrap !important;
+}
+
+/* --- DEBLOAT URLBAR ----------------------------------- */
+
+#identity-box { display: none; }
+#pageActionButton { display: none; }
+#pocket-button { display: none; }
+#urlbar-zoom-button { display: none; }
+#tracking-protection-icon-container { display: none !important; }
+#reader-mode-button{ display: none !important; }
+#star-button { display: none; }
+#star-button-box:hover { background: inherit !important; }
+
+/* Go to arrow button at the end of the urlbar when searching */
+#urlbar-go-button { display: none; }
+
+/* remove container indicator from urlbar */
+#userContext-label, #userContext-indicator { display: none !important;}
+
+/* --- STYLE TAB TOOLBAR -------------------------------- */
+
+#titlebar {
+ --proton-tab-block-margin: 0px !important;
+ --tab-block-margin: 0px !important;
+}
+
+#TabsToolbar, .tabbrowser-tab {
+ max-height: var(--tab-min-height) !important;
+ font-size: 14px !important;
+}
+
+/* Change color of normal tabs */
+tab:not([selected="true"]) {
+ background-color: var(--tab-inactive-bg-color) !important;
+ color: var(--identity-icon-color, var(--tab-inactive-fg-fallback-color)) !important;
+}
+
+tab {
+ font-family: var(--tab-font, monospace);
+ font-weight: bold;
+ border: none !important;
+}
+
+/* safari style tab width */
+.tabbrowser-tab[fadein] {
+ max-width: 100vw !important;
+ border: none
+}
+
+/* Hide close button on tabs */
+#tabbrowser-tabs .tabbrowser-tab .tab-close-button { display: none !important; }
+
+/* disable favicons in tab */
+/* .tab-icon-stack:not([pinned]) { display: none !important; } */
+
+.tabbrowser-tab {
+ /* remove border between tabs */
+ padding-inline: 0px !important;
+ /* reduce fade effect of tab text */
+ --tab-label-mask-size: 1em !important;
+ /* fix pinned tab behaviour on overflow */
+ overflow-clip-margin: 0px !important;
+}
+
+/* Tab: selected colors */
+#tabbrowser-tabs .tabbrowser-tab[selected] .tab-content {
+ background: var(--tab-active-bg-color) !important;
+ color: var(--identity-icon-color, var(--tab-active-fg-fallback-color)) !important;
+}
+
+/* Tab: hovered colors */
+#tabbrowser-tabs .tabbrowser-tab:hover:not([selected]) .tab-content {
+ background: var(--tab-active-bg-color) !important;
+}
+
+/* hide window controls */
+.titlebar-buttonbox-container { display: none; }
+
+/* remove titlebar spacers */
+.titlebar-spacer { display: none !important; }
+
+/* disable tab shadow */
+#tabbrowser-tabs:not([noshadowfortests]) .tab-background:is([selected], [multiselected]) {
+ box-shadow: none !important;
+}
+
+/* remove dark space between pinned tab and first non-pinned tab */
+#tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs]) >
+#tabbrowser-arrowscrollbox >
+.tabbrowser-tab:nth-child(1 of :not([pinned], [hidden])) {
+ margin-inline-start: 0px !important;
+}
+
+/* remove dropdown menu button which displays all tabs on overflow */
+#alltabs-button { display: none !important }
+
+/* fix displaying of pinned tabs on overflow */
+#tabbrowser-tabs:not([secondarytext-unsupported]) .tab-label-container {
+ height: var(--tab-min-height) !important;
+}
+
+/* remove overflow scroll buttons */
+#scrollbutton-up, #scrollbutton-down { display: none !important; }
+
+/* remove new tab button */
+#tabs-newtab-button {
+ display: none !important;
+}
+
+/* hide private browsing indicator */
+#private-browsing-indicator-with-label {
+ display: none;
+}
+
+/* --- AUTOHIDE NAVBAR ---------------------------------- */
+
+/* hide navbar unless focused */
+#nav-bar {
+ min-height: 0 !important;
+ max-height: 0 !important;
+ height: 0 !important;
+ --moz-transform: scaleY(0) !important;
+ transform: scaleY(0) !important;
+}
+
+/* show on focus */
+#nav-bar:focus-within {
+ --moz-transform: scale(1) !important;
+ transform: scale(1) !important;
+ max-height: var(--urlbar-height-setting) !important;
+ height: var(--urlbar-height-setting) !important;
+ min-height: var(--urlbar-height-setting) !important;
+}
+
+#navigator-toolbox:focus-within > .browser-toolbar {
+ transform: translateY(0);
+ opacity: 1;
+}
diff --git a/msmtp/.config/msmtp/config b/msmtp/.config/msmtp/config
new file mode 100644
index 0000000..9be6dfd
--- /dev/null
+++ b/msmtp/.config/msmtp/config
@@ -0,0 +1,16 @@
+defaults
+auth on
+protocol smtp
+tls on
+tls_trust_file /etc/ssl/certs/ca-certificates.crt
+
+# account_name
+account home
+host smtp.gmail.com
+port 465
+tls_starttls off
+eval echo from $(gpg -q --for-your-eyes-only -d ~/.authinfo.gpg | awk -F ' ' '/account_name/ { print $(NF-2); exit; }')
+eval echo user $(gpg -q --for-your-eyes-only -d ~/.authinfo.gpg | awk -F ' ' '/account_name/ { print $(NF-2); exit; }')
+passwordeval "gpg -q --for-your-eyes-only -d ~/.authinfo.gpg | awk -F ' ' '/account_name/ { print $NF; exit; }'"
+
+account default : home
diff --git a/shell/.bash_aliases b/shell/.bash_aliases
new file mode 100644
index 0000000..dea4234
--- /dev/null
+++ b/shell/.bash_aliases
@@ -0,0 +1,36 @@
+# -*- mode:sh; -*-
+
+alias pyenv="source /home/bard/.pyvenv/bin/activate"
+alias mf='mpv "$(fzf)"'
+alias comp="picom --experimental-backends --daemon"
+alias killcomp="killall picom"
+alias kd="killall Discord"
+
+# directory aliases
+# cd into the previous working directory by omitting `cd`.
+alias ..='cd ..'
+alias ...='cd ../..'
+alias ....='cd ../../..'
+
+# Safer default for cp, mv, rm. These will print a verbose output of
+# the operations. If an existing file is affected, they will ask for
+# confirmation. This can make things a bit more cumbersome, but is a
+# generally safer option.
+alias cp='cp -iv'
+alias mv='mv -iv'
+alias rm='rm -Iv'
+
+# Make ls a bit easier to read. Note that the -A is the same as -a but
+# does not include implied paths (the current dir denoted by a dot and
+# the previous dir denoted by two dots). I would also like to use the
+# -p option, which prepends a forward slash to directories, but it does
+# not seem to work with symlinked directories. For more, see `man ls`.
+alias ls='ls -pv --color=auto --group-directories-first'
+alias lsa='ls -pvA --color=auto --group-directories-first'
+alias lsl='ls -lhpv --color=auto --group-directories-first'
+alias lsla='ls -lhpvA --color=auto --group-directories-first'
+
+# emacs stuff
+# change daemon permissions for script
+alias ep="chmod 700 /run/user/1000/emacs/"
+alias en="emacsclient -c -nw"
diff --git a/shell/.bashrc b/shell/.bashrc
new file mode 100644
index 0000000..12feb0d
--- /dev/null
+++ b/shell/.bashrc
@@ -0,0 +1,85 @@
+# ~/.bashrc: executed by bash(1) for non-login shells.
+# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
+# for examples
+export TERMINAL="/usr/local/bin/st"
+export PATH="/home/bard/.local/bin:$PATH"
+export PATH="/home/bard/.local/scripts/bin:$PATH"
+export PATH="$HOME/opt/:$PATH"
+export PKG_CONFIG_PATH="$HOME/opt/raylib/lib/pkgconfig/:$PKG_CONFIG_PATH"
+export PATH="$HOME/.nimble/bin":$PATH
+
+# HISTORY
+# don't put duplicate lines or lines starting with space in the history.
+HISTCONTROL=ignoreboth
+
+# append to the history file, don't overwrite it
+shopt -s histappend
+
+# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
+HISTSIZE=50
+HISTFILESIZE=200
+
+# check the window size after each command and, if necessary,
+# update the values of LINES and COLUMNS.
+shopt -s checkwinsize
+
+# enable color support of ls and also add handy aliases
+if [ -x /usr/bin/dircolors ]; then
+ test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
+ alias ls='ls --color=auto'
+ alias dir='dir --color=auto'
+ alias vdir='vdir --color=auto'
+
+ alias grep='grep --color=auto'
+ alias fgrep='fgrep --color=auto'
+ alias egrep='egrep --color=auto'
+fi
+
+if [ -f ~/.bash_aliases ]; then
+ . ~/.bash_aliases
+fi
+
+# simple function to check if installed
+_checkexec ()
+{
+ command -v "$1" > /dev/null
+}
+# editors
+# Default editor.
+if pgrep -x emacs > /dev/null
+then
+ export VISUAL="emacsclient -c"
+ export EDITOR="emacsclient -t"
+elif _checkexec gvim
+then
+ export VISUAL="gvim"
+ export EDITOR=vim
+else
+ export VISUAL=vim
+ export EDITOR=$VISUAL
+fi
+
+# function for count number of certain filetype
+countype()
+{
+ ls -a *.$1 | wc -l
+}
+
+# Default browser. This leverages the MIME list.
+export BROWSER=/usr/bin/xdg-open
+
+# enable programmable completion features (you don't need to enable
+# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
+# sources /etc/bash.bashrc).
+if ! shopt -oq posix; then
+ if [ -f /usr/share/bash-completion/bash_completion ]; then
+ . /usr/share/bash-completion/bash_completion
+ elif [ -f /etc/bash_completion ]; then
+ . /etc/bash_completion
+ fi
+fi
+
+export PS1='[\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]]\[\033[01;35m\] λ\[\033[00m\] '
+
+[ -f "/home/bard/.ghcup/env" ] && source "/home/bard/.ghcup/env" # ghcup-env
+. "$HOME/.cargo/env"
diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf
new file mode 100644
index 0000000..32dbab6
--- /dev/null
+++ b/tmux/.config/tmux/tmux.conf
@@ -0,0 +1,38 @@
+set-option -g prefix C-t
+set -g mouse on
+# don't do anything when a 'bell' rings
+set -g visual-activity off
+set -g visual-bell off
+set -g visual-silence off
+setw -g monitor-activity off
+set -g bell-action none
+
+# clock mode
+setw -g clock-mode-colour colour7
+
+# copy mode
+setw -g mode-style 'fg=colour7 bg=colour2 bold'
+
+# pane borders
+set -g pane-border-style 'fg=colour7'
+set -g pane-active-border-style 'fg=colour3'
+
+# statusbar
+set -g status-position bottom
+set -g status-justify left
+set -g status-style 'fg=colour7'
+set -g status-left ''
+set -g status-right '%Y-%m-%d %H:%M '
+set -g status-right-length 50
+set -g status-left-length 10
+
+setw -g window-status-current-style 'fg=colour0 bg=colour7 bold'
+setw -g window-status-current-format ' #I #W #F '
+
+setw -g window-status-style 'fg=colour7 dim'
+setw -g window-status-format ' #I #[fg=colour7]#W #[fg=colour7]#F '
+
+setw -g window-status-bell-style 'fg=colour7 bg=colour7 bold'
+
+# messages
+set -g message-style 'fg=colour2 bg=colour0 bold' \ No newline at end of file
diff --git a/urxvt/Repositories/URxvt-themes/And yet another random b/urxvt/Repositories/URxvt-themes/And yet another random
new file mode 100644
index 0000000..581b327
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/And yet another random
@@ -0,0 +1,36 @@
+! special
+*.foreground: #d7d7d7
+*.background: #2f2e36
+*.cursorColor: #d7d7d7
+
+! black
+*.color0: #9da4c2
+*.color8: #9da4c2
+
+! red
+*.color1: #8a504f
+*.color9: #8a504f
+
+! green
+*.color2: #597e54
+*.color10: #597e54
+
+! yellow
+*.color3: #bfbf8c
+*.color11: #bfbf8c
+
+! blue
+*.color4: #555870
+*.color12: #555870
+
+! magenta
+*.color5: #655b66
+*.color13: #655b66
+
+! cyan
+*.color6: #6a7a7a
+*.color14: #6a7a7a
+
+! white
+*.color7: #e5e5e5
+*.color15: #ffffff
diff --git a/urxvt/Repositories/URxvt-themes/DebianThemeURxvt b/urxvt/Repositories/URxvt-themes/DebianThemeURxvt
new file mode 100644
index 0000000..b0c02ff
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/DebianThemeURxvt
@@ -0,0 +1,58 @@
+! Xresource file
+
+URxvt*depth: 24
+URxvt*geometry: 100x25
+URxvt.borderColor: #333333
+URxvt.internalBorder: 8
+
+! -- scrollbar
+
+URxvt.scrollstyle: plain
+URxvt.scrollBar: false
+URxvt.scrollTtyOutput: false
+URxvt.scrollWidthBuffer: true
+URxvt.scrollTtyKeypress: true
+
+! -- login shell
+
+URxvt.loginShell: false
+
+! -- font
+
+URxvt.font: xft:lime:pixelsize=10
+
+
+! -- perl
+
+URxvt.perl-ext-command: default,clipboard,vtwheel
+URxvt.keysym.Mod4-v: perl:clipboard:paste
+
+! -- colors
+
+! black
+URxvt.color0: #121212
+URxvt.color8: #3B3B3B
+! red
+URxvt.color1: #8C4655
+URxvt.color9: #B3596B
+! green
+URxvt.color2: #8C466A
+URxvt.color10: #B35988
+! yellow
+URxvt.color3: #8C4681
+URxvt.color11: #B359A4
+! blue
+URxvt.color4: #81468C
+URxvt.color12: #2d2d2d
+! magenta
+URxvt.color5: #6A468C
+URxvt.color13: #8859B3
+! cyan
+URxvt.color6: #55468C
+URxvt.color14: #6B59B3
+! white
+URxvt.color7: #737373
+URxvt.color15: #8C8C8C
+
+URxvt.background: #333333
+URxvt.foreground: 15
diff --git a/urxvt/Repositories/URxvt-themes/Good rainbow b/urxvt/Repositories/URxvt-themes/Good rainbow
new file mode 100644
index 0000000..8152baa
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/Good rainbow
@@ -0,0 +1,55 @@
+!--------------------xdefauls
+URxvt.font: xft:terminus:pixelsize=14
+urxvt*termName: rxvt
+urxvt*scrollBar: false
+urxvt*matcher.button: 1
+urxvt.transparent: false
+urxvt.boldFont:
+Xft*dpi: 96
+Xft*antialias: true
+Xft*hinting: true
+Xft*hintstyle: hintfull
+URxvt*cursorUnderline: true
+Xft*rgba: rgb
+URxvt*geometry: 85x20
+*internalBorder: 23
+URxvt*fading: 0
+URxvt*tintColor: #ffffff
+URxvt*shading: 0
+URxvt*inheritPixmap: False
+URxvt.foreground: #bea492
+URxvt.background: #181512
+URxvt.cursorColor: #bea492
+URxvt.colorBD: #bea492
+
+! black
+URxvt.color0: #33302e
+URxvt.color8: #81776f
+
+! red
+URxvt.color1: #8c4c4c
+URxvt.color9: #9f5555
+
+! green
+URxvt.color2: #746c48
+URxvt.color10: #857b52
+
+! yellow
+URxvt..color3: #907245
+URxvt..color11: #9c7e53
+
+! blue
+URxvt.color4: #4c626d
+URxvt.color12: #5b707a
+
+! magenta
+URxvt.color5: #604c5f
+URxvt.color13: #625665
+
+! cyan
+URxvt.color6: #4b5e57
+URxvt.color14: #557067
+
+! white
+URxvt.color7: #a69181
+URxvt.color15: #e8dfcd
diff --git a/urxvt/Repositories/URxvt-themes/HomeMade Cotton Candy b/urxvt/Repositories/URxvt-themes/HomeMade Cotton Candy
new file mode 100644
index 0000000..7d96607
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/HomeMade Cotton Candy
@@ -0,0 +1,56 @@
+!--------------------xdefauls
+URxvt.font: xft:monaco:pixelsize=13
+urxvt*termName: rxvt
+urxvt*scrollBar: false
+urxvt*matcher.button: 1
+urxvt.transparent: false
+urxvt.boldFont:
+URxvt.letterSpace: -1
+Xft*dpi: 96
+Xft*antialias: true
+Xft*hinting: true
+Xft*hintstyle: hintfull
+URxvt*cursorUnderline: true
+Xft*rgba: rgb
+URxvt*geometry: 85x20
+*internalBorder: 26
+URxvt*fading: 0
+URxvt*tintColor: #ffffff
+URxvt*shading: 0
+URxvt*inheritPixmap: False
+! special
+*.foreground: #c5c8c6
+*.background: #1f1f1f
+*.cursorColor: #c5c8c6
+
+! black
+*.color0: #282a2e
+*.color8: #373b41
+
+! red
+*.color1: #a85377
+*.color9: #a85377
+
+! green
+*.color2: #746f81
+*.color10: #746f81
+
+! yellow
+*.color3: #545670
+*.color11: #545670
+
+! blue
+*.color4: #6a9bb9
+*.color12: #6a9bb9
+
+! magenta
+*.color5: #764970
+*.color13: #764970
+
+! cyan
+*.color6: #abb9ba
+*.color14: #abb9ba
+
+! white
+*.color7: #899298
+*.color15: #899298
diff --git a/urxvt/Repositories/URxvt-themes/Jelly Beans yo b/urxvt/Repositories/URxvt-themes/Jelly Beans yo
new file mode 100644
index 0000000..82ddf14
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/Jelly Beans yo
@@ -0,0 +1,45 @@
+!! jellybeans colors
+! 8 8 8
+! *background: #080808
+! 128 128 128
+! *foreground: #808080
+! black
+! 26 26 26
+*color0: #1a1a1a
+! 64 64 64
+*color8: #404040
+! red
+! 215 95 95
+*color1: #d75f5f
+! 234 132 132
+*color9: #EA8484
+! green
+! 135 175 95
+*color2: #87af5f
+! 199 240 159
+*color10: #C7F09F
+! yellow
+! 255 175 95
+*color3: #ffaf5f
+! 255 204 154
+*color11: #FFCC9A
+! blue
+! 135 175 215
+*color4: #87afd7
+! 165 202 239
+*color12: #a5caef
+! magenta
+! 135 135 175
+*color5: #8787af
+! 166 166 222
+*color13: #A6A6DE
+! cyan
+! 95 135 135
+*color6: #5f8787
+! 105 178 178
+*color14: #69b2b2
+! white
+! 128 128 128
+*color7: #808080
+! 215 215 215
+*color15: #d7d7d7
diff --git a/urxvt/Repositories/URxvt-themes/LightPurpleGreen b/urxvt/Repositories/URxvt-themes/LightPurpleGreen
new file mode 100644
index 0000000..b9e9968
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/LightPurpleGreen
@@ -0,0 +1,53 @@
+!--------------------xdefauls
+URxvt.font: xft:ubuntu mono:pixelsize=12
+urxvt*termName: rxvt
+urxvt*scrollBar: false
+urxvt*matcher.button: 1
+urxvt.transparent: false
+urxvt.boldFont:
+Xft*dpi: 96
+Xft*antialias: true
+Xft*hinting: true
+Xft*hintstyle: hintfull
+Xft*rgba: rgb
+URxvt*geometry: 85x20
+*internalBorder: 23
+URxvt*fading: 0
+URxvt*tintColor: #ffffff
+URxvt*shading: 0
+URxvt*inheritPixmap: False
+URxvt*background: #4B414C
+URxvt*foreground: #efefef
+! --- standard colors ---
+! black
+URxvt*color0: #7f94a0
+! bright_black
+URxvt*color8: #7f94a0
+! red
+URxvt*color1: #818995
+! bright_red
+URxvt*color9: #818995
+! green
+URxvt*color2: #A5BE9E
+! bright_green
+URxvt*color10: #A5BE9E
+! yellow
+URxvt*color3: #afad84
+! bright_yellow
+URxvt*color11: #afad84
+! blue
+URxvt*color4: #afad84
+! bright_blue
+URxvt*color12: #afad84
+! magenta
+URxvt*color5: #efefef
+! bright_magenta
+URxvt*color13: #efefef
+! cyan
+URxvt*color6: #6c7570
+! bright_cyan
+URxvt*color14: #6c7570
+! white
+URxvt*color7: #ada38b
+! bright_white
+URxvt*color15: #efefef
diff --git a/urxvt/Repositories/URxvt-themes/README.md b/urxvt/Repositories/URxvt-themes/README.md
new file mode 100644
index 0000000..7bd2899
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/README.md
@@ -0,0 +1,110 @@
+light purplegreen
+============
+
+<a href="http://imgur.com/r4qnd0P"><img src="http://i.imgur.com/r4qnd0P.png" title="source: imgur.com" /></a>>
+
+dark violet
+============
+
+<a href="http://imgur.com/syB9MpU"><img src="http://i.imgur.com/syB9MpU.png" title="source: imgur.com" /></a>
+
+
+julia
+============
+
+<a href="http://imgur.com/HldAf6q"><img src="http://i.imgur.com/HldAf6q.png" title="source: imgur.com" /></a>
+
+mixa lot
+=============
+
+<a href="http://imgur.com/Sf0DCnT"><img src="http://i.imgur.com/Sf0DCnT.png" title="source: imgur.com" /></a>
+
+pretty
+=============
+<a href="http://imgur.com/hBDtz4K"><img src="http://i.imgur.com/hBDtz4K.png" title="source: imgur.com" /></a>
+
+blue space
+==============
+<a href="http://imgur.com/gQquxno"><img src="http://i.imgur.com/gQquxno.png" title="source: imgur.com" /></a>
+
+random tree
+======================
+<a href="http://imgur.com/noH7P4Y"><img src="http://i.imgur.com/noH7P4Y.png" title="source: imgur.com" /></a>
+
+deep sea
+=====================
+<a href="http://imgur.com/U5bxU64"><img src="http://i.imgur.com/U5bxU64.png" title="source: imgur.com" /></a>
+
+a theme
+=====================
+<a href="http://imgur.com/eM8YhzW"><img src="http://i.imgur.com/eM8YhzW.png" title="source: imgur.com" /></a>
+
+fall
+=======================
+<a href="http://imgur.com/0ors61Y"><img src="http://i.imgur.com/0ors61Y.png" title="source: imgur.com" /></a>
+
+Smooth white blue
+======================
+<a href="http://imgur.com/9TjIBMI"><img src="http://i.imgur.com/9TjIBMI.png" title="source: imgur.com" /></a>
+
+fall green ncmpcpp
+==================
+<a href="http://imgur.com/gRcjR4G"><img src="http://i.imgur.com/gRcjR4G.png" title="source: imgur.com" /></a>
+
+something
+=======================
+<a href="http://imgur.com/Kv9xN3Q"><img src="http://i.imgur.com/Kv9xN3Q.png" title="source: imgur.com" /></a>
+
+the arch dude
+=======================
+<a href="http://imgur.com/IOtOjeC"><img src="http://i.imgur.com/IOtOjeC.png" title="source: imgur.com" /></a>
+
+i'm not gentoo
+=========================
+<a href="http://imgur.com/2Mu9Q02"><img src="http://i.imgur.com/2Mu9Q02.png" title="source: imgur.com" /></a>
+
+good rainbow
+=========================
+<a href="http://imgur.com/ds1Zzit"><img src="http://i.imgur.com/ds1Zzit.png" title="source: imgur.com" /></a>
+
+HomeMade Cotton Candy
+====================
+<a href="http://i.imgur.com/oGka08U.png">
+ <img src="http://imgur.com/oGka08Ul.png" />
+</a>
+
+tree bark
+============================
+<a href="http://i.imgur.com/sJd9l1B.png">
+ <img src="http://imgur.com/sJd9l1Bl.png" />
+</a>
+
+All colorful and shit
+============================
+<a href="http://i.imgur.com/zkg0YI3.png">
+ <img src="http://imgur.com/zkg0YI3l.png" />
+</a>
+
+ronery flower
+=============================
+<a href="http://i.imgur.com/oFQXGei.png">
+ <img src="http://imgur.com/oFQXGeil.png" />
+</a>
+
+rando macfag gay
+=============================
+<a href="http://i.imgur.com/cCWoNGE.png">
+ <img src="http://imgur.com/cCWoNGEl.png" />
+</a>
+
+i have no name
+===========================
+<a href="http://i.imgur.com/8Wwea9o.png">
+ <img src="http://imgur.com/8Wwea9ol.png" />
+</a>
+
+calm girl
+============================
+<a href="http://i.imgur.com/K84OSho.png">
+ <img src="http://imgur.com/K84OShol.png" />
+</a>
diff --git a/urxvt/Repositories/URxvt-themes/a new one b/urxvt/Repositories/URxvt-themes/a new one
new file mode 100644
index 0000000..9470984
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/a new one
@@ -0,0 +1,40 @@
+!--------------------xdefauls
+URxvt.font: xft:monaco:pixelsize=11
+urxvt*termName: rxvt
+urxvt*scrollBar: false
+urxvt*matcher.button: 1
+urxvt.transparent: false
+urxvt.boldFont:
+URxvt.letterSpace: -1
+Xft*dpi: 96
+Xft*antialias: true
+Xft*hinting: true
+Xft*hintstyle: hintfull
+URxvt*cursorUnderline: true
+Xft*rgba: rgb
+URxvt*geometry: 85x20
+*internalBorder: 26
+URxvt*fading: 0
+URxvt*tintColor: #ffffff
+URxvt*shading: 0
+URxvt*inheritPixmap: False
+*background: #20242c
+*foreground: #b3b8c4
+
+*color0: #3e4853
+*color1: #b06a58
+*color2: #95b47b
+*color3: #e5c078
+*color4: #58698c
+*color5: #7b5e8d
+*color6: #82a1b2
+*color7: #cccaca
+
+*color8: #525c67
+*color9: #ba7e6c
+*color10: #a9c88f
+*color11: #f9d48c
+*color12: #6c7da0
+*color13: #8f72a1
+*color14: #96b5c6
+*color15: #e0dede
diff --git a/urxvt/Repositories/URxvt-themes/a theme b/urxvt/Repositories/URxvt-themes/a theme
new file mode 100644
index 0000000..1c615c3
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/a theme
@@ -0,0 +1,49 @@
+URxvt.cursorColor: #c0b18b
+! black
+!URxvt.color0: #2f2f2f
+!URxvt.color8: #444444
+! red
+!URxvt.color1: #8800DD
+!URxvt.color9: #AA22FF
+! green
+!URxvt.color2: #9977DD
+!URxvt.color10: #BB99EE
+! yellow
+!URxvt.color3: #BB88EE
+!URxvt.color11: #DDAAEE
+! blue
+!URxvt.color4: #7755FF
+!URxvt.color12: #AA88FF
+! magenta
+!URxvt.color5: #6600DD
+!URxvt.color13: #9955FF
+! cyan
+!URxvt.color6: #9977AA
+!URxvt.color14: #BB99CC
+! white
+!URxvt.color7: #EEEEEE
+!URxvt.color15: #AAAAAA
+!black
+URxvt.color0:#4A3637
+URxvt.color8:#4A3637
+!red
+URxvt.color1:#d17b49
+URxvt.color9:#d17b49
+!green
+URxvt.color2:#7b8748
+URxvt.color10:#7b8748
+!yellow
+URxvt.color3:#af865a
+URxvt.color11:#af865a
+!blue
+URxvt.color4:#535C5C
+URxvt.color12:#535C5C
+!magenta
+URxvt.color5:#775759
+URxvt.color13:#775759
+!cyan
+URxvt.color6:#6d715e
+URxvt.color14:#6d715e
+!white
+URxvt.color7:#c0b18b
+URxvt.color15:#c0b18b
diff --git a/urxvt/Repositories/URxvt-themes/all colorful and stuff b/urxvt/Repositories/URxvt-themes/all colorful and stuff
new file mode 100644
index 0000000..924f704
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/all colorful and stuff
@@ -0,0 +1,56 @@
+!--------------------xdefauls
+URxvt.font: xft:monaco:pixelsize=13
+urxvt*termName: rxvt
+urxvt*scrollBar: false
+urxvt*matcher.button: 1
+urxvt.transparent: false
+urxvt.boldFont:
+URxvt.letterSpace: -1
+Xft*dpi: 96
+Xft*antialias: true
+Xft*hinting: true
+Xft*hintstyle: hintfull
+URxvt*cursorUnderline: true
+Xft*rgba: rgb
+URxvt*geometry: 85x20
+*internalBorder: 26
+URxvt*fading: 0
+URxvt*tintColor: #ffffff
+URxvt*shading: 0
+URxvt*inheritPixmap: False
+! special
+*.foreground: #aaaaaa
+*.background: #161b21
+*.cursorColor: #aaaaaa
+
+! black
+*.color0: #9ea2a5
+*.color8: #9ea2a5
+
+! red
+*.color1: #8b6066
+*.color9: #8b6066
+
+! green
+*.color2: #9a7e62
+*.color10: #9a7e62
+
+! yellow
+*.color3: #e7d869
+*.color11: #e7d869
+
+! blue
+*.color4: #354f73
+*.color12: #354f73
+
+! magenta
+*.color5: #55465b
+*.color13: #55465b
+
+! cyan
+*.color6: #716467
+*.color14: #716467
+
+! white
+*.color7: #aaaaaa
+*.color15: #a7a9a8
diff --git a/urxvt/Repositories/URxvt-themes/arch dude remix b/urxvt/Repositories/URxvt-themes/arch dude remix
new file mode 100644
index 0000000..4046bcd
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/arch dude remix
@@ -0,0 +1,39 @@
+!--------------------xdefauls
+URxvt.font: xft:terminus:pixelsize=14
+urxvt*termName: rxvt
+urxvt*scrollBar: false
+urxvt*matcher.button: 1
+urxvt.transparent: false
+urxvt.boldFont:
+Xft*dpi: 96
+Xft*antialias: true
+Xft*hinting: true
+Xft*hintstyle: hintfull
+URxvt*cursorUnderline: true
+Xft*rgba: rgb
+URxvt*geometry: 85x20
+*internalBorder: 23
+URxvt*fading: 0
+URxvt*tintColor: #ffffff
+URxvt*shading: 0
+URxvt*inheritPixmap: False
+
+URxvt.color0: #3B444F
+URxvt.color8: #4A585A
+URxvt.color1: #D8B795
+URxvt.color9: #D8B795
+URxvt.color2: #A5AF86
+URxvt.color10: #BDC79E
+URxvt.color3: #CD7860
+URxvt.color11: #E88773
+URxvt.color4: #7A9388
+URxvt.color12: #94B1A3
+URxvt.color5: #75434C
+URxvt.color13: #BB6C73
+URxvt.color6: #767D75
+URxvt.color14: #9DA69E
+URxvt.color7: #C2C2A8
+URxvt.color15: #DBDAC1
+URxvt.background: #252525
+URxvt.foreground: #a3a6ab
+URxvt..colorUL: #95b9cc
diff --git a/urxvt/Repositories/URxvt-themes/black blue space b/urxvt/Repositories/URxvt-themes/black blue space
new file mode 100644
index 0000000..b2d1aa7
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/black blue space
@@ -0,0 +1,33 @@
+URxvt.scrollBar: false
+urxvt*termName: rxvt
+urxvt*font: xft:uushi:pixelsize=8
+urxvt*boldFont:
+urxvt*background: #000000
+urxvt*foreground: #666699
+urxvt*cursorColor: #6699CC
+urxvt*colorBD: #CCCCFF
+
+!Visiblue
+urxvt*color0: #333366
+urxvt*color8: #333399
+
+urxvt*color1: #6666CC
+urxvt*color9: #9999FF
+
+urxvt*color2: #0099CC
+urxvt*color10: #00CCFF
+
+urxvt*color3: #3366CC
+urxvt*color11: #6699FF
+
+urxvt*color4: #006699
+urxvt*color12: #0099CC
+
+urxvt*color5: #0066FF
+urxvt*color13: #0099FF
+
+urxvt*color6: #669999
+urxvt*color14: #66CCCC
+
+urxvt*color7: #99CCCC
+urxvt*color15: #CCFFFF
diff --git a/urxvt/Repositories/URxvt-themes/blue white purpe calm b/urxvt/Repositories/URxvt-themes/blue white purpe calm
new file mode 100644
index 0000000..f73c7e3
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/blue white purpe calm
@@ -0,0 +1,51 @@
+!--------------------xdefauls
+URxvt.font: xft:Ubuntu Mono:bold:pixelsize=14
+urxvt*termName: rxvt
+urxvt*scrollBar: false
+urxvt*matcher.button: 1
+urxvt.transparent: false
+urxvt.boldFont:
+Xft*dpi: 96
+Xft*antialias: true
+Xft*hinting: full
+URxvt*geometry: 85x20
+*internalBorder: 23
+URxvt*fading: 0
+URxvt*tintColor: #ffffff
+URxvt*shading: 0
+URxvt*inheritPixmap: False
+URxvt*background: #1b1b1b
+URxvt*foreground: #efefef
+! --- standard colors ---
+! black
+URxvt*color0: #7f94a0
+! bright_black
+URxvt*color8: #A56D61
+! red
+URxvt*color1: #8687b3
+! bright_red
+URxvt*color9: #9E9FBE
+! green
+URxvt*color2: #A5BE9E
+! bright_green
+URxvt*color10: #a6ad8d
+! yellow
+URxvt*color3: #C19FBA
+! bright_yellow
+URxvt*color11: #afad84
+! blue
+URxvt*color4: #7f6270
+! bright_blue
+URxvt*color12: #af9c96
+! magenta
+URxvt*color5: #efefef
+! bright_magenta
+URxvt*color13: #b89c8d
+! cyan
+URxvt*color6: #6c7570
+! bright_cyan
+URxvt*color14: #a6a496
+! white
+URxvt*color7: #ada38b
+! bright_white
+URxvt*color15: #efefef
diff --git a/urxvt/Repositories/URxvt-themes/brown slug b/urxvt/Repositories/URxvt-themes/brown slug
new file mode 100644
index 0000000..655df45
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/brown slug
@@ -0,0 +1,44 @@
+!--------------------xdefauls
+URxvt.font: xft:tamsyn:pixelsize=14
+urxvt*termName: rxvt
+urxvt*scrollBar: false
+urxvt*matcher.button: 1
+urxvt.transparent: false
+urxvt.boldFont:
+Xft*dpi: 96
+Xft*antialias: true
+Xft*hinting: full
+URxvt*geometry: 85x20
+*internalBorder: 23
+URxvt*fading: 0
+URxvt*tintColor: #ffffff
+URxvt*shading: 0
+URxvt*inheritPixmap: False
+! special
+URxvt.foreground: #507a5e
+URxvt.background: #27292a
+URxvt.cursorColor: #507a5e
+! black
+URxvt.color0: #282a2e
+URxvt.color8: #373b41
+! red
+URxvt.color1: #927575
+URxvt.color9: #524545
+! green
+URxvt.color2: #dbe57e
+URxvt.color10: #dce95a
+! yellow
+URxvt.color3: #d39d77
+URxvt.color11: #d6c096
+! blue
+URxvt.color4: #33424f
+URxvt.color12: #42596d
+! magenta
+URxvt.color5: #755c7d
+URxvt.color13: #7a6380
+! cyan
+URxvt.color6: #5e8d87
+URxvt.color14: #4f6a66
+! white
+URxvt.color7: #40454a
+URxvt.color15: #575056
diff --git a/urxvt/Repositories/URxvt-themes/calm girl b/urxvt/Repositories/URxvt-themes/calm girl
new file mode 100644
index 0000000..602655f
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/calm girl
@@ -0,0 +1,55 @@
+
+!--------------------xdefauls
+URxvt.font: xft:monaco:pixelsize=13
+urxvt*termName: rxvt
+urxvt*scrollBar: false
+urxvt*matcher.button: 1
+urxvt.transparent: false
+urxvt.boldFont:
+Xft*dpi: 96
+Xft*antialias: true
+Xft*hinting: true
+Xft*hintstyle: hintfull
+Xft*rgba: rgb
+URxvt*geometry: 85x20
+*internalBorder: 23
+URxvt*fading: 0
+URxvt*tintColor: #ffffff
+URxvt*shading: 0
+URxvt*inheritPixmap: False
+! special
+*.foreground: #c5c8c6
+*.background: #333232
+*.cursorColor: #c5c8c6
+
+! black
+*.color0: #585c69
+*.color8: #585c69
+
+! red
+*.color1: #cab0a1
+*.color9: #cab0a1
+
+! green
+*.color2: #9f8578
+*.color10: #9f8578
+
+! yellow
+*.color3: #986c5b
+*.color11: #986c5b
+
+! blue
+*.color4: #808178
+*.color12: #808178
+
+! magenta
+*.color5: #979892
+*.color13: #979892
+
+! cyan
+*.color6: #cab0a1
+*.color14: #cab0a1
+
+! white
+*.color7: #707880
+*.color15: #707880
diff --git a/urxvt/Repositories/URxvt-themes/dark violet good b/urxvt/Repositories/URxvt-themes/dark violet good
new file mode 100644
index 0000000..87e9c40
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/dark violet good
@@ -0,0 +1,30 @@
+
+
+ URxvt*background: #1b1b1b
+ URxvt*foreground: #cccaca
+
+ !Black
+ URxvt*color0: #222222
+ URxvt*color8: #5b595a
+ !Red
+ URxvt*color1: #664742
+ URxvt*color9: #664742
+ !Green
+ URxvt*color2: #A5AF86
+ URxvt*color10: #A5AF86
+ !Yellow
+ URxvt*color3: #F7E7BD
+ URxvt*color11: #F7E7BD
+ !Blue
+ URxvt*color4: #6e686f
+ URxvt*color12: #6e686f
+ !Magenta
+ URxvt*color5: #966E6E
+ URxvt*color13: #B09A91
+ !Cyan
+ URxvt*color6: #849492
+ URxvt*color14: #849492
+ !White
+ URxvt*color7: #a49c9c
+ URxvt*color15: #e9e6e6
+
diff --git a/urxvt/Repositories/URxvt-themes/fall b/urxvt/Repositories/URxvt-themes/fall
new file mode 100644
index 0000000..0cc0e56
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/fall
@@ -0,0 +1,19 @@
+
+
+ *color0: #d4c490
+ *color1: #aab283
+ *color2: #8a9b71
+ *color3: #5c7162
+ *color4: #a1755c
+ *color5: #895255
+ *color6: #a95332
+ *color7: #6c886f
+ *color8: #c4623d
+ *color9: #94643e
+ *color10: #b78143
+ *color11: #c69459
+ *color12: #ae8b6b
+ *color13: #818890
+ *color14: #d4c490
+ *color15: #aab283
+
diff --git a/urxvt/Repositories/URxvt-themes/fall green b/urxvt/Repositories/URxvt-themes/fall green
new file mode 100644
index 0000000..7d98907
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/fall green
@@ -0,0 +1,45 @@
+!--------------------xdefauls
+URxvt.font: xft:ubuntu mono:pixelsize=13
+urxvt*termName: rxvt
+urxvt*scrollBar: false
+urxvt*matcher.button: 1
+urxvt.transparent: false
+urxvt.boldFont:
+Xft*dpi: 96
+Xft*antialias: true
+Xft*hinting: true
+Xft*hintstyle: hintfull
+Xft*rgba: rgb
+URxvt*geometry: 85x20
+*internalBorder: 23
+URxvt*fading: 0
+URxvt*tintColor: #ffffff
+URxvt*shading: 0
+URxvt*inheritPixmap: False
+URxvt*background: #212121
+URxvt*foreground: #D2C5BC
+!#D2C5BC
+!black
+URxvt*color0:#777777
+URxvt*color8:#777777
+!red
+URxvt*color1:#a19488
+URxvt*color9:#a19488
+!green
+URxvt*color2:#88a194
+URxvt*color10:#88a194
+!yellow
+URxvt*color3:#95a188
+URxvt*color11:#95a188
+!blue
+URxvt*color4:#9488a1
+URxvt*color12:#9488a1
+!magenta
+URxvt*color5:#a18895
+URxvt*color13:#a18895
+!cyan
+URxvt*color6:#8895a1
+URxvt*color14:#8895a1
+!white
+URxvt*color7:#d9d9d9
+URxvt*color15:#d9d9d9
diff --git a/urxvt/Repositories/URxvt-themes/gray blue chill brah b/urxvt/Repositories/URxvt-themes/gray blue chill brah
new file mode 100644
index 0000000..097dc0a
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/gray blue chill brah
@@ -0,0 +1,43 @@
+!--------------------xdefauls
+urxvt*font: xft:uushi:size=8
+urxvt*termName: rxvt
+urxvt*background: #333333
+urxvt*foreground: #efefef
+urxvt*scrollBar: false
+urxvt*matcher.button: 1
+urxvt.transparent: false
+urxvt*allow_bold: true
+Xft*dpi: 96
+Xft*antialias: true
+Xft*hinting: full
+URxvt*geometry: 85x20
+URxvt*fading: 0
+URxvt*tintColor: #ffffff
+URxvt*shading: 0
+URxvt*inheritPixmap: False
+! black + red
+!urxvt*color0: #3f3f3f
+urxvt*color0: #2d2d2d
+urxvt*color1: #dcdccc
+! green + yellow
+urxvt*color2: #A9A794
+urxvt*color3: #506070
+! blue + purple
+urxvt*color4: #938989
+urxvt*color5: #B1AE95
+! cyan + white
+urxvt*color6: #A1C1CE
+urxvt*color7: #efefef
+! bright-black + bright-red
+urxvt*color8: #506070
+urxvt*color9: #938989
+! bright-green + bright-yellow
+urxvt*color10: #C5B9C9
+urxvt*color11: #506070
+! bright-blue + bright-purple
+urxvt*color12: #94bff3
+urxvt*color13: #ec93d3
+! bright-cyan + bright-white
+urxvt*color14: #93e0e3
+urxvt*color15: #efefef
+!}}}
diff --git a/urxvt/Repositories/URxvt-themes/green white URxvt b/urxvt/Repositories/URxvt-themes/green white URxvt
new file mode 100644
index 0000000..c43d32c
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/green white URxvt
@@ -0,0 +1,50 @@
+
+! Xresource file
+URxvt*depth: 12
+URxvt*geometry: 80x20
+URxvt.borderColor: #739890
+URxvt.internalBorder: 4
+! -- scrollbar
+URxvt.scrollstyle: plain
+URxvt.scrollBar: false
+URxvt.scrollTtyOutput: false
+URxvt.scrollWidthBuffer: true
+URxvt.scrollTtyKeypress: true
+! -- login shell
+URxvt.loginShell: false
+! -- font
+URxvt.font: xft:uushi:pixelsize=9
+URxvt.boldFont:
+! -- perl
+URxvt.perl-ext-command: default,clipboard,vtwheel
+URxvt.keysym.Mod4-v: perl:clipboard:paste
+! -- colors
+URxvt.background: #424242
+URxvt.foreground: #739890
+URxvt.colorBD: #CFCFCF
+URxvt.colorUL: #A0A0A0
+URxvt.colorIT: #686868
+!BLK
+URxvt.color0: #303030
+URxvt.color8: #686868
+!RED
+URxvt.color9: #cfcfcf
+URxvt.color1: #cfcfcf
+!GRN
+URxvt.color10: #A3D572
+URxvt.color2: #6D9E3F
+!BLU
+URxvt.color12: #98CBFE
+URxvt.color4: #6095C5
+!YEL
+URxvt.color11: #EFBD8B
+URxvt.color3: #B58858
+!CYN
+URxvt.color14: #75DAA9
+URxvt.color6: #3BA275
+!MAG
+URxvt.color13: #E5B0FF
+URxvt.color5: #AC7BDE
+!WHT
+URxvt.color7: #CFCFCF
+URxvt.color15: #FFFFFF
diff --git a/urxvt/Repositories/URxvt-themes/holiday pine b/urxvt/Repositories/URxvt-themes/holiday pine
new file mode 100644
index 0000000..a400e89
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/holiday pine
@@ -0,0 +1,50 @@
+!--------------------xdefauls
+URxvt.font: xft:Ubuntu Mono:bold:pixelsize=14
+urxvt*termName: rxvt
+urxvt*scrollBar: false
+urxvt*matcher.button: 1
+urxvt.transparent: false
+urxvt.boldFont:
+Xft*dpi: 96
+Xft*antialias: true
+Xft*hinting: full
+URxvt*geometry: 85x20
+URxvt*fading: 0
+URxvt*tintColor: #ffffff
+URxvt*shading: 0
+URxvt*inheritPixmap: False
+*background: #838B83
+*foreground: #d9e6f2
+! --- standard colors ---
+! black
+*color0: #50452e
+! bright_black
+*color8: #6a5f48
+! red
+*color1: #92754a
+! bright_red
+*color9: #b8a484
+! green
+*color2: #3D7221
+! bright_green
+*color10: #a6ad8d
+! yellow
+*color3: #E0EC8B
+! bright_yellow
+*color11: #afad84
+! blue
+*color4: #7f6270
+! bright_blue
+*color12: #af9c96
+! magenta
+*color5: #92625d
+! bright_magenta
+*color13: #b89c8d
+! cyan
+*color6: #6c7570
+! bright_cyan
+*color14: #a6a496
+! white
+*color7: #ada38b
+! bright_white
+*color15: #B0A07D
diff --git a/urxvt/Repositories/URxvt-themes/i have no name b/urxvt/Repositories/URxvt-themes/i have no name
new file mode 100644
index 0000000..5225484
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/i have no name
@@ -0,0 +1,56 @@
+!--------------------xdefauls
+URxvt.font: xft:monaco:pixelsize=13
+urxvt*termName: rxvt
+urxvt*scrollBar: false
+urxvt*matcher.button: 1
+urxvt.transparent: false
+urxvt.boldFont:
+URxvt.letterSpace: -1
+Xft*dpi: 96
+Xft*antialias: true
+Xft*hinting: true
+Xft*hintstyle: hintfull
+URxvt*cursorUnderline: true
+Xft*rgba: rgb
+URxvt*geometry: 85x20
+*internalBorder: 26
+URxvt*fading: 0
+URxvt*tintColor: #ffffff
+URxvt*shading: 0
+URxvt*inheritPixmap: False
+! special
+*.foreground: #9d9191
+*.background: #1f1c1e
+*.cursorColor: #9d9191
+
+! black
+*.color0: #85983e
+*.color8: #36353a
+
+! red
+*.color1: #b3655b
+*.color9: #fb8e91
+
+! green
+*.color2: #eed7a1
+*.color10: #9aaa5f
+
+! yellow
+*.color3: #e1977e
+*.color11: #c3aa81
+
+! blue
+*.color4: #627d92
+*.color12: #525173
+
+! magenta
+*.color5: #503d50
+*.color13: #483440
+
+! cyan
+*.color6: #77899f
+*.color14: #425d72
+
+! white
+*.color7: #707880
+*.color15: #c5c8c6
diff --git a/urxvt/Repositories/URxvt-themes/i'm not gentoo b/urxvt/Repositories/URxvt-themes/i'm not gentoo
new file mode 100644
index 0000000..72a02bf
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/i'm not gentoo
@@ -0,0 +1,26 @@
+urxvt*background: #212629
+urxvt*foreground: #737c80
+!black
+URxvt*color0: #111313
+URxvt*color8: #424446
+!red
+URxvt*color1: #9e6b71
+URxvt*color9: #b69094
+!green
+URxvt*color2: #719e6b
+URxvt*color10: #94b690
+!yellow
+URxvt*color3: #9e986c
+URxvt*color11: #b5b18f
+!blue
+URxvt*color4: #6c8b9e
+URxvt*color12: #90a7b6
+!magenta
+URxvt*color5: #986b9e
+URxvt*color13: #b290b6
+!cyan
+URxvt*color6: #6b9e98
+URxvt*color14: #90b6b3
+!white
+URxvt*color7: #b8baba
+URxvt*color15: #cdcfce
diff --git a/urxvt/Repositories/URxvt-themes/julie b/urxvt/Repositories/URxvt-themes/julie
new file mode 100644
index 0000000..4b9e960
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/julie
@@ -0,0 +1,27 @@
+URxvt*background: [90]#151515
+URxvt*foreground: #c6a57b
+URxvt*background: #151515
+!black
+URxvt*color0: #101010
+URxvt*color8: #404040
+!red
+URxvt*color1: #953331
+URxvt*color9: #8D4A48
+!green
+URxvt*color2: #546A29
+URxvt*color10: #7E9960
+!yellow
+URxvt*color3: #909737
+URxvt*color11: #9CA554
+!blue
+URxvt*color4: #385E6B
+URxvt*color12: #5C737C
+!magenta
+URxvt*color5: #7F355E
+URxvt*color13: #95618B
+!cyan
+URxvt*color6: #34676F
+URxvt*color14: #5D858A
+!white
+URxvt*color7: #dddddd
+URxvt*color15: #dddddd
diff --git a/urxvt/Repositories/URxvt-themes/light dark b/urxvt/Repositories/URxvt-themes/light dark
new file mode 100644
index 0000000..ad65c71
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/light dark
@@ -0,0 +1,27 @@
+!black
+URxvt.color0: #000000
+URxvt.color8: #2B2B2B
+!red
+URxvt.color1: #A5372E
+URxvt.color9: #E06C5C
+!green
+URxvt.color2: #4A663C
+URxvt.color10: #7B996C
+!yellow
+URxvt.color3: #7C5618
+URxvt.color11: #B38849
+!blue
+URxvt.color4: #566060
+URxvt.color12: #889393
+!magenta
+URxvt.color5: #8E4948
+URxvt.color13: #C67C78
+!cyan
+URxvt.color6: #6D5B42
+URxvt.color14: #A28D73
+!white
+URxvt.color7: #8D8D8D
+URxvt.color15: #C6C6C6
+
+urxvt.background: #111111
+urxvt.foreground: 15
diff --git a/urxvt/Repositories/URxvt-themes/mix a lot b/urxvt/Repositories/URxvt-themes/mix a lot
new file mode 100644
index 0000000..713f63e
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/mix a lot
@@ -0,0 +1,19 @@
+*background:#171717
+*foreground:#b3b4b1
+*color0: #1d1d1d
+*color1: #784742
+*color2: #427363
+*color3: #665847
+*color4: #6a708b
+*color5: #7a378b
+*color6: #52707b
+*color7: #b3b3b3
+
+*color8: #4c4c4c
+*color9: #784742
+*color10: #cef318
+*color11: #ede265
+*color12: #6ac0fd
+*color13: #ef79ae
+*color14: #49d4dd
+*color15: #ffffff
diff --git a/urxvt/Repositories/URxvt-themes/never-seen/g b/urxvt/Repositories/URxvt-themes/never-seen/g
new file mode 100644
index 0000000..d66e3d2
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/never-seen/g
@@ -0,0 +1,35 @@
+*background: #181b20
+*foreground: #D2C5BC
+!#D2C5BC
+
+!black
+*color0:#4A3637
+*color8:#4A3637
+
+!red
+*color1:#d17b49
+*color9:#d17b49
+
+!green
+*color2:#7b8748
+*color10:#7b8748
+
+!yellow
+*color3:#af865a
+*color11:#af865a
+
+!blue
+*color4:#535C5C
+*color12:#535C5C
+
+!magenta
+*color5:#775759
+*color13:#775759
+
+!cyan
+*color6:#6d715e
+*color14:#6d715e
+
+!white
+*color7:#c0b18b
+*color15:#c0b18b
diff --git a/urxvt/Repositories/URxvt-themes/pretty b/urxvt/Repositories/URxvt-themes/pretty
new file mode 100644
index 0000000..311891a
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/pretty
@@ -0,0 +1,49 @@
+!--------------------xdefauls
+
+
+urxvt*font: xft:uushi:size=8
+urxvt*termName: rxvt
+urxvt*background: #0c0d0e
+urxvt*foreground: #7f8f9f
+urxvt*scrollBar: false
+urxvt*matcher.button: 1
+urxvt.transparent: false
+urxvt*allow_bold: true
+
+Xft*dpi: 96
+Xft*antialias: true
+Xft*hinting: full
+
+URxvt*geometry: 85x20
+URxvt*fading: 0
+URxvt*tintColor: #ffffff
+URxvt*shading: 0
+URxvt*inheritPixmap: False
+
+! black + red
+!urxvt*color0: #3f3f3f
+urxvt*color0: #101010
+urxvt*color1: #705050
+! green + yellow
+urxvt*color2: #60b48a
+urxvt*color3: #f0dfaf
+! blue + purple
+urxvt*color4: #506070
+urxvt*color5: #dc8cc3
+! cyan + white
+urxvt*color6: #8cd0d3
+urxvt*color7: #dcdccc
+! bright-black + bright-red
+urxvt*color8: #000000
+urxvt*color9: #dca3a3
+! bright-green + bright-yellow
+urxvt*color10: #c3bf9f
+urxvt*color11: #f0dfaf
+! bright-blue + bright-purple
+urxvt*color12: #94bff3
+urxvt*color13: #ec93d3
+! bright-cyan + bright-white
+urxvt*color14: #93e0e3
+urxvt*color15: #ffffff
+!}}}
+
diff --git a/urxvt/Repositories/URxvt-themes/purplish b/urxvt/Repositories/URxvt-themes/purplish
new file mode 100644
index 0000000..a361197
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/purplish
@@ -0,0 +1,52 @@
+!--------------------xdefauls
+URxvt.font: xft:tamsyn:pixelsize=14
+urxvt*termName: rxvt
+urxvt*scrollBar: false
+urxvt*matcher.button: 1
+urxvt.transparent: false
+urxvt.boldFont:
+Xft*dpi: 96
+Xft*antialias: true
+Xft*hinting: full
+URxvt*geometry: 85x20
+*internalBorder: 23
+URxvt*fading: 0
+URxvt*tintColor: #ffffff
+URxvt*shading: 0
+URxvt*inheritPixmap: False
+URxvt*background: #363636
+URxvt*foreground: #af9c96
+*foreground: #B8B5AB
+! --- standard colors ---
+! black
+URxvt*color0: #92754a
+! bright_black
+URxvt*color8: #6a5f48
+! red
+URxvt*color1: #92754a
+! bright_red
+URxvt*color9: #b8a484
+! green
+URxvt*color2: #628E66
+! bright_green
+URxvt*color10: #a6ad8d
+! yellow
+URxvt*color3: #E0EC8B
+! bright_yellow
+URxvt*color11: #afad84
+! blue
+URxvt*color4: #7f6270
+! bright_blue
+URxvt*color12: #af9c96
+! magenta
+URxvt*color5: #92625d
+! bright_magenta
+URxvt*color13: #b89c8d
+! cyan
+URxvt*color6: #7f6270
+! bright_cyan
+URxvt*color14: #7f6270
+! white
+URxvt*color7: #ada38b
+! bright_white
+URxvt*color15: #B0A07D
diff --git a/urxvt/Repositories/URxvt-themes/rando light purp b/urxvt/Repositories/URxvt-themes/rando light purp
new file mode 100644
index 0000000..d5f7f2b
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/rando light purp
@@ -0,0 +1,67 @@
+! --- ~/.Xresources ------------------------------------------------------------
+! ------------------------------------------------------------------------------
+! --- generated with 4bit Terminal Color Scheme Designer -----------------------
+! ------------------------------------------------------------------------------
+! --- http://ciembor.github.com/4bit -------------------------------------------
+! ------------------------------------------------------------------------------
+
+! --- special colors ---
+
+*background: #cac4d4
+*foreground: #978973
+
+! --- standard colors ---
+
+! black
+*color0: #000000
+
+! bright_black
+*color8: #262626
+
+! red
+*color1: #9b7976
+
+! bright_red
+*color9: #cdbdbb
+
+! green
+*color2: #769b79
+
+! bright_green
+*color10: #bbcdbd
+
+! yellow
+*color3: #989b76
+
+! bright_yellow
+*color11: #cccdbb
+
+! blue
+*color4: #79769b
+
+! bright_blue
+*color12: #bdbbcd
+
+! magenta
+*color5: #9b7698
+
+! bright_magenta
+*color13: #cdbbcc
+
+! cyan
+*color6: #76989b
+
+! bright_cyan
+*color14: #bbcccd
+
+! white
+*color7: #c3c3c3
+
+! bright_white
+*color15: #ffffff
+
+
+! ------------------------------------------------------------------------------
+! --- end of terminal colors section -------------------------------------------
+! ------------------------------------------------------------------------------
+
diff --git a/urxvt/Repositories/URxvt-themes/rando mac b/urxvt/Repositories/URxvt-themes/rando mac
new file mode 100644
index 0000000..2647405
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/rando mac
@@ -0,0 +1,39 @@
+! special
+*.foreground: #8a6a53
+#Dark Brown Background#
+#*background: #181514
+#Light Brown Background#
+*background: #2c251c
+*cursorColor: #8a6a53
+
+! black
+*color0: #4c4234
+*color8: #322a21
+
+! red
+*color1: #94525a
+*color9: #df6a95
+
+! green
+*color2: #758365
+*color10: #a6bca4
+
+! yellow
+*color3: #a2bb30
+*color11: #ceed3b
+
+! blue
+*color4: #32565b
+*color12: #4f789f
+
+! magenta
+*color5: #7d323f
+*color13: #a74354
+
+! cyan
+*color6: #40696e
+*color14: #3e9182
+
+! white
+*color7: #8a6a53
+*color15: #f0d7c2
diff --git a/urxvt/Repositories/URxvt-themes/ronery flower b/urxvt/Repositories/URxvt-themes/ronery flower
new file mode 100644
index 0000000..5e61849
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/ronery flower
@@ -0,0 +1,56 @@
+!--------------------xdefauls
+URxvt.font: xft:monaco:pixelsize=13
+urxvt*termName: rxvt
+urxvt*scrollBar: false
+urxvt*matcher.button: 1
+urxvt.transparent: false
+urxvt.boldFont:
+URxvt.letterSpace: -1
+Xft*dpi: 96
+Xft*antialias: true
+Xft*hinting: true
+Xft*hintstyle: hintfull
+URxvt*cursorUnderline: true
+Xft*rgba: rgb
+URxvt*geometry: 85x20
+*internalBorder: 26
+URxvt*fading: 0
+URxvt*tintColor: #ffffff
+URxvt*shading: 0
+URxvt*inheritPixmap: False
+! special
+*.foreground: #c5c8c6
+*.background: #292b2d
+*.cursorColor: #c5c8c6
+
+! black
+*.color0: #292929
+*.color8: #9cb0b4
+
+! red
+*.color1: #3d6370
+*.color9: #007db4
+
+! green
+*.color2: #aaad8f
+*.color10: #c5cc87
+
+! yellow
+*.color3: #78838b
+*.color11: #518860
+
+! blue
+*.color4: #5f85a9
+*.color12: #9aaac1
+
+! magenta
+*.color5: #534856
+*.color13: #9c80a4
+
+! cyan
+*.color6: #2c3b36
+*.color14: #335348
+
+! white
+*.color7: #707880
+*.color15: #c5c8c6
diff --git a/urxvt/Repositories/URxvt-themes/smooth white blue b/urxvt/Repositories/URxvt-themes/smooth white blue
new file mode 100644
index 0000000..acd61ec
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/smooth white blue
@@ -0,0 +1,34 @@
+!--------------------xdefauls
+URxvt.font: xft:Ubuntu Mono:bold:pixelsize=14
+urxvt*termName: rxvt
+urxvt*scrollBar: false
+urxvt*matcher.button: 1
+urxvt.transparent: false
+urxvt.boldFont:
+Xft*dpi: 96
+Xft*antialias: true
+Xft*hinting: full
+URxvt*geometry: 85x20
+*internalBorder: 23
+URxvt*fading: 0
+URxvt*tintColor: #ffffff
+URxvt*shading: 0
+URxvt*inheritPixmap: False
+URxvt*background: #161616
+URxvt*foreground: #efefef
+URxvt*color0: #777777
+URxvt*color8: #616161
+URxvt*color1: #efefef
+URxvt*color9: #7B93A6
+URxvt*color2: #85A999
+URxvt*color10: #96B1A9
+URxvt*color3: #969696
+URxvt*color11: #B7B7B7
+URxvt*color4: #758891
+URxvt*color12: #90A4A9
+URxvt*color5: #A2B4BC
+URxvt*color13: #efefef
+URxvt*color6: #8CA6A3
+URxvt*color14: #8FABA7
+URxvt*color7: #A5A5A5
+URxvt*color15: #C0C0C0
diff --git a/urxvt/Repositories/URxvt-themes/something b/urxvt/Repositories/URxvt-themes/something
new file mode 100644
index 0000000..a955ecb
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/something
@@ -0,0 +1,44 @@
+!--------------------xdefauls
+URxvt.font: xft:ubuntu mono:pixelsize=12
+urxvt*termName: rxvt
+urxvt*scrollBar: false
+urxvt*matcher.button: 1
+urxvt.transparent: false
+urxvt.boldFont:
+Xft*dpi: 96
+Xft*antialias: true
+Xft*hinting: true
+Xft*hintstyle: hintfull
+Xft*rgba: rgb
+URxvt*geometry: 85x20
+*internalBorder: 23
+URxvt*fading: 0
+URxvt*tintColor: #ffffff
+URxvt*shading: 0
+URxvt*inheritPixmap: False
+URxvt*background: #ACA7AF
+URxvt*foreground: #454545
+!black
+URxvt*color0: #101010
+URxvt*color8: #404040
+!red
+URxvt*color1: #953331
+URxvt*color9: #8D4A48
+!green
+URxvt*color2: #546A29
+URxvt*color10: #7E9960
+!yellow
+URxvt*color3: #E9E184
+URxvt*color11: #9CA554
+!blue
+URxvt*color4: #385E6B
+URxvt*color12: #5C737C
+!magenta
+URxvt*color5: #7F355E
+URxvt*color13: #95618B
+!cyan
+URxvt*color6: #34676F
+URxvt*color14: #5D858A
+!white
+URxvt*color7: #D8DBA2
+URxvt*color15: #D8DBA2
diff --git a/urxvt/Repositories/URxvt-themes/the arch dude b/urxvt/Repositories/URxvt-themes/the arch dude
new file mode 100644
index 0000000..02d5b1f
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/the arch dude
@@ -0,0 +1,37 @@
+!--------------------xdefauls
+URxvt.font: xft:terminus:pixelsize=14
+urxvt*termName: rxvt
+urxvt*scrollBar: false
+urxvt*matcher.button: 1
+urxvt.transparent: false
+urxvt.boldFont:
+Xft*dpi: 96
+Xft*antialias: true
+Xft*hinting: true
+Xft*hintstyle: hintfull
+URxvt*cursorUnderline: true
+Xft*rgba: rgb
+URxvt*geometry: 85x20
+*internalBorder: 23
+URxvt*fading: 0
+URxvt*tintColor: #ffffff
+URxvt*shading: 0
+URxvt*inheritPixmap: False
+URxvt.color0: #3B444F
+URxvt.color8: #4A585A
+URxvt.color1: #CD546C
+URxvt.color9: #CD546C
+URxvt.color2: #A5AF86
+URxvt.color10: #BDC79E
+URxvt.color3: #CD7860
+URxvt.color11: #E88773
+URxvt.color4: #7A9388
+URxvt.color12: #94B1A3
+URxvt.color5: #75434C
+URxvt.color13: #BB6C73
+URxvt.color6: #767D75
+URxvt.color14: #9DA69E
+URxvt.color7: #C2C2A8
+URxvt.color15: #DBDAC1
+URxvt.background: #292929
+URxvt.foreground: #a3a6ab
diff --git a/urxvt/Repositories/URxvt-themes/tree bark b/urxvt/Repositories/URxvt-themes/tree bark
new file mode 100644
index 0000000..be2a59f
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/tree bark
@@ -0,0 +1,56 @@
+!--------------------xdefauls
+URxvt.font: xft:monaco:pixelsize=13
+urxvt*termName: rxvt
+urxvt*scrollBar: false
+urxvt*matcher.button: 1
+urxvt.transparent: false
+urxvt.boldFont:
+URxvt.letterSpace: -1
+Xft*dpi: 96
+Xft*antialias: true
+Xft*hinting: true
+Xft*hintstyle: hintfull
+URxvt*cursorUnderline: true
+Xft*rgba: rgb
+URxvt*geometry: 85x20
+*internalBorder: 26
+URxvt*fading: 0
+URxvt*tintColor: #ffffff
+URxvt*shading: 0
+URxvt*inheritPixmap: False
+! special
+*.foreground: #f1fcf8
+*.background: #111012
+*.cursorColor: #f1fcf8
+
+! black
+*.color0: #b4b4aa
+*.color8: #b4b4aa
+
+! red
+*.color1: #64605f
+*.color9: #64605f
+
+! green
+*.color2: #7e8d88
+*.color10: #7e8d88
+
+! yellow
+*.color3: #d0d4b9
+*.color11: #d0d4b9
+
+! blue
+*.color4: #b0c2c2
+*.color12: #b0c2c2
+
+! magenta
+*.color5: #f3fcf7
+*.color13: #f3fcf7
+
+! cyan
+*.color6: #988c80
+*.color14: #988c80
+
+! white
+*.color7: #70735e
+*.color15: #70735e
diff --git a/urxvt/Repositories/URxvt-themes/tree green brown b/urxvt/Repositories/URxvt-themes/tree green brown
new file mode 100644
index 0000000..fc834d8
--- /dev/null
+++ b/urxvt/Repositories/URxvt-themes/tree green brown
@@ -0,0 +1,41 @@
+!--------------------xdefauls
+urxvt*font: xft:monospace:size=8
+urxvt*termName: rxvt
+urxvt*scrollBar: false
+urxvt*matcher.button: 1
+urxvt.transparent: false
+urxvt*allow_bold: true
+Xft*dpi: 96
+Xft*antialias: true
+Xft*hinting: full
+URxvt*geometry: 85x20
+URxvt*fading: 0
+URxvt*tintColor: #ffffff
+URxvt*shading: 0
+URxvt*inheritPixmap: False
+!black
+URxvt.color0: #000000
+URxvt.color8: #2B2B2B
+!red
+URxvt.color1: #a28d73
+URxvt.color9: #a28d73
+!green
+URxvt.color2: #4A663C
+URxvt.color10: #7B996C
+!yellow
+URxvt.color3: #7C5618
+URxvt.color11: #B38849
+!blue
+URxvt.color4: #566060
+URxvt.color12: #889393
+!magenta
+URxvt.color5: #8E4948
+URxvt.color13: #C67C78
+!cyan
+URxvt.color6: #6D5B42
+URxvt.color14: #A28D73
+!white
+URxvt.color7: #7B996C
+URxvt.color15: #7B996C
+urxvt.background: #111111
+urxvt.foreground: 15
diff --git a/urxvt/Repositories/urxvt-perls/LICENSE b/urxvt/Repositories/urxvt-perls/LICENSE
new file mode 100644
index 0000000..d159169
--- /dev/null
+++ b/urxvt/Repositories/urxvt-perls/LICENSE
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/urxvt/Repositories/urxvt-perls/README.md b/urxvt/Repositories/urxvt-perls/README.md
new file mode 100644
index 0000000..52800b2
--- /dev/null
+++ b/urxvt/Repositories/urxvt-perls/README.md
@@ -0,0 +1,45 @@
+A small collection of perl extensions for the rxvt-unicode terminal emulator.
+
+Installation
+------------
+Simply place the scripts you want to install in /usr/lib/urxvt/perl/ for
+system-wide availability or in ~/.urxvt/ext/ for user-only availability.
+You can also put them in a folder of your choice, but then you have to add this
+line to your .Xdefaults/.Xresources:
+
+ URxvt.perl-lib: /your/folder/
+
+See the following sections for information on how to enable the scripts or set
+script-specific options and keyboard mappings in your .Xdefaults/.Xresources.
+
+
+keyboard-select
+---------------
+Use keyboard shortcuts to select and copy text.
+
+After installing, put the following lines in your .Xdefaults/.Xresources:
+
+ URxvt.perl-ext-common: ...,keyboard-select
+ URxvt.keysym.M-Escape: perl:keyboard-select:activate
+
+The following line overwrites the default Meta-s binding and allows to activate
+keyboard-select directly in backward search mode:
+
+ URxvt.keysym.M-s: perl:keyboard-select:search
+
+Use Meta-Escape to activate selection mode, then use the following keys:
+
+ h/j/k/l: Move cursor left/down/up/right (also with arrow keys)
+ g/G/0/^/$/H/M/L/f/F/;/,/w/W/b/B/e/E: More vi-like cursor movement keys
+ '/'/?: Start forward/backward search
+ n/N: Repeat last search, N: in reverse direction
+ Ctrl-f/b: Scroll down/up one screen
+ Ctrl-d/u: Scroll down/up half a screen
+ v/V/Ctrl-v: Toggle normal/linewise/blockwise selection
+ y/Return: Copy selection to primary buffer, Return: quit afterwards
+ Y: Copy selected lines to primary buffer or cursor line and quit
+ q/Escape: Quit keyboard selection mode
+
+Options:
+
+ URxvt.keyboard-select.clipboard: If true, copy to clipboard too
diff --git a/urxvt/Repositories/urxvt-perls/deprecated/README.md b/urxvt/Repositories/urxvt-perls/deprecated/README.md
new file mode 100644
index 0000000..c7cc774
--- /dev/null
+++ b/urxvt/Repositories/urxvt-perls/deprecated/README.md
@@ -0,0 +1,87 @@
+Deprecated perl extensions for the rxvt-unicode terminal emulator.
+
+See the file README.md in the parent directory for installation instructions,
+in case you still want to use them.
+
+
+url-select
+----------
+Use keyboard shortcuts to select URLs.
+
+**DEPRECATED**
+
+Since version 9.21 the *matcher* extension shipped with rxvt-unicode fully
+replaces this extension. The `url-select:select_next` action is provided by the
+`matcher:select` action. However, the *matcher* extension does not provide
+vi-like key bindings; it only uses the arrow and home/end keys.
+
+This should be used as a replacement for the default matcher extension, it also
+makes URLs clickable with the middle mouse button.
+
+After installing, put the following lines in your .Xdefaults/.Xresources:
+
+ URxvt.perl-ext-common: ...,url-select
+ URxvt.keysym.M-u: perl:url-select:select_next
+
+Use Meta-u to activate URL selection mode, then use the following keys:
+
+ j/k: Select next downward/upward URL (also with arrow keys)
+ g/G: Select first/last URL (also with home/end key)
+ o/Return: Open selected URL in browser, Return: deactivate afterwards
+ y: Copy (yank) selected URL and deactivate selection mode
+ q/Escape: Deactivate URL selection mode
+
+Options:
+
+ URxvt.url-select.autocopy: if set to true, selected URLs are automatically
+ copied to the PRIMARY buffer
+ URxvt.url-select.button: mouse button to click-open URLs (default: 2)
+ URxvt.url-select.launcher: browser/command to open selected URL with
+ URxvt.url-select.underline: if set to true, all URLs get underlined
+
+For compatibility reasons, url-select will also use any patterns defined for
+the matcher extension by reading all `URxvt.matcher.pattern.[0-9]` resources.
+
+
+clipboard
+---------
+
+**DEPRECATED**
+
+Since version 9.20 rxvt-unicode natively supports copying to and pasting from
+the CLIPBOARD buffer with the `Ctrl-Meta-c` and `Ctrl-Meta-v` key bindings. The
+`clipboard.autocopy` setting is provided by the `selection-to-clipboard`
+extension shipped with rxvt-unicode.
+
+Use keyboard shortcuts to copy the selection to the clipboard and to paste the
+clipboard contents (optionally escaping all special characters).
+
+After installing, put the following lines in your .Xdefaults/.Xresources:
+
+ URxvt.perl-ext-common: ...,clipboard
+ URxvt.keysym.M-c: perl:clipboard:copy
+ URxvt.keysym.M-v: perl:clipboard:paste
+ URxvt.keysym.M-C-v: perl:clipboard:paste_escaped
+
+Options:
+
+ URxvt.clipboard.autocopy: if set to true, the clipboard is automatically
+ updated whenever the PRIMARY selection changes
+
+You can also overwrite the system commands to use for copying/pasting.
+The default ones are:
+
+ URxvt.clipboard.copycmd: xsel -ib
+ URxvt.clipboard.pastecmd: xsel -ob
+
+If you prefer xclip, then put these lines in your .Xdefaults/.Xresources:
+
+ URxvt.clipboard.copycmd: xclip -i -selection clipboard
+ URxvt.clipboard.pastecmd: xclip -o -selection clipboard
+
+On Mac OS X, put these lines in your .Xdefaults/.Xresources:
+
+ URxvt.clipboard.copycmd: pbcopy
+ URxvt.clipboard.pastecmd: pbpaste
+
+The use of the functions should be self-explanatory!
diff --git a/urxvt/Repositories/urxvt-perls/deprecated/clipboard b/urxvt/Repositories/urxvt-perls/deprecated/clipboard
new file mode 100644
index 0000000..05e1601
--- /dev/null
+++ b/urxvt/Repositories/urxvt-perls/deprecated/clipboard
@@ -0,0 +1,115 @@
+#! perl -w
+# Author: Bert Muennich
+# Website: http://www.github.com/muennich/urxvt-perls
+# License: GPLv2
+
+# Use keyboard shortcuts to copy the selection to the clipboard and to paste
+# the clipboard contents (optionally escaping all special characters).
+# Requires xsel to be installed!
+
+# Usage: put the following lines in your .Xdefaults/.Xresources:
+# URxvt.perl-ext-common: ...,clipboard
+# URxvt.keysym.M-c: perl:clipboard:copy
+# URxvt.keysym.M-v: perl:clipboard:paste
+# URxvt.keysym.M-C-v: perl:clipboard:paste_escaped
+
+# Options:
+# URxvt.clipboard.autocopy: If true, PRIMARY overwrites clipboard
+
+# You can also overwrite the system commands to use for copying/pasting.
+# The default ones are:
+# URxvt.clipboard.copycmd: xsel -ib
+# URxvt.clipboard.pastecmd: xsel -ob
+# If you prefer xclip, then put these lines in your .Xdefaults/.Xresources:
+# URxvt.clipboard.copycmd: xclip -i -selection clipboard
+# URxvt.clipboard.pastecmd: xclip -o -selection clipboard
+# On Mac OS X, put these lines in your .Xdefaults/.Xresources:
+# URxvt.clipboard.copycmd: pbcopy
+# URxvt.clipboard.pastecmd: pbpaste
+
+# The use of the functions should be self-explanatory!
+
+use strict;
+
+sub on_start {
+ my ($self) = @_;
+
+ $self->{copy_cmd} = $self->x_resource('clipboard.copycmd') || 'xsel -ib';
+ $self->{paste_cmd} = $self->x_resource('clipboard.pastecmd') || 'xsel -ob';
+
+ if ($self->x_resource('clipboard.autocopy') eq 'true') {
+ $self->enable(sel_grab => \&sel_grab);
+ }
+
+ ()
+}
+
+sub copy {
+ my ($self) = @_;
+
+ if (open(CLIPBOARD, "| $self->{copy_cmd}")) {
+ my $sel = $self->selection();
+ utf8::encode($sel);
+ print CLIPBOARD $sel;
+ close(CLIPBOARD);
+ } else {
+ print STDERR "error running '$self->{copy_cmd}': $!\n";
+ }
+
+ ()
+}
+
+sub paste {
+ my ($self) = @_;
+
+ my $str = `$self->{paste_cmd}`;
+ if ($? == 0) {
+ $self->tt_paste($str);
+ } else {
+ print STDERR "error running '$self->{paste_cmd}': $!\n";
+ }
+
+ ()
+}
+
+sub paste_escaped {
+ my ($self) = @_;
+
+ my $str = `$self->{paste_cmd}`;
+ if ($? == 0) {
+ $str =~ s/([!#\$%&\*\(\) ='"\\\|\[\]`~,<>\?])/\\\1/g;
+ $self->tt_paste($str);
+ } else {
+ print STDERR "error running '$self->{paste_cmd}': $!\n";
+ }
+
+ ()
+}
+
+sub on_action {
+ my ($self, $action) = @_;
+
+ on_user_command($self, "clipboard:" . $action);
+}
+
+sub on_user_command {
+ my ($self, $cmd) = @_;
+
+ if ($cmd eq "clipboard:copy") {
+ $self->copy;
+ } elsif ($cmd eq "clipboard:paste") {
+ $self->paste;
+ } elsif ($cmd eq "clipboard:paste_escaped") {
+ $self->paste_escaped;
+ }
+
+ ()
+}
+
+sub sel_grab {
+ my ($self) = @_;
+
+ $self->copy;
+
+ ()
+}
diff --git a/urxvt/Repositories/urxvt-perls/deprecated/url-select b/urxvt/Repositories/urxvt-perls/deprecated/url-select
new file mode 100644
index 0000000..34637bb
--- /dev/null
+++ b/urxvt/Repositories/urxvt-perls/deprecated/url-select
@@ -0,0 +1,408 @@
+#! perl -w
+# Author: Bert Muennich
+# Website: http://www.github.com/muennich/urxvt-perls
+# Based on: http://www.jukie.net/~bart/blog/urxvt-url-yank
+# License: GPLv2
+
+# Use keyboard shortcuts to select URLs.
+# This should be used as a replacement for the default matcher extension,
+# it also makes URLs clickable with the middle mouse button.
+
+# Usage: put the following lines in your .Xdefaults/.Xresources:
+# URxvt.perl-ext-common: ...,url-select
+# URxvt.keysym.M-u: perl:url-select:select_next
+
+# Use Meta-u to activate URL selection mode, then use the following keys:
+# j/k: Select next downward/upward URL (also with arrow keys)
+# g/G: Select first/last URL (also with home/end key)
+# o/Return: Open selected URL in browser, Return: deactivate afterwards
+# y: Copy (yank) selected URL and deactivate selection mode
+# q/Escape: Deactivate URL selection mode
+
+# Options:
+# URxvt.url-select.autocopy: If true, selected URLs are copied to PRIMARY
+# URvxt.url-select.button: Mouse button to click-open URLs (default: 2)
+# URxvt.url-select.launcher: Browser/command to open selected URL with
+# URxvt.url-select.underline: If set to true, all URLs get underlined
+
+use strict;
+
+# The custom rendition bit to use for marking the cell as being underlined
+# by us so we can unset it again after a line has changed.
+use constant UNDERLINED => 1<<3; # arbitrarily chosen in hope of no collision
+
+sub on_start {
+ my ($self) = @_;
+
+ # read resource settings
+ if ($self->x_resource('url-select.launcher')) {
+ @{$self->{browser}} = split /\s+/, $self->x_resource('url-select.launcher');
+ } else {
+ @{$self->{browser}} = ('x-www-browser');
+ }
+ if ($self->x_resource('url-select.underline') eq 'true') {
+ $self->enable(line_update => \&line_update);
+ }
+ if ($self->x_resource('url-select.autocopy') eq 'true') {
+ $self->{autocopy} = 1;
+ }
+
+ $self->{state} = 0;
+
+ for my $mod (split '', $self->x_resource("url-select.button") ||
+ $self->x_resource("matcher.button") || 2) {
+ if ($mod =~ /^\d+$/) {
+ $self->{button} = $mod;
+ } elsif ($mod eq "C") {
+ $self->{state} |= urxvt::ControlMask;
+ } elsif ($mod eq "S") {
+ $self->{state} |= urxvt::ShiftMask;
+ } elsif ($mod eq "M") {
+ $self->{state} |= $self->ModMetaMask;
+ } elsif ($mod ne "-" && $mod ne " ") {
+ warn("invalid button/modifier in $self->{_name}<$self->{argv}[0]>: $mod\n");
+ }
+ }
+
+ if ($self->x_resource('matcher.pattern')) {
+ @{$self->{pattern}} = ($self->x_resource('matcher.pattern'));
+ } elsif ($self->x_resource('matcher.pattern.0')) {
+ my $current = 0;
+
+ while (defined (my $res = $self->x_resource("matcher.pattern.$current"))) {
+ $res = $self->locale_decode($res);
+ utf8::encode $res;
+ push @{$self->{pattern}}, qr($res)x;
+ $current++;
+ }
+ } else {
+ @{$self->{pattern}} = qr{
+ (?:https?://|ftp://|news://|mailto:|file://|\bwww\.)
+ [\w\-\@;\/?:&=%\$.+!*\x27,~#]*
+ (
+ \([\w\-\@;\/?:&=%\$.+!*\x27,~#]*\) # Allow a pair of matched parentheses
+ | #
+ [\w\-\@;\/?:&=%\$+*~] # exclude some trailing characters (heuristic)
+ )+
+ }x;
+ }
+
+ ()
+}
+
+
+sub line_update {
+ my ($self, $row) = @_;
+
+ my $line = $self->line($row);
+ my $text = $line->t;
+ my $rend = $line->r;
+
+ # clear all underlines that were set by us
+ for (@$rend) {
+ if (urxvt::GET_CUSTOM($_) & UNDERLINED) {
+ $_ = urxvt::SET_CUSTOM($_, urxvt::GET_CUSTOM($_) & ~UNDERLINED) &
+ ~urxvt::RS_Uline;
+ }
+ }
+
+ for my $pattern (@{$self->{pattern}}) {
+ while ($text =~ /$pattern/g) {
+ my $url = $&;
+ my ($beg, $end) = ($-[0], $+[0] - 1);
+
+ for (@{$rend}[$beg .. $end]) {
+ unless ($_ & urxvt::RS_Uline) {
+ $_ = urxvt::SET_CUSTOM($_, urxvt::GET_CUSTOM($_) | UNDERLINED);
+ $_ |= urxvt::RS_Uline;
+ }
+ }
+ }
+ }
+
+ $line->r($rend);
+
+ ()
+}
+
+sub on_action {
+ my ($self, $action) = @_;
+
+ on_user_command($self, "url-select:" . $action);
+}
+
+
+sub on_user_command {
+ my ($self, $cmd) = @_;
+
+ if ($cmd eq 'url-select:select_next') {
+ if (not $self->{active}) {
+ activate($self);
+ }
+ select_next($self, -1);
+ }
+
+ ()
+}
+
+
+sub key_press {
+ my ($self, $event, $keysym) = @_;
+ my $char = chr($keysym);
+
+ if ($keysym == 0xff1b || lc($char) eq 'q' ||
+ (lc($char) eq 'c' && $event->{state} & urxvt::ControlMask)) {
+ deactivate($self);
+ } elsif ($keysym == 0xff0d || $char eq 'o' ||
+ (lc($char) eq 'm' && $event->{state} & urxvt::ControlMask)) {
+ $self->exec_async(@{$self->{browser}}, ${$self->{found}[$self->{n}]}[4]);
+ deactivate($self) unless $char eq 'o';
+ } elsif ($char eq 'y') {
+ my $found = $self->{found}[$self->{n}];
+ $self->selection_beg(${$found}[0], ${$found}[1]);
+ $self->selection_end(${$found}[2], ${$found}[3]);
+ $self->selection_make($event->{time});
+ $self->selection_beg(1, 0);
+ $self->selection_end(1, 0);
+ deactivate($self);
+ } elsif ($char eq 'k' || $keysym == 0xff52 || $keysym == 0xff51) {
+ select_next($self, -1, $event);
+ } elsif ($char eq 'j' || $keysym == 0xff54 || $keysym == 0xff53) {
+ select_next($self, 1, $event);
+ } elsif ($char eq 'g' || $keysym == 0xff50) {
+ $self->{row} = $self->top_row - 1;
+ delete $self->{found};
+ select_next($self, 1, $event);
+ } elsif ($char eq 'G' || $keysym == 0xff57) {
+ $self->{row} = $self->nrow;
+ delete $self->{found};
+ select_next($self, -1, $event);
+ }
+
+ return 1;
+}
+
+
+sub on_button_press {
+ my ($self, $event) = @_;
+
+ my $mask = $self->ModLevel3Mask | $self->ModMetaMask |
+ urxvt::ShiftMask | urxvt::ControlMask;
+
+ if ($event->{button} == $self->{button} && ($event->{state} & $mask) == $self->{state}) {
+ my $col = $event->{col};
+ my $row = $event->{row};
+ my $line = $self->line($row);
+ my $text = $line->t;
+
+ for my $pattern (@{$self->{pattern}}) {
+ while ($text =~ /$pattern/g) {
+ my ($url, $beg, $end) = ($&, $-[0], $+[0]);
+ --$end if $url =~ s/["')]$//;
+
+ if ($col >= $beg && $col <= $end) {
+ $self->{button_pressed} = 1;
+ $self->{button_col} = $col;
+ $self->{button_row} = $row;
+ $self->{button_url} = $url;
+ return 1;
+ }
+ }
+ }
+ }
+
+ ()
+}
+
+sub on_button_release {
+ my ($self, $event) = @_;
+
+ if ($self->{button_pressed} && $event->{button} == $self->{button}) {
+ my $col = $event->{col};
+ my $row = $event->{row};
+
+ $self->{button_pressed} = 0;
+
+ if ($col == $self->{button_col} && $row == $self->{button_row}) {
+ $self->exec_async(@{$self->{browser}}, $self->{button_url});
+ return 1;
+ }
+ }
+
+ ()
+}
+
+
+sub select_next {
+ # $dir < 0: up, > 0: down
+ my ($self, $dir, $event) = @_;
+ my $row = $self->{row};
+
+ if (($dir < 0 && $self->{n} > 0) ||
+ ($dir > 0 && $self->{n} < $#{ $self->{found} })) {
+ # another url on current line
+ $self->{n} += $dir;
+ hilight($self);
+ if ($self->{autocopy}) {
+ my $found = $self->{found}[$self->{n}];
+ $self->selection_beg(${$found}[0], ${$found}[1]);
+ $self->selection_end(${$found}[2], ${$found}[3]);
+ $self->selection_make($event->{time});
+ $self->selection_beg(1, 0);
+ $self->selection_end(1, 0);
+ }
+ return;
+ }
+
+ while (($dir < 0 && $row > $self->top_row) ||
+ ($dir > 0 && $row < $self->nrow - 1)) {
+ my $line = $self->line($row);
+ $row = ($dir < 0 ? $line->beg : $line->end) + $dir;
+ $line = $self->line($row);
+ my $text = $line->t;
+
+ for my $pattern (@{$self->{pattern}}) {
+ if ($text =~ /$pattern/g) {
+ delete $self->{found};
+
+ do {
+ my ($beg, $end) = ($-[0], $+[0]);
+ push @{$self->{found}}, [$line->coord_of($beg),
+ $line->coord_of($end), substr($text, $beg, $end - $beg)];
+ } while ($text =~ /$pattern/g);
+
+ $self->{row} = $row;
+ $self->{n} = $dir < 0 ? $#{$self->{found}} : 0;
+ hilight($self);
+ if ($self->{autocopy}) {
+ my $found = $self->{found}[$self->{n}];
+ $self->selection_beg(${$found}[0], ${$found}[1]);
+ $self->selection_end(${$found}[2], ${$found}[3]);
+ $self->selection_make($event->{time});
+ $self->selection_beg(1, 0);
+ $self->selection_end(1, 0);
+ }
+ return;
+ }
+ }
+ }
+
+ deactivate($self) unless $self->{found};
+
+ ()
+}
+
+
+sub hilight {
+ my ($self) = @_;
+
+ if ($self->{found}) {
+ if ($self->{row} < $self->view_start() ||
+ $self->{row} >= $self->view_start() + $self->nrow) {
+ # scroll selected url into visible area
+ my $top = $self->{row} - ($self->nrow >> 1);
+ $self->view_start($top < 0 ? $top : 0);
+ }
+
+ status_area($self);
+ $self->want_refresh();
+ }
+
+ ()
+}
+
+
+sub refresh {
+ my ($self) = @_;
+
+ if ($self->{found}) {
+ if ($self->x_resource('highlightColor')) {
+ $self->scr_xor_span(@{$self->{found}[$self->{n}]}[0 .. 3], urxvt::RS_Sel);
+ } else {
+ $self->scr_xor_span(@{$self->{found}[$self->{n}]}[0 .. 3], urxvt::RS_RVid);
+ }
+ }
+
+ ()
+}
+
+
+sub status_area {
+ my ($self) = @_;
+
+ my $row = $self->{row} < 0 ?
+ $self->{row} - $self->top_row : abs($self->top_row) + $self->{row};
+ my $text = sprintf("%d,%d ", $row + 1, $self->{n} + 1);
+
+ if ($self->top_row == 0) {
+ $text .= "All";
+ } elsif ($self->view_start() == $self->top_row) {
+ $text .= "Top";
+ } elsif ($self->view_start() == 0) {
+ $text .= "Bot";
+ } else {
+ $text .= sprintf("%2d%",
+ ($self->top_row - $self->view_start) * 100 / $self->top_row);
+ }
+
+ my $text_len = length($text);
+
+ if ($self->{overlay_len} != $text_len) {
+ delete $self->{overlay} if $self->{overlay};
+ $self->{overlay} = $self->overlay(-1, -1, $text_len, 1,
+ urxvt::OVERLAY_RSTYLE, 0);
+ $self->{overlay_len} = $text_len;
+ }
+
+ $self->{overlay}->set(0, 0, $self->special_encode($text));
+ $self->{overlay}->show();
+
+ ()
+}
+
+
+sub tt_write {
+ return 1;
+}
+
+
+sub activate {
+ my ($self) = @_;
+
+ $self->{active} = 1;
+
+ $self->{row} = $self->view_start() + $self->nrow;
+ $self->{n} = 0;
+ $self->{overlay_len} = 0;
+ $self->{button_pressed} = 0;
+
+ $self->{view_start} = $self->view_start();
+ $self->{pty_ev_events} = $self->pty_ev_events(urxvt::EV_NONE);
+
+ $self->enable(
+ key_press => \&key_press,
+ refresh_begin => \&refresh,
+ refresh_end => \&refresh,
+ tt_write => \&tt_write,
+ );
+
+ ()
+}
+
+
+sub deactivate {
+ my ($self) = @_;
+
+ $self->disable("key_press", "refresh_begin", "refresh_end", "tt_write");
+ $self->view_start($self->{view_start});
+ $self->pty_ev_events($self->{pty_ev_events});
+
+ delete $self->{overlay} if $self->{overlay};
+ delete $self->{found} if $self->{found};
+
+ $self->want_refresh();
+
+ $self->{active} = 0;
+
+ ()
+}
diff --git a/urxvt/Repositories/urxvt-perls/keyboard-select b/urxvt/Repositories/urxvt-perls/keyboard-select
new file mode 100644
index 0000000..b60e9d8
--- /dev/null
+++ b/urxvt/Repositories/urxvt-perls/keyboard-select
@@ -0,0 +1,606 @@
+#! perl -w
+# Author: Bert Muennich
+# Website: http://www.github.com/muennich/urxvt-perls
+# License: GPLv2
+
+# Use keyboard shortcuts to select and copy text.
+
+# Usage: put the following lines in your .Xdefaults/.Xresources:
+# URxvt.perl-ext-common: ...,keyboard-select
+# URxvt.keysym.M-Escape: perl:keyboard-select:activate
+# The following line overwrites the default Meta-s binding and allows to
+# activate keyboard-select directly in backward search mode:
+# URxvt.keysym.M-s: perl:keyboard-select:search
+
+# Use Meta-Escape to activate selection mode, then use the following keys:
+# h/j/k/l: Move cursor left/down/up/right (also with arrow keys)
+# g/G/0/^/$/H/M/L/f/F/;/,/w/W/b/B/e/E: More vi-like cursor movement keys
+# '/'/?: Start forward/backward search
+# n/N: Repeat last search, N: in reverse direction
+# Ctrl-f/b: Scroll down/up one screen
+# Ctrl-d/u: Scroll down/up half a screen
+# v/V/Ctrl-v: Toggle normal/linewise/blockwise selection
+# y/Return: Copy selection to primary buffer, Return: quit afterwards
+# Y: Copy selected lines to primary buffer or cursor line and quit
+# q/Escape: Quit keyboard selection mode
+
+# Options:
+# URxvt.keyboard-select.clipboard: If true, copy to clipboard too
+
+
+use strict;
+
+sub on_start{
+ my ($self) = @_;
+
+ $self->{clipboard} = $self->x_resource_boolean('keyboard-select.clipboard');
+
+ $self->{patterns}{'w'} = qr/\w[^\w\s]|\W\w|\s\S/;
+ $self->{patterns}{'W'} = qr/\s\S/;
+ $self->{patterns}{'b'} = qr/.*(?:\w[^\w\s]|\W\w|\s\S)/;
+ $self->{patterns}{'B'} = qr/.*\s\S/;
+ $self->{patterns}{'e'} = qr/[^\w\s](?=\w)|\w(?=\W)|\S(?=\s|$)/;
+ $self->{patterns}{'E'} = qr/\S(?=\s|$)/;
+
+ ()
+}
+
+
+sub on_action {
+ my ($self, $action) = @_;
+
+ on_user_command($self, "keyboard-select:" . $action);
+}
+
+
+sub on_user_command {
+ my ($self, $cmd) = @_;
+
+ if (not $self->{active}) {
+ if ($cmd eq 'keyboard-select:activate') {
+ activate($self);
+ } elsif ($cmd eq 'keyboard-select:search') {
+ activate($self, 1);
+ }
+ }
+
+ ()
+}
+
+
+sub key_press {
+ my ($self, $event, $keysym, $char) = @_;
+ my $key = chr($keysym);
+
+ if (lc($key) eq 'c' && $event->{state} & urxvt::ControlMask) {
+ deactivate($self);
+ } elsif ($self->{search}) {
+ if ($keysym == 0xff1b) {
+ if ($self->{search_mode}) {
+ deactivate($self);
+ } else {
+ $self->{search} = '';
+ status_area($self);
+ }
+ } elsif ($keysym == 0xff08) {
+ $self->{search} = substr($self->{search}, 0, -1);
+ if (not $self->{search} and $self->{search_mode}) {
+ deactivate($self);
+ } else {
+ status_area($self);
+ }
+ } elsif ($keysym == 0xff0d ||
+ (lc($key) eq 'm' && $event->{state} & urxvt::ControlMask)) {
+ my $txt = substr($self->{search}, 1);
+ if ($txt) {
+ $self->{pattern} = ($txt =~ m/[[:upper:]]/) ? qr/\Q$txt\E/ :
+ qr/\Q$txt\E/i;
+ } elsif ($self->{pattern}) {
+ delete $self->{pattern};
+ }
+ $self->{search} = '';
+ $self->screen_cur($self->{srhcr}, $self->{srhcc});
+ if (not find_next($self)) {
+ if ($self->{search_mode}) {
+ deactivate($self);
+ } else {
+ status_area($self);
+ }
+ }
+ } elsif (length($char) > 0) {
+ $self->{search} .= $self->locale_decode($char);
+ my $txt = substr($self->{search}, 1);
+ if ($txt) {
+ $self->{pattern} = ($txt =~ m/[[:upper:]]/) ? qr/\Q$txt\E/ :
+ qr/\Q$txt\E/i;
+ } elsif ($self->{pattern}) {
+ delete $self->{pattern};
+ }
+ $self->screen_cur($self->{srhcr}, $self->{srhcc});
+ find_next($self);
+ status_area($self);
+ }
+ } elsif ($self->{move_to}) {
+ if ($keysym == 0xff1b) {
+ $self->{move_to} = 0;
+ status_area($self);
+ } elsif (length($char) > 0) {
+ $self->{move_to} = 0;
+ $self->{patterns}{'f-1'} = qr/^.*\Q$key\E/;
+ $self->{patterns}{'f+1'} = qr/^.+?\Q$key\E/;
+ move_to($self, ';');
+ status_area($self);
+ }
+ } elsif ($keysym == 0xff1b || lc($key) eq 'q') {
+ deactivate($self);
+ } elsif (lc($key) eq 'y' || $keysym == 0xff0d ||
+ (lc($key) eq 'm' && $event->{state} & urxvt::ControlMask)) {
+ my $quit = 0;
+ if ($key eq 'Y' && $self->{select} ne 'l') {
+ $quit = !$self->{select};
+ toggle_select($self, 'l');
+ }
+ if ($self->{select}) {
+ my ($br, $bc, $er, $ec) = calc_span($self);
+ $ec = $self->line($er)->l if $self->{select} eq 'l';
+ $self->selection_beg($br, $bc);
+ $self->selection_end($er, $ec);
+ $self->selection_make($event->{time}, $self->{select} eq 'b');
+ if ($self->{clipboard}) {
+ $self->selection($self->selection(), 1);
+ $self->selection_grab($event->{time}, 1);
+ }
+ if (lc($key) eq 'y') {
+ $self->selection_beg(1, 0);
+ $self->selection_end(1, 0);
+ $self->{select} = '';
+ status_area($self);
+ $self->want_refresh();
+ } else {
+ $quit = 1;
+ }
+ }
+ if ($quit) {
+ deactivate($self);
+ }
+ } elsif ($key eq 'V') {
+ toggle_select($self, 'l');
+ } elsif ($key eq 'v') {
+ if ($event->{state} & urxvt::ControlMask) {
+ toggle_select($self, 'b');
+ } else {
+ toggle_select($self, 'n');
+ }
+ } elsif ($key eq 'k' || $keysym == 0xff52) {
+ move_cursor($self, 'k');
+ } elsif ($key eq 'j' || $keysym == 0xff54) {
+ move_cursor($self, 'j');
+ } elsif ($key eq 'h' || $keysym == 0xff51) {
+ move_cursor($self, 'h');
+ } elsif ($key eq 'l' || $keysym == 0xff53) {
+ move_cursor($self, 'l');
+ } elsif ($keysym == 0xff57) {
+ move_cursor($self, '$');
+ } elsif ($keysym == 0xff50) {
+ move_cursor($self, '^');
+ } elsif ('gG0^$HML' =~ m/\Q$key\E/ ||
+ ('fbdu' =~ m/\Q$key\E/ && $event->{state} & urxvt::ControlMask)) {
+ move_cursor($self, $key);
+ } elsif (lc($key) eq 'f') {
+ $self->{move_to} = 1;
+ $self->{move_dir} = $key eq 'F' ? -1 : 1;
+ status_area($self, $key);
+ } elsif (';,wWbBeE' =~ m/\Q$key\E/) {
+ move_to($self, $key);
+ } elsif ($key eq '/' || $key eq '?') {
+ $self->{search} = $key;
+ $self->{search_dir} = $key eq '?' ? -1 : 1;
+ ($self->{srhcr}, $self->{srhcc}) = $self->screen_cur();
+ status_area($self);
+ } elsif (lc($key) eq 'n') {
+ find_next($self, $self->{search_dir} * ($key eq 'N' ? -1 : 1));
+ }
+
+ return 1;
+}
+
+
+sub move_cursor {
+ my ($self, $key) = @_;
+ my ($cr, $cc) = $self->screen_cur();
+ my $line = $self->line($cr);
+
+ if ($key eq 'k' && $line->beg > $self->top_row) {
+ $cr = $line->beg - 1;
+ } elsif ($key eq 'j' && $line->end < $self->nrow - 1) {
+ $cr = $line->end + 1;
+ } elsif ($key eq 'h' && $self->{offset} > 0) {
+ $self->{offset} = $line->offset_of($cr, $cc) - 1;
+ $self->{dollar} = 0;
+ } elsif ($key eq 'l' && $self->{offset} < $line->l - 1) {
+ ++$self->{offset};
+ } elsif ($key eq 'f' || $key eq 'd') {
+ my $vs = $self->view_start() +
+ ($key eq 'd' ? $self->nrow / 2 : $self->nrow - 1);
+ $vs = 0 if $vs > 0;
+ $cr += $vs - $self->view_start($vs);
+ } elsif ($key eq 'b' || $key eq 'u') {
+ my $vs = $self->view_start() -
+ ($key eq 'u' ? $self->nrow / 2 : $self->nrow - 1);
+ $vs = $self->top_row if $vs < $self->top_row;
+ $cr += $vs - $self->view_start($vs);
+ } elsif ($key eq 'g') {
+ ($cr, $self->{offset}) = ($self->top_row, 0);
+ $self->{dollar} = 0;
+ } elsif ($key eq 'G') {
+ ($cr, $self->{offset}) = ($self->nrow - 1, 0);
+ $self->{dollar} = 0;
+ } elsif ($key eq '0') {
+ $self->{offset} = 0;
+ $self->{dollar} = 0;
+ } elsif ($key eq '^') {
+ my $ltxt = $self->special_decode($line->t);
+ while ($ltxt =~ s/^( *)\t/$1 . " " x (8 - length($1) % 8)/e) {}
+ $self->{offset} = $ltxt =~ m/^ +/ ? $+[0] : 0;
+ $self->{dollar} = 0;
+ } elsif ($key eq '$') {
+ my $co = $line->offset_of($cr, $cc);
+ $self->{dollar} = $co + 1;
+ $self->{offset} = $line->l - 1;
+ } elsif ($key eq 'H') {
+ $cr = $self->view_start();
+ } elsif ($key eq 'M') {
+ $cr = $self->view_start() + $self->nrow / 2;
+ } elsif ($key eq 'L') {
+ $cr = $self->view_start() + $self->nrow - 1;
+ }
+
+ $line = $self->line($cr);
+ $cc = $self->{dollar} || $self->{offset} >= $line->l ? $line->l - 1 :
+ $self->{offset};
+ $self->screen_cur($line->coord_of($cc));
+
+ status_area($self);
+ $self->want_refresh();
+
+ ()
+}
+
+
+sub move_to {
+ my ($self, $key) = @_;
+ my ($cr, $cc) = $self->screen_cur();
+ my $line = $self->line($cr);
+ my $offset = $self->{offset};
+ my ($dir, $pattern);
+ my ($wrap, $found) = (0, 0);
+
+ if ($key eq ';' || $key eq ',') {
+ $dir = $self->{move_dir} * ($key eq ',' ? -1 : 1);
+ $pattern = $self->{patterns}{sprintf('f%+d', $dir)};
+ return if not $pattern;
+ } else {
+ if (lc($key) eq 'b') {
+ $dir = -1;
+ } else {
+ $dir = 1;
+ ++$offset if lc($key) eq 'e';
+ }
+ $pattern = $self->{patterns}{$key};
+ $wrap = 1;
+ }
+
+ if ($dir > 0) {
+ NEXTDOWN: my $text = substr($line->t, $offset);
+ if ($text =~ m/$pattern/) {
+ $offset += $+[0] - 1;
+ $found = 1;
+ } elsif ($wrap && $line->end + 1 < $self->nrow) {
+ $cr = $line->end + 1;
+ $line = $self->line($cr);
+ $offset = 0;
+ if (lc($key) eq 'e') {
+ goto NEXTDOWN;
+ } else {
+ $found = 1;
+ }
+ }
+ } elsif ($dir < 0) {
+ NEXTUP: my $text = substr($line->t, 0, $offset);
+ if ($text =~ m/$pattern/) {
+ $offset += $+[0] - length($text) - 1;
+ $found = 1;
+ } elsif ($wrap) {
+ if ($offset > 0) {
+ $offset = 0;
+ $found = 1;
+ } elsif ($line->beg > $self->top_row) {
+ $cr = $line->beg - 1;
+ $line = $self->line($cr);
+ $offset = $line->l;
+ goto NEXTUP;
+ }
+ }
+ }
+
+ if ($found) {
+ $self->{dollar} = 0;
+ $self->{offset} = $offset;
+ $self->screen_cur($line->coord_of($offset));
+ $self->want_refresh();
+ }
+
+ ()
+}
+
+
+sub find_next {
+ my ($self, $dir) = @_;
+
+ return if not $self->{pattern};
+ $dir = $self->{search_dir} if not $dir;
+
+ my ($cr, $cc) = $self->screen_cur();
+ my $line = $self->line($cr);
+ my $offset = $line->offset_of($cr, $cc);
+ my $text;
+ my $found = 0;
+
+ ++$offset if $dir > 0;
+
+ while (not $found) {
+ if ($dir > 0) {
+ $text = substr($line->t, $offset);
+ if ($text =~ m/$self->{pattern}/) {
+ $found = 1;
+ $offset += $-[0];
+ } else {
+ last if $line->end >= $self->nrow;
+ $line = $self->line($line->end + 1);
+ $offset = 0;
+ }
+ } else {
+ $text = substr($line->t, 0, $offset);
+ if ($text =~ m/$self->{pattern}/) {
+ $found = 1;
+ $offset = $-[0] while $text =~ m/$self->{pattern}/g;
+ } else {
+ last if $line->beg <= $self->top_row;
+ $line = $self->line($line->beg - 1);
+ $offset = $line->l;
+ }
+ }
+ }
+
+ if ($found) {
+ $self->{dollar} = 0;
+ $self->{offset} = $offset;
+ $self->screen_cur($line->coord_of($offset));
+ status_area($self);
+ $self->want_refresh();
+ }
+
+ return $found;
+}
+
+
+sub tt_write {
+ return 1;
+}
+
+
+sub refresh {
+ my ($self) = @_;
+ my ($cr, $cc) = $self->screen_cur();
+
+ # scroll the current cursor position into visible area
+ if ($cr < $self->view_start()) {
+ $self->view_start($cr);
+ } elsif ($cr >= $self->view_start() + $self->nrow) {
+ $self->view_start($cr - $self->nrow + 1);
+ }
+
+ if ($self->{select}) {
+ my ($hl, $reverse_cursor);
+ my ($br, $bc, $er, $ec) = calc_span($self);
+
+ if ($self->x_resource('highlightColor')) {
+ $hl = urxvt::RS_Sel;
+ $reverse_cursor = 0;
+ } else {
+ $hl = urxvt::RS_RVid;
+ $reverse_cursor = $self->{select} ne 'l';
+ }
+ if ($self->{select} eq 'b') {
+ my $co = $self->line($cr)->offset_of($cr, $cc);
+ my $dollar = $self->{dollar} && $co >= $self->{dollar} - 1;
+
+ my $r = $br;
+ while ($r <= $er) {
+ my $line = $self->line($r);
+ if ($bc < $line->l) {
+ $ec = $line->l if $dollar;
+ my ($br, $bc) = $line->coord_of($bc);
+ my ($er, $ec) = $line->coord_of($ec <= $line->l ? $ec : $line->l);
+ $self->scr_xor_span($br, $bc, $er, $ec, $hl);
+ } elsif ($r == $cr) {
+ $reverse_cursor = 0;
+ }
+ $r = $line->end + 1;
+ }
+ } else {
+ $self->scr_xor_span($br, $bc, $er, $ec, $hl);
+ }
+
+ if ($reverse_cursor) {
+ # make the cursor visible again
+ $self->scr_xor_span($cr, $cc, $cr, $cc + 1, $hl);
+ }
+ }
+
+ ()
+}
+
+
+sub activate {
+ my ($self, $search) = @_;
+
+ $self->{active} = 1;
+
+ $self->{select} = '';
+ $self->{dollar} = 0;
+ $self->{move_to} = 0;
+
+ if ($search) {
+ $self->{search} = '?';
+ $self->{search_dir} = -1;
+ $self->{search_mode} = 1;
+ } else {
+ $self->{search} = '';
+ $self->{search_mode} = 0;
+ }
+
+ ($self->{oldcr}, $self->{oldcc}) = $self->screen_cur();
+ ($self->{srhcr}, $self->{srhcc}) = $self->screen_cur();
+ $self->{old_view_start} = $self->view_start();
+ $self->{old_pty_ev_events} = $self->pty_ev_events(urxvt::EV_NONE);
+
+ my $line = $self->line($self->{oldcr});
+ $self->{offset} = $line->offset_of($self->{oldcr}, $self->{oldcc});
+
+ $self->selection_beg(1, 0);
+ $self->selection_end(1, 0);
+
+ $self->enable(
+ key_press => \&key_press,
+ refresh_begin => \&refresh,
+ refresh_end => \&refresh,
+ tt_write => \&tt_write,
+ );
+
+ if ($self->{offset} >= $line->l) {
+ $self->{offset} = $line->l > 0 ? $line->l - 1 : 0;
+ $self->screen_cur($line->coord_of($self->{offset}));
+ $self->want_refresh();
+ }
+
+ $self->{overlay_len} = 0;
+ status_area($self);
+
+ ()
+}
+
+
+sub deactivate {
+ my ($self) = @_;
+
+ $self->selection_beg(1, 0);
+ $self->selection_end(1, 0);
+
+ delete $self->{overlay} if $self->{overlay};
+
+ $self->disable("key_press", "refresh_begin", "refresh_end", "tt_write");
+ $self->screen_cur($self->{oldcr}, $self->{oldcc});
+ $self->view_start($self->{old_view_start});
+ $self->pty_ev_events($self->{old_pty_ev_events});
+
+ $self->want_refresh();
+
+ $self->{active} = 0;
+
+ ()
+}
+
+
+sub status_area {
+ my ($self, $extra) = @_;
+ my ($stat, $stat_len);
+
+ if ($self->{search}) {
+ $stat_len = $self->ncol;
+ $stat = $self->{search} . ' ' x ($stat_len - length($self->{search}));
+ } else {
+ if ($self->{select}) {
+ $stat = "-V" . ($self->{select} ne 'n' ? uc($self->{select}) : "") . "- ";
+ }
+
+ if ($self->top_row == 0) {
+ $stat .= "All";
+ } elsif ($self->view_start() == $self->top_row) {
+ $stat .= "Top";
+ } elsif ($self->view_start() == 0) {
+ $stat .= "Bot";
+ } else {
+ $stat .= sprintf("%2d%%",
+ ($self->top_row - $self->view_start) * 100 / $self->top_row);
+ }
+
+ $stat = "$extra $stat" if $extra;
+ $stat_len = length($stat);
+ }
+
+ if (!$self->{overlay} || $self->{overlay_len} != $stat_len) {
+ delete $self->{overlay} if $self->{overlay};
+ $self->{overlay} = $self->overlay(-1, -1, $stat_len, 1,
+ urxvt::OVERLAY_RSTYLE, 0);
+ $self->{overlay_len} = $stat_len;
+ }
+
+ $self->{overlay}->set(0, 0, $self->special_encode($stat));
+ $self->{overlay}->show();
+
+ ()
+}
+
+
+sub toggle_select {
+ my ($self, $mode) = @_;
+
+ if ($self->{select} eq $mode) {
+ $self->{select} = '';
+ } else {
+ if (not $self->{select}) {
+ ($self->{ar}, $self->{ac}) = $self->screen_cur();
+ }
+ $self->{select} = $mode;
+ }
+
+ status_area($self);
+ $self->want_refresh();
+
+ ()
+}
+
+
+sub calc_span {
+ my ($self) = @_;
+ my ($cr, $cc) = $self->screen_cur();
+ my ($br, $bc, $er, $ec);
+
+ if ($self->{select} eq 'b') {
+ $br = $self->line($cr)->beg;
+ $bc = $self->line($cr)->offset_of($cr, $cc);
+ $er = $self->line($self->{ar})->beg;
+ $ec = $self->line($self->{ar})->offset_of($self->{ar}, $self->{ac});
+ ($br, $er) = ($er, $br) if $br > $er;
+ ($bc, $ec) = ($ec, $bc) if $bc > $ec;
+ } else {
+ if ($cr < $self->{ar}) {
+ ($br, $bc, $er, $ec) = ($cr, $cc, $self->{ar}, $self->{ac});
+ } elsif ($cr > $self->{ar}) {
+ ($br, $bc, $er, $ec) = ($self->{ar}, $self->{ac}, $cr, $cc);
+ } else {
+ ($br, $er) = ($cr, $cr);
+ ($bc, $ec) = $cc < $self->{ac} ? ($cc, $self->{ac}) : ($self->{ac}, $cc);
+ }
+ }
+
+ if ($self->{select} eq 'l') {
+ ($br, $er) = ($self->line($br)->beg, $self->line($er)->end);
+ ($bc, $ec) = (0, $self->ncol);
+ } else {
+ ++$ec;
+ }
+
+ return ($br, $bc, $er, $ec);
+}
diff --git a/xorg/.Xmodmap b/xorg/.Xmodmap
new file mode 100644
index 0000000..dc12776
--- /dev/null
+++ b/xorg/.Xmodmap
@@ -0,0 +1,3 @@
+remove Lock = Caps_Lock
+keysym Caps_Lock = Control_L
+add Control = Control_L
diff --git a/xorg/.config/picom/picom.conf b/xorg/.config/picom/picom.conf
new file mode 100644
index 0000000..274af3c
--- /dev/null
+++ b/xorg/.config/picom/picom.conf
@@ -0,0 +1,530 @@
+#################################
+# Animations #
+#################################
+# requires https://github.com/jonaburg/picom
+# (These are also the default values)
+transition-length = 3.00
+# transition-length = 300
+transition-pow-x = 0.0
+transition-pow-y = 0.1
+transition-pow-w = 0.1
+transition-pow-h = 0.1
+size-transition = false
+
+
+#################################
+# Corners #
+#################################
+# requires: https://github.com/sdhand/compton or https://github.com/jonaburg/picom
+corner-radius = 0.0;
+rounded-corners-exclude = [
+ #"window_type = 'normal'",
+ "class_g = 'awesome'",
+ "class_g = 'URxvt'",
+ "class_g = 'XTerm'",
+ "class_g = 'kitty'",
+ "class_g = 'Zotero'",
+ "class_g = 'Alacritty'",
+ "class_g = 'St'",
+ "class_g = 'Emacs'",
+ "class_g = 'discord'",
+ "class_g = 'Polybar'",
+ "class_g = 'mpv'",
+ "class_g = 'code-oss'",
+ #"class_g = 'TelegramDesktop'",
+ "class_g = 'firefox'",
+ "class_g = 'i3bar'",
+ "class_g = 'Dunst'",
+ "class_g = 'Librewolf'",
+ "class_g = 'i3-frame'",
+ "class_g = 'dmenu'",
+ "class_g = 'dwm'",
+ "class_g = 'polybar'",
+ "class_g = 'Anki'",
+ "class_g = 'system-init'",
+ "class_g = 'Thunderbird'"
+];
+round-borders = 0;
+round-borders-exclude = [
+ #"class_g = 'TelegramDesktop'",
+];
+
+#################################
+# Shadows #
+#################################
+
+
+# Enabled client-side shadows on windows. Note desktop windows
+# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow,
+# unless explicitly requested using the wintypes option.
+#
+# shadow = false
+shadow = false;
+
+# The blur radius for shadows, in pixels. (defaults to 12)
+# shadow-radius = 12
+shadow-radius = 7;
+
+# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
+# shadow-opacity = .75
+
+# The left offset for shadows, in pixels. (defaults to -15)
+# shadow-offset-x = -15
+shadow-offset-x = -7;
+
+# The top offset for shadows, in pixels. (defaults to -15)
+# shadow-offset-y = -15
+shadow-offset-y = -7;
+
+# Avoid drawing shadows on dock/panel windows. This option is deprecated,
+# you should use the *wintypes* option in your config file instead.
+#
+# no-dock-shadow = false
+
+# Don't draw shadows on drag-and-drop windows. This option is deprecated,
+# you should use the *wintypes* option in your config file instead.
+#
+# no-dnd-shadow = false
+
+# Red color value of shadow (0.0 - 1.0, defaults to 0).
+# shadow-red = 0
+
+# Green color value of shadow (0.0 - 1.0, defaults to 0).
+# shadow-green = 0
+
+# Blue color value of shadow (0.0 - 1.0, defaults to 0).
+# shadow-blue = 0
+
+# Do not paint shadows on shaped windows. Note shaped windows
+# here means windows setting its shape through X Shape extension.
+# Those using ARGB background is beyond our control.
+# Deprecated, use
+# shadow-exclude = 'bounding_shaped'
+# or
+# shadow-exclude = 'bounding_shaped && !rounded_corners'
+# instead.
+#
+# shadow-ignore-shaped = ''
+
+# Specify a list of conditions of windows that should have no shadow.
+#
+# examples:
+# shadow-exclude = "n:e:Notification";
+#
+# shadow-exclude = []
+shadow-exclude = [
+ "name = 'Notification'",
+ "class_g = 'Conky'",
+ "class_g ?= 'Notify-osd'",
+ "class_g = 'Cairo-clock'",
+ "class_g = 'slop'",
+ "class_g = 'Polybar'",
+ "_GTK_FRAME_EXTENTS@:c"
+];
+
+# Specify a X geometry that describes the region in which shadow should not
+# be painted in, such as a dock window region. Use
+# shadow-exclude-reg = "x10+0+0"
+# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on.
+#
+# shadow-exclude-reg = ""
+
+# Crop shadow of a window fully on a particular Xinerama screen to the screen.
+# xinerama-shadow-crop = false
+
+
+#################################
+# Fading #
+#################################
+
+
+# Fade windows in/out when opening/closing and when opacity changes,
+# unless no-fading-openclose is used.
+# fading = false
+fading = false;
+
+# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
+# fade-in-step = 0.028
+fade-in-step = 0.03;
+
+# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
+# fade-out-step = 0.03
+fade-out-step = 0.03;
+
+# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
+# fade-delta = 10
+
+# Specify a list of conditions of windows that should not be faded.
+# don't need this, we disable fading for all normal windows with wintypes: {}
+fade-exclude = [
+ "class_g = 'slop'" # maim
+]
+
+# Do not fade on window open/close.
+# no-fading-openclose = false
+
+# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc.
+# no-fading-destroyed-argb = false
+
+
+#################################
+# Transparency / Opacity #
+#################################
+
+
+# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
+# inactive-opacity = 1
+inactive-opacity = 1.0;
+
+# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
+frame-opacity = 1.0
+# frame-opacity = 0.7;
+
+# Default opacity for dropdown menus and popup menus. (0.0 - 1.0, defaults to 1.0)
+# menu-opacity = 1.0
+# menu-opacity is depreciated use dropdown-menu and popup-menu instead.
+
+#If using these 2 below change their values in line 510 & 511 aswell
+popup_menu = { opacity = 0.8; }
+dropdown_menu = { opacity = 0.8; }
+
+
+# Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows.
+# inactive-opacity-override = true
+inactive-opacity-override = false;
+
+# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
+active-opacity = 1.0;
+
+# Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
+# inactive-dim = 0.0
+
+# Specify a list of conditions of windows that should always be considered focused.
+# focus-exclude = []
+focus-exclude = [
+ "class_g = 'Cairo-clock'",
+ "class_g = 'Bar'", # lemonbar
+ "class_g = 'slop'" # maim
+];
+
+# Use fixed inactive dim value, instead of adjusting according to window opacity.
+# inactive-dim-fixed = 1.0
+
+# Specify a list of opacity rules, in the format `PERCENT:PATTERN`,
+# like `50:name *= "Firefox"`. picom-trans is recommended over this.
+# Note we don't make any guarantee about possible conflicts with other
+# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows.
+# example:
+# opacity-rule = [ "80:class_g = 'URxvt'" ];
+#
+# opacity-rule = []
+opacity-rule = [
+ "80:class_g = 'Bar'", # lemonbar
+ "100:class_g = 'slop'", # maim
+ "100:class_g = 'XTerm'",
+ "100:class_g = 'URxvt'",
+ "100:class_g = 'kitty'",
+ "100:class_g = 'Alacritty'",
+ "100:class_g = 'Polybar'",
+ "100:class_g = 'code-oss'",
+ "100:class_g = 'Meld'",
+ "70:class_g = 'TelegramDesktop'",
+ "90:class_g = 'Joplin'",
+ "95:class_g = 'Emacs'",
+ "90:class_g = 'URxvt'",
+ "100:class_g = 'firefox'",
+ "100:class_g = 'mpv'",
+ "100:class_g = 'Thunderbird'"
+];
+
+
+#################################
+# Background-Blurring #
+#################################
+
+
+# Parameters for background blurring, see the *BLUR* section for more information.
+# blur-method =
+# blur-size = 12
+#
+# blur-deviation = false
+
+# Blur background of semi-transparent / ARGB windows.
+# Bad in performance, with driver-dependent behavior.
+# The name of the switch may change without prior notifications.
+#
+# blur-background = true;
+
+# Blur background of windows when the window frame is not opaque.
+# Implies:
+# blur-background
+# Bad in performance, with driver-dependent behavior. The name may change.
+#
+# blur-background-frame = false;
+
+
+# Use fixed blur strength rather than adjusting according to window opacity.
+# blur-background-fixed = false;
+
+
+# Specify the blur convolution kernel, with the following format:
+# example:
+# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
+#
+# blur-kern = ''
+# blur-kern = "3x3box";
+
+blur: {
+ # requires: https://github.com/ibhagwan/picom
+ # method = "kawase";
+ method = "kernel";
+ strength = 2.75;
+ # deviation = 1.0;
+ kernel = "11x11gaussian";
+ background = false;
+ background-frame = false;
+ background-fixed = false;
+ # kern = "3x3box";
+}
+
+# Exclude conditions for background blur.
+blur-background-exclude = [
+ #"window_type = 'dock'",
+ #"window_type = 'desktop'",
+ #"class_g = 'URxvt'",
+ #
+ # prevents picom from blurring the background
+ # when taking selection screenshot with `main`
+ # https://github.com/naelstrof/maim/issues/130
+ "class_g = 'slop'",
+ "_GTK_FRAME_EXTENTS@:c"
+];
+
+
+#################################
+# General Settings #
+#################################
+
+# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
+# daemon = false
+
+# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`.
+# `xrender` is the default one.
+#
+experimental-backends = true;
+backend = "glx";
+#backend = "xrender";
+
+
+# Enable/disable VSync.
+# vsync = false
+vsync = true
+
+# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
+# dbus = false
+
+# Try to detect WM windows (a non-override-redirect window with no
+# child that has 'WM_STATE') and mark them as active.
+#
+# mark-wmwin-focused = false
+mark-wmwin-focused = true;
+
+# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
+# mark-ovredir-focused = false
+mark-ovredir-focused = true;
+
+# Try to detect windows with rounded corners and don't consider them
+# shaped windows. The accuracy is not very high, unfortunately.
+#
+# detect-rounded-corners = false
+detect-rounded-corners = true;
+
+# Detect '_NET_WM_OPACITY' on client windows, useful for window managers
+# not passing '_NET_WM_OPACITY' of client windows to frame windows.
+#
+# detect-client-opacity = false
+detect-client-opacity = true;
+
+# Specify refresh rate of the screen. If not specified or 0, picom will
+# try detecting this with X RandR extension.
+#
+# refresh-rate = 60
+refresh-rate = 0
+
+# Limit picom to repaint at most once every 1 / 'refresh_rate' second to
+# boost performance. This should not be used with
+# vsync drm/opengl/opengl-oml
+# as they essentially does sw-opti's job already,
+# unless you wish to specify a lower refresh rate than the actual value.
+#
+# sw-opti =
+
+# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window,
+# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy,
+# provided that the WM supports it.
+#
+# use-ewmh-active-win = false
+
+# Unredirect all windows if a full-screen opaque window is detected,
+# to maximize performance for full-screen windows. Known to cause flickering
+# when redirecting/unredirecting windows. paint-on-overlay may make the flickering less obvious.
+#
+# unredir-if-possible = false
+
+# Delay before unredirecting the window, in milliseconds. Defaults to 0.
+# unredir-if-possible-delay = 0
+
+# Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
+# unredir-if-possible-exclude = []
+
+# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows
+# in the same group focused at the same time.
+#
+# detect-transient = false
+detect-transient = true
+
+# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same
+# group focused at the same time. 'WM_TRANSIENT_FOR' has higher priority if
+# detect-transient is enabled, too.
+#
+# detect-client-leader = false
+detect-client-leader = true
+
+# Resize damaged region by a specific number of pixels.
+# A positive value enlarges it while a negative one shrinks it.
+# If the value is positive, those additional pixels will not be actually painted
+# to screen, only used in blur calculation, and such. (Due to technical limitations,
+# with use-damage, those pixels will still be incorrectly painted to screen.)
+# Primarily used to fix the line corruption issues of blur,
+# in which case you should use the blur radius value here
+# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`,
+# with a 5x5 one you use `--resize-damage 2`, and so on).
+# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly.
+#
+# resize-damage = 1
+
+# Specify a list of conditions of windows that should be painted with inverted color.
+# Resource-hogging, and is not well tested.
+#
+# invert-color-include = []
+
+# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer.
+# Might cause incorrect opacity when rendering transparent content (but never
+# practically happened) and may not work with blur-background.
+# My tests show a 15% performance boost. Recommended.
+#
+# glx-no-stencil = false
+
+# GLX backend: Avoid rebinding pixmap on window damage.
+# Probably could improve performance on rapid window content changes,
+# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
+# Recommended if it works.
+#
+# glx-no-rebind-pixmap = false
+
+# Disable the use of damage information.
+# This cause the whole screen to be redrawn everytime, instead of the part of the screen
+# has actually changed. Potentially degrades the performance, but might fix some artifacts.
+# The opposing option is use-damage
+#
+# no-use-damage = false
+#use-damage = true (Causing Weird Black semi opaque rectangles when terminal is opened)
+#Changing use-damage to false fixes the problem
+use-damage = false
+
+# Use X Sync fence to sync clients' draw calls, to make sure all draw
+# calls are finished before picom starts drawing. Needed on nvidia-drivers
+# with GLX backend for some users.
+#
+# xrender-sync-fence = false
+
+# GLX backend: Use specified GLSL fragment shader for rendering window contents.
+# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl`
+# in the source tree for examples.
+#
+# glx-fshader-win = ''
+
+# Force all windows to be painted with blending. Useful if you
+# have a glx-fshader-win that could turn opaque pixels transparent.
+#
+# force-win-blend = false
+
+# Do not use EWMH to detect fullscreen windows.
+# Reverts to checking if a window is fullscreen based only on its size and coordinates.
+#
+# no-ewmh-fullscreen = false
+
+# Dimming bright windows so their brightness doesn't exceed this set value.
+# Brightness of a window is estimated by averaging all pixels in the window,
+# so this could comes with a performance hit.
+# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0)
+#
+# max-brightness = 1.0
+
+# Make transparent windows clip other windows like non-transparent windows do,
+# instead of blending on top of them.
+#
+# transparent-clipping = false
+
+# Set the log level. Possible values are:
+# "trace", "debug", "info", "warn", "error"
+# in increasing level of importance. Case doesn't matter.
+# If using the "TRACE" log level, it's better to log into a file
+# using *--log-file*, since it can generate a huge stream of logs.
+#
+# log-level = "debug"
+log-level = "info";
+
+# Set the log file.
+# If *--log-file* is never specified, logs will be written to stderr.
+# Otherwise, logs will to written to the given file, though some of the early
+# logs might still be written to the stderr.
+# When setting this option from the config file, it is recommended to use an absolute path.
+#
+# log-file = '/path/to/your/log/file'
+
+# Show all X errors (for debugging)
+# show-all-xerrors = false
+
+# Write process ID to a file.
+# write-pid-path = '/path/to/your/log/file'
+
+# Window type settings
+#
+# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard:
+# "unknown", "desktop", "dock", "toolbar", "menu", "utility",
+# "splash", "dialog", "normal", "dropdown_menu", "popup_menu",
+# "tooltip", "notification", "combo", and "dnd".
+#
+# Following per window-type options are available: ::
+#
+# fade, shadow:::
+# Controls window-type-specific shadow and fade settings.
+#
+# opacity:::
+# Controls default opacity of the window type.
+#
+# focus:::
+# Controls whether the window of this type is to be always considered focused.
+# (By default, all window types except "normal" and "dialog" has this on.)
+#
+# full-shadow:::
+# Controls whether shadow is drawn under the parts of the window that you
+# normally won't be able to see. Useful when the window has parts of it
+# transparent, and you want shadows in those areas.
+#
+# redir-ignore:::
+# Controls whether this type of windows should cause screen to become
+# redirected again after been unredirected. If you have unredir-if-possible
+# set, and doesn't want certain window to cause unnecessary screen redirection,
+# you can set this to `true`.
+#
+wintypes:
+{
+ normal = { fade = false; shadow = false; }
+ tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; };
+ dock = { shadow = false; }
+ dnd = { shadow = false; }
+ popup_menu = { opacity = 0.8; }
+ dropdown_menu = { opacity = 0.8; }
+};
diff --git a/xorg/.urxvt/ext/resize-font b/xorg/.urxvt/ext/resize-font
new file mode 100644
index 0000000..28e041e
--- /dev/null
+++ b/xorg/.urxvt/ext/resize-font
@@ -0,0 +1,170 @@
+# vim:ft=perl:fenc=utf-8:tw=80
+# Copyright (c) 2009-, Simon Lundström <[email protected]>
+# Copyright (c) 2014 Maarten de Vries <[email protected]>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+# https://github.com/simmel/urxvt-resize-font
+
+my @fonts = (
+ {'name' => 'font', 'code' => 710},
+ {'name' => 'boldFont', 'code' => 711},
+ {'name' => 'italicFont', 'code' => 712},
+ {'name' => 'boldItalicFont', 'code' => 713},
+);
+
+my @fixed = qw(4x6 5x7 5x8 6x9 6x10 6x12 6x13 7x13 7x14 8x13 8x16 9x15 9x18
+ 10x20 12x24);
+my $step;
+
+sub on_start {
+ my ($self) = @_;
+
+ foreach (@fonts) {
+ $_->{'default'} = $self->resource($_->{'name'});
+ }
+
+ $step = $self->x_resource("%.step") || 2;
+}
+
+sub on_init {
+ my ($self) = @_;
+ my $commands = {
+ "smaller" => "C-minus",
+ "bigger" => "C-plus",
+ "reset" => "C-equal",
+ "show" => "C-question",
+ };
+ bind_hotkeys($self, $commands);
+
+ ()
+}
+
+sub bind_hotkeys {
+ my ($self, $commands) = @_;
+
+ for (keys %$commands) {
+ my $hotkey = $$commands{$_};
+ my $hotkey_bound = $self->{'term'}->x_resource("keysym.$hotkey");
+ if (!defined($hotkey_bound) ) {
+ # Support old-style key bindings
+ if ($self->x_resource("%.$_")) {
+ $hotkey = $self->x_resource("%.$_");
+ }
+
+ # FIXME If we're bound to a keysym, don't bind the default.
+ $self->bind_action($hotkey, "%:$_") or
+ warn "unable to register '$hotkey' as hotkey for $_";
+ }
+ else {
+ if ($hotkey_bound !~ /^resize-font:/) {
+ warn "Hotkey $$commands{$_} already bound to $hotkey_bound, not ".
+ "binding to resize-font:$_ by default.";
+ }
+ }
+ }
+}
+
+sub on_action {
+ my ($self, $string) = @_;
+
+ if ($string eq "bigger") {
+ foreach (@fonts) {
+ next if not defined($_->{'default'});
+ update_font_size($self, $_, +$step);
+ }
+ }
+ elsif ($string eq "smaller") {
+ foreach (@fonts) {
+ next if not defined($_->{'default'});
+ update_font_size($self, $_, -$step);
+ }
+ }
+ elsif ($string eq "reset") {
+ foreach (@fonts) {
+ next if not defined($_->{'default'});
+ set_font($self, $_, $_->{'default'});
+ }
+ }
+ elsif ($string eq "show") {
+
+ my $term = $self->{'term'};
+ $term->{'resize-font'}{'overlay'} = {
+ ov => $term->overlay_simple(0, -1, format_font_info($self)),
+ to => urxvt::timer
+ ->new
+ ->start(urxvt::NOW + 1)
+ ->cb(sub {
+ delete $term->{'resize-font'}{'overlay'};
+ }),
+ };
+ }
+
+ ()
+}
+
+sub get_font {
+ my ($self, $name) = @_;
+ return $self->resource($name);
+}
+
+sub set_font {
+ my ($self, $font, $new) = @_;
+ $self->cmd_parse(sprintf("\33]%d;%s\007", $font->{'code'}, $new));
+}
+
+sub update_font_size {
+ my ($self, $font, $delta) = @_;
+ my $regex = qr"(?<=size=)(\d+)";
+ my $current = get_font($self, $font->{'name'});
+
+ my ($index) = grep { $fixed[$_] eq $current } 0..$#fixed;
+ if ($index or $index eq 0) {
+ my $inc = $delta / abs($delta);
+ $index += $inc;
+ if ($index < 0) { $index = 0; }
+ if ($index > $#fixed) { $index = $#fixed; }
+ $current = $fixed[$index];
+ }
+ elsif ($current =~ /^-/) {
+ my @font = split(/-/, $current);
+ # https://en.wikipedia.org/wiki/X_logical_font_description
+ my $newsize = $font[7]+$delta;
+ $font[7] = $newsize if ($newsize > 0);
+ $current = join('-', @font);
+ }
+ else {
+ my $newsize = $1+$delta if ($current =~ /$regex/);
+ $current =~ s/$regex/$newsize/ge if ($newsize > 0);
+ }
+ set_font($self, $font, $current);
+}
+
+sub format_font_info {
+ my ($self) = @_;
+
+ my $width = 0;
+ foreach (@fonts) {
+ my $length = length($_->{'name'});
+ $width = $length > $width ? $length : $width;
+ }
+ ++$width;
+
+ my $info = '';
+ foreach (@fonts) {
+ $info .= sprintf("%-${width}s %s\n", $_->{'name'} . ':',
+ get_font($self, $_->{'name'}));
+ }
+
+ return $info;
+} \ No newline at end of file
diff --git a/xorg/.xinitrc b/xorg/.xinitrc
new file mode 100644
index 0000000..357768a
--- /dev/null
+++ b/xorg/.xinitrc
@@ -0,0 +1,67 @@
+#!/bin/sh
+
+userresources=$HOME/.Xresources
+usertheme=$HOME/Xresources.vivendi
+usermodmap=$HOME/.Xmodmap
+sysresources=/etc/X11/xinit/Xresources
+sysmodmap=/etc/X11/xinit/Xmodmap
+
+# merge in defaults and keymaps
+
+if [ -f $sysresources ]; then
+
+
+
+
+
+
+
+ xrdb -merge $sysresources
+
+fi
+
+if [ -f $sysmodmap ]; then
+ xmodmap $sysmodmap
+fi
+
+if [ -f "$userresources" ]; then
+
+
+
+
+
+
+
+ xrdb -merge "$userresources"
+ xrdb -merge "$usertheme"
+
+fi
+
+if [ -f "$usermodmap" ]; then
+ xmodmap "$usermodmap"
+fi
+
+[ -f /etc/xprofile ] && . /etc/xprofile
+[ -f ~/.xprofile ] && . ~/.xprofile
+
+# if [ -f "$usertheme" ]; then
+# fi
+
+# start some nice programs
+
+if [ -n "`/etc/X11/chooser.sh`" ]; then
+ command="`/etc/X11/chooser.sh`"
+else
+ failsafe="yes"
+fi
+
+if [ -d /etc/X11/xinit/xinitrc.d ] ; then
+ for f in /etc/X11/xinit/xinitrc.d/?* ; do
+ [ -x "$f" ] && . "$f"
+ done
+ unset f
+fi
+
+if [ -n "$failsafe" ]; then
+ exec dwm
+fi
diff --git a/xorg/.xprofile b/xorg/.xprofile
new file mode 100644
index 0000000..600bf19
--- /dev/null
+++ b/xorg/.xprofile
@@ -0,0 +1 @@
+/home/bard/.local/bin/scripts/startpage.sh &
diff --git a/xorg/Xresources.melissa-dark b/xorg/Xresources.melissa-dark
new file mode 100644
index 0000000..a35b83a
--- /dev/null
+++ b/xorg/Xresources.melissa-dark
@@ -0,0 +1,34 @@
+! Ef Melissa Dark Xresources theme
+*.foreground: #e8e4b1
+*.background: #352718
+URxvt.background: [90]#352718
+*.cursorColor: #e8e4b1
+! black
+*.color0: #352718
+*.color8: #90918a
+! red
+*.color1: #ff7f7f
+*.color9: #ff7f7f
+! green
+*.color2: #6fd560
+*.color10: #6fd560
+! yellow
+*.color3: #ffa21f
+*.color11: #ffa21f
+! blue
+*.color4: #57aff6
+*.color12: #57aff6
+! magenta
+*.color5: #f0aac5
+*.color13: #f0aac5
+! cyan
+*.color6: #6fcad0
+*.color14: #6fcad0
+! white
+*.color7: #e8e4b1
+*.color15: #e8e4b1
+
+dmenu.background: #352718
+dmenu.foreground: #e8e4b1
+dmenu.selbackground: #704f00
+dmenu.selforeground: #e8e4b1
diff --git a/xorg/Xresources.operandi b/xorg/Xresources.operandi
new file mode 100644
index 0000000..62ca3bb
--- /dev/null
+++ b/xorg/Xresources.operandi
@@ -0,0 +1,34 @@
+! Modus Operandi Tinted Xresources theme
+*.foreground: #000000
+*.background: #fbf7f0
+URxvt.background: [90]#fbf7f0
+*.cursorColor: #000000
+! black
+*.color0: #000000
+*.color8: #5C6370
+! red
+*.color1: #ff5f59
+*.color9: #ff5f59
+! green
+*.color2: #44BC44
+*.color10: #44BC44
+! yellow
+*.color3: #fec43f
+*.color11: #fec43f
+! blue
+*.color4: #2FAFFF
+*.color12: #2FAFFF
+! magenta
+*.color5: #FEACD0
+*.color13: #FEACD0
+! cyan
+*.color6: #00D3D0
+*.color14: #00D3D0
+! white
+*.color7: #fbf7f0
+*.color15: #fbf7f0
+
+dmenu.background: #fbf7f0
+dmenu.foreground: #000000
+dmenu.selbackground: #cab9b2
+dmenu.selforeground: #000000
diff --git a/xorg/Xresources.spring b/xorg/Xresources.spring
new file mode 100644
index 0000000..e0dc13d
--- /dev/null
+++ b/xorg/Xresources.spring
@@ -0,0 +1,34 @@
+! Ef Spring Xresources theme
+*.foreground: #34494a
+*.background: #f6fff9
+URxvt.background: [90]#f6fff9
+*.cursorColor: #34494a
+! black
+*.color0: #f6fff9
+*.color8: #90918a
+! red
+*.color1: #c42d2f
+*.color9: #c42d2f
+! green
+*.color2: #1a870f
+*.color10: #1a870f
+! yellow
+*.color3: #a45f22
+*.color11: #a45f22
+! blue
+*.color4: #375cc6
+*.color12: #375cc6
+! magenta
+*.color5: #d5206f
+*.color13: #d5206f
+! cyan
+*.color6: #1f6fbf
+*.color14: #1f6fbf
+! white
+*.color7: #34494a
+*.color15: #34494a
+
+dmenu.background: #f6fff9
+dmenu.foreground: #34494a
+dmenu.selbackground: #90e8b0
+dmenu.selforeground: #34494a \ No newline at end of file
diff --git a/xorg/Xresources.vivendi b/xorg/Xresources.vivendi
new file mode 100644
index 0000000..5d46148
--- /dev/null
+++ b/xorg/Xresources.vivendi
@@ -0,0 +1,34 @@
+! Modus Vivendi Xresources theme
+*.foreground: #ffffff
+*.background: #000000
+URxvt.background: [90]#000000
+*.cursorColor: #ffffff
+! black
+*.color0: #000000
+*.color8: #5C6370
+! red
+*.color1: #ff5f59
+*.color9: #ff5f59
+! green
+*.color2: #44BC44
+*.color10: #44BC44
+! yellow
+*.color3: #fec43f
+*.color11: #fec43f
+! blue
+*.color4: #2FAFFF
+*.color12: #2FAFFF
+! magenta
+*.color5: #FEACD0
+*.color13: #FEACD0
+! cyan
+*.color6: #00D3D0
+*.color14: #00D3D0
+! white
+*.color7: #ffffff
+*.color15: #ffffff
+
+dmenu.background: #000000
+dmenu.foreground: #ffffff
+dmenu.selbackground: #5C6370
+dmenu.selforeground: #ffffff