-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
3,191 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import cssnano from "cssnano"; | ||
import tailwindcss from "tailwindcss"; | ||
import postcssPresentEnv from "postcss-preset-env"; | ||
import pxtorem from "postcss-pxtorem"; | ||
|
||
|
||
export default { | ||
plugins: [ | ||
pxtorem({ | ||
replace: true, | ||
propList: ["*"], | ||
}), | ||
postcssPresentEnv(), | ||
tailwindcss, | ||
...(process.env.NODE_ENV === "production" ? [cssnano] : []), | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Starting a blog | ||
|
||
Since everyone and their dog likes to post about cool new tech on their blog, I decided to try it out. | ||
|
||
I'll mostly write about frameworks, libraries and how to make lots of moving parts work together. | ||
|
||
```ts | ||
const f = 33; | ||
console.log(f); | ||
``` |
26 changes: 26 additions & 0 deletions
26
src/routes/articles/2024-03-30-maping-chord-key-combos-on-linux.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Mapping chord key combos on Linux | ||
|
||
Recently I realized that lots of my key combinations require pretty unhealthy hand movements. | ||
|
||
```python | ||
import map2 | ||
|
||
# capture keyboard inputs with a reader | ||
reader = map2.Reader(patterns=["/dev/input/by-id/your-kbd"]) | ||
# re-map them using a chrod mapper | ||
mapper = map2.ChordMapper() | ||
# and write them to a virtual device | ||
writer = map2.Writer(clone_from="/dev/input/by-id/your-kbd") | ||
# setup the event pipeline | ||
map2.link([reader, mapper, writer]) | ||
|
||
# and map some chords! | ||
mapper_kbd_arp.map([";", "a"], "A") | ||
mapper_kbd_arp.map([";", "s"], "S") | ||
mapper_kbd_arp.map([";", "d"], "D") | ||
mapper_kbd_arp.map([";", "f"], "F") | ||
mapper_kbd_arp.map([";", "g"], "G") | ||
# and so on... | ||
``` | ||
|
||
And that's it! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { getRequestEvent } from "solid-js/web"; | ||
|
||
export default function Home() { | ||
const q = getRequestEvent()?.request.url; | ||
return ( | ||
<main> | ||
<h1>Page</h1> | ||
<div>q: {q}</div> | ||
</main> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import {style} from "@client/style/commonStyle"; | ||
|
||
|
||
export const flashAnimation = style` | ||
animation: flash 0.6s alternate ease-in-out infinite; | ||
@keyframes flash { | ||
0% { opacity: 0.4; } | ||
100% { opacity: 0.7; } | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { normalizeColorName, themeColors } from "~/style/colorsTs"; | ||
|
||
export const colorVariablesCSS = (() => { | ||
let colorVariablesCSS = ""; | ||
for (const [key, value] of Object.entries(themeColors)) { | ||
const theme = key; | ||
if (typeof value == "object") { | ||
colorVariablesCSS += `&.theme-${theme} {`; | ||
for (const [name, color] of Object.entries(themeColors[theme])) { | ||
colorVariablesCSS += `--color-${normalizeColorName(name)}: ${color};`; | ||
} | ||
colorVariablesCSS += "\n}"; | ||
} else { | ||
// top level | ||
colorVariablesCSS += `--color-${normalizeColorName(key)}: ${value};`; | ||
} | ||
} | ||
return colorVariablesCSS; | ||
})(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import theme from "./theme"; | ||
|
||
export const themeColors = theme.colors as any; | ||
|
||
export const themeColorList = (() => { | ||
const list: string[] = []; | ||
|
||
for (const colorSet of [themeColors, themeColors.light, themeColors.dark]) { | ||
for (const [key, value] of Object.entries(colorSet)) { | ||
if (typeof value == "string") list.push(key); | ||
} | ||
} | ||
|
||
return list; | ||
})(); | ||
|
||
export const normalizeColorName = (colorName: string) => | ||
colorName.replace(/\//g, "-"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import * as layoutMixins from "~/style/mixins/layoutTs"; | ||
import { | ||
_boxShadowMixin, | ||
_dropShadowMixin, | ||
} from "~/style/mixins/shadowMixins"; | ||
import * as sizes from "~/style/sizesTS"; | ||
import * as reactStyleUtil from "~/style/styleUtil"; | ||
import * as styleUtils from "~/style/styleUtilTS"; | ||
import * as textStyles from "~/style/textStylesTS"; | ||
|
||
export const jumboText = textStyles._jumboText; | ||
export const largeText = textStyles._largeText; | ||
export const bigText = textStyles._bigText; | ||
export const heading1Text = textStyles._heading1Text; | ||
export const heading2Text = textStyles._heading2Text; | ||
export const heading3Text = textStyles._heading3Text; | ||
export const bodyText = textStyles._bodyText; | ||
export const subText = textStyles._subText; | ||
export const smallText = textStyles._smallText; | ||
|
||
export type FontSize = textStyles._FontSize; | ||
export type FontStyle = textStyles._FontStyle; | ||
export const primaryFont = textStyles._primaryFont; | ||
export const primaryFontItalic = textStyles._primaryFontItalic; | ||
export const primaryFontBold = textStyles._primaryFontBold; | ||
export const primaryFontBoldItalic = textStyles._primaryFontBoldItalic; | ||
|
||
export const text = textStyles._text; | ||
export const variableTextStyle = textStyles._variableTextStyle; | ||
|
||
export const sizeXS = sizes._sizeXS; | ||
export const sizeS = sizes._sizeS; | ||
export const sizeM = sizes._sizeM; | ||
export const sizeL = sizes._sizeL; | ||
export const sizeXL = sizes._sizeXL; | ||
export const breakpoint = sizes._breakpoint; | ||
export const breakpointFrom = sizes._breakpointFrom; | ||
export const breakpointUntil = sizes._breakpointUntil; | ||
|
||
export const style = styleUtils.style; | ||
|
||
export const edgeChildrenNoMargin = layoutMixins._edgeChildrenNoMargin; | ||
export const edgeChildrenNoPadding = layoutMixins._edgeChildrenNoPadding; | ||
export const contentContainer = layoutMixins._contentContainer; | ||
|
||
export const color = layoutMixins._color; | ||
export const staticColor = layoutMixins._staticColor; | ||
|
||
export const withStyle = reactStyleUtil._withStyle; | ||
|
||
export const dropShadow = _dropShadowMixin; | ||
export const boxShadow = _boxShadowMixin; |
Oops, something went wrong.