mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-05-20 07:53:56 +02:00
Compare commits
5 commits
81d1fe565e
...
080c16564f
Author | SHA1 | Date | |
---|---|---|---|
LordMZTE | 080c16564f | ||
LordMZTE | be70635b95 | ||
LordMZTE | cc5c19cff0 | ||
LordMZTE | dfb37bcb33 | ||
LordMZTE | 7413815278 |
|
@ -2,11 +2,11 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712791164,
|
"lastModified": 1713537308,
|
||||||
"narHash": "sha256-3sbWO1mbpWsLepZGbWaMovSO7ndZeFqDSdX0hZ9nVyw=",
|
"narHash": "sha256-XtTSSIB2DA6tOv+l0FhvfDMiyCmhoRbNB+0SeInZkbk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "1042fd8b148a9105f3c0aca3a6177fd1d9360ba5",
|
"rev": "5c24cf2f0a12ad855f444c30b2421d044120c66f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
config._module.args = {
|
config._module.args = {
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
inherit pkgs system;
|
inherit pkgs system;
|
||||||
inherit (pkgs) lib stdenv;
|
inherit (pkgs) lib stdenv stdenvNoCC;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Local user nix env
|
# Local user nix env
|
||||||
|
|
13
mzte-nv/conf/lua/pluginconf/p-gitsigns.fnl
Normal file
13
mzte-nv/conf/lua/pluginconf/p-gitsigns.fnl
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
(local gitsigns (require :gitsigns))
|
||||||
|
|
||||||
|
(fn on-attach [bufnr]
|
||||||
|
(vim.keymap.set :n :gV
|
||||||
|
(fn []
|
||||||
|
(gitsigns.toggle_deleted)
|
||||||
|
(gitsigns.toggle_numhl)
|
||||||
|
(gitsigns.toggle_linehl)
|
||||||
|
(gitsigns.toggle_word_diff)
|
||||||
|
(gitsigns.toggle_current_line_blame))
|
||||||
|
{:buffer bufnr}))
|
||||||
|
|
||||||
|
(gitsigns.setup {:on_attach on-attach})
|
|
@ -33,7 +33,8 @@
|
||||||
:noice
|
:noice
|
||||||
:tsn-actions
|
:tsn-actions
|
||||||
:lightbulb
|
:lightbulb
|
||||||
:dressing])
|
:dressing
|
||||||
|
:gitsigns])
|
||||||
|
|
||||||
(local errors {})
|
(local errors {})
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,8 @@ fn lPathTransformerClosure(l: *c.lua_State) !c_int {
|
||||||
ffi.luaPushString(l, path);
|
ffi.luaPushString(l, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
c.lua_call(l, 2, 1);
|
c.lua_call(l, 2, 2);
|
||||||
return 1;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn transformJdtlsURI(uri_str: []const u8, writer: anytype) !void {
|
fn transformJdtlsURI(uri_str: []const u8, writer: anytype) !void {
|
||||||
|
|
|
@ -3,5 +3,6 @@
|
||||||
imports = [
|
imports = [
|
||||||
./cgnix
|
./cgnix
|
||||||
./mcdev.nix
|
./mcdev.nix
|
||||||
|
./userstyles.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
38
nix/userstyles.nix
Normal file
38
nix/userstyles.nix
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
# Module that provides an output for a stylus import file with catppuccin themes.
|
||||||
|
{ pkgs, stdenvNoCC, ... }:
|
||||||
|
let
|
||||||
|
flavor = "mocha";
|
||||||
|
accent-color = "red";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
packages.userstyles = stdenvNoCC.mkDerivation {
|
||||||
|
name = "userstyles.json";
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
url = "https://github.com/catppuccin/userstyles/releases/download/all-userstyles-export/import.json";
|
||||||
|
hash = "sha256-eYU9Y95au9mI3muS4+1QJt31W7s2zVmurdKbQ1dU+pk=";
|
||||||
|
};
|
||||||
|
|
||||||
|
dontUnpack = true;
|
||||||
|
|
||||||
|
# TODO: use better language
|
||||||
|
realBuilder = "${pkgs.deno}/bin/deno";
|
||||||
|
args = [
|
||||||
|
"run"
|
||||||
|
"-A"
|
||||||
|
(pkgs.writeText "build.js" ''
|
||||||
|
const json = await import(Deno.env.get("src"), { with: { type: "json" } });
|
||||||
|
const processed = json.default.map(theme => {
|
||||||
|
if (theme.usercssData?.vars?.accentColor?.default)
|
||||||
|
theme.usercssData.vars.accentColor.default = "${accent-color}";
|
||||||
|
|
||||||
|
if (theme.usercssData?.vars?.darkFlavor?.default)
|
||||||
|
theme.usercssData.vars.darkFlavor.default = "${flavor}";
|
||||||
|
|
||||||
|
return theme;
|
||||||
|
});
|
||||||
|
|
||||||
|
Deno.writeTextFileSync(Deno.env.get("out"), JSON.stringify(processed));
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -5,6 +5,17 @@ const log = std.log.scoped(.init);
|
||||||
|
|
||||||
const Connection = @import("Connection.zig");
|
const Connection = @import("Connection.zig");
|
||||||
|
|
||||||
|
const journal_prefix = "systemd-cat --level-prefix=false -- ";
|
||||||
|
|
||||||
|
fn initCommand(comptime argv: []const [:0]const u8) []const [:0]const u8 {
|
||||||
|
return &[_][:0]const u8{
|
||||||
|
"systemd-cat",
|
||||||
|
"--level-prefix=false",
|
||||||
|
"--identifier=" ++ argv[0],
|
||||||
|
"--",
|
||||||
|
} ++ argv;
|
||||||
|
}
|
||||||
|
|
||||||
pub fn init(alloc: std.mem.Allocator, initial: bool) !void {
|
pub fn init(alloc: std.mem.Allocator, initial: bool) !void {
|
||||||
const con = try Connection.init();
|
const con = try Connection.init();
|
||||||
defer con.deinit();
|
defer con.deinit();
|
||||||
|
@ -12,27 +23,27 @@ pub fn init(alloc: std.mem.Allocator, initial: bool) !void {
|
||||||
// Normal-Mode keyboard mappings
|
// Normal-Mode keyboard mappings
|
||||||
inline for (.{
|
inline for (.{
|
||||||
// "run command" maps
|
// "run command" maps
|
||||||
.{ "Super", "Return", "spawn", opts.term_command },
|
.{ "Super", "Return", "spawn", journal_prefix ++ opts.term_command },
|
||||||
.{ "Super+Control", "E", "spawn", opts.file_manager_command },
|
.{ "Super+Control", "E", "spawn", journal_prefix ++ opts.file_manager_command },
|
||||||
.{ "Super+Control", "B", "spawn", opts.browser_command },
|
.{ "Super+Control", "B", "spawn", journal_prefix ++ opts.browser_command },
|
||||||
.{ "Super+Control", "V", "spawn", "vinput md" },
|
.{ "Super+Control", "V", "spawn", journal_prefix ++ "vinput md" },
|
||||||
.{ "Super+Control", "L", "spawn", "physlock" },
|
.{ "Super+Control", "L", "spawn", journal_prefix ++ "physlock" },
|
||||||
.{ "Super+Shift", "P", "spawn", "gpower2" },
|
.{ "Super+Shift", "P", "spawn", journal_prefix ++ "gpower2" },
|
||||||
.{ "Alt", "Space", "spawn", "rofi -show combi" },
|
.{ "Alt", "Space", "spawn", journal_prefix ++ "rofi -show combi" },
|
||||||
.{ "Super+Alt", "Space", "spawn", "rofi -show emoji" },
|
.{ "Super+Alt", "Space", "spawn", journal_prefix ++ "rofi -show emoji" },
|
||||||
.{ "None", "Print", "spawn", "grim -g \"$(slurp; sleep 1)\" ~/Downloads/screenshot.png" },
|
.{ "None", "Print", "spawn", journal_prefix ++ "grim -g \"$(slurp; sleep 1)\" ~/Downloads/screenshot.png" },
|
||||||
.{ "Shift", "Print", "spawn", "grim -g \"$(slurp; sleep 1)\" - | feh -" },
|
.{ "Shift", "Print", "spawn", "grim -g \"$(slurp; sleep 1)\" - | " ++ journal_prefix ++ " feh -" },
|
||||||
|
|
||||||
// media keys
|
// media keys
|
||||||
.{ "None", "XF86Eject", "spawn", "eject -T" },
|
.{ "None", "XF86Eject", "spawn", journal_prefix ++ "eject -T" },
|
||||||
.{ "None", "XF86AudioRaiseVolume", "spawn", "pactl set-sink-volume @DEFAULT_SINK@ +5%" },
|
.{ "None", "XF86AudioRaiseVolume", "spawn", journal_prefix ++ "pactl set-sink-volume @DEFAULT_SINK@ +5%" },
|
||||||
.{ "None", "XF86AudioLowerVolume", "spawn", "pactl set-sink-volume @DEFAULT_SINK@ -5%" },
|
.{ "None", "XF86AudioLowerVolume", "spawn", journal_prefix ++ "pactl set-sink-volume @DEFAULT_SINK@ -5%" },
|
||||||
.{ "None", "XF86AudioMute", "spawn", "pactl set-sink-mute @DEFAULT_SINK@ toggle" },
|
.{ "None", "XF86AudioMute", "spawn", journal_prefix ++ "pactl set-sink-mute @DEFAULT_SINK@ toggle" },
|
||||||
.{ "None", "XF86AudioMicMute", "spawn", "pactl set-source-mute @DEFAULT_SINK@ toggle" },
|
.{ "None", "XF86AudioMicMute", "spawn", journal_prefix ++ "pactl set-source-mute @DEFAULT_SINK@ toggle" },
|
||||||
.{ "None", "XF86AudioMedia", "spawn", "playerctl play-pause" },
|
.{ "None", "XF86AudioMedia", "spawn", journal_prefix ++ "playerctl play-pause" },
|
||||||
.{ "None", "XF86AudioPlay", "spawn", "playerctl play-pause" },
|
.{ "None", "XF86AudioPlay", "spawn", journal_prefix ++ "playerctl play-pause" },
|
||||||
.{ "None", "XF86AudioPrev", "spawn", "playerctl previous" },
|
.{ "None", "XF86AudioPrev", "spawn", journal_prefix ++ "playerctl previous" },
|
||||||
.{ "None", "XF86AudioNext", "spawn", "playerctl next" },
|
.{ "None", "XF86AudioNext", "spawn", journal_prefix ++ "playerctl next" },
|
||||||
|
|
||||||
// control maps
|
// control maps
|
||||||
.{ "Super+Shift", "E", "exit" },
|
.{ "Super+Shift", "E", "exit" },
|
||||||
|
@ -225,7 +236,7 @@ pub fn init(alloc: std.mem.Allocator, initial: bool) !void {
|
||||||
// TODO: wonk
|
// TODO: wonk
|
||||||
// We use an arena here to prevent leaks because process.Child apparently doesn't support
|
// We use an arena here to prevent leaks because process.Child apparently doesn't support
|
||||||
// detaching.
|
// detaching.
|
||||||
var child = std.process.Child.init(&argv, child_arena.allocator());
|
var child = std.process.Child.init(initCommand(&argv), child_arena.allocator());
|
||||||
try child.spawn();
|
try child.spawn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue