From a26ffeee6c15c77e92d0edd2a70559184940dc7a Mon Sep 17 00:00:00 2001 From: Tucker Johnson Date: Sun, 1 Jun 2025 14:17:51 -0400 Subject: [PATCH] large scale stage --- Makefile | 7 ++-- PKGBUILD | 44 ------------------------- README.md | 13 -------- README.txt | 67 +++++++++++++++++++++++++++++++++++++++ config.h | 2 +- TuCLS.7 => extras/TuCLS.7 | 0 extras/scripts/remapd | 13 ++++++++ extras/scripts/remaps | 16 ++++++++++ extras/scripts/setbg | 19 +++++++++++ extras/ttymaps.kmap | 2 ++ 10 files changed, 123 insertions(+), 60 deletions(-) delete mode 100644 PKGBUILD delete mode 100644 README.md create mode 100644 README.txt rename TuCLS.7 => extras/TuCLS.7 (100%) create mode 100755 extras/scripts/remapd create mode 100755 extras/scripts/remaps create mode 100755 extras/scripts/setbg create mode 100644 extras/ttymaps.kmap diff --git a/Makefile b/Makefile index d2abfd1..4bacdd1 100644 --- a/Makefile +++ b/Makefile @@ -35,13 +35,16 @@ dist: clean install: all mkdir -p ${DESTDIR}${PREFIX}/bin - cp -f dwm ${DESTDIR}${PREFIX}/bin + cp -f dwm extras/scripts/* ${DESTDIR}${PREFIX}/bin chmod 755 ${DESTDIR}${PREFIX}/bin/dwm + chmod 755 ${DESTDIR}${PREFIX}/bin/remapd + chmod 755 ${DESTDIR}${PREFIX}/bin/remaps + chmod 755 ${DESTDIR}${PREFIX}/bin/setbg 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}${MANPREFIX}/man7 - cp -f TuCLS.7 ${DESTDIR}${MANPREFIX}/man7 + cp -f extras/TuCLS.7 ${DESTDIR}${MANPREFIX}/man7 chmod 644 ${DESTDIR}${MANPREFIX}/man7/TuCLS.7 uninstall: diff --git a/PKGBUILD b/PKGBUILD deleted file mode 100644 index 1903c72..0000000 --- a/PKGBUILD +++ /dev/null @@ -1,44 +0,0 @@ -_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/README.md b/README.md deleted file mode 100644 index cf67303..0000000 --- a/README.md +++ /dev/null @@ -1,13 +0,0 @@ -### included patches - -- [Clickable statusbar](https://dwm.suckless.org/patches/statuscmd/) -- Reads [xresources](https://dwm.suckless.org/patches/xresources/) colors/variables (i.e. works with `pywal`, etc.). -- scratchpad: Accessible with mod+shift+enter. -- New layouts: bstack, fibonacci, deck, centered master and more. All bound to keys super+(shift+)t/y/u/i. -- True fullscreen (super+f) and prevents focus shifting. -- Windows can be made sticky (super+s). -- [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 (super-K/J). -- [shiftview](https://dwm.suckless.org/patches/nextprev/): Cycle through tags (super+g/;). -- [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. diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..b492f11 --- /dev/null +++ b/README.txt @@ -0,0 +1,67 @@ +> N.B. This copy of dmenu is modified as part of TuCLS (Tucker's configured +> Linux System) +> +> Additional non-source features can be found in the 'extras' directory. +> +> included source code patches +> +> - Clickable statusbar (https://dwm.suckless.org/patches/statuscmd/) +> - Reads xresources (https://dwm.suckless.org/patches/xresources/) +> - scratchpad/drop-down terminal +> - New layouts: bstack, fibonacci, deck, centered master and more +> - True fullscreen and prevents focus shifting +> - Windows can be made sticky +> - hide vacant tags (https://dwm.suckless.org/patches/hide_vacant_tags/) +> - Stacker (https://dwm.suckless.org/patches/stacker/) +> - Shiftview (https://dwm.suckless.org/patches/nextprev/) +> - Vanitygaps (https://dwm.suckless.org/patches/vanitygaps/) +> - Swallow patch (https://dwm.suckless.org/patches/swallow/) + +dwm - dynamic window manager +============================ +dwm is an extremely fast, small, and dynamic window manager for X. + + +Requirements +------------ +In order to build dwm you need the Xlib header files. + + +Installation +------------ +Edit config.mk to match your local setup (dwm is installed into +the /usr/local namespace by default). + +Afterwards enter the following command to build and install dwm (if +necessary as root): + + make clean install + + +Running dwm +----------- +Add the following line to your .xinitrc to start dwm using startx: + + exec dwm + +In order to connect dwm to a specific display, make sure that +the DISPLAY environment variable is set correctly, e.g.: + + DISPLAY=foo.bar:1 exec dwm + +(This will start dwm on display :1 of the host foo.bar.) + +In order to display status info in the bar, you can do something +like this in your .xinitrc: + + while xsetroot -name "`date` `uptime | sed 's/.*,//'`" + do + sleep 1 + done & + exec dwm + + +Configuration +------------- +The configuration of dwm is done by creating a custom config.h +and (re)compiling the source code. diff --git a/config.h b/config.h index 9835519..5856bd7 100644 --- a/config.h +++ b/config.h @@ -180,7 +180,7 @@ static const Key keys[] = { { MODKEY, XK_o, incnmaster, {.i = +1 } }, { MODKEY|ShiftMask, XK_o, incnmaster, {.i = -1 } }, { MODKEY, XK_p, spawn, {.v = (const char*[]){ "mpc", "toggle", NULL } } }, - { MODKEY|ShiftMask, XK_p, spawn, SHCMD("mpc pause; dm-kampv") }, + { MODKEY|ShiftMask, XK_p, spawn, SHCMD("mpc pause; killall mpv") }, { MODKEY, XK_bracketleft, spawn, {.v = (const char*[]){ "mpc", "seek", "-10", NULL } } }, { MODKEY|ShiftMask, XK_bracketleft, spawn, {.v = (const char*[]){ "mpc", "seek", "-60", NULL } } }, { MODKEY, XK_bracketright,spawn, {.v = (const char*[]){ "mpc", "seek", "+10", NULL } } }, diff --git a/TuCLS.7 b/extras/TuCLS.7 similarity index 100% rename from TuCLS.7 rename to extras/TuCLS.7 diff --git a/extras/scripts/remapd b/extras/scripts/remapd new file mode 100755 index 0000000..9d48e60 --- /dev/null +++ b/extras/scripts/remapd @@ -0,0 +1,13 @@ +#!/bin/bash + +# Rerun the remaps script whenever a new input device is added. + +# Tucker Johnson (git.newer.systems) (tucker@newer.systems) + +# This script is to add out-of the box features to my dmenu build. If you want +# to make changes, make them in the source directory and reinstall. + +while :; do + remaps + grep -qP -m1 '[^un]bind.+\/[^:]+\(usb\)' <(udevadm monitor -u -t seat -s input -s usb) +done diff --git a/extras/scripts/remaps b/extras/scripts/remaps new file mode 100755 index 0000000..5dc98df --- /dev/null +++ b/extras/scripts/remaps @@ -0,0 +1,16 @@ +#!/bin/sh + +# This script is called on startup to remap keys. + +# Tucker Johnson (git.newer.systems) (tucker@newer.systems) + +# This script is to add out-of the box features to my dmenu build. If you want +# to make changes, make them in the source directory and reinstall. + +xset r rate 300 50 + +setxkbmap -option caps:super,altwin:menu_win + +killall xcape 2>/dev/null ; xcape -e 'Super_L=Escape' + +xset -q | grep -q "Caps Lock:\s*on" && xdotool key Caps_Lock diff --git a/extras/scripts/setbg b/extras/scripts/setbg new file mode 100755 index 0000000..db8a908 --- /dev/null +++ b/extras/scripts/setbg @@ -0,0 +1,19 @@ +#!/bin/sh + + +# Location of link to wallpaper link. +background="${XDG_DATA_HOME:-$HOME/.local/share}/bg" + +while getopts "s" o; do case "${o}" in + s) silent='1' ;; +esac done + +shift $((OPTIND - 1)) + +newimage="$(readlink -f "$1")" && +case "$(file --mime-type -b "$newimage")" in + image/* ) cp -f "$newimage" "$background" && [ -z "$silent" ] && notify-send -i "$background" "Changing wallpaper..." ;; + *) [ -z "$silent" ] && notify-send "Error" "Not a valid image" ; exit 1;; +esac + +xwallpaper --zoom "$background" diff --git a/extras/ttymaps.kmap b/extras/ttymaps.kmap new file mode 100644 index 0000000..51a7042 --- /dev/null +++ b/extras/ttymaps.kmap @@ -0,0 +1,2 @@ +keycode 1 = Caps_Lock +keycode 58 = Escape -- 2.39.5