Compare commits

..

24 commits

Author SHA1 Message Date
107aaa2f57
ruler: add keyword "timezone" 2025-12-14 11:31:51 +08:00
e94302a78d
packages/ruler: update 2025-12-14 11:30:34 +08:00
161a228bd5
networks: fix ordering and add new network 2025-12-13 21:40:39 +08:00
a1dd3560b7
Revert "vanadium: +duckstation"
This reverts commit a1524540e8.
2025-12-11 22:30:19 +08:00
a1524540e8
vanadium: +duckstation 2025-12-11 22:30:14 +08:00
8aecd18722
vanadium/xmonad: warp to window 2025-12-11 22:04:10 +08:00
214eaa957c
vanadium: enable hoogle 2025-12-11 09:54:44 +08:00
123faf4f0a
packages/ruler: hoogle 2025-12-11 08:52:30 +08:00
4adfabafa9
npins: update sources 2025-12-10 22:28:29 +08:00
8b15436a35
nvim/ruler: make comment hl-group recursive 2025-12-10 21:32:02 +08:00
45c4e95843
packages/ruler: update 2025-12-10 21:26:47 +08:00
95ed521889
vanadium/xmonad: magnifier default to off 2025-12-10 09:27:15 +08:00
a1177c3378
vanadium/xmonad: revert to (a better version of) tallr 2025-12-09 22:18:26 +08:00
0a0020a641
vanadium/xmonad: remove redundant import 2025-12-09 21:44:21 +08:00
aeadf11d99
home/zen-browser: remove border 2025-12-09 20:23:22 +08:00
1b6d0a63e1
vanadium/xmonad: make tab direction consistent across layouts 2025-12-09 20:14:29 +08:00
f27de9f059
vanadium/xmonad: rotate accordion 90 degrees 2025-12-09 15:28:20 +08:00
f525007c3d
vanadium: +foliate 2025-12-09 14:30:09 +08:00
f58cbc86ee
xmobar: update events 2025-12-09 10:34:59 +08:00
18201b4f47
vanadium/xmonad: switch back to tallr 2025-12-09 10:08:09 +08:00
1e63c7bb53
vanadium/xmonad: revamp layout algorithm
- Use threecol everywhere except
- chat and multimedia: use grid / accordion
2025-12-08 23:16:07 +08:00
18418415d1
tree-wide: set nixpkgs in NIX_PATH without flake
This prevents double fetch
2025-12-08 20:18:00 +08:00
076a4448e7
networks: implement bssid support 2025-12-07 16:01:51 +08:00
b66c63601f
nvim/ruler: make type a ruler keyword 2025-12-07 10:59:27 +08:00
14 changed files with 139 additions and 72 deletions

View file

@ -10,15 +10,19 @@ syn match rulerLineComment "--.*$"
syn match rulerTripleDot "\.\.\."
syn match rulerDate "\d\d\d\d\D\d\d\D\d\d \d\d\D\d\d\D\(\d\d\|__\)"
syn match rulerTag "\s\+[a-zA-Z]\+:[^\n]*"
syn match rulerImport "import"
syn keyword rulerImport import
syn keyword rulerType type
syn keyword rulerTimezone timezone
syn region rulerBlockComment start="{-" end="-}"
syn region rulerBlockComment start="{-" end="-}" contains=rulerBlockComment
hi def link rulerLineComment Comment
hi def link rulerBlockComment Comment
hi def link rulerTripleDot Comment
hi def link rulerDate Macro
hi def link rulerImport Keyword
hi def link rulerType Keyword
hi def link rulerTimezone Keyword
hi def link rulerTag @property
let b:current_syntax = "ruler"

View file

@ -31,6 +31,9 @@ in
# nixpkgs
#
{
# don't use `nixpkgs.flake.source`, it uses flake so it double fetches
nix.nixPath = [ "nixpkgs=${sources.nixpkgs}" ];
nixpkgs = {
overlays = map import [
../packages/overlay.nix
@ -39,10 +42,6 @@ in
../overlays/lix.nix
../overlays/nix-monitored.nix
];
# Set NIX_PATH and flake registry at the same time
# https://github.com/NixOS/nixpkgs/pull/254405
flake.source = sources.nixpkgs;
};
nix.package = pkgs.nix-monitored;

View file

@ -34,6 +34,9 @@ in
# nixpkgs
#
{
# don't use `nixpkgs.flake.source`, it uses flake so it double fetches
nix.nixPath = [ "nixpkgs=${sources.nixpkgs}" ];
nixpkgs = {
overlays = map import [
../overlays/agenix.nix
@ -45,10 +48,6 @@ in
../overlays/lix.nix
../overlays/nix-monitored.nix
];
# Set NIX_PATH and flake registry at the same time
# https://github.com/NixOS/nixpkgs/pull/254405
flake.source = sources.nixpkgs;
};
nix.package = pkgs.nix-monitored;

View file

@ -35,6 +35,9 @@ in
nix = {
distributedBuilds = true;
settings.builders-use-substitutes = true;
# don't use `nixpkgs.flake.source`, it uses flake so it double fetches
nixPath = [ "nixpkgs=${sources.nixpkgs}" ];
};
nixpkgs = {
@ -70,10 +73,6 @@ in
../overlays/lix.nix
../overlays/nix-monitored.nix
];
# Set NIX_PATH and flake registry at the same time
# https://github.com/NixOS/nixpkgs/pull/254405
flake.source = sources.nixpkgs;
};
nix.package = pkgs.nix-monitored;

View file

@ -85,6 +85,7 @@
pkgs.evolution
pkgs.libreoffice
pkgs.calibre
pkgs.foliate # TODO: replace calibre with foliate
# pkgs.rawtherapee
pkgs.digikam
pkgs.gimp

View file

@ -73,9 +73,10 @@ config =
, "--target", "2025-10-31=dragon book"
, "--target", "2025-11-19=scalpel"
, "--target", "2025-11-29=à deux"
, "--target", "2025-12-16=dragon book"
-- , "--target", "2025-12-15=campus baguette"
-- , "--target", "2025-12-16=dragon book"
, "--target", "2025-12-18=baguette"
, "--target", "2025-12-30=seule"
, "--target", "2025-12-15=campus baguette"
, "--target", "2026-02-02=monmaster"
, "--target", "2026-02-22=dernier appel"
]

View file

@ -1,9 +1,11 @@
{-# LANGUAGE NegativeLiterals #-}
{-# OPTIONS_GHC -Wno-missing-signatures #-} -- my layout is getting crazy
import XMonad
import XMonad.Actions.CopyWindow
import XMonad.Actions.Submap
import XMonad.Actions.SwapWorkspaces
import XMonad.Actions.Warp
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.InsertPosition
@ -13,18 +15,22 @@ import XMonad.Hooks.OnPropertyChange
import XMonad.Hooks.RefocusLast
import XMonad.Hooks.StatusBar
import XMonad.Layout.FocusTracking
import XMonad.Layout.IfMax
import XMonad.Layout.Magnifier hiding (Toggle)
import qualified XMonad.Layout.Magnifier as Mag
import XMonad.Layout.NoBorders
import XMonad.Layout.PerWorkspace
import XMonad.Layout.Reflect
import XMonad.Layout.Reflect.Message
import XMonad.Layout.Renamed
import XMonad.Layout.ResizableTile
import XMonad.Layout.Spacing
import XMonad.Layout.ToggleLayouts
import qualified XMonad.StackSet as W
import XMonad.Util.EZConfig
import XMonad.Util.Hacks
import XMonad.Util.NamedScratchpad
import XMonad.Util.SpawnOnce
import XMonad.Layout.Magnifier
import Data.Char.Greek
import Data.Ratio
@ -62,14 +68,28 @@ main =
`additionalKeys` keybinds
myLayout =
let tallr = renamed [ Replace "Tall" ]
$ smartSpacingWithEdge 5
$ reflectMsg . reflectHoriz
$ ResizableTall 1 (1/10) (3/7) []
mag = magnifyxy 1.05 1.3 (NoMaster 3) False
in avoidStruts
avoidStruts
$ smartBorders
$ mag tallr ||| focusTracking Full
$ onWorkspace researchWS (toggleLayouts (mag tallr) full)
$ onWorkspace chatWS (toggleLayouts (mag tallr) full)
$ onWorkspace multimediaWS (toggleLayouts (mag tallr) full)
$ toggleLayouts (mag tallr) full
where
mag = magnifierOff
full = focusTracking Full
mkTallrN n =
smartSpacingWithEdge 5
$ reflectMsg . reflectHoriz
$ ResizableTall n (1/10) (3/7) []
tallr =
renamed [ Replace "Tall" ]
$ ifMax 3 (mkTallrN 1)
$ ifMax 5 (mkTallrN 2)
$ ifMax 7 (mkTallrN 3)
$ mkTallrN 4
isSioyek :: Query Bool
isSioyek = className =? "sioyek"
@ -264,17 +284,13 @@ keybinds =
, ((0, xF86XK_AudioPlay), spawn "playerctl play-pause")
, ((0, xF86XK_AudioNext), spawn "playerctl next" )
-- Toggle fullscreen
, ((superMask, xK_Escape), sendMessage NextLayout)
-- Resize windows
, ((superMask, xK_equal ), sendMessage $ IncMasterN 1)
, ((superMask, xK_minus ), sendMessage $ IncMasterN -1)
, ((superMask, xK_comma ), sendMessage Shrink )
, ((superMask, xK_period ), sendMessage Expand )
, ((superMask .|. shiftMask, xK_comma ), sendMessage MirrorShrink )
, ((superMask .|. shiftMask, xK_period), sendMessage MirrorExpand )
, ((superMask , xK_apostrophe), sendMessage Toggle )
, ((superMask , xK_apostrophe), sendMessage Mag.Toggle )
, ((superMask , xK_space ), sendMessage ToggleLayout )
-- [D]o sink and lift
, ( (superMask, xK_d)
@ -285,6 +301,19 @@ keybinds =
)
]
-- We override default focus shifting bindings to warp the cursor to the center of the new window.
-- This is especially useful because mag doesn't work well with focusFollowsMouse.
-- The order is important: focus shift, and then warp the cursor
--
-- Warp when focus shifts by binding, not by mouse (otherwise it's annoying)
++ (let warp = warpToWindow 0.5 0.5
in [ ((superMask, xK_Tab ), windows W.focusDown >> warp)
, ((superMask .|. shiftMask, xK_Tab ), windows W.focusUp >> warp)
, ((superMask, xK_j ), windows W.focusDown >> warp)
, ((superMask, xK_k ), windows W.focusUp >> warp)
]
)
-- Screenshots
++ (let fullscreen = "maim -u | xclip -in -selection clipboard -t image/png"
withSelection = "maim -u -s -b 5 -o | xclip -in -selection clipboard -t image/png"
@ -343,12 +372,15 @@ altMask = mod1Mask
myWorkspaces :: [WorkspaceId]
myWorkspaces = map (:[]) $ take 8 greekLower
multimediaWS :: WorkspaceId
multimediaWS = myWorkspaces !! 6
researchWS :: WorkspaceId
researchWS = myWorkspaces !! 2
chatWS :: WorkspaceId
chatWS = myWorkspaces !! 3
multimediaWS :: WorkspaceId
multimediaWS = myWorkspaces !! 6
centeredFloat, smallFloat, fullFloat, buttomRightFloat :: W.RationalRect
centeredFloat = W.RationalRect (1%9) (1%9) (7%9) (7%9)
smallFloat = W.RationalRect (3%5) (3%5) (2%7) (2%7)

View file

@ -78,4 +78,15 @@
'';
};
};
services.hoogle = {
enable = true;
packages =
haskellPackages: with haskellPackages; [
optparse-applicative
megaparsec
tasty-golden
tree-diff
];
};
}

View file

@ -59,6 +59,9 @@ in
# diff .zen/default/prefs.js{.bk,}
profiles.default = {
settings = {
# Zen specific
"zen.theme.content-element-separation" = 0; # Remove "borders" around window
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"browser.tabs.loadInBackground" = true;
"browser.ctrlTab.sortByRecentlyUsed" = false;

View file

@ -6,6 +6,7 @@ in
[
{
ssid = "~";
bssid = "de:ad:de:ad:d0:d0"; # dead dead dodo
priority = preferredPriority;
hasPassword = true;
}
@ -80,6 +81,13 @@ in
hasPassword = true;
randomizeMac = true;
}
{
ssid = "LouisaCoffee";
bssid = "fa:92:bf:62:7c:19";
priority = privatePriority;
hasPassword = true;
randomizeMac = true;
}
{
ssid = "MetroTaipei x Louisa"; # 大安
priority = privatePriority;

View file

@ -13,6 +13,7 @@ let
go =
networkArgs@{
ssid,
bssid ? null,
# Custom fields wrapping nixpkgs module options
hasPassword ? false,
scanOnLowSignal ? false,
@ -20,16 +21,23 @@ let
...
}:
{
${ssid} = lib.mkMerge [
${
# We use a unique key here to make sure no "same ssid different bssid" networks collide in key.
# This is ordered, we still show "null" so that it would come after hex characters [a-z0-9].
# The serialization is based on string order.
"${ssid},${if bssid != null then bssid else "null"}"
} =
lib.mkMerge [
(builtins.removeAttrs networkArgs [
# We keep ssid, because it overrides the attrset name ssid
# "ssid"
"hasPassword"
"scanOnLowSignal"
"randomizeMac"
])
(lib.optionalAttrs hasPassword {
pskRaw = "ext:${escapePwdKey ssid}";
pskRaw = "ext:${
# this implies changing the external password key if you set a bssid!
escapePwdKey (if bssid == null then ssid else "${ssid},${bssid}")
}";
})
{
extraConfig = ''

View file

@ -1,3 +1,5 @@
# Use the following to start a hoogle server for the project
# nix-shell -E 'with import ./. {}; packages.ruler.envFunc{withHoogle = true;}' --run "hoogle server --local"
{
haskellPackages,
haskell,
@ -11,8 +13,8 @@ let
domain = "git.confusedcompiler.org";
owner = "leana8959";
repo = "ruler";
rev = "2556b4985065d093b1db3a14a2c5c37115871c78";
hash = "sha256-OvNhDpyAbZp+d0rSXLE55BvM5jT3OI8q79D6aVaA2FI=";
rev = "72069c79bd6540fb9a1ee941fa2502edd6853af8";
hash = "sha256-UQYx1WoWxASnWINtlTE2zMrADBketo/bgo5aud5j8Og=";
}) { };
cabalOverrides = o: {

Binary file not shown.

View file

@ -114,9 +114,9 @@
},
"branch": "release-25.11",
"submodules": false,
"revision": "3fdd076e08049a9c7a83149b270440d9787d2df5",
"url": "https://github.com/nix-community/home-manager/archive/3fdd076e08049a9c7a83149b270440d9787d2df5.tar.gz",
"hash": "07k47xnkzha7ilcyak57wrh2ngka2j4f0d95zyyxn8jz8195q2q6"
"revision": "20561be440a11ec57a89715480717baf19fe6343",
"url": "https://github.com/nix-community/home-manager/archive/20561be440a11ec57a89715480717baf19fe6343.tar.gz",
"hash": "1n2l891p04y3xmd0sl5i3553ndgpxkinysg1bf8iiixmxhcm7i9v"
},
"infuse": {
"type": "GitRelease",
@ -144,9 +144,9 @@
},
"branch": "main",
"submodules": false,
"revision": "01e573c9e31ba3be7eaa848ba7dfcbd04260163e",
"url": "https://github.com/oxalica/nil/archive/01e573c9e31ba3be7eaa848ba7dfcbd04260163e.tar.gz",
"hash": "0j8dix0a29lmszpl0gpv9whrhigs9bj4s2is3rsdwqc6gviqsq92"
"revision": "504599f7e555a249d6754698473124018b80d121",
"url": "https://github.com/oxalica/nil/archive/504599f7e555a249d6754698473124018b80d121.tar.gz",
"hash": "1mzx60999jciq2ax1l5ajmks6fb3cmjavn7fsyh4aysvcdgzrj6p"
},
"nix-monitored": {
"type": "Git",
@ -173,10 +173,10 @@
"version_upper_bound": null,
"release_prefix": null,
"submodules": false,
"version": "v0.6.3",
"revision": "477021a0f5b2fce11cb73dde9ecce49094f56db0",
"url": "https://api.github.com/repos/utdemir/nix-tree/tarball/v0.6.3",
"hash": "1hzss0sqxhyjp1f8v1p2sqv1636943brwl2x0vn2f851xbb6kgz7"
"version": "v0.8.0",
"revision": "e7ef6623cf944b80e48196d74c6531dd79943652",
"url": "https://api.github.com/repos/utdemir/nix-tree/tarball/v0.8.0",
"hash": "1ag68xnszianrfinm56mf9bhvm0pglvnmlyffjr1pxrkji8d52nc"
},
"nixos-hardware": {
"type": "Git",
@ -200,9 +200,9 @@
},
"branch": "nixos-25.11-small",
"submodules": false,
"revision": "e9f8538978f954bed00f6535b764e7932dbc3eea",
"url": "https://github.com/nixos/nixpkgs/archive/e9f8538978f954bed00f6535b764e7932dbc3eea.tar.gz",
"hash": "07wdninn693v06jz537pn1d257idi7p3dqh1mvygsb2zf6y4hypm"
"revision": "1acf2f172ef3d6e31c9913ccb7ba07b13dadfedc",
"url": "https://github.com/nixos/nixpkgs/archive/1acf2f172ef3d6e31c9913ccb7ba07b13dadfedc.tar.gz",
"hash": "1hhjz7jx0n0i2mxq9d3yvqvlmrwjklq1ljcfzpmnzyfhrixqg9y5"
},
"nur": {
"type": "Git",
@ -213,9 +213,9 @@
},
"branch": "main",
"submodules": false,
"revision": "cdeb308c4faaa430f951e81db2360cebb54feb58",
"url": "https://github.com/nix-community/nur/archive/cdeb308c4faaa430f951e81db2360cebb54feb58.tar.gz",
"hash": "1jjsgmg3maqkrncwc3fn7iqcsi88fjvfzkpchcc1iwih65kr91il"
"revision": "e7844e0f24c76b6137e16ab95c9a7c275acf2fbb",
"url": "https://github.com/nix-community/nur/archive/e7844e0f24c76b6137e16ab95c9a7c275acf2fbb.tar.gz",
"hash": "10bz6b1j2d5z257xv8bjwdr1636f807f2gr24yaswxr55a7wdyk9"
},
"pin-emacs28": {
"type": "Git",
@ -378,9 +378,9 @@
},
"branch": "main",
"submodules": false,
"revision": "8c9284cc227a5c7cd8f1e1fa7a6882b0907187c8",
"url": "https://github.com/0xc000022070/zen-browser-flake/archive/8c9284cc227a5c7cd8f1e1fa7a6882b0907187c8.tar.gz",
"hash": "1k0bxn3c9bsm5543wsijv6r73jb8c1a4pzcwqh7rjpn67n988hj2"
"revision": "1adab25828578301037855c59849e9bbecf8948b",
"url": "https://github.com/0xc000022070/zen-browser-flake/archive/1adab25828578301037855c59849e9bbecf8948b.tar.gz",
"hash": "091sdxgqxcmxh15w9b65bv29fw0cgg0mfpl3d1ymsv1510lq30a6"
}
},
"version": 5