Compare commits
No commits in common. "365eb1e164fdb407e431121964b69dc39e308fd2" and "79fd67e916c91e217fc19f92cb3a0800a012067d" have entirely different histories.
365eb1e164
...
79fd67e916
5
.gitignore
vendored
|
@ -1,5 +1,4 @@
|
|||
.hugo_build.lock
|
||||
src/public
|
||||
src/voidcruiser.nl
|
||||
public
|
||||
voidcruiser.nl
|
||||
.direnv
|
||||
result
|
||||
|
|
6
.gitmodules
vendored
|
@ -1,3 +1,3 @@
|
|||
[submodule "src/themes"]
|
||||
path = src/themes
|
||||
url = gitlab:EternalWanderer/themes.git
|
||||
[submodule "themes/vugo"]
|
||||
path = themes/vugo
|
||||
url = gitlab:EternalWanderer/vugo.git
|
||||
|
|
27
flake.lock
|
@ -20,16 +20,16 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1707347730,
|
||||
"narHash": "sha256-0etC/exQIaqC9vliKhc3eZE2Mm2wgLa0tj93ZF/egvM=",
|
||||
"lastModified": 1696983906,
|
||||
"narHash": "sha256-L7GyeErguS7Pg4h8nK0wGlcUTbfUMDu+HMf1UcyP72k=",
|
||||
"owner": "NixOs",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6832d0d99649db3d65a0e15fa51471537b2c56a6",
|
||||
"rev": "bd1cde45c77891214131cbbea5b1203e485a9d51",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOs",
|
||||
"ref": "nixos-23.11",
|
||||
"ref": "nixos-23.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -37,8 +37,7 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"themes": "themes"
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
|
@ -55,22 +54,6 @@
|
|||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"themes": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1707594839,
|
||||
"narHash": "sha256-VeoBv8LfsTLGSoGpiNlC8gd79xd4InG+bAC6TkBCSHw=",
|
||||
"owner": "EternalWanderer",
|
||||
"repo": "themes",
|
||||
"rev": "53560c95d3bd33362e5552cb9efeaf8234724868",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"owner": "EternalWanderer",
|
||||
"repo": "themes",
|
||||
"type": "gitlab"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
14
flake.nix
|
@ -1,13 +1,9 @@
|
|||
{ description = "Voidcruiser website";
|
||||
{ description = "Website flake";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOs/nixpkgs/nixos-23.11";
|
||||
nixpkgs.url = "github:NixOs/nixpkgs/nixos-23.05";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
themes = {
|
||||
url = "gitlab:EternalWanderer/themes";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
outputs = { self, nixpkgs, flake-utils, themes }:
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
|
@ -17,12 +13,12 @@
|
|||
|
||||
pname = "voidcruiser";
|
||||
version = "1.3";
|
||||
src = ./src;
|
||||
src = ./.;
|
||||
|
||||
buildInputs = [ pkgs.hugo ];
|
||||
|
||||
buildPhase = ''
|
||||
hugo --themesDir="${themes.outPath}"
|
||||
hugo
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
|
|
@ -1,91 +0,0 @@
|
|||
---
|
||||
title: "Xmonad Configuration Bits"
|
||||
date: "2023-09-13T16:47:48+02:00"
|
||||
author: "$HUMANOID"
|
||||
tags: ["xmonad", "haskell"]
|
||||
description: "A few interesting things I've done with my XMonad config"
|
||||
---
|
||||
|
||||
So the other day I was hacking some more on my XMonad config and came across a
|
||||
few quirks that I don't think I've seen other people implement in their configs.
|
||||
Though truth be told, I haven't really looked at a lot of other people's config
|
||||
files.
|
||||
|
||||
> "Where is your config file anyway?"
|
||||
|
||||
Haven't published it yet as it's still a huge mess of half baked Haskell
|
||||
snippets.
|
||||
|
||||
## Complex terminal sessions
|
||||
|
||||
I use [Kitty](https://sw.kovidgoyal.net/kitty/) as my terminal. It's amazing and
|
||||
probably warrants its own article one day. One of the really cool features is
|
||||
that it allows you to override options on launch with the `-o` or `--override`
|
||||
parameter. This allows you to change any of the values in your `kitty.conf`,
|
||||
this includes the font and colour pallet.
|
||||
|
||||
I've been using this to start terminals with
|
||||
[BQN](https://mlochbaum.github.io/BQN/) compatible font.
|
||||
|
||||
```sh
|
||||
kitty -o font_size=17 -o font_family='BQN386 Unicode' -e bqn
|
||||
```
|
||||
|
||||
This works great and I assigned it to a keybinding for a while. However, some
|
||||
time later I decided to check out [R](https://www.r-project.org/) and wanted to
|
||||
have a similar keybinding with slightly different options. Here it dawned on me
|
||||
that it would be silly to copy-paste the BQN keybinding and change a few things,
|
||||
so I abstracted that away into a function that takes a list of options and feeds
|
||||
that to Kitty.
|
||||
|
||||
```haskell
|
||||
runInKittyWithOpts :: [String] -> String -> X ()
|
||||
runInKittyWithOpts opts executable = spawn $ "kitty "
|
||||
++ (unwords . map ("-o " ++)) opts
|
||||
++ " -e " ++ executable
|
||||
```
|
||||
|
||||
If I now want to start a kitty session with a BQN font and R repl, I can add
|
||||
something like the following to a keybinding:
|
||||
```haskell
|
||||
runInKittyWithOpts rOptions "R"
|
||||
where rOptions = [ "font_size=17"
|
||||
, "font_family='BQN386 Unicode'"
|
||||
]
|
||||
```
|
||||
|
||||
Since I write quite a bit, I also have a kitty session with a giant margin left
|
||||
and right of the "terminal" section of the window as that empty space helps me
|
||||
concentrate. All this is, is the previous function without the `-e` parameter:
|
||||
```haskell
|
||||
kittyWithOpts :: [String] -> X ()
|
||||
kittyWithOpts opts = spawn $ "kitty "
|
||||
++ (unwords . map ("-o " ++)) opts
|
||||
```
|
||||
Though I didn't let that stop me from golfing it down to a point free version:
|
||||
```haskell
|
||||
kittyWithOpts :: [String] -> X ()
|
||||
kittyWithOpts = spawn . ("kitty " ++) . (unwords . map ("-o " ++))
|
||||
```
|
||||
My prefered settings for a "text hole" terminal.
|
||||
```haskell
|
||||
kittyWithOpts [ "font_family='BQN386 Unicode'"
|
||||
, "font_size=14"
|
||||
, "single_window_margin_width='5 200'"
|
||||
]
|
||||
```
|
||||
|
||||
If I were to implement this properly, I would make a kitty module with all
|
||||
options in DataType. But alas, I'm not patient/bored enough for that... yet.
|
||||
|
||||
## Mouse bindings
|
||||
|
||||
I thought it would be neat to be able to scroll up and down while holding my
|
||||
modifier key to change my screen brightness and audio levels. The basic concept
|
||||
here was quite simple; us a lambda function that chucks whatever data it gets
|
||||
onto the ground because the type signature for mousebindings forces you to deal
|
||||
with a focussed window.
|
||||
|
||||
```haskell
|
||||
, ((modMask, button4), \_ -> safeSpawn "pulsemixer" ["--change-volume","+1"])
|
||||
```
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 53560c95d3bd33362e5552cb9efeaf8234724868
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 446 B After Width: | Height: | Size: 446 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
1
themes/vugo
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 8a0e6fc8f845ea5cf6115a9100893e82e64cc3f3
|