changeset 2:a2c891f7b914

Occasional commit 2
author Yasuri <yasuri@charliesmp.net>
date Sat, 03 Oct 2026 18:53:08 -0500
parents f78c8a98f113
children 84d6074a5566
files config/dmenu/config.def.h config/dwm/config.def.h config/dwm/dwm.c config/dwm/dwm.c.orig config/picom/picom.conf config/st/config.def.h configuration.nix home.nix
diffstat 8 files changed, 181 insertions(+), 85 deletions(-) [+]
line wrap: on
line diff
--- a/config/dmenu/config.def.h	Fri Oct 02 18:58:29 2026 -0500
+++ b/config/dmenu/config.def.h	Sat Oct 03 18:53:08 2026 -0500
@@ -4,7 +4,7 @@
 static int topbar = 1;                      /* -b  option; if 0, dmenu appears at bottom     */
 /* -fn option overrides fonts[0]; default X11 font or font set */
 static const char *fonts[] = {
-	"monospace:size=10"
+	"Iosevka Nerd Font Propo:size=10"
 };
 static const char *prompt      = NULL;      /* -p  option; prompt to the left of input field */
 static const char *colors[SchemeLast][2] = {
--- a/config/dwm/config.def.h	Fri Oct 02 18:58:29 2026 -0500
+++ b/config/dwm/config.def.h	Sat Oct 03 18:53:08 2026 -0500
@@ -10,17 +10,18 @@
 static       int smartgaps          = 0;        /* 1 means no outer gap when there is only one window */
 static const int showbar            = 1;        /* 0 means no bar */
 static const int topbar             = 1;        /* 0 means bottom bar */
-static const char *fonts[]          = { "JetBrainsMono Nerd Font Propo:size=10" };
-static const char dmenufont[]       = "JetBrainsMono Nerd Font Propo:size=10";
-static const char col_gray1[] = "#0f1a12"; /* bar bg */
-static const char col_gray2[] = "#2e4234"; /* inactive border */
-static const char col_gray3[] = "#b9c7bd"; /* bar fg */
-static const char col_gray4[] = "#0f1a12"; /* selected fg */
-static const char col_cyan[]  = "#5fae2e"; /* selected bg and border */
+static const char *fonts[]          = { "Iosevka Nerd Font Propo:size=10" };
+static const char dmenufont[]       = "Iosevka Nerd Font Propo:size=10";
+static const char col_bg[]     = "#1d1b2a";
+static const char col_border[] = "#38364b";
+static const char col_fg[]     = "#9a9db8";
+static const char col_selfg[]  = "#dfdbec";
+static const char col_selbg[]  = "#526882";
+static const char col_selbrd[] = "#57708b";
 static const char *colors[][3] = {
-	/*               fg         bg         border   */
-	[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
-	[SchemeSel]  = { col_gray4, col_cyan,  col_cyan  },
+	/*               fg         bg         border     */
+	[SchemeNorm] = { col_fg,    col_bg,    col_border },
+	[SchemeSel]  = { col_selfg, col_selbg, col_selbrd },
 };
 
 /* tagging */
@@ -48,7 +49,7 @@
 
 static const Layout layouts[] = {
 	/* symbol     arrange function */
-	{ "[]=",      tile },    /* first entry is default */
+	{ "[F]",      NULL },    /* first entry is default */
 	{ "[M]",      monocle },
 	{ "[@]",      spiral },
 	{ "[\\]",     dwindle },
@@ -78,7 +79,12 @@
 
 /* commands */
 static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
-static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
+static const char *dmenucmd[] = {
+	"dmenu_run", "-m", dmenumon,
+	"-nb", col_bg, "-nf", col_fg,
+	"-sb", col_selbg, "-sf", col_selfg,
+	NULL
+};
 static const char *termcmd[]  = { "st", "-e", "tmux", NULL };
 
 static const Key keys[] = {
--- a/config/dwm/dwm.c	Fri Oct 02 18:58:29 2026 -0500
+++ b/config/dwm/dwm.c	Sat Oct 03 18:53:08 2026 -0500
@@ -145,6 +145,10 @@
 	int monitor;
 } Rule;
 
+typedef struct {
+	int x, y, w, h;
+} DwmLogo;
+
 /* function declarations */
 static void applyrules(Client *c);
 static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact);
@@ -245,6 +249,7 @@
 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 dwmlogowdth = 54; /* dwm logo width */
 static int (*xerrorxlib)(Display *, XErrorEvent *);
 static unsigned int numlockmask = 0;
 static void (*handler[LASTEvent]) (XEvent *) = {
@@ -437,6 +442,7 @@
 	}
 	if (ev->window == selmon->barwin) {
 		i = x = 0;
+		x = dwmlogowdth; /* dwm logo width */
 		do
 			x += TEXTW(tags[i]);
 		while (ev->x >= x && ++i < LENGTH(tags));
@@ -707,6 +713,7 @@
 drawbar(Monitor *m)
 {
 	int x, w, tw = 0;
+	int stroke = 4, letterHeight = bh - 4;
 	int boxs = drw->fonts->h / 9;
 	int boxw = drw->fonts->h / 6 + 2;
 	unsigned int i, occ = 0, urg = 0;
@@ -727,15 +734,36 @@
 		if (c->isurgent)
 			urg |= c->tags;
 	}
-	x = 0;
+
+	/* use colored scheme for visibility */
+	drw_setscheme(drw, scheme[SchemeNorm]);
+
+	/* draw dark background for logo */
+	drw_rect(drw, 0, 0, dwmlogowdth, bh, 1, 1);
+
+	/* draw dwm logo */
+	const DwmLogo dwmLogo[] = {
+		{  0,  9, stroke, letterHeight / 2 }, /* d: left vertical */
+		{  0, 15,     35, stroke           }, /* d: bottom horizontal */
+		{ 13,  1, stroke, letterHeight     }, /* d: right vertical */
+		{  0,  7,     15, stroke           }, /* d: top horizontal */
+		{ 22,  7, stroke, letterHeight / 2 }, /* w: center vertical */
+		{ 31,  7, stroke, letterHeight / 2 }, /* w: right vertical */
+		{ 31,  7,     22, stroke           }, /* m: top horizontal */
+		{ 40, 11, stroke, letterHeight / 2 }, /* m: center vertical */
+		{ 49, 11, stroke, letterHeight / 2 }  /* m: right vertical */
+	};
+
+	for (int i = 0; i < LENGTH(dwmLogo); i++) {
+		drw_rect(drw, dwmLogo[i].x, dwmLogo[i].y, dwmLogo[i].w, dwmLogo[i].h, 1, 0);
+	}
+
+	/* start drawing tags after logo */
+	x = dwmlogowdth;
 	for (i = 0; i < LENGTH(tags); i++) {
 		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);
-		if (occ & 1 << i)
-			drw_rect(drw, x + boxs, boxs, boxw, boxw,
-				m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
-				urg & 1 << i);
 		x += w;
 	}
 	w = TEXTW(m->ltsymbol);
--- a/config/dwm/dwm.c.orig	Fri Oct 02 18:58:29 2026 -0500
+++ b/config/dwm/dwm.c.orig	Sat Oct 03 18:53:08 2026 -0500
@@ -86,6 +86,7 @@
 struct Client {
 	char name[256];
 	float mina, maxa;
+	float cfact;
 	int x, y, w, h;
 	int oldx, oldy, oldw, oldh;
 	int basew, baseh, incw, inch, maxw, maxh, minw, minh, hintsvalid;
@@ -118,6 +119,10 @@
 	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];
@@ -200,6 +205,7 @@
 static void setfocus(Client *c);
 static void setfullscreen(Client *c, int fullscreen);
 static void setlayout(const Arg *arg);
+static void setcfact(const Arg *arg);
 static void setmfact(const Arg *arg);
 static void setup(void);
 static void seturgent(Client *c, int urg);
@@ -207,7 +213,6 @@
 static void spawn(const Arg *arg);
 static void tag(const Arg *arg);
 static void tagmon(const Arg *arg);
-static void tile(Monitor *m);
 static void togglebar(const Arg *arg);
 static void togglefloating(const Arg *arg);
 static void toggletag(const Arg *arg);
@@ -640,6 +645,10 @@
 	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);
@@ -1043,6 +1052,7 @@
 	c->w = c->oldw = wa->width;
 	c->h = c->oldh = wa->height;
 	c->oldbw = wa->border_width;
+	c->cfact = 1.0;
 
 	updatetitle(c);
 	if (XGetTransientForHint(dpy, w, &trans) && (t = wintoclient(trans))) {
@@ -1521,6 +1531,24 @@
 		drawbar(selmon);
 }
 
+void
+setcfact(const Arg *arg) {
+	float f;
+	Client *c;
+
+	c = selmon->sel;
+
+	if(!arg || !c || !selmon->lt[selmon->sellt]->arrange)
+		return;
+	f = arg->f + c->cfact;
+	if(arg->f == 0.0)
+		f = 1.0;
+	else if(f < 0.25 || f > 4.0)
+		return;
+	c->cfact = f;
+	arrange(selmon);
+}
+
 /* arg > 1.0 will set mfact absolutely */
 void
 setmfact(const Arg *arg)
@@ -1685,34 +1713,6 @@
 }
 
 void
-tile(Monitor *m)
-{
-	unsigned int i, n, h, mw, my, ty;
-	Client *c;
-
-	for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
-	if (n == 0)
-		return;
-
-	if (n > m->nmaster)
-		mw = m->nmaster ? m->ww * m->mfact : 0;
-	else
-		mw = m->ww;
-	for (i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
-		if (i < m->nmaster) {
-			h = (m->wh - my) / (MIN(n, m->nmaster) - i);
-			resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), 0);
-			if (my + HEIGHT(c) < m->wh)
-				my += HEIGHT(c);
-		} else {
-			h = (m->wh - ty) / (n - i);
-			resize(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), 0);
-			if (ty + HEIGHT(c) < m->wh)
-				ty += HEIGHT(c);
-		}
-}
-
-void
 togglebar(const Arg *arg)
 {
 	selmon->showbar = !selmon->showbar;
--- a/config/picom/picom.conf	Fri Oct 02 18:58:29 2026 -0500
+++ b/config/picom/picom.conf	Sat Oct 03 18:53:08 2026 -0500
@@ -3,3 +3,13 @@
     "80:class_g *= 'st-256color'"
 ];
 
+blur: {
+  method = "dual_kawase";
+  strength = 8;
+  deviation = 14;
+  kernel = "11x11gaussian";
+  background = true;
+  background-frame = true;
+  background-fixed = true;
+  kern = "3x3box";
+}
--- a/config/st/config.def.h	Fri Oct 02 18:58:29 2026 -0500
+++ b/config/st/config.def.h	Sat Oct 03 18:53:08 2026 -0500
@@ -5,7 +5,7 @@
  *
  * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
  */
-static char *font = "JetBrainsMono Nerd Font Mono:pixelsize=14:antialias=true:autohint=true";
+static char *font = "Iosevka Nerd Font Mono:pixelsize=16:antialias=true:autohint=true";
 static int borderpx = 2;
 
 /*
@@ -98,32 +98,32 @@
 
 static const char *colorname[] = {
 	/* 8 normal colors */
-	"#0f1a12", /* black */
-	"#b5533c", /* red, bark rust */
-	"#4f9a2f", /* green, moss */
-	"#c2b84a", /* yellow */
-	"#4a7f8f", /* blue, water shadow */
-	"#8a6f8f", /* magenta */
-	"#5fb09a", /* cyan */
-	"#c9d6cc", /* white, mist */
+	"#38364b", /* black   */
+	"#c27a8e", /* red     */
+	"#7fa39f", /* green   */
+	"#c4b08a", /* yellow  */
+	"#6f8fb5", /* blue    */
+	"#a597c9", /* magenta */
+	"#8cb8cc", /* cyan    */
+	"#dfdbec", /* white   */
 
 	/* 8 bright colors */
-	"#2e4234", /* bright black */
-	"#d9775c", /* bright red */
-	"#8fd14f", /* bright green, new leaves */
-	"#e0d878", /* bright yellow */
-	"#7fb3c4", /* bright blue */
-	"#b595b8", /* bright magenta */
-	"#8fdcc3", /* bright cyan */
-	"#eef4f0", /* bright white, rapids */
+	"#4a4e65",
+	"#d68fa2",
+	"#97bab5",
+	"#d6c4a0",
+	"#8aa9cc",
+	"#bcaedd",
+	"#a5cfe0",
+	"#f0edfa",
 
 	[255] = 0,
 
-	/* extra colors */
-	"#8fd14f", /* 256 cursor */
-	"#5fae2e", /* 257 reverse cursor */
-	"#c9d6cc", /* 258 default fg */
-	"#0f1a12", /* 259 default bg */
+	/* extended colors */
+	"#dfdbec", /* 256 cursor */
+	"#515d76", /* 257 reverse cursor */
+	"#dfdbec", /* 258 default fg */
+	"#1d1b2a", /* 259 default bg */
 };
 
 unsigned int defaultfg = 258;
--- a/configuration.nix	Fri Oct 02 18:58:29 2026 -0500
+++ b/configuration.nix	Sat Oct 03 18:53:08 2026 -0500
@@ -1,5 +1,4 @@
 { config, lib, pkgs, ... }:
-
 {
   imports =
     [ 
@@ -24,7 +23,12 @@
     autoRepeatDelay = 200;
     autoRepeatInterval = 35;
     displayManager.sessionCommands = ''
-	xwallpaper --zoom /home/ivy/wall.jpg
+    export XCURSOR_THEME=macOS
+    export XCURSOR_SIZE=24
+	xwallpaper --zoom /home/ivy/wall.png
+    ${pkgs.callPackage ./modules/dwmbar.nix { }}/bin/dwmbar &
+    xset r rate 200 35
+    xrdb -merge /home/ivy/.Xresources
    '';
     windowManager.dwm = {
 	enable = true;
@@ -34,6 +38,8 @@
    };
 };
 
+virtualisation.libvirtd.enable = true;
+programs.virt-manager.enable = true;
  services.picom.enable = true; 
 
   services.pipewire = {
@@ -52,7 +58,7 @@
 
   users.users.ivy = {
     isNormalUser = true;
-    extraGroups = [ "wheel" ]; 
+    extraGroups = [ "wheel" "libvirtd" ]; 
     shell = pkgs.zsh;
     packages = with pkgs; [
       tree
@@ -71,15 +77,42 @@
     maim
     slop
     mercurial
+    dnsmasq
   ];
 
   programs.zsh.enable = true;
   fonts.packages = with pkgs; [
     nerd-fonts.jetbrains-mono
+    nerd-fonts.iosevka
   ];
 
 
   nix.settings.experimental-features = [ "nix-command" "flakes" ];
+    # for linux phone dev
+  systemd.network.enable = true;
+
+  # stable name no matter which USB port you use
+  systemd.network.links."10-phone" = {
+    matchConfig.Driver = "cdc_ether";
+    linkConfig.Name = "phone0";
+  };
+
+  systemd.network.networks."10-phone" = {
+    matchConfig.Name = "phone0";
+    address = [ "172.16.42.2/24" ];
+    linkConfig.RequiredForOnline = "no";
+    # optional: share the laptop's internet with the phone over USB
+    networkConfig.IPMasquerade = "ipv4";
+  };
+
+  # keep NetworkManager's hands off it
+  networking.networkmanager.unmanaged = [ "interface-name:phone0" ];
+
+  # let the phone reach services on the laptop
+  networking.firewall.trustedInterfaces = [ "phone0" ];
+
+  # ssh root@phone
+  networking.hosts."172.16.42.1" = [ "phone" ];
 
 
  system.stateVersion = "26.05"; 
--- a/home.nix	Fri Oct 02 18:58:29 2026 -0500
+++ b/home.nix	Sat Oct 03 18:53:08 2026 -0500
@@ -14,12 +14,30 @@
      pkgs.vesktop
      pkgs.macchina
      pkgs.xclip
+     pkgs.btop
+     pkgs.libsForQt5.qtstyleplugin-kvantum 
+     (pkgs.callPackage ./modules/dwmbar.nix { })
+     pkgs.cmatrix
+     pkgs.cava
+     pkgs.lavat
     ];
     programs.librewolf.enable = true;
     home.stateVersion = "26.05";
     home.file.".config/alacritty".source = ./config/alacritty;
     home.file.".config/picom".source = ./config/picom;
-    programs.tmux = {
+    qt = {
+  enable = true;
+  platformTheme.name = "qtct";
+  style.name = "kvantum";
+  kvantum = {
+    themes = [ pkgs.rose-pine-kvantum ];
+    settings.General.theme = "rose-pine-iris";
+  };
+  qt5ctSettings.Appearance.style = "kvantum";
+  qt6ctSettings.Appearance.style = "kvantum";
+};
+
+programs.tmux = {
   enable = true;
   prefix = "C-Space";
   mouse = true;
@@ -48,20 +66,21 @@
 
     bind r source-file ~/.config/tmux/tmux.conf \; display "reloaded"
 
-    # palette: forest floor, moss, fern, mist
-    set -g status-style "bg=#0f1a10,fg=#cfe3cf"
+    # palette: near black, slate outline, store path blue
+    set -g status-style "bg=#131313,fg=#a9c7ee"
     set -g status-left-length 30
-    set -g status-left "#[bg=#7bc043,fg=#0f1a10,bold] #S #[default] "
-    set -g status-right "#[fg=#6b7a70]%a %b %d #[bg=#4f9d2d,fg=#0f1a10,bold] %H:%M "
-    set -g window-status-format "#[fg=#6b7a70] #I #W "
-    set -g window-status-current-format "#[bg=#2a3f2a,fg=#a5d63f,bold] #I #W "
-    set -g pane-border-style "fg=#2a3f2a"
-    set -g pane-active-border-style "fg=#7bc043"
-    set -g message-style "bg=#7bc043,fg=#0f1a10"
-    set -g mode-style "bg=#4f9d2d,fg=#0f1a10"
+    set -g status-left "#[bg=#5277c3,fg=#eef4ff,bold] #S #[default] "
+    set -g status-right "#[fg=#4a4a63]%a %b %d #[bg=#7ebae4,fg=#131313,bold] %H:%M "
+    set -g window-status-format "#[fg=#4a4a63] #I #W "
+    set -g window-status-current-format "#[bg=#222222,fg=#7ebae4,bold] #I #W "
+    set -g pane-border-style "fg=#363648"
+    set -g pane-active-border-style "fg=#5277c3"
+    set -g message-style "bg=#5277c3,fg=#eef4ff"
+    set -g mode-style "bg=#5277c3,fg=#eef4ff"
+
     bind -T copy-mode-vi v send -X begin-selection
-bind -T copy-mode-vi y send -X copy-pipe-and-cancel "xclip -selection clipboard -i"
-bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "xclip -selection clipboard -i"
+    bind -T copy-mode-vi y send -X copy-pipe-and-cancel "xclip -selection clipboard -i"
+    bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "xclip -selection clipboard -i"
   '';
 };
 }