mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-05-19 23:43:46 +02:00
Compare commits
5 commits
81d1fe565e
...
080c16564f
Author | SHA1 | Date | |
---|---|---|---|
LordMZTE | 080c16564f | ||
LordMZTE | be70635b95 | ||
LordMZTE | cc5c19cff0 | ||
LordMZTE | dfb37bcb33 | ||
LordMZTE | 7413815278 |
|
@ -23,7 +23,7 @@
|
|||
config._module.args = {
|
||||
inherit inputs;
|
||||
inherit pkgs system;
|
||||
inherit (pkgs) lib stdenv;
|
||||
inherit (pkgs) lib stdenv stdenvNoCC;
|
||||
};
|
||||
|
||||
# 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
|
||||
:tsn-actions
|
||||
:lightbulb
|
||||
:dressing])
|
||||
:dressing
|
||||
:gitsigns])
|
||||
|
||||
(local errors {})
|
||||
|
||||
|
|
|
@ -41,8 +41,8 @@ fn lPathTransformerClosure(l: *c.lua_State) !c_int {
|
|||
ffi.luaPushString(l, path);
|
||||
}
|
||||
|
||||
c.lua_call(l, 2, 1);
|
||||
return 1;
|
||||
c.lua_call(l, 2, 2);
|
||||
return 2;
|
||||
}
|
||||
|
||||
fn transformJdtlsURI(uri_str: []const u8, writer: anytype) !void {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# Module that provides an output for a stylus import file with catppuccin themes.
|
||||
{ pkgs, stdenv, ... }:
|
||||
{ pkgs, stdenvNoCC, ... }:
|
||||
let
|
||||
flavor = "mocha";
|
||||
accent-color = "red";
|
||||
in
|
||||
{
|
||||
packages.userstyles = stdenv.mkDerivation {
|
||||
packages.userstyles = stdenvNoCC.mkDerivation {
|
||||
name = "userstyles.json";
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://github.com/catppuccin/userstyles/releases/download/all-userstyles-export/import.json";
|
||||
|
|
|
@ -5,6 +5,17 @@ const log = std.log.scoped(.init);
|
|||
|
||||
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 {
|
||||
const con = try Connection.init();
|
||||
defer con.deinit();
|
||||
|
@ -12,27 +23,27 @@ pub fn init(alloc: std.mem.Allocator, initial: bool) !void {
|
|||
// Normal-Mode keyboard mappings
|
||||
inline for (.{
|
||||
// "run command" maps
|
||||
.{ "Super", "Return", "spawn", opts.term_command },
|
||||
.{ "Super+Control", "E", "spawn", opts.file_manager_command },
|
||||
.{ "Super+Control", "B", "spawn", opts.browser_command },
|
||||
.{ "Super+Control", "V", "spawn", "vinput md" },
|
||||
.{ "Super+Control", "L", "spawn", "physlock" },
|
||||
.{ "Super+Shift", "P", "spawn", "gpower2" },
|
||||
.{ "Alt", "Space", "spawn", "rofi -show combi" },
|
||||
.{ "Super+Alt", "Space", "spawn", "rofi -show emoji" },
|
||||
.{ "None", "Print", "spawn", "grim -g \"$(slurp; sleep 1)\" ~/Downloads/screenshot.png" },
|
||||
.{ "Shift", "Print", "spawn", "grim -g \"$(slurp; sleep 1)\" - | feh -" },
|
||||
.{ "Super", "Return", "spawn", journal_prefix ++ opts.term_command },
|
||||
.{ "Super+Control", "E", "spawn", journal_prefix ++ opts.file_manager_command },
|
||||
.{ "Super+Control", "B", "spawn", journal_prefix ++ opts.browser_command },
|
||||
.{ "Super+Control", "V", "spawn", journal_prefix ++ "vinput md" },
|
||||
.{ "Super+Control", "L", "spawn", journal_prefix ++ "physlock" },
|
||||
.{ "Super+Shift", "P", "spawn", journal_prefix ++ "gpower2" },
|
||||
.{ "Alt", "Space", "spawn", journal_prefix ++ "rofi -show combi" },
|
||||
.{ "Super+Alt", "Space", "spawn", journal_prefix ++ "rofi -show emoji" },
|
||||
.{ "None", "Print", "spawn", journal_prefix ++ "grim -g \"$(slurp; sleep 1)\" ~/Downloads/screenshot.png" },
|
||||
.{ "Shift", "Print", "spawn", "grim -g \"$(slurp; sleep 1)\" - | " ++ journal_prefix ++ " feh -" },
|
||||
|
||||
// media keys
|
||||
.{ "None", "XF86Eject", "spawn", "eject -T" },
|
||||
.{ "None", "XF86AudioRaiseVolume", "spawn", "pactl set-sink-volume @DEFAULT_SINK@ +5%" },
|
||||
.{ "None", "XF86AudioLowerVolume", "spawn", "pactl set-sink-volume @DEFAULT_SINK@ -5%" },
|
||||
.{ "None", "XF86AudioMute", "spawn", "pactl set-sink-mute @DEFAULT_SINK@ toggle" },
|
||||
.{ "None", "XF86AudioMicMute", "spawn", "pactl set-source-mute @DEFAULT_SINK@ toggle" },
|
||||
.{ "None", "XF86AudioMedia", "spawn", "playerctl play-pause" },
|
||||
.{ "None", "XF86AudioPlay", "spawn", "playerctl play-pause" },
|
||||
.{ "None", "XF86AudioPrev", "spawn", "playerctl previous" },
|
||||
.{ "None", "XF86AudioNext", "spawn", "playerctl next" },
|
||||
.{ "None", "XF86Eject", "spawn", journal_prefix ++ "eject -T" },
|
||||
.{ "None", "XF86AudioRaiseVolume", "spawn", journal_prefix ++ "pactl set-sink-volume @DEFAULT_SINK@ +5%" },
|
||||
.{ "None", "XF86AudioLowerVolume", "spawn", journal_prefix ++ "pactl set-sink-volume @DEFAULT_SINK@ -5%" },
|
||||
.{ "None", "XF86AudioMute", "spawn", journal_prefix ++ "pactl set-sink-mute @DEFAULT_SINK@ toggle" },
|
||||
.{ "None", "XF86AudioMicMute", "spawn", journal_prefix ++ "pactl set-source-mute @DEFAULT_SINK@ toggle" },
|
||||
.{ "None", "XF86AudioMedia", "spawn", journal_prefix ++ "playerctl play-pause" },
|
||||
.{ "None", "XF86AudioPlay", "spawn", journal_prefix ++ "playerctl play-pause" },
|
||||
.{ "None", "XF86AudioPrev", "spawn", journal_prefix ++ "playerctl previous" },
|
||||
.{ "None", "XF86AudioNext", "spawn", journal_prefix ++ "playerctl next" },
|
||||
|
||||
// control maps
|
||||
.{ "Super+Shift", "E", "exit" },
|
||||
|
@ -225,7 +236,7 @@ pub fn init(alloc: std.mem.Allocator, initial: bool) !void {
|
|||
// TODO: wonk
|
||||
// We use an arena here to prevent leaks because process.Child apparently doesn't support
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue