neovim lspconfig

This commit is contained in:
Tristan 2023-12-23 15:43:26 +00:00
parent fb5c04a84a
commit 34aaaf63d2
29 changed files with 1705 additions and 1399 deletions

View file

@ -1,5 +1,9 @@
{ config, pkgs, lib, ... }:
let
{
config,
pkgs,
lib,
...
}: let
my-deps = {
notify-send = "${pkgs.libnotify}/bin/notify-send";
playerctl = "${pkgs.playerctl}/bin/playerctl";
@ -21,8 +25,7 @@ let
hyprpicker = "${pkgs.hyprpicker}/bin/hyprpicker";
sed = "${pkgs.gnused}/bin/sed";
};
in
{
in {
programs.scripts = [
{
name = "play-pause";
@ -38,25 +41,33 @@ in
fi
'';
hotkeys = [
{ modifier = ""; key = "XF86AudioPlay"; }
{
modifier = "";
key = "XF86AudioPlay";
}
];
}
{
name = "bwmenu";
text = ''
items="$(rbw list)"
echo "$items" | ${ my-deps.menu } | xargs -I_ rbw get _ | wl-copy
echo "$items" | ${my-deps.menu} | xargs -I_ rbw get _ | wl-copy
'';
hotkeys = [{ key = "P"; }];
hotkeys = [{key = "P";}];
install = false;
}
{
name = "bwotpmenu";
text = ''
items="$(rbw list)"
echo "$items" | ${ my-deps.menu } | xargs -I_ rbw code _ | wl-copy
echo "$items" | ${my-deps.menu} | xargs -I_ rbw code _ | wl-copy
'';
hotkeys = [{ modifier = "SUPER_SHIFT"; key = "P"; }];
hotkeys = [
{
modifier = "SUPER_SHIFT";
key = "P";
}
];
install = false;
}
{
@ -72,7 +83,10 @@ in
cat "$FILE" | wl-copy -t image/png
'';
hotkeys = [
{ modifier = "SUPER_SHIFT"; key = "S"; }
{
modifier = "SUPER_SHIFT";
key = "S";
}
];
}
{
@ -82,8 +96,16 @@ in
${my-deps.notify-send} "Brightness" -h int:value:$(light) -a brightness-down -t 1000
'';
hotkeys = [
{ modifier = ""; key = "XF86MonBrightnessDown"; args = "10"; }
{ modifier = "SHIFT"; key = "XF86MonBrightnessDown"; args = "1"; }
{
modifier = "";
key = "XF86MonBrightnessDown";
args = "10";
}
{
modifier = "SHIFT";
key = "XF86MonBrightnessDown";
args = "1";
}
];
install = false;
}
@ -94,8 +116,16 @@ in
${my-deps.notify-send} "Brightness" -h int:value:$(light) -a brightness-up -t 1000
'';
hotkeys = [
{ modifier = ""; key = "XF86MonBrightnessUp"; args = "10"; }
{ modifier = "SHIFT"; key = "XF86MonBrightnessUp"; args = "1"; }
{
modifier = "";
key = "XF86MonBrightnessUp";
args = "10";
}
{
modifier = "SHIFT";
key = "XF86MonBrightnessUp";
args = "1";
}
];
install = false;
}
@ -110,7 +140,7 @@ in
${my-deps.xargs} -I_ ${my-deps.hyprctl} dispatch focuswindow title:"_"
'';
hotkeys = [
{ key = "TAB"; }
{key = "TAB";}
];
}
{
@ -118,18 +148,22 @@ in
text = ''
${my-deps.hyprpicker} | wl-copy && notify-send "Copied Colour" "$(wl-paste)"
'';
hotkeys = [{
key = "G";
}];
hotkeys = [
{
key = "G";
}
];
}
(lib.mkIf config.roles.mpd.enable {
name = "ncmpcpp";
text = ''
${my-deps.terminal} -e ncmpcpp
'';
hotkeys = [{
key = "M";
}];
hotkeys = [
{
key = "M";
}
];
install = false;
})
{
@ -137,9 +171,11 @@ in
text = ''
${my-deps.runmenu}
'';
hotkeys = [{
key = "D";
}];
hotkeys = [
{
key = "D";
}
];
install = false;
}
{
@ -147,10 +183,12 @@ in
text = ''
hyprctl keyword misc:cursor_zoom_factor 2
'';
hotkeys = [{
modifier = "SUPER";
key = "EQUAL";
}];
hotkeys = [
{
modifier = "SUPER";
key = "EQUAL";
}
];
install = false;
}
{
@ -158,10 +196,12 @@ in
text = ''
hyprctl keyword misc:cursor_zoom_factor 1
'';
hotkeys = [{
modifier = "SUPER";
key = "MINUS";
}];
hotkeys = [
{
modifier = "SUPER";
key = "MINUS";
}
];
install = false;
}
{
@ -170,19 +210,25 @@ in
${my-deps.amixer} sset Master 5%+ && ${my-deps.amixer} sset Master unmute
'';
hotkeys = [
{ key = "bracketright"; }
{ modifier = ""; key = "XF86AudioRaiseVolume"; }
{key = "bracketright";}
{
modifier = "";
key = "XF86AudioRaiseVolume";
}
];
install = false;
}
{
name = "lower-volume";
text = ''
${ my-deps.amixer } sset Master 5%-
${my-deps.amixer} sset Master 5%-
'';
hotkeys = [
{ key = "bracketleft"; }
{ modifier = ""; key = "XF86AudioLowerVolume"; }
{key = "bracketleft";}
{
modifier = "";
key = "XF86AudioLowerVolume";
}
];
install = false;
}
@ -192,8 +238,14 @@ in
${my-deps.playerctl} next
'';
hotkeys = [
{ modifier = "SUPER_SHIFT"; key = "period"; }
{ modifier = ""; key = "XF86AudioNext"; }
{
modifier = "SUPER_SHIFT";
key = "period";
}
{
modifier = "";
key = "XF86AudioNext";
}
];
install = false;
}
@ -203,8 +255,14 @@ in
${my-deps.playerctl} previous
'';
hotkeys = [
{ modifier = "SUPER_SHIFT"; key = "comma"; }
{ modifier = ""; key = "XF86AudioPrev"; }
{
modifier = "SUPER_SHIFT";
key = "comma";
}
{
modifier = "";
key = "XF86AudioPrev";
}
];
install = false;
}
@ -212,7 +270,7 @@ in
name = "terminal";
text = my-deps.terminal;
hotkeys = [
{ key = "RETURN"; }
{key = "RETURN";}
];
install = false;
}
@ -220,7 +278,7 @@ in
name = "fileman";
text = my-deps.fileman;
hotkeys = [
{ key = "O"; }
{key = "O";}
];
install = false;
}
@ -237,7 +295,7 @@ in
esac
'';
hotkeys = [
{ key = "Z"; }
{key = "Z";}
];
install = false;
}