summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Sima <ben@bensima.com>2025-12-22 13:31:18 -0500
committerBen Sima <ben@bensima.com>2025-12-22 13:31:18 -0500
commit8d9eb8fa8a20efa4c4318fccef97d21fe91fb092 (patch)
treedfe4a94d2c20653a1b97add68d96ebf5a2856317 /lib
parentf8d26da7c054c0a4c89ab12993e00f74ea9260a1 (diff)
Switch to kitty terminal with ef-dream theme, emoji support
- Replace urxvt with kitty as default terminal - Add ef-dream inspired color scheme to kitty - Configure emoji font fallback with Noto Color Emoji - Update xmonad.hs to use kitty for terminal and scratchpads - Fix cmdtree to fetch from GitHub instead of broken git://jb55.com - Remove urxvt.nix and alacritty config - Add AGENTS.md for agentic coding tools
Diffstat (limited to 'lib')
-rw-r--r--lib/calendars.nix55
-rw-r--r--lib/cfg.def.h4
-rw-r--r--lib/linux.nix47
-rw-r--r--lib/packages.nix6
-rw-r--r--lib/urxvt.nix30
-rw-r--r--lib/xmonad.hs40
6 files changed, 128 insertions, 54 deletions
diff --git a/lib/calendars.nix b/lib/calendars.nix
index 265ee20..c2e9385 100644
--- a/lib/calendars.nix
+++ b/lib/calendars.nix
@@ -9,6 +9,7 @@ let
ben-shared = "ben";
kate = "0962a74ab76a97543b485d2a583caa271042baab9d64437ae6c3bc8a50df1f08";
training = "eb5dfe0a-0e60-b7e5-eb7a-3b980b50b195";
+ parasail = "ben.sima@parasail.io";
};
getCals = ls: lib.attrsets.attrVals ls calendars;
@@ -80,6 +81,23 @@ in {
vdirsyncer = common.vdirsyncer // {collections = getCals ["kate"];};
khal = common.khal // {color = "#FAA0A0";};
};
+
+ # Parasail Google Calendar - syncs to local for khal viewing
+ # and for reverse sync to ben-shared
+ "parasail" = {
+ remote = {
+ type = "google_calendar";
+ };
+ vdirsyncer = common.vdirsyncer // {
+ auth = null;
+ collections = getCals ["parasail"];
+ itemTypes = ["VEVENT"];
+ tokenFile = "${config.xdg.dataHome}/vdirsyncer/parasail.token";
+ clientIdCommand = ["${pkgs.pass}/bin/pass" "parasail/calendar-client-id"];
+ clientSecretCommand = ["${pkgs.pass}/bin/pass" "parasail/calendar-client-secret"];
+ };
+ khal = common.khal // {color = "#4285F4";};
+ };
};
programs.khal = {
@@ -116,5 +134,42 @@ in {
b = "calendar_bensima_scheduling_remote"
collections = [${pair "a_to_b" ["ben-shared" "scheduling"]}]
conflict_resolution = "a wins"
+
+ # One-way sync: ben-shared → parasail Google Calendar
+ # Uses patched vdirsyncer that skips NotFoundError for missing items
+ # (works around Google CalDAV bug with recurring events)
+ [storage calendar_shared_readonly]
+ type = "filesystem"
+ path = "${config.home.homeDirectory}/Calendars/bensima_shared"
+ fileext = ".ics"
+ read_only = true
+
+ [storage calendar_parasail_remote_direct]
+ type = "google_calendar"
+ token_file = "${config.xdg.dataHome}/vdirsyncer/parasail.token"
+ client_id.fetch = ["command", "${pkgs.pass}/bin/pass", "parasail/calendar-client-id"]
+ client_secret.fetch = ["command", "${pkgs.pass}/bin/pass", "parasail/calendar-client-secret"]
+ item_types = ["VEVENT"]
+
+ [pair shared_to_parasail]
+ a = "calendar_shared_readonly"
+ b = "calendar_parasail_remote_direct"
+ collections = [["ben_to_parasail", "ben", "ben.sima@parasail.io"]]
+ conflict_resolution = "a wins"
+ partial_sync = "ignore"
+
+ # Reverse sync: parasail → ben-shared (so wife sees work busy times)
+ [storage calendar_parasail_local_readonly]
+ type = "filesystem"
+ path = "${config.home.homeDirectory}/Calendars/parasail"
+ fileext = ".ics"
+ read_only = true
+
+ [pair parasail_to_shared]
+ a = "calendar_parasail_local_readonly"
+ b = "calendar_bensima_shared_remote"
+ collections = [["parasail_to_ben", "ben.sima@parasail.io", "ben"]]
+ conflict_resolution = "a wins"
+ partial_sync = "ignore"
'';
}
diff --git a/lib/cfg.def.h b/lib/cfg.def.h
index ce585ff..7e86df5 100644
--- a/lib/cfg.def.h
+++ b/lib/cfg.def.h
@@ -52,11 +52,11 @@ static struct command mumble[] = {
static struct command apps[] = {
DEFCMD ("f", "firefox" , "firefox")
- DEFCMD ("h", "htop" , "urxvt htop")
+ DEFCMD ("h", "htop" , "kitty -e htop")
// DEFCMD ("k", "keybase" , "keybase-gui")
DEFPREFIX ("m", "mumble" , mumble)
DEFCMD ("n", "nautilus" , "nautilus")
- DEFCMD ("r", "ranger" , "urxvt ranger")
+ DEFCMD ("r", "ranger" , "kitty -e ranger")
DEFCMD ("t", "telegram" , "telegram-desktop")
DEFCMD ("q", "qutebrowser", "qutebrowser")
};
diff --git a/lib/linux.nix b/lib/linux.nix
index d4568c4..fb9eddf 100644
--- a/lib/linux.nix
+++ b/lib/linux.nix
@@ -93,6 +93,8 @@ in
#catppuccin.enable = true;
fonts.fontconfig.enable = true;
+ fonts.fontconfig.defaultFonts.emoji = [ "Noto Color Emoji" ];
+ fonts.fontconfig.defaultFonts.monospace = [ "Fira Code" "Noto Color Emoji" ];
gtk.enable = false; # this fails because of some missing service file
gtk.font.name = "Fira Sans";
@@ -213,6 +215,51 @@ in
programs = {
git.signing.signByDefault = true;
+ kitty = {
+ enable = true;
+ font = {
+ name = "Fira Code";
+ size = 14;
+ };
+ settings = {
+ background_opacity = "0.95";
+ symbol_map = "U+1F600-U+1F64F,U+1F300-U+1F5FF,U+1F680-U+1F6FF,U+1F1E0-U+1F1FF,U+2600-U+26FF,U+2700-U+27BF,U+1F900-U+1F9FF,U+1FA00-U+1FA6F,U+1FA70-U+1FAFF,U+231A-U+231B,U+23E9-U+23F3,U+23F8-U+23FA,U+25AA-U+25AB,U+25B6,U+25C0,U+25FB-U+25FE,U+2614-U+2615,U+2648-U+2653,U+267F,U+2693,U+26A1,U+26AA-U+26AB,U+26BD-U+26BE,U+26C4-U+26C5,U+26CE,U+26D4,U+26EA,U+26F2-U+26F3,U+26F5,U+26FA,U+26FD,U+2702,U+2705,U+2708-U+270D,U+270F Noto Color Emoji";
+
+ # ef-dream inspired colors
+ foreground = "#efd5c5";
+ background = "#232025";
+ cursor = "#f3c09a";
+ cursor_text_color = "#232025";
+ selection_foreground = "#232025";
+ selection_background = "#d0b0ff";
+
+ # black
+ color0 = "#232025";
+ color8 = "#5b595e";
+ # red
+ color1 = "#ff6f6f";
+ color9 = "#ff7a5f";
+ # green
+ color2 = "#51b04f";
+ color10 = "#7fce5f";
+ # yellow
+ color3 = "#c0b24f";
+ color11 = "#d09950";
+ # blue
+ color4 = "#57b0ff";
+ color12 = "#80aadf";
+ # magenta
+ color5 = "#ffaacf";
+ color13 = "#d0b0ff";
+ # cyan
+ color6 = "#6fb3c0";
+ color14 = "#8fcfd0";
+ # white
+ color7 = "#efd5c5";
+ color15 = "#f3c09a";
+ };
+ };
+
firefox = {
enable = true;
package =
diff --git a/lib/packages.nix b/lib/packages.nix
index 7ebd519..8c20c2c 100644
--- a/lib/packages.nix
+++ b/lib/packages.nix
@@ -46,11 +46,11 @@ in {
asciinema
aspellDicts.en
bat
- barrier
bc
cava
chafa
cloc
+ deskflow
direnv
entr
eternal-terminal
@@ -60,7 +60,7 @@ in {
file
fira-code
fira-code-symbols
- fira-code-nerdfont
+ #fira-code-nerdfont
font-awesome_5
forgit
gcal
@@ -80,7 +80,7 @@ in {
ncdu
nmap
ncmpc
- nerdfonts
+ #nerdfonts
nix-index
nix-prefetch-scripts
nixos-generators
diff --git a/lib/urxvt.nix b/lib/urxvt.nix
deleted file mode 100644
index a25bc68..0000000
--- a/lib/urxvt.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ ... }:
-let
- inherit (import ./const.nix) fontSize;
- #fontSize = 10;
- #font = name: size: "xft:${name}:size=${toString size}:ant";
-
- # why doesn't font size work right? It is always either too large or too
- # small... what if I just don't set font size?
- # ->
- font = name: size: "xft:${name}:ant";
-in {
- programs.urxvt = {
- enable = true;
- fonts = [
- (font "Fira Code" fontSize)
- (font "FiraCodeNerdfont" fontSize)
- "xft:Noto Emoji"
- ];
- #keybindings = {
- # # why don't any of these work?
- # "Shift-Control-C" = "eval:selection_to_clipboard";
- # "Shift-Control-V" = "eval:paste_clipboard";
- # "Shift-Control-+" = "command:\033]710;${font 12}\007\033]711;${font 12}\007";
- # "Shift-Control--" = "command:\033]710;${font 8}\007\033]711;${font 8}\007";
- #};
- iso14755 = true; # unicode chars
- #transparent = true;
- #shading = 10;
- };
-}
diff --git a/lib/xmonad.hs b/lib/xmonad.hs
index e58ab09..b008119 100644
--- a/lib/xmonad.hs
+++ b/lib/xmonad.hs
@@ -22,17 +22,21 @@ import Data.List (intercalate, isPrefixOf)
import Graphics.X11.ExtraTypes.XF86
import XMonad
import XMonad.Actions.CopyWindow
+import XMonad.Actions.GridSelect
import XMonad.Actions.WindowBringer (gotoMenu, bringMenu)
import XMonad.Actions.UpdatePointer (updatePointer)
import XMonad.Config
import XMonad.Config.Desktop
import XMonad.Hooks.EwmhDesktops (ewmh)
+import XMonad.Hooks.FadeInactive
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers (doFullFloat, isFullscreen)
+import XMonad.Layout.Accordion
import XMonad.Layout.BinarySpacePartition
import XMonad.Layout.Dwindle as Dwindle
import XMonad.Layout.LayoutModifier
import XMonad.Layout.NoBorders
+import XMonad.Layout.PerScreen
import XMonad.Layout.ResizableTile
import XMonad.Layout.Spacing
import XMonad.Layout.Spiral
@@ -95,18 +99,14 @@ scratchHook = namedScratchpadManageHook scratchpads --
myManageHook = manageDocks <+> scratchHook <+> (shouldFloat --> doFullFloat) <+> manageHook def
--- todo: use urxvtc with daemon
-termName = "/home/ben/.nix-profile/bin/urxvt"
+termName = "kitty"
centerFloat = customFloating (W.RationalRect 0.125 0.125 0.75 0.75)
scratchpads = [
- -- run htop in xterm, find it by title
- NS "htop" "urxvt -e htop" (title =? "htop") centerFloat,
- NS "gotop" "urxvt -e gotop" (title =? "gotop") centerFloat,
-
- NS "nvtop" "urxvt -e nvtop" (title =? "nvtop") centerFloat,
-
+ NS "htop" "kitty -e htop" (title =? "htop") centerFloat,
+ NS "gotop" "kitty -e gotop" (title =? "gotop") centerFloat,
+ NS "nvtop" "kitty -e nvtop" (title =? "nvtop") centerFloat,
NS "pwvucontrol" "pwvucontrol" (className =? "Pwvucontrol") centerFloat
]
@@ -119,6 +119,8 @@ insKeys conf@(XConfig {modMask = modMask}) =
((modMask, xK_n), spawn "rofi -sidebar-mode -show window"),
((modMask, xK_u), spawn "rofi -show calc -modi calc -no-show-match -no-sort"),
+ ((modMask, xK_g), goToSelected def),
+
-- scratchpads
((meh, xK_h), namedScratchpadAction scratchpads "htop"),
((meh, xK_n), namedScratchpadAction scratchpads "nvtop"),
@@ -187,19 +189,19 @@ myTabCfg theme =
myLayout theme =
avoidStruts $
- noBorders (tabbed shrinkText $ myTabCfg theme)
- ||| (addSpace $ noBorders Full)
+ ifWider 2160 wideLayouts tallLayouts
+ where
+ wideLayouts =
+ (addSpace $ noBorders (tabbed shrinkText $ myTabCfg theme))
||| twopane
- ||| Mirror twopane
- ||| ThreeCol 1 (3 / 100) (1 / 2)
- ||| ThreeColMid 1 (3 / 100) (1 / 2)
+ ||| (addSpace $ ThreeCol 1 (3 / 100) (1 / 3))
||| tiled
+-- ||| emptyBSP
+ tallLayouts =
+ (addSpace $ noBorders (tabbed shrinkText $ myTabCfg theme))
+ ||| addSpace Accordion
+ ||| Mirror twopane
||| Mirror tiled
- ||| emptyBSP
- where
- -- ||| goldenSpiral
- -- ||| Spiral R Dwindle.CW (3 / 2) (11 / 10) -- L/R is where to put non-main windows
-
-- The last parameter is fraction to multiply the slave window heights
-- with. Useless here.
tiled = addSpace $ ResizableTall nmaster delta ratio []
@@ -225,7 +227,7 @@ myConf theme = additionalKeys cfg (insKeys cfg)
layoutHook = myLayout theme,
terminal = termName,
workspaces = myWorkspaces,
- logHook = updatePointer (0.5,0.5) (0,0)
+ logHook = updatePointer (0.5,0.5) (0,0) >> fadeInactiveLogHook 0.8
}
main :: IO ()