From 921c36dc0f5898bc0daed9dba29d5e17c2be9a9e Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Mon, 13 May 2024 18:44:23 -0500 Subject: [PATCH 01/19] add sxhkd mode support to statusbar.py --- .config/sx/sxrc | 2 +- .config/sxhkd/sxhkdrc | 1 + builds/statusbar/statusbar/statusbar.py | 21 +++++++++++++++++++-- builds/utils/sh/mode | 1 + 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.config/sx/sxrc b/.config/sx/sxrc index 03464ba..bec46c3 100755 --- a/.config/sx/sxrc +++ b/.config/sx/sxrc @@ -1,3 +1,3 @@ # start the wm -sxhkd & +mode sxhkdrc bspwm diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index e531a21..940dcf6 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -50,5 +50,6 @@ super + {_,shift + } {1-9,0} super + {t,f,s} bspc node -t {tiled,floating,fullscreen} +# x230t specific -- activate the tablet menu XF86RotateWindows tabletmenu diff --git a/builds/statusbar/statusbar/statusbar.py b/builds/statusbar/statusbar/statusbar.py index 2fef7ed..ffa3827 100644 --- a/builds/statusbar/statusbar/statusbar.py +++ b/builds/statusbar/statusbar/statusbar.py @@ -38,6 +38,22 @@ def generate_desktop_string(monitor_array): return ' '.join(output) +def filemodfactory(filename: str, modname: str): + def filemod(queue, _): + orig = 0 + while True: + new = os.path.getmtime(filename) + if(new > orig): + with open(filename, 'r') as f: + queue.put({ + "module": modname, + "data": f.read().rstrip() + }) + orig = new + time.sleep(0.1) + + return filemod + def bspwm(queue, monitor): client = socket.socket( socket.AF_UNIX, @@ -90,11 +106,12 @@ def filecheckerfactory(filename: str, modname: str, timeout=60): battery = filecheckerfactory("/sys/class/power_supply/BAT0/capacity", "bat") batterystatus = filecheckerfactory("/sys/class/power_supply/BAT0/status", "batstat") +sxhkdmode = filemodfactory("/home/usr/.cache/sxhkd_mode", "sxhkdmode") def render(modules) -> str: columns, _ = os.get_terminal_size(0) - left = "{} | {}".format(modules["clock"], modules["bspwm"]) + left = "{} | {}({})".format(modules["clock"], modules["bspwm"], modules["sxhkdmode"]) right = "{}({})".format(modules["bat"], modules["batstat"]) padding = " " * (columns - len(left) - len(right) - 0) @@ -146,7 +163,7 @@ def main(): )) return queue = Queue() - modules = [bspwm, clock, battery, batterystatus] + modules = [bspwm, clock, battery, batterystatus, sxhkdmode] [Process(target=module, args=(queue, argv[1])).start() for module in modules] module_outputs = defaultdict(lambda: "") diff --git a/builds/utils/sh/mode b/builds/utils/sh/mode index 8aaf7e2..d020d65 100755 --- a/builds/utils/sh/mode +++ b/builds/utils/sh/mode @@ -4,6 +4,7 @@ if [ -n "$1" ]; then pkill sxhkd sxhkd -c ~/.config/sxhkd/$1 & disown [ -f "~/.config/sxhkd/$1.sh" ] && ~/.config/sxhkd/$1.sh + echo "$1" > ~/.cache/sxhkd_mode exit fi From f28f9837f66515375daa358371f189ce4f285291 Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Fri, 17 May 2024 10:33:46 -0500 Subject: [PATCH 02/19] add the new_mail module --- builds/statusbar/statusbar/statusbar.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/builds/statusbar/statusbar/statusbar.py b/builds/statusbar/statusbar/statusbar.py index ffa3827..8c74ede 100644 --- a/builds/statusbar/statusbar/statusbar.py +++ b/builds/statusbar/statusbar/statusbar.py @@ -54,6 +54,16 @@ def filemodfactory(filename: str, modname: str): return filemod +def new_mail(queue, _): + while True: + dir_output = os.listdir("/home/usr/Mail/main/INBOX/new") + dir_output = len(dir_output) + queue.put({ + "module": "newmail", + "data": str(dir_output) + }) + time.sleep(20) + def bspwm(queue, monitor): client = socket.socket( socket.AF_UNIX, @@ -112,7 +122,7 @@ def render(modules) -> str: columns, _ = os.get_terminal_size(0) left = "{} | {}({})".format(modules["clock"], modules["bspwm"], modules["sxhkdmode"]) - right = "{}({})".format(modules["bat"], modules["batstat"]) + right = "{} {}({})".format(modules["newmail"], modules["bat"], modules["batstat"]) padding = " " * (columns - len(left) - len(right) - 0) output = left + padding + right @@ -163,7 +173,7 @@ def main(): )) return queue = Queue() - modules = [bspwm, clock, battery, batterystatus, sxhkdmode] + modules = [bspwm, clock, battery, batterystatus, sxhkdmode, new_mail] [Process(target=module, args=(queue, argv[1])).start() for module in modules] module_outputs = defaultdict(lambda: "") From 032df33f955f1c142233541ec375ff23b9d01729 Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Sat, 18 May 2024 22:19:16 -0500 Subject: [PATCH 03/19] add khard config --- .config/khard/khard.conf | 19 +++++++++++++++++++ home/khard/default.nix | 13 +++++++++++++ home/x11.nix | 1 + 3 files changed, 33 insertions(+) create mode 100644 .config/khard/khard.conf create mode 100644 home/khard/default.nix diff --git a/.config/khard/khard.conf b/.config/khard/khard.conf new file mode 100644 index 0000000..4e57eb3 --- /dev/null +++ b/.config/khard/khard.conf @@ -0,0 +1,19 @@ +[addressbooks] +[[main]] +path = ~/vdir/people/main/20cda0dd-5922-4905-8956-859c989a6519 +[general] +default_action = list +editor = nvim +merge_editor = nvim, -d + +[contact table] +display = first_name +group_by_addressbook = no +reverse = no +show_nicknames = no +show_uids = yes +show_kinds = no +sort = last_name +localize_dates = yes +preferred_phone_number_type = pref, cell, home +preferred_email_address_type = pref, work, home diff --git a/home/khard/default.nix b/home/khard/default.nix new file mode 100644 index 0000000..a8224ef --- /dev/null +++ b/home/khard/default.nix @@ -0,0 +1,13 @@ +{ lib, config, pkgs, home, ... }: + +{ + home.packages = with pkgs; [ + khard + ]; + + home.file = { + ".config/khard/config" = { + source = ../../.config/khard/config; + }; + }; +} diff --git a/home/x11.nix b/home/x11.nix index c13f6d7..206cc20 100644 --- a/home/x11.nix +++ b/home/x11.nix @@ -10,6 +10,7 @@ ./wallpapers ./vdirsyncer ./khal + ./khard ./isync ./todoman ./neomutt From f7c7671dcef772ced8e68d23cb2754514b40fd60 Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Sat, 25 May 2024 10:32:43 -0500 Subject: [PATCH 04/19] update khard config location --- home/khard/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/khard/default.nix b/home/khard/default.nix index a8224ef..f8127ca 100644 --- a/home/khard/default.nix +++ b/home/khard/default.nix @@ -7,7 +7,7 @@ home.file = { ".config/khard/config" = { - source = ../../.config/khard/config; + source = ../../.config/khard/khard.conf; }; }; } From 8563eede6308ddee5496ff739eba4d606f84295c Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Sat, 25 May 2024 10:32:57 -0500 Subject: [PATCH 05/19] mlg has two displays now --- builds/utils/sh/disp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/builds/utils/sh/disp b/builds/utils/sh/disp index 5d7f04b..27adda2 100755 --- a/builds/utils/sh/disp +++ b/builds/utils/sh/disp @@ -56,23 +56,19 @@ case "$(hostname)" in case "$1" in "invert") xrandr \ - --output HDMI-0 --mode 1920x1080 --pos 3840x0 --rotate right --rate 60 \ --output DP-0 --off \ --output DP-1-2 --primary --mode 1920x1080 --pos 0x352 --rotate normal --rate 180 \ --output DP-1-1 --mode 1920x1080 --pos 1920x352 --rotate normal --rate 180 bspc monitor DP-1-2 -d 1 3 5 7 bspc monitor DP-1-1 -d 2 4 6 8 - bspc monitor HDMI-0 -d 9 ;; *) xrandr \ - --output HDMI-0 --mode 1920x1080 --pos 3840x0 --rotate right --rate 60 \ --output DP-0 --off \ --output DP-1-1 --primary --mode 1920x1080 --pos 0x352 --rotate normal --rate 180 \ --output DP-1-2 --mode 1920x1080 --pos 1920x352 --rotate normal --rate 180 bspc monitor DP-1-1 -d 1 3 5 7 bspc monitor DP-1-2 -d 2 4 6 8 - bspc monitor HDMI-0 -d 9 ;; esac xinput set-prop 'INSTANT USB GAMING MOUSE ' 'libinput Accel Speed' -1 From edceb9cf4e19ab2c6250d239eb38c8ccca4d14e7 Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Sat, 25 May 2024 10:33:13 -0500 Subject: [PATCH 06/19] add special case for htmldjango --- .config/nvim/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index feaa02d..25e4838 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -92,6 +92,7 @@ function setTabbing(lang, width) end setTabbing("python", 4) +setTabbing("htmldjango", 4) setTabbing("javascript", 4) setTabbing("css", 4) setTabbing("html", 4) From db20d9e047d7288e0355b8d3992ed76d2d432e2f Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Sat, 25 May 2024 14:06:08 -0500 Subject: [PATCH 07/19] plus 20 focus --- boxes/mlg/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boxes/mlg/default.nix b/boxes/mlg/default.nix index e2de063..b05d4a0 100644 --- a/boxes/mlg/default.nix +++ b/boxes/mlg/default.nix @@ -10,7 +10,7 @@ ../../modules/common.nix ../../modules/x11.nix ../../modules/discord.nix - ../../modules/gaming.nix +# ../../modules/gaming.nix ../../modules/rbw.nix ]; From cb5a27847054055ac58111467d16feacd69763b6 Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Sat, 25 May 2024 14:06:20 -0500 Subject: [PATCH 08/19] bump flake.lock --- flake.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index 4b91062..29524d3 100644 --- a/flake.lock +++ b/flake.lock @@ -41,11 +41,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1714043889, - "narHash": "sha256-f7aben2pbfL/CzphiAAwwe5CrmSYRZv3UF7zaGkD+Pc=", + "lastModified": 1716609804, + "narHash": "sha256-MSIbLOzFVjJ0uSfWThdtH87/60p9Cr4qM1VybYJeVK0=", "owner": "rycee", "repo": "nur-expressions", - "rev": "fee36e584de8c0034f311b76b5da1b81dad0b17b", + "rev": "b56c33d04975db768b7306c79060c25e6259366b", "type": "gitlab" }, "original": { @@ -93,11 +93,11 @@ ] }, "locked": { - "lastModified": 1714043624, - "narHash": "sha256-Xn2r0Jv95TswvPlvamCC46wwNo8ALjRCMBJbGykdhcM=", + "lastModified": 1715381426, + "narHash": "sha256-wPuqrAQGdv3ISs74nJfGb+Yprm23U/rFpcHFFNWgM94=", "owner": "nix-community", "repo": "home-manager", - "rev": "86853e31dc1b62c6eeed11c667e8cdd0285d4411", + "rev": "ab5542e9dbd13d0100f8baae2bc2d68af901f4b4", "type": "github" }, "original": { @@ -199,11 +199,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1713995372, - "narHash": "sha256-fFE3M0vCoiSwCX02z8VF58jXFRj9enYUSTqjyHAjrds=", + "lastModified": 1716361217, + "narHash": "sha256-mzZDr00WUiUXVm1ujBVv6A0qRd8okaITyUp4ezYRgc4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "dd37924974b9202f8226ed5d74a252a9785aedf8", + "rev": "46397778ef1f73414b03ed553a3368f0e7e33c2f", "type": "github" }, "original": { From 1be3c2feaac665098749c9b888d8318d0986a3e2 Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Sat, 25 May 2024 21:01:05 -0500 Subject: [PATCH 09/19] invert monitors --- builds/utils/sh/disp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/builds/utils/sh/disp b/builds/utils/sh/disp index 27adda2..9b35d8d 100755 --- a/builds/utils/sh/disp +++ b/builds/utils/sh/disp @@ -55,14 +55,6 @@ case "$(hostname)" in "mlg") case "$1" in "invert") - xrandr \ - --output DP-0 --off \ - --output DP-1-2 --primary --mode 1920x1080 --pos 0x352 --rotate normal --rate 180 \ - --output DP-1-1 --mode 1920x1080 --pos 1920x352 --rotate normal --rate 180 - bspc monitor DP-1-2 -d 1 3 5 7 - bspc monitor DP-1-1 -d 2 4 6 8 - ;; - *) xrandr \ --output DP-0 --off \ --output DP-1-1 --primary --mode 1920x1080 --pos 0x352 --rotate normal --rate 180 \ @@ -70,6 +62,14 @@ case "$(hostname)" in bspc monitor DP-1-1 -d 1 3 5 7 bspc monitor DP-1-2 -d 2 4 6 8 ;; + *) + xrandr \ + --output DP-0 --off \ + --output DP-1-2 --primary --mode 1920x1080 --pos 0x352 --rotate normal --rate 180 \ + --output DP-1-1 --mode 1920x1080 --pos 1920x352 --rotate normal --rate 180 + bspc monitor DP-1-2 -d 1 3 5 7 + bspc monitor DP-1-1 -d 2 4 6 8 + ;; esac xinput set-prop 'INSTANT USB GAMING MOUSE ' 'libinput Accel Speed' -1 From 36b441f054fb47b0b60073d9187c4c31176fd98c Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Tue, 28 May 2024 10:14:25 -0500 Subject: [PATCH 10/19] add a shift+ins to insert special characters --- .config/sxhkd/sxhkdrc | 3 +++ builds/utils/sh/special_ins | 14 ++++++++++++++ 2 files changed, 17 insertions(+) create mode 100755 builds/utils/sh/special_ins diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 940dcf6..3c8bb65 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -53,3 +53,6 @@ super + {t,f,s} # x230t specific -- activate the tablet menu XF86RotateWindows tabletmenu + +shift + Insert + special_ins diff --git a/builds/utils/sh/special_ins b/builds/utils/sh/special_ins new file mode 100755 index 0000000..6cc23c9 --- /dev/null +++ b/builds/utils/sh/special_ins @@ -0,0 +1,14 @@ +# insert special characters universally in xorg + +( +tmenu < Date: Tue, 28 May 2024 10:14:39 -0500 Subject: [PATCH 11/19] remove comments from statusbar and change statusbar location to ~/.cache/statusbar --- builds/statusbar/statusbar/statusbar.py | 7 +++---- builds/utils/sh/mode | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/builds/statusbar/statusbar/statusbar.py b/builds/statusbar/statusbar/statusbar.py index 8c74ede..4e796d0 100644 --- a/builds/statusbar/statusbar/statusbar.py +++ b/builds/statusbar/statusbar/statusbar.py @@ -116,7 +116,7 @@ def filecheckerfactory(filename: str, modname: str, timeout=60): battery = filecheckerfactory("/sys/class/power_supply/BAT0/capacity", "bat") batterystatus = filecheckerfactory("/sys/class/power_supply/BAT0/status", "batstat") -sxhkdmode = filemodfactory("/home/usr/.cache/sxhkd_mode", "sxhkdmode") +sxhkdmode = filemodfactory("/home/usr/.cache/statusbar/sxhkd_mode", "sxhkdmode") def render(modules) -> str: columns, _ = os.get_terminal_size(0) @@ -144,10 +144,9 @@ def render(modules) -> str: stdout.flush() def main(): + os.mkdir("/home/usr/.cache/statusbar") + if argv[1] == "start_statusbars": -# signal.signal(signal.SIGINT, signal.SIG_IGN) -# os.system("pkill statusbar") -# signal.signal(signal.SIGINT, signal.SIG_DFL) # get the monitors xrandr = subprocess.Popen(['xrandr'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) output = list(xrandr.stdout) diff --git a/builds/utils/sh/mode b/builds/utils/sh/mode index d020d65..7ad2263 100755 --- a/builds/utils/sh/mode +++ b/builds/utils/sh/mode @@ -4,7 +4,7 @@ if [ -n "$1" ]; then pkill sxhkd sxhkd -c ~/.config/sxhkd/$1 & disown [ -f "~/.config/sxhkd/$1.sh" ] && ~/.config/sxhkd/$1.sh - echo "$1" > ~/.cache/sxhkd_mode + echo "$1" > ~/.cache/statusbar/sxhkd_mode exit fi From 51612623881a9a187bc1bae7165863e695af543d Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Fri, 7 Jun 2024 17:52:49 -0500 Subject: [PATCH 12/19] update statusbar setup.py to say GPLv3, not MIT --- builds/st/lightmode.h | 20 ++++++++++++++++++++ builds/statusbar/setup.py | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 builds/st/lightmode.h diff --git a/builds/st/lightmode.h b/builds/st/lightmode.h new file mode 100644 index 0000000..e70e37c --- /dev/null +++ b/builds/st/lightmode.h @@ -0,0 +1,20 @@ +/* Terminal colors (16 first used in escape sequence) */ +static const char *colorname[] = { + /* solarized light */ + "#eee8d5", /* 0: black */ + "#dc322f", /* 1: red */ + "#859900", /* 2: green */ + "#b58900", /* 3: yellow */ + "#268bd2", /* 4: blue */ + "#d33682", /* 5: magenta */ + "#2aa198", /* 6: cyan */ + "#073642", /* 7: white */ + "#fdf6e3", /* 8: brblack */ + "#cb4b16", /* 9: brred */ + "#93a1a1", /* 10: brgreen */ + "#839496", /* 11: bryellow */ + "#657b83", /* 12: brblue */ + "#6c71c4", /* 13: brmagenta*/ + "#586e75", /* 14: brcyan */ + "#002b36", /* 15: brwhite */ +}; diff --git a/builds/statusbar/setup.py b/builds/statusbar/setup.py index 493b970..5b3db72 100644 --- a/builds/statusbar/setup.py +++ b/builds/statusbar/setup.py @@ -7,7 +7,7 @@ setup( author_email = 'ryan@beepboop.systems', url = 'https://git.beepboop.systems/stupidcomputer/dot_testing', description = 'simple statusbar content program', - license = 'MIT', + license = 'GPLv3', entry_points = { 'console_scripts': [ 'statusbar = statusbar.statusbar:main' From 5620e61f31f4d28f97aa34ce9d3db4b57bc805d9 Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Wed, 12 Jun 2024 12:14:20 -0500 Subject: [PATCH 13/19] make the statusbar program actually work --- builds/statusbar/statusbar/statusbar.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/builds/statusbar/statusbar/statusbar.py b/builds/statusbar/statusbar/statusbar.py index 4e796d0..bbb7c69 100644 --- a/builds/statusbar/statusbar/statusbar.py +++ b/builds/statusbar/statusbar/statusbar.py @@ -144,7 +144,10 @@ def render(modules) -> str: stdout.flush() def main(): - os.mkdir("/home/usr/.cache/statusbar") + try: + os.mkdir("/home/usr/.cache/statusbar") + except FileExistsError: + pass if argv[1] == "start_statusbars": # get the monitors From d9f3b421089ed63d3979d622c2c449164d4d2605 Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Wed, 12 Jun 2024 12:14:31 -0500 Subject: [PATCH 14/19] upgrade to 24.05 --- flake.lock | 102 ++++++++++++++++++++++--------------------- flake.nix | 6 +-- home/rbw/default.nix | 2 +- modules/gnupg.nix | 1 - 4 files changed, 56 insertions(+), 55 deletions(-) diff --git a/flake.lock b/flake.lock index 29524d3..8b2518d 100644 --- a/flake.lock +++ b/flake.lock @@ -41,11 +41,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1716609804, - "narHash": "sha256-MSIbLOzFVjJ0uSfWThdtH87/60p9Cr4qM1VybYJeVK0=", + "lastModified": 1718165009, + "narHash": "sha256-/N2ZesXMM5Fw9mpQhSCCieGxM/9jysbQQBLYHiSQppI=", "owner": "rycee", "repo": "nur-expressions", - "rev": "b56c33d04975db768b7306c79060c25e6259366b", + "rev": "7e3ce9990c382947c33f0def2a1c33c420d8c710", "type": "gitlab" }, "original": { @@ -58,11 +58,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1668681692, - "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=", + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "owner": "edolstra", "repo": "flake-compat", - "rev": "009399224d5e398d03b22badca40a37ac85412a1", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "type": "github" }, "original": { @@ -93,16 +93,16 @@ ] }, "locked": { - "lastModified": 1715381426, - "narHash": "sha256-wPuqrAQGdv3ISs74nJfGb+Yprm23U/rFpcHFFNWgM94=", + "lastModified": 1717527182, + "narHash": "sha256-vWSkg6AMok1UUQiSYVdGMOXKD2cDFnajITiSi0Zjd1A=", "owner": "nix-community", "repo": "home-manager", - "rev": "ab5542e9dbd13d0100f8baae2bc2d68af901f4b4", + "rev": "845a5c4c073f74105022533907703441e0464bc3", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-23.11", + "ref": "release-24.05", "repo": "home-manager", "type": "github" } @@ -114,11 +114,11 @@ ] }, "locked": { - "lastModified": 1713166947, - "narHash": "sha256-Vk+eyK7EcvoXf6IxEuaKVmme2ui6W/mketcrZxfFmGg=", + "lastModified": 1716729631, + "narHash": "sha256-IerjU5GUeKc0eW9FPOdlPveSGJ2ZrO+lIfuHPUmUF2I=", "owner": "nix-community", "repo": "home-manager", - "rev": "6779167a739240778d34024b89ecf6404fb28f9e", + "rev": "fc4492181833eaaa7a26a8081c0615d95792d825", "type": "github" }, "original": { @@ -199,47 +199,32 @@ }, "nixpkgs": { "locked": { - "lastModified": 1716361217, - "narHash": "sha256-mzZDr00WUiUXVm1ujBVv6A0qRd8okaITyUp4ezYRgc4=", + "lastModified": 1718086528, + "narHash": "sha256-hoB7B7oPgypePz16cKWawPfhVvMSXj4G/qLsfFuhFjw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "46397778ef1f73414b03ed553a3368f0e7e33c2f", + "rev": "47b604b07d1e8146d5398b42d3306fdebd343986", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-23.11", + "ref": "nixos-24.05", "repo": "nixpkgs", "type": "github" } }, - "nixpkgs-23_05": { + "nixpkgs-24_05": { "locked": { - "lastModified": 1704290814, - "narHash": "sha256-LWvKHp7kGxk/GEtlrGYV68qIvPHkU9iToomNFGagixU=", + "lastModified": 1717144377, + "narHash": "sha256-F/TKWETwB5RaR8owkPPi+SPJh83AQsm6KrQAlJ8v/uA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421", + "rev": "805a384895c696f802a9bf5bf4720f37385df547", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-23.05", - "type": "indirect" - } - }, - "nixpkgs-23_11": { - "locked": { - "lastModified": 1706098335, - "narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a77ab169a83a4175169d78684ddd2e54486ac651", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-23.11", + "ref": "nixos-24.05", "type": "indirect" } }, @@ -276,11 +261,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1705856552, - "narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=", + "lastModified": 1717602782, + "narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "612f97239e2cc474c13c9dafa0df378058c5ad8d", + "rev": "e8057b67ebf307f01bdcc8fba94d94f75039d1f6", "type": "github" }, "original": { @@ -370,32 +355,49 @@ "blobs": "blobs", "flake-compat": "flake-compat", "nixpkgs": "nixpkgs_2", - "nixpkgs-23_05": "nixpkgs-23_05", - "nixpkgs-23_11": "nixpkgs-23_11", + "nixpkgs-24_05": "nixpkgs-24_05", "utils": "utils" }, "locked": { - "lastModified": 1706219574, - "narHash": "sha256-qO+8UErk+bXCq2ybHU4GzXG4Ejk4Tk0rnnTPNyypW4g=", + "lastModified": 1718084203, + "narHash": "sha256-Cx1xoVfSMv1XDLgKg08CUd1EoTYWB45VmB9XIQzhmzI=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "e47f3719f1db3e0961a4358d4cb234a0acaa7baf", + "rev": "29916981e7b3b5782dc5085ad18490113f8ff63b", "type": "gitlab" }, "original": { "owner": "simple-nixos-mailserver", - "ref": "nixos-23.11", + "ref": "nixos-24.05", "repo": "nixos-mailserver", "type": "gitlab" } }, - "utils": { + "systems": { "locked": { - "lastModified": 1605370193, - "narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1709126324, + "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=", "owner": "numtide", "repo": "flake-utils", - "rev": "5021eac20303a61fafe17224c087f5519baed54d", + "rev": "d465f4819400de7c8d874d50b982301f28a84605", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 7e8a58d..8e01315 100644 --- a/flake.nix +++ b/flake.nix @@ -3,9 +3,9 @@ inputs = { # regular nixos stuff - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; home-manager = { - url = "github:nix-community/home-manager/release-23.11"; + url = "github:nix-community/home-manager/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; }; firefox-addons = { @@ -13,7 +13,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; simple-nixos-mailserver = { - url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-23.11"; + url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05"; }; nix-colors = { url = "github:misterio77/nix-colors"; diff --git a/home/rbw/default.nix b/home/rbw/default.nix index 060dcc2..90bb3f9 100644 --- a/home/rbw/default.nix +++ b/home/rbw/default.nix @@ -6,7 +6,7 @@ settings = { base_url = "https://bitwarden.beepboop.systems"; email = "bit@beepboop.systems"; -# pinentry = "gtk"; + pinentry = pkgs.pinentry-gnome3; }; }; } diff --git a/modules/gnupg.nix b/modules/gnupg.nix index 8784ba1..df3da55 100644 --- a/modules/gnupg.nix +++ b/modules/gnupg.nix @@ -3,7 +3,6 @@ { programs.gnupg.agent = { enable = true; - pinentryFlavor = "gtk2"; enableSSHSupport = true; }; } From e7e75d747c23eb5097975ee5675a38d60951b99a Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Sat, 15 Jun 2024 20:19:11 -0500 Subject: [PATCH 15/19] add a "solo" option for mlg I'm on vacation, so it now makes sense for mlg to be solo, instead of being forevermore plugged into a dock. Now, you can type `disp solo` and make it configure DP-0 for working, instead of trying to configure DP-1-1 and DP-1-2. Additionally, this commit also introduces DISP_ACCESS_IP, to remotely specify the access IP of `x230t`. This is because the wifi I'm using right now: - doesn't have the right subnet - not the right network prefix - no static ip assignment - etc. --- builds/utils.nix | 6 ++---- builds/utils/sh/disp | 20 ++++++++++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/builds/utils.nix b/builds/utils.nix index c84a2f2..da53dba 100644 --- a/builds/utils.nix +++ b/builds/utils.nix @@ -13,7 +13,6 @@ , figlet , curl , ytfzf -, herbe , xrandr , xrectsel , ffcast @@ -21,7 +20,6 @@ , xkbset , rbw , xclip -, libsForQt5 }: stdenv.mkDerivation rec { @@ -31,7 +29,7 @@ stdenv.mkDerivation rec { src = ./utils; nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ bash feh xrandr jq curl fzy ytfzf sshuttle svkbd scrcpy xkbset rbw xclip ffcast libsForQt5.kolourpaint ]; + buildInputs = [ bash feh xrandr jq curl fzy ytfzf sshuttle svkbd scrcpy rbw xclip ffcast xkbset ]; installPhase = '' mkdir -p $out/bin @@ -39,7 +37,7 @@ stdenv.mkDerivation rec { for i in $(ls $src/sh); do cp $src/sh/$i $out/bin ln -sf $out/bin/tmenu_run $out/bin/regenerate - wrapProgram $out/bin/$i --prefix PATH : ${lib.makeBinPath [ sxhkd bash feh xrandr jq figlet curl fzy ytfzf herbe sshuttle svkbd scrcpy libsForQt5.kolourpaint xrectsel ffcast ]} + wrapProgram $out/bin/$i --prefix PATH : ${lib.makeBinPath [ sxhkd bash feh xrandr jq figlet curl fzy xkbset ytfzf sshuttle svkbd scrcpy xrectsel ffcast ]} done ''; } diff --git a/builds/utils/sh/disp b/builds/utils/sh/disp index 9b35d8d..62735f2 100755 --- a/builds/utils/sh/disp +++ b/builds/utils/sh/disp @@ -3,6 +3,8 @@ set -x +[ "$1" = "-h" ] && echo "use DISP_ACCESS_IP to control sshfs conn ip" && exit 0 + set_walls() { for i in $(xrandr | grep ' connected' | cut -d' ' -f1); do xwallpaper --output $i --zoom ~/.local/share/pape.jpg @@ -62,6 +64,9 @@ case "$(hostname)" in bspc monitor DP-1-1 -d 1 3 5 7 bspc monitor DP-1-2 -d 2 4 6 8 ;; + "solo") + bspc monitor DP-0 -d 1 2 3 4 5 6 7 8 9 + ;; *) xrandr \ --output DP-0 --off \ @@ -74,27 +79,34 @@ case "$(hostname)" in xinput set-prop 'INSTANT USB GAMING MOUSE ' 'libinput Accel Speed' -1 # setup synchronization + # check if we have another IP defined + if [ ! -z "$DISP_ACCESS_IP" ]; then + target="$DISP_ACCESS_IP" + else + target=x230t + fi + pkill sshfs rm $HOME/doc # this is safe, as doc is a dir if it mattered, # but it's just a link, so it's a regular file. # in conclusion, good either way mkdir -p $HOME/.cache/mount_point - sshfs usr@x230t:/home/usr/doc $HOME/.cache/mount_point + sshfs "usr@$target:/home/usr/doc" $HOME/.cache/mount_point -o ConnectTimeout=1 ln -sf $HOME/.cache/mount_point $HOME/doc rm $HOME/.thunderbird # see previous comment mkdir -p $HOME/.cache/mount_point3 - sshfs usr@x230t:/home/usr/.thunderbird $HOME/.cache/mount_point3 + sshfs "usr@$target:/home/usr/.thunderbird" $HOME/.cache/mount_point3 -o ConnectTimeout=1 ln -sf $HOME/.cache/mount_point3 $HOME/.thunderbird rm $HOME/Mail mkdir -p $HOME/.cache/mount_point4 - sshfs usr@x230t:/home/usr/Mail $HOME/.cache/mount_point4 + sshfs "usr@$target:/home/usr/Mail" $HOME/.cache/mount_point4 -o ConnectTimeout=1 ln -sf $HOME/.cache/mount_point4 $HOME/Mail rm $HOME/vdir mkdir -p $HOME/.cache/mount_point5 - sshfs usr@x230t:/home/usr/vdir $HOME/.cache/mount_point5 + sshfs "usr@$target:/home/usr/vdir" $HOME/.cache/mount_point5 -o ConnectTimeout=1 ln -sf $HOME/.cache/mount_point5 $HOME/vdir ;; From 66b98eab2e9a58987de8d042e96002004330e6ee Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Sat, 15 Jun 2024 21:19:41 -0500 Subject: [PATCH 16/19] potpourri - add brave into home/, st has light mode, etc. --- builds/st.nix | 4 +++- home/brave/default.nix | 18 +++++++++++++++ home/elinks/default.nix | 2 +- home/elinks/elinks.nix | 49 ----------------------------------------- home/x11-progs.nix | 7 ------ home/x11.nix | 1 + modules/common.nix | 2 +- 7 files changed, 24 insertions(+), 59 deletions(-) create mode 100644 home/brave/default.nix delete mode 100644 home/elinks/elinks.nix diff --git a/builds/st.nix b/builds/st.nix index fa428cf..f6116a8 100644 --- a/builds/st.nix +++ b/builds/st.nix @@ -7,6 +7,7 @@ , fontconfig , freetype , ncurses +, lightMode ? false , extraLibs ? [ ] }: @@ -19,7 +20,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config fontconfig freetype ncurses ]; buildInputs = [ libX11 libXft ] ++ extraLibs; - buildPhase = '' + buildPhase = lib.optionalString (lightMode == true) "cp lightmode.h colors.h;" + + '' make ''; diff --git a/home/brave/default.nix b/home/brave/default.nix new file mode 100644 index 0000000..3d43428 --- /dev/null +++ b/home/brave/default.nix @@ -0,0 +1,18 @@ +{ lib, inputs, config, pkgs, home, ... }: + +let + plib = import ../../lib { inherit pkgs; }; +in { + programs.chromium = { + enable = true; + package = lib.mkForce (plib.mkPackageWrapper + pkgs.brave + "export HOME=$HOME/.cache/brave" + "" + "--args --disable-frame-rate-limit" + ); + extensions = [ + { id = "ecnphlgnajanjnkcmbpancdjoidceilk"; } + ]; + }; +} diff --git a/home/elinks/default.nix b/home/elinks/default.nix index 7dbebf4..52f97d7 100644 --- a/home/elinks/default.nix +++ b/home/elinks/default.nix @@ -2,7 +2,7 @@ { home.packages = [ - (pkgs.callPackage ./elinks.nix {}) + pkgs.elinks ]; home.file = { diff --git a/home/elinks/elinks.nix b/home/elinks/elinks.nix deleted file mode 100644 index 9189bb8..0000000 --- a/home/elinks/elinks.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ lib, stdenv, fetchFromGitHub, ncurses, libX11, bzip2, zlib -, brotli, zstd, xz, openssl, autoreconfHook, gettext, pkg-config, libev -, gpm, libidn, tre, expat, luajit -}: - -stdenv.mkDerivation rec { - pname = "elinks"; - version = "0.17.0"; - - src = fetchFromGitHub { - owner = "rkd77"; - repo = "elinks"; - rev = "v${version}"; - hash = "sha256-JeUiMHAqSZxxBe8DplzmzHzsY6KqoBqba0y8GDwaR0Y="; - }; - - buildInputs = [ - ncurses libX11 bzip2 zlib brotli zstd xz - openssl libidn tre expat libev luajit - ] - ++ lib.optional stdenv.isLinux gpm - ; - - nativeBuildInputs = [ autoreconfHook gettext pkg-config ]; - - configureFlags = [ - "--enable-finger" - "--enable-html-highlight" - "--enable-gopher" - "--enable-gemini" - "--enable-cgi" - "--enable-bittorrent" - "--enable-nntp" - "--enable-256-colors" - "--enable-true-color" - "--with-brotli" - "--with-lzma" - "--with-libev" - "--with-terminfo" - ]; - - meta = with lib; { - description = "Full-featured text-mode web browser"; - homepage = "https://github.com/rkd77/elinks"; - license = licenses.gpl2; - platforms = with platforms; linux ++ darwin; - maintainers = with maintainers; [ iblech gebner ]; - }; -} diff --git a/home/x11-progs.nix b/home/x11-progs.nix index 6881777..a398988 100644 --- a/home/x11-progs.nix +++ b/home/x11-progs.nix @@ -12,12 +12,5 @@ in { pkgs.xwallpaper pkgs.xbrightness pkgs.xdotool - ] ++ [ - (plib.mkPackageWrapper - pkgs.brave - "export HOME=$HOME/.cache/brave" - "" - "--args --disable-frame-rate-limit" - ) ]; } diff --git a/home/x11.nix b/home/x11.nix index 206cc20..e2f2aba 100644 --- a/home/x11.nix +++ b/home/x11.nix @@ -3,6 +3,7 @@ { imports = [ ./bspwm + ./brave ./sx ./sxhkd ./tridactyl diff --git a/modules/common.nix b/modules/common.nix index 825e83f..042f8b5 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -7,7 +7,7 @@ environment.systemPackages = [ (pkgs.callPackage ../builds/rebuild.nix {}) - (pkgs.callPackage ../builds/st.nix {}) + (pkgs.callPackage ../builds/st.nix { lightMode = true; }) (pkgs.callPackage ../builds/utils.nix {}) (pkgs.callPackage ../builds/statusbar {}) pkgs.man-pages From 237f7c2691fbdc84bbc67de2e45c374cb7fe7c8a Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Sat, 15 Jun 2024 21:19:41 -0500 Subject: [PATCH 17/19] potpourri - add brave into home/, st has light mode, etc. --- modules/common.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/common.nix b/modules/common.nix index 042f8b5..dc3e8ac 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -7,7 +7,7 @@ environment.systemPackages = [ (pkgs.callPackage ../builds/rebuild.nix {}) - (pkgs.callPackage ../builds/st.nix { lightMode = true; }) + (pkgs.callPackage ../builds/st.nix { lightMode = false; }) (pkgs.callPackage ../builds/utils.nix {}) (pkgs.callPackage ../builds/statusbar {}) pkgs.man-pages From 53a9878e826dca42af747ce0e9a864e3ab25af12 Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Sat, 15 Jun 2024 21:39:05 -0500 Subject: [PATCH 18/19] refine the licensing situation --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 088a689..f3a8393 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,9 @@ things to do license ------- -all materials, except for: - a) `./home/wallpapers/pape.jpg`, which is of unknown licenses, and - b) ./builds/st, which is licensed under MIT, persuant to ./builds/st/LICENSE, -is licensed under the GPLv3. +all materials in this repository, except for: + +* `./home/wallpapers/pape.jpg`, which is of unknown license, and +* `./builds/st`, which is licensed under MIT, persuant to `./builds/st/LICENSE`, + +is (c) rndusr, randomuser, stupidcomputer, etc 2024 and licensed under the GPLv3 (see `./LICENSE`) From c1ff21e8771de8f5fa98d0b6c52e3d4b3b366d77 Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Sat, 15 Jun 2024 21:57:21 -0500 Subject: [PATCH 19/19] remove the rewrite rule in nginx --- boxes/netbox/default.nix | 8 -------- 1 file changed, 8 deletions(-) diff --git a/boxes/netbox/default.nix b/boxes/netbox/default.nix index 08982e1..2e38b45 100644 --- a/boxes/netbox/default.nix +++ b/boxes/netbox/default.nix @@ -194,14 +194,6 @@ forceSSL = true; enableACME = true; root = "/var/www/beepboop.systems"; - locations."/" = { - extraConfig = '' - if ($request_uri ~ ^/(.*)\.html(\?|$)) { - return 302 /$1; - } - try_files $uri $uri.html $uri/ =404; - ''; - }; }; services.nginx.virtualHosts."git.beepboop.systems" = {