Compare commits

..

No commits in common. "107aaa2f57e98f6c8f5515b1e547f5cca208cb54" and "9fd52db5bbe0660ffc0cec22100b96cd2990c267" have entirely different histories.

14 changed files with 72 additions and 139 deletions

View file

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

View file

@ -31,9 +31,6 @@ in
# nixpkgs # nixpkgs
# #
{ {
# don't use `nixpkgs.flake.source`, it uses flake so it double fetches
nix.nixPath = [ "nixpkgs=${sources.nixpkgs}" ];
nixpkgs = { nixpkgs = {
overlays = map import [ overlays = map import [
../packages/overlay.nix ../packages/overlay.nix
@ -42,6 +39,10 @@ in
../overlays/lix.nix ../overlays/lix.nix
../overlays/nix-monitored.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; nix.package = pkgs.nix-monitored;

View file

@ -34,9 +34,6 @@ in
# nixpkgs # nixpkgs
# #
{ {
# don't use `nixpkgs.flake.source`, it uses flake so it double fetches
nix.nixPath = [ "nixpkgs=${sources.nixpkgs}" ];
nixpkgs = { nixpkgs = {
overlays = map import [ overlays = map import [
../overlays/agenix.nix ../overlays/agenix.nix
@ -48,6 +45,10 @@ in
../overlays/lix.nix ../overlays/lix.nix
../overlays/nix-monitored.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; nix.package = pkgs.nix-monitored;

View file

@ -35,9 +35,6 @@ in
nix = { nix = {
distributedBuilds = true; distributedBuilds = true;
settings.builders-use-substitutes = true; settings.builders-use-substitutes = true;
# don't use `nixpkgs.flake.source`, it uses flake so it double fetches
nixPath = [ "nixpkgs=${sources.nixpkgs}" ];
}; };
nixpkgs = { nixpkgs = {
@ -73,6 +70,10 @@ in
../overlays/lix.nix ../overlays/lix.nix
../overlays/nix-monitored.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; nix.package = pkgs.nix-monitored;

View file

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

View file

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

View file

@ -1,11 +1,9 @@
{-# LANGUAGE NegativeLiterals #-} {-# LANGUAGE NegativeLiterals #-}
{-# OPTIONS_GHC -Wno-missing-signatures #-} -- my layout is getting crazy
import XMonad import XMonad
import XMonad.Actions.CopyWindow import XMonad.Actions.CopyWindow
import XMonad.Actions.Submap import XMonad.Actions.Submap
import XMonad.Actions.SwapWorkspaces import XMonad.Actions.SwapWorkspaces
import XMonad.Actions.Warp
import XMonad.Hooks.DynamicLog import XMonad.Hooks.DynamicLog
import XMonad.Hooks.EwmhDesktops import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.InsertPosition import XMonad.Hooks.InsertPosition
@ -15,22 +13,18 @@ import XMonad.Hooks.OnPropertyChange
import XMonad.Hooks.RefocusLast import XMonad.Hooks.RefocusLast
import XMonad.Hooks.StatusBar import XMonad.Hooks.StatusBar
import XMonad.Layout.FocusTracking 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.NoBorders
import XMonad.Layout.PerWorkspace
import XMonad.Layout.Reflect import XMonad.Layout.Reflect
import XMonad.Layout.Reflect.Message import XMonad.Layout.Reflect.Message
import XMonad.Layout.Renamed import XMonad.Layout.Renamed
import XMonad.Layout.ResizableTile import XMonad.Layout.ResizableTile
import XMonad.Layout.Spacing import XMonad.Layout.Spacing
import XMonad.Layout.ToggleLayouts
import qualified XMonad.StackSet as W import qualified XMonad.StackSet as W
import XMonad.Util.EZConfig import XMonad.Util.EZConfig
import XMonad.Util.Hacks import XMonad.Util.Hacks
import XMonad.Util.NamedScratchpad import XMonad.Util.NamedScratchpad
import XMonad.Util.SpawnOnce import XMonad.Util.SpawnOnce
import XMonad.Layout.Magnifier
import Data.Char.Greek import Data.Char.Greek
import Data.Ratio import Data.Ratio
@ -68,28 +62,14 @@ main =
`additionalKeys` keybinds `additionalKeys` keybinds
myLayout = myLayout =
avoidStruts let tallr = renamed [ Replace "Tall" ]
$ smartBorders $ smartSpacingWithEdge 5
$ onWorkspace researchWS (toggleLayouts (mag tallr) full) $ reflectMsg . reflectHoriz
$ onWorkspace chatWS (toggleLayouts (mag tallr) full) $ ResizableTall 1 (1/10) (3/7) []
$ onWorkspace multimediaWS (toggleLayouts (mag tallr) full) mag = magnifyxy 1.05 1.3 (NoMaster 3) False
$ toggleLayouts (mag tallr) full in avoidStruts
where $ smartBorders
mag = magnifierOff $ mag tallr ||| focusTracking Full
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 :: Query Bool
isSioyek = className =? "sioyek" isSioyek = className =? "sioyek"
@ -284,13 +264,17 @@ keybinds =
, ((0, xF86XK_AudioPlay), spawn "playerctl play-pause") , ((0, xF86XK_AudioPlay), spawn "playerctl play-pause")
, ((0, xF86XK_AudioNext), spawn "playerctl next" ) , ((0, xF86XK_AudioNext), spawn "playerctl next" )
-- Toggle fullscreen
, ((superMask, xK_Escape), sendMessage NextLayout)
-- Resize windows -- Resize windows
, ((superMask, xK_equal ), sendMessage $ IncMasterN 1)
, ((superMask, xK_minus ), sendMessage $ IncMasterN -1)
, ((superMask, xK_comma ), sendMessage Shrink ) , ((superMask, xK_comma ), sendMessage Shrink )
, ((superMask, xK_period ), sendMessage Expand ) , ((superMask, xK_period ), sendMessage Expand )
, ((superMask .|. shiftMask, xK_comma ), sendMessage MirrorShrink ) , ((superMask .|. shiftMask, xK_comma ), sendMessage MirrorShrink )
, ((superMask .|. shiftMask, xK_period), sendMessage MirrorExpand ) , ((superMask .|. shiftMask, xK_period), sendMessage MirrorExpand )
, ((superMask , xK_apostrophe), sendMessage Mag.Toggle ) , ((superMask , xK_apostrophe), sendMessage Toggle )
, ((superMask , xK_space ), sendMessage ToggleLayout )
-- [D]o sink and lift -- [D]o sink and lift
, ( (superMask, xK_d) , ( (superMask, xK_d)
@ -301,19 +285,6 @@ 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 -- Screenshots
++ (let fullscreen = "maim -u | xclip -in -selection clipboard -t image/png" ++ (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" withSelection = "maim -u -s -b 5 -o | xclip -in -selection clipboard -t image/png"
@ -372,15 +343,12 @@ altMask = mod1Mask
myWorkspaces :: [WorkspaceId] myWorkspaces :: [WorkspaceId]
myWorkspaces = map (:[]) $ take 8 greekLower myWorkspaces = map (:[]) $ take 8 greekLower
researchWS :: WorkspaceId multimediaWS :: WorkspaceId
researchWS = myWorkspaces !! 2 multimediaWS = myWorkspaces !! 6
chatWS :: WorkspaceId chatWS :: WorkspaceId
chatWS = myWorkspaces !! 3 chatWS = myWorkspaces !! 3
multimediaWS :: WorkspaceId
multimediaWS = myWorkspaces !! 6
centeredFloat, smallFloat, fullFloat, buttomRightFloat :: W.RationalRect centeredFloat, smallFloat, fullFloat, buttomRightFloat :: W.RationalRect
centeredFloat = W.RationalRect (1%9) (1%9) (7%9) (7%9) centeredFloat = W.RationalRect (1%9) (1%9) (7%9) (7%9)
smallFloat = W.RationalRect (3%5) (3%5) (2%7) (2%7) smallFloat = W.RationalRect (3%5) (3%5) (2%7) (2%7)

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,3 @@
# 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, haskellPackages,
haskell, haskell,
@ -13,8 +11,8 @@ let
domain = "git.confusedcompiler.org"; domain = "git.confusedcompiler.org";
owner = "leana8959"; owner = "leana8959";
repo = "ruler"; repo = "ruler";
rev = "72069c79bd6540fb9a1ee941fa2502edd6853af8"; rev = "2556b4985065d093b1db3a14a2c5c37115871c78";
hash = "sha256-UQYx1WoWxASnWINtlTE2zMrADBketo/bgo5aud5j8Og="; hash = "sha256-OvNhDpyAbZp+d0rSXLE55BvM5jT3OI8q79D6aVaA2FI=";
}) { }; }) { };
cabalOverrides = o: { cabalOverrides = o: {

Binary file not shown.

View file

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