initial restructuring

This commit is contained in:
2026-08-08 21:12:37 -06:00
parent d1e4ae22d2
commit bb038bfba0
62 changed files with 0 additions and 3 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 664 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 924 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 662 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 731 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

+7
View File
@@ -0,0 +1,7 @@
{ config, pkgs, inputs, ... }:
{
imports = [
./niri.nix
];
}
+142
View File
@@ -0,0 +1,142 @@
{ config, lib, pkgs, inputs, ... }:
let
launch-lisgd = pkgs.writeShellScriptBin "launch-lisgd" ''
# Search for the capacitive touch layer and extract its event number.
# UPDATE 'Touchscreen' below to match the unique word you found in step 1.
TOUCH_EVENT=$(grep -i -E 'name=".*Finger.*"' -A 5 /proc/bus/input/devices | grep -o 'event[0-9]\+' | head -n 1)
if [ -n "$TOUCH_EVENT" ]; then
# Start lisgd locked exclusively to the finger digitizer
${pkgs.lisgd}/bin/lisgd -t 30 -m 150 -r 45 -d "/dev/input/$TOUCH_EVENT" \
-g "3,LR,*,*,P,niri msg action focus-column-left && sleep 0.4" \
-g "3,RL,*,*,P,niri msg action focus-column-right && sleep 0.4" \
-g "3,UD,*,*,P,niri msg action focus-workspace-up && sleep 0.4" \
-g "3,DU,*,*,P,niri msg action focus-workspace-down && sleep 0.4" \
-g "4,DU,*,*,P,dms ipc spotlight toggle && sleep 0.4" \
-g "1,DU,B,*,pkill -u jashton -RTMIN wvkbd-mobintl && sleep 0.4"
fi
'';
launch-wvkbd = pkgs.writeShellScriptBin "launch-wvkbd" ''
THEME_CACHE="$HOME/.cache/DankMaterialShell/dms-colors.json"
if [ -f "$THEME_CACHE" ]; then
BG=$(jq -r '.["colors"]["dark"]["background"]' "$THEME_CACHE" | tr -d '#')
FG=$(jq -r '.["colors"]["dark"]["surface_container_lowest"]' "$THEME_CACHE" | tr -d '#')
TXT=$(jq -r '.["colors"]["dark"]["on_background"]' "$THEME_CACHE" | tr -d '#')
PRIMARY=$(jq -r '.["colors"]["dark"]["surface_container_lowest"]' "$THEME_CACHE" | tr -d '#')
ON_PRIMARY=$(jq -r '.["colors"]["dark"]["on_background"]' "$THEME_CACHE" | tr -d '#')
wvkbd-mobintl --hidden --no-popup --bg "$BG" --press "$BG" --fg "$FG" --text "$TXT" --fg-sp "$PRIMARY" --text-sp "$ON_PRIMARY" -L 300
else
wvkbd-mobintl --hidden --no-popup
fi
'';
in
{
xdg.portal = {
enable = true;
# Use gtk or kde based on your preferred file picker dialog
config.niri = {
"org.freedesktop.impl.portal.FileChooser" = [ "gtk" ]; # or "kde"
};
# Ensure the GTK portal is installed
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
programs.niri = {
settings = {
# Autostart DMS if you prefer launching it directly from Niri instead of systemd
spawn-at-startup = [
{ command = [ "dms" "run" ]; }
{ command = [ "${launch-wvkbd}/bin/launch-wvkbd" ]; }
{ command = [ "${launch-lisgd}/bin/launch-lisgd" ]; } # Spawns the daemon
];
hotkey-overlay = {
skip-at-startup = true;
};
input = {
keyboard.xkb.layout = "us";
touchpad = {
tap = true;
natural-scroll = true;
};
};
layout = {
gaps = 8;
center-focused-column = "never";
default-column-width.proportion = 1.0;
border.enable = false;
#tab-indicator.corner-radius = 18.0;
focus-ring = {
enable = false;
width = 2;
};
};
prefer-no-csd = true;
window-rules = [
{ # All windows
geometry-corner-radius = {
bottom-left = 25.0;
bottom-right = 25.0;
top-right = 25.0;
top-left = 25.0;
};
draw-border-with-background = true;
clip-to-geometry = true;
}
];
# Vim Keybindings & Built-in Features
binds = with config.lib.niri.actions; {
# Launchers & Session Control
"Mod+Return".action.spawn = [ "alacritty" ];
"Mod+P".action.spawn = [ "pkill" "-RTMIN" "wvkbd-mobintl" ];
"Mod+Space".action.spawn = [ "dms" "ipc" "spotlight" "toggle" ];
"Mod+X".action.close-window = [];
"Mod+F".action.fullscreen-window = [];
"Mod+Shift+E".action.quit = [];
"Mod+Shift+P".action.toggle-overview = [];
# Vim Focus Movement
"Mod+H".action.focus-column-left = [];
"Mod+J".action.focus-window-down = [];
"Mod+K".action.focus-window-up = [];
"Mod+L".action.focus-column-right = [];
# Workspace Navigation
"Mod+N".action.focus-workspace-down = [];
"Mod+U".action.focus-workspace-up = [];
# Vim Window Reordering
"Mod+Shift+H".action.move-column-left = [];
"Mod+Shift+L".action.move-column-right = [];
"Mod+Shift+J".action.move-column-to-workspace-down = [];
"Mod+Shift+K".action.move-column-to-workspace-up = [];
# Volume & Brightness Media Controls
"XF86AudioRaiseVolume".action.spawn = [ "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.05+" ];
"XF86AudioLowerVolume".action.spawn = [ "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.05-" ];
"XF86AudioMute".action.spawn = [ "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle" ];
"XF86MonBrightnessUp".action.spawn = [ "dms" "ipc" "call" "brightness" "increment" "5" "" ];
"XF86MonBrightnessDown".action.spawn = [ "dms" "ipc" "call" "brightness" "decrement" "5" "" ];
# Screenshots
"Print".action.screenshot = [];
"Ctrl+Print".action.screenshot-screen = [];
};
};
};
}
+5
View File
@@ -0,0 +1,5 @@
{ pkgs, config, ... }:
{
}
+128
View File
@@ -0,0 +1,128 @@
{ config, lib, pkgs, inputs, ... }:
let
# Compile your custom wvkbd build
custom_wvkbd = pkgs.wvkbd.overrideAttrs (oldAttrs: {
# Pin the package version to the exact commit from your flake input
src = inputs.wvkbd-src;
version = "custom-git";
# Choose your preferred layout layout (e.g., mobintl, standard, cyrillic)
makeFlags = (oldAttrs.makeFlags or []) ++ [ "LAYOUT=mobintl" ];
# Optional: Swap out the layout with your own config.h file if you have one
preBuild = ''
cp ${./programs/layout.custom.h} layout.mobintl.h
cp ${./programs/config.custom.h} config.mobintl.h
cp ${./programs/keymap.custom.h} keymap.mobintl.h
'';
});
in
{
imports = [
./programs
./desktop
];
home.username = "jashton";
home.homeDirectory = "/home/jashton";
home.file.".zshrc".text = ''
# Zsh is configured globally at the NixOS system level.
# This file exists solely to prevent the zsh-newuser-install prompt.
'';
home.sessionVariables = {
EDITOR = "nvim";
NIXOS_OZONE_WL = "1"; # Forces Electron/Chromium apps to use Wayland natively
GTK_IM_MODULE = "wayland"; # Forces GTK apps to use Wayland text-input protocols
QT_IM_MODULE = "wayland"; # Forces Qt apps to use Wayland text-input protocols
TEXT_INPUT_PRESENT = "1"; # Explicitly signals virtual keyboard capability to the shell
};
home.packages = with pkgs; [
antigravity
asciinema
discord
ffmpeg
gemini-cli
libreoffice
mc
opencode
pdftk
scrot
spotify
vlc
wtype
xwayland-satellite
yt-dlp
zathura
custom_wvkbd
(pkgs.writeShellScriptBin "find-open-port" ''
if [ -z "$1" ]; then
echo "Please provide an application name, project directory, or other identifier."
echo " Usage: find-open-port $HOME/dev/some-project"
echo " Usage: find-open-port some-app"
exit 1
fi
APP_NAME=$1
REGISTRY_FILE=$HOME/.dotfiles/ports.registry
MIN_PORT=8000
MAX_PORT=8999
MAX_RETRIES=50
echo "Searching for available port between $MIN_PORT and $MAX_PORT for $APP_NAME..."
for ((i=1; i<=MAX_RETRIES; i++)); do
RANDOM_PORT=$(shuf -i $MIN_PORT-$MAX_PORT -n 1)
if ! ss -tuln | grep -E -q ":$RANDOM_PORT\b"; then
if [ -f "$REGISTRY_FILE" ] && grep -q "\b$RANDOM_PORT\b" "$REGISTRY_FILE"; then
continue
fi
echo "$APP_NAME : $RANDOM_PORT" >> "$REGISTRY_FILE"
echo -e "\nSuccessfully wrote '$APP_NAME : $RANDOM_PORT' to $REGISTRY_FILE"
exit 0
fi
done
echo -e "\nError: Could not find an open port between $MIN_PORT and $MAX_PORT after $MAX_RETRIES attempts."
exit 1
'')
];
home.activation = {
# 1. Create the persistent directories
createWorkspaceDirs = lib.hm.dag.entryAfter ["writeBoundary"] ''
$DRY_RUN_CMD mkdir -p $HOME/dev
$DRY_RUN_CMD mkdir -p $HOME/downloads
$DRY_RUN_CMD mkdir -p $HOME/life
$DRY_RUN_CMD mkdir -p $HOME/media/pics
$DRY_RUN_CMD mkdir -p $HOME/media/videos
$DRY_RUN_CMD mkdir -p $HOME/school
'';
};
programs.ssh = {
enable = true;
matchBlocks = {
"heliotrope" = {
hostname = "100.77.235.110";
};
"lavender" = {
hostname = "100.99.189.49";
};
"violet" = {
hostname = "100.101.100.84";
};
};
};
home.stateVersion = "26.05"; # DO NOT CHANGE
}
+55
View File
@@ -0,0 +1,55 @@
{ config, pkgs, ... }:
{
programs.alacritty = {
enable = true;
theme = "hyper";
settings = {
window = {
padding = { x = 20; y = 20; };
opacity = .85;
};
font = {
normal = {
family = "Hack Nerd Font";
style = "Mono";
};
size = 14.0;
};
colors = {
primary = {
background = "#08090b"; # Black
foreground = "#8d739c"; # Vintage Lavender 1
};
normal = {
black = "#1e1f21"; # Carbon Black
red = "#4f3963"; # Vintage Grape
green = "#7e6790"; # Vintage Lavender 2
yellow = "#847397"; # Vintage Lavender 3
blue = "#2c2137"; # Midnight Violet
magenta = "#8d739c"; # Vintage Lavender 1
cyan = "#7e6790"; # Vintage Lavender 2
white = "#323335"; # Graphite
};
# Bright colors map to the same palette for a consistent, flat aesthetic
bright = {
black = "#323335"; # Graphite
red = "#4f3963"; # Vintage Grape
green = "#7e6790"; # Vintage Lavender 2
yellow = "#847397"; # Vintage Lavender 3
blue = "#2c2137"; # Midnight Violet
magenta = "#8d739c"; # Vintage Lavender 1
cyan = "#7e6790"; # Vintage Lavender 2
white = "#8d739c"; # Vintage Lavender 1
};
};
scrolling.multiplier = 3;
};
};
}
+50
View File
@@ -0,0 +1,50 @@
#ifndef config_h_INCLUDED
#define config_h_INCLUDED
#define DEFAULT_FONT "Sans 14"
#define DEFAULT_ROUNDING 5
#define SHIFT_SPACE_IS_TAB
static const int transparency = 255;
struct clr_scheme schemes[] = {
{
/* colors */
.bg = {.bgra = {15, 15, 15, transparency}},
.fg = {.bgra = {45, 45, 45, transparency}},
.high = {.bgra = {100, 100, 100, transparency}},
.swipe = {.bgra = {100, 255, 100, 64}},
.text = {.color = UINT32_MAX},
.text_press = {.color = UINT32_MAX},
.text_swipe = {.color = UINT32_MAX},
.font = DEFAULT_FONT,
.rounding = DEFAULT_ROUNDING,
},
{
/* colors */
.bg = {.bgra = {15, 15, 15, transparency}},
.fg = {.bgra = {32, 32, 32, transparency}},
.high = {.bgra = {100, 100, 100, transparency}},
.swipe = {.bgra = {100, 255, 100, 64}},
.text_press = {.color = UINT32_MAX},
.text_swipe = {.color = UINT32_MAX},
.text = {.color = UINT32_MAX},
.font = DEFAULT_FONT,
.rounding = DEFAULT_ROUNDING,
}
};
/* layers is an ordered list of layouts, used to cycle through */
static enum layout_id layers[] = {
Full, // First layout is the default layout on startup
Special,
NumLayouts // signals the last item, may not be omitted
};
/* layers is an ordered list of layouts, used to cycle through */
static enum layout_id landscape_layers[] = {
Landscape, // First layout is the default layout on startup
LandscapeSpecial,
NumLayouts // signals the last item, may not be omitted
};
#endif // config_h_INCLUDED
+50
View File
@@ -0,0 +1,50 @@
#ifndef config_h_INCLUDED
#define config_h_INCLUDED
#define DEFAULT_FONT "Hack Nerd Font Mono 12"
#define DEFAULT_ROUNDING 12
#define SHIFT_SPACE_IS_TAB
static const int transparency = 255;
struct clr_scheme schemes[] = {
{
/* colors */
.bg = {.bgra = {15, 15, 15, transparency}},
.fg = {.bgra = {45, 45, 45, transparency}},
.high = {.bgra = {100, 100, 100, transparency}},
.swipe = {.bgra = {100, 255, 100, 64}},
.text = {.color = UINT32_MAX},
.text_press = {.color = UINT32_MAX},
.text_swipe = {.color = UINT32_MAX},
.font = DEFAULT_FONT,
.rounding = DEFAULT_ROUNDING,
},
{
/* colors */
.bg = {.bgra = {15, 15, 15, transparency}},
.fg = {.bgra = {32, 32, 32, transparency}},
.high = {.bgra = {100, 100, 100, transparency}},
.swipe = {.bgra = {100, 255, 100, 64}},
.text_press = {.color = UINT32_MAX},
.text_swipe = {.color = UINT32_MAX},
.text = {.color = UINT32_MAX},
.font = DEFAULT_FONT,
.rounding = DEFAULT_ROUNDING,
}
};
/* layers is an ordered list of layouts, used to cycle through */
static enum layout_id layers[] = {
Landscape, // First layout is the default layout on startup
LandscapeSpecial,
NumLayouts // signals the last item, may not be omitted
};
/* layers is an ordered list of layouts, used to cycle through */
static enum layout_id landscape_layers[] = {
Landscape, // First layout is the default layout on startup
LandscapeSpecial,
NumLayouts // signals the last item, may not be omitted
};
#endif // config_h_INCLUDED
+9
View File
@@ -0,0 +1,9 @@
{ config, dms, pkgs, ... }:
{
imports = [
./alacritty.nix
./git.nix
./nvim.nix
];
}
+24
View File
@@ -0,0 +1,24 @@
{ config, pkgs, ... }:
{
programs.git = {
enable = true;
settings = {
user = {
name = "joshashtondev";
email = "me@joshashton.dev";
};
init.defaultBranch = "main";
pull.rebase = true;
push.autoSetupRemote = true;
};
ignores = [
".env"
"*.log"
"*.swp"
".DS_STORE"
];
};
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+184
View File
@@ -0,0 +1,184 @@
/* constants */
/* how tall the keyboard should be by default (can be overriden) */
#define KBD_PIXEL_HEIGHT 250
/* how tall the keyboard should be by default (can be overriden) */
#define KBD_PIXEL_LANDSCAPE_HEIGHT 120
/* spacing around each key */
#define KBD_KEY_BORDER 4
/* layout declarations */
enum layout_id {
Landscape = 1,
LandscapeSpecial = 2,
Emoji = 3,
Index,
NumLayouts,
};
static struct key keys_landscape[], keys_landscape_special[], keys_emoji[];
static struct layout layouts[NumLayouts] = {
[Landscape] = {keys_landscape, "latin", "landscape", true},
[LandscapeSpecial] = {keys_landscape_special, "latin", "landscapespecial", true},
[Emoji] = {keys_emoji, "latin", "emoji", false},
};
static struct key keys_emoji[] = {
{"🙂", "🙏", 1.0, Copy, 0x1f642, 0, 0x1f64f}, // Emojis
{"😀", "🙋", 1.0, Copy, 0x1f600, 0, 0x1f64b},
{"😁", "✋", 1.0, Copy, 0x1f601, 0, 0x270B},
{"😂", "🙇", 1.0, Copy, 0x1f602, 0, 0x1f647},
{"😃", "👨", 1.0, Copy, 0x1f603, 0, 0x1f468},
{"😄", "👩", 1.0, Copy, 0x1f604, 0, 0x1f469},
{"😅", "👶", 1.0, Copy, 0x1f605, 0, 0x1f476},
{"😆", "👻", 1.0, Copy, 0x1f606, 0, 0x1f47b},
{"😇", "✨", 1.0, Copy, 0x1f607, 0, 0x2728},
{"🤣", "💰", 1.0, Copy, 0x1f923, 0, 0x1f4b0},
{"", "", 0.0, EndRow},
{"😉", "🐕", 1.0, Copy, 0x1f609, 0, 0x1f415},
{"😊", "🐈", 1.0, Copy, 0x1f60a, 0, 0x1f408},
{"😋", "🐧", 1.0, Copy, 0x1f60b, 0, 0x1f427},
{"😌", "🐇", 1.0, Copy, 0x1f60c, 0, 0x1f407},
{"😍", "💔", 1.0, Copy, 0x1f60d, 0, 0x1f494},
{"😘", "💕", 1.0, Copy, 0x1f618, 0, 0x1f495},
{"😎", "❤", 1.0, Copy, 0x1f60e, 0, 0x2764},
{"😐", "😏", 1.0, Copy, 0x1f610, 0, 0x1f60f},
{"😒", "👀", 1.0, Copy, 0x1f612, 0, 0x1f440},
{"😓", "💀", 1.0, Copy, 0x1f613, 0, 0x1f480},
{"", "", 0.0, EndRow},
{"⇧", "⇫", 1.0, Mod, Shift, .scheme = 1},
{"😛", "😜", 1.0, Copy, 0x1f61b, 0, 0x1f61c},
{"😮", "😝", 1.0, Copy, 0x1f62e, 0, 0x1f61d},
{"😟", "😞", 1.0, Copy, 0x1f61f, 0, 0x1f61e},
{"😠", "🥺", 1.0, Copy, 0x1f620, 0, 0x1f97a},
{"😢", "👿", 1.0, Copy, 0x1f622, 0, 0x1f47f},
{"😭", "😯", 1.0, Copy, 0x1f62d, 0, 0x1f62f},
{"😳", "😕", 1.0, Copy, 0x1f633, 0, 0x1f615},
{"😴", "😵", 1.0, Copy, 0x1f634, 0, 0x1f635},
{"⌫", "⌫", 1.0, Code, KEY_BACKSPACE, .scheme = 1},
{"", "", 0.0, EndRow},
{"Abc", "Abc", 1.0, BackLayer, .scheme = 1},
{"⌨͕", "⌨͔", 1.0, NextLayer, .scheme = 1},
{"👆", "👊", 1.0, Copy, 0x1f446, 0, 0x1f44a},
{"👇", "👌", 1.0, Copy, 0x1f447, 0, 0x1f44c},
{"👈", "👏", 1.0, Copy, 0x1f448, 0, 0x1f44f},
{"👉", "👐", 1.0, Copy, 0x1f449, 0, 0x1f450},
{"👋", "🙌", 1.0, Copy, 0x1f44b, 0, 0x1f64c},
{"👍", "✅", 1.0, Copy, 0x1f44d, 0, 0x2705},
{"👎", "💪", 1.0, Copy, 0x1f44e, 0, 0x1f4aa},
{"Enter", "Enter", 1.0, Code, KEY_ENTER, .scheme = 1},
{"", "", 0.0, Last},
};
static struct key keys_landscape[] = {
{"q", "Q", 1.0, Code, KEY_Q, .scheme = 1},
{"w", "W", 1.0, Code, KEY_W, .scheme = 1},
{"e", "E", 1.0, Code, KEY_E, .scheme = 1},
{"r", "R", 1.0, Code, KEY_R, .scheme = 1},
{"t", "T", 1.0, Code, KEY_T, .scheme = 1},
{"y", "Y", 1.0, Code, KEY_Y, .scheme = 1},
{"u", "U", 1.0, Code, KEY_U, .scheme = 1},
{"i", "I", 1.0, Code, KEY_I, .scheme = 1},
{"o", "O", 1.0, Code, KEY_O, .scheme = 1},
{"p", "P", 1.0, Code, KEY_P, .scheme = 1},
{"", "", 0.0, EndRow},
{"a", "A", 1.0, Code, KEY_A, .scheme = 1},
{"s", "S", 1.0, Code, KEY_S, .scheme = 1},
{"d", "D", 1.0, Code, KEY_D, .scheme = 1},
{"f", "F", 1.0, Code, KEY_F, .scheme = 1},
{"g", "G", 1.0, Code, KEY_G, .scheme = 1},
{"h", "H", 1.0, Code, KEY_H, .scheme = 1},
{"j", "J", 1.0, Code, KEY_J, .scheme = 1},
{"k", "K", 1.0, Code, KEY_K, .scheme = 1},
{"l", "L", 1.0, Code, KEY_L, .scheme = 1},
{"", "", 0.0, EndRow},
{"⇧", "⇫", 1.5, Mod, Shift},
{"z", "Z", 1.0, Code, KEY_Z, .scheme = 1},
{"x", "X", 1.0, Code, KEY_X, .scheme = 1},
{"c", "C", 1.0, Code, KEY_C, .scheme = 1},
{"v", "V", 1.0, Code, KEY_V, .scheme = 1},
{"b", "B", 1.0, Code, KEY_B, .scheme = 1},
{"n", "N", 1.0, Code, KEY_N, .scheme = 1},
{"m", "M", 1.0, Code, KEY_M, .scheme = 1},
{"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme = 1},
{"", "", 0.0, EndRow},
{"?123", "?123", 1.0, Layout, 0, &layouts[LandscapeSpecial]},
{"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme = 1},
{",", ",", 1.0, Code, KEY_COMMA, .scheme = 1},
{"🙂", "🙂", 1.0, Layout, 0, &layouts[Emoji]},
{"", "", 5.0, Code, KEY_SPACE, .scheme = 1},
{".", ".", 1.0, Code, KEY_DOT, .scheme = 1},
{"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme = 1},
/* end of layout */
{"", "", 0.0, Last},
};
static struct key keys_landscape_special[] = {
{"Esc", "Esc", 1.0, Code, KEY_ESC, .scheme = 1},
{"1", "1", 1.0, Code, KEY_1, .scheme = 1},
{"2", "2", 1.0, Code, KEY_2, .scheme = 1},
{"3", "3", 1.0, Code, KEY_3, .scheme = 1},
{"4", "4", 1.0, Code, KEY_4, .scheme = 1},
{"5", "5", 1.0, Code, KEY_5, .scheme = 1},
{"6", "6", 1.0, Code, KEY_6, .scheme = 1},
{"7", "7", 1.0, Code, KEY_7, .scheme = 1},
{"8", "8", 1.0, Code, KEY_8, .scheme = 1},
{"9", "9", 1.0, Code, KEY_9, .scheme = 1},
{"0", "0", 1.0, Code, KEY_0, .scheme = 1},
{"", "", 0.0, EndRow},
{"`", "`", 0.5, Code, KEY_GRAVE, .scheme = 1},
{"~", "~", 0.5, Code, KEY_GRAVE, .scheme = 1},
{"!", "!", 1.0, Code, KEY_1, .scheme = 1},
{"@", "@", 1.0, Code, KEY_2, .scheme = 1},
{"#", "#", 1.0, Code, KEY_3, .scheme = 1},
{"$", "$", 1.0, Code, KEY_4, .scheme = 1},
{"%", "%", 1.0, Code, KEY_5, .scheme = 1},
{"^", "^", 1.0, Code, KEY_6, .scheme = 1},
{"&", "&", 1.0, Code, KEY_7, .scheme = 1},
{"*", "*", 1.0, Code, KEY_8, .scheme = 1},
{"-", "-", 1.0, Code, KEY_MINUS, .scheme = 1},
{"=", "=", 1.0, Code, KEY_EQUAL, .scheme = 1},
{"", "", 0.0, EndRow},
{"Abc", "Abc", 1.0, Layout, 0, &layouts[Landscape]},
{"(", "(", 0.5, Code, KEY_9, .scheme = 1},
{")", ")", 0.5, Code, KEY_0, .scheme = 1},
{"[", "[", 0.5, Code, KEY_LEFTBRACE, .scheme = 1},
{"]", "]", 0.5, Code, KEY_RIGHTBRACE, .scheme = 1},
{"{", "{", 0.5, Code, KEY_LEFTBRACE, .scheme = 1},
{"}", "}", 0.5, Code, KEY_RIGHTBRACE, .scheme = 1},
{"\\", "\\", 0.75, Code, KEY_BACKSLASH, .scheme = 1},
{"|", "|", 0.75, Code, KEY_BACKSLASH, .scheme = 1},
{";", ";", 1.0, Code, KEY_SEMICOLON, .scheme = 1},
{":", ":", 1.0, Code, KEY_SEMICOLON, .scheme = 1},
{"'", "'", 1.0, Code, KEY_APOSTROPHE, .scheme = 1},
{"\"", "\"", 1.0, Code, KEY_APOSTROPHE, .scheme = 1},
{"/", ">", 1.0, Code, KEY_SLASH, .scheme = 1},
{"", "", 0.0, EndRow},
{"↑", "↑", 1.5, Code, KEY_UP, .scheme = 1},
{"↓", "↓", 1.5, Code, KEY_DOWN, .scheme = 1},
{"_", "_", 1.0, Code, KEY_MINUS, .scheme = 1},
{"+", "+", 1.0, Code, KEY_EQUAL, .scheme = 1},
{"<", "<", 1.0, Code, KEY_COMMA, .scheme = 1},
{">", ">", 1.0, Code, KEY_DOT, .scheme = 1},
{"/", "/", 1.0, Code, KEY_SLASH, .scheme = 1},
{"⌫", "⌫", 3.0, Code, KEY_BACKSPACE, .scheme = 1},
{"", "", 0.0, EndRow},
{"←", "←", 1.5, Code, KEY_LEFT, .scheme = 1},
{"→", "→", 1.5, Code, KEY_RIGHT, .scheme = 1},
{"Sup", "Sup", 1.0, Mod, Super, .scheme = 1},
{"", "", 6.0, Code, KEY_SPACE, .scheme = 1},
{"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme = 1},
/* end of layout */
{"", "", 0.0, Last},
};
+100
View File
@@ -0,0 +1,100 @@
{ config, pkgs, ... }:
{
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
defaultEditor = true;
initLua = ''
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.tabstop = 2
vim.opt.softtabstop = 2
vim.opt.expandtab = true
vim.opt.shiftwidth = 2
vim.opt.smartindent = true
vim.opt.wrap = false
vim.opt.swapfile = false
vim.opt.backup = false
vim.opt.undofile = false
vim.opt.hlsearch = false
vim.opt.incsearch = true
vim.opt.termguicolors = true
vim.opt.clipboard = "unnamedplus"
vim.opt.scrolloff = 999
vim.opt.updatetime = 50
vim.opt.foldmethod = "indent"
vim.opt.foldlevel = 99
vim.g.mapleader = " "
vim.keymap.set("n", "<leader>", ":")
vim.keymap.set("n", "<leader>w", "<cmd>w<CR>", { silent = true })
vim.keymap.set("n", "<leader>q", "<cmd>q<CR>", { silent = true })
vim.keymap.set("n", "<leader>wq", "<cmd>wq<CR>", { silent = true })
vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", { silent = true })
vim.keymap.set("n", "Q", "<nop>")
vim.keymap.set("n", "o", "o<esc>")
vim.keymap.set("n", "O", "O<esc>")
vim.keymap.set("i", "jj", "<esc>")
local is_dark = vim.o.background ~= "light"
require("cyberdream").setup({
transparent = is_dark,
variant = is_dark and "dark" or "light",
terminal_colors = true,
})
vim.cmd.colorscheme("cyberdream")
require("nvim-tree").setup({
view = { width = 30 },
renderer = { group_empty = true },
filters = { dotfiles = false },
})
require("bufferline").setup({
options = {
offsets = {
{
filetype = "NvimTree",
text = "Files",
highlight = "Directory",
separator = true,
},
},
},
})
require("lualine").setup({
ons = { theme = "auto" },
})
require("neocord").setup({
logo = "auto",
logo_tooltip = "Neovim",
main_image = "language",
show_time = true,
global_timer = true,
})
require("gitsigns").setup({
signs = {
add = { text = "+" },
change = { text = "~" },
delete = { text = "_" },
},
})
'';
plugins = with pkgs.vimPlugins; [
{ plugin = cyberdream-nvim; }
{ plugin = nvim-web-devicons; }
{ plugin = nvim-tree-lua; }
{ plugin = bufferline-nvim; }
{ plugin = lualine-nvim; }
{ plugin = neocord; }
{ plugin = gitsigns-nvim; }
];
};
}