Palette library integrated + polybar and alacritty
This commit is contained in:
parent
a61bfe3c50
commit
ef5b48d142
17 changed files with 1090 additions and 214 deletions
|
|
@ -1,12 +1,11 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
nord = import ../configs/themes/nord.nix;
|
||||
in {
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
# Include fonts packages
|
||||
home.packages = with pkgs; [ nerdfonts ];
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
env.TERM = "xterm-256color";
|
||||
scrolling.history = 3000;
|
||||
font = {
|
||||
normal.family = "FuraCode Nerd Font Mono";
|
||||
|
|
@ -18,65 +17,28 @@ in {
|
|||
hints.modifiers = "Control";
|
||||
};
|
||||
|
||||
# NORD Theme: https://github.com/arcticicestudio/nord-alacritty
|
||||
colors = {
|
||||
primary = {
|
||||
background = nord.n0;
|
||||
foreground = nord.n6;
|
||||
dim_foreground = nord.n4;
|
||||
};
|
||||
cursor = {
|
||||
text = nord.n0;
|
||||
cursor = nord.n4;
|
||||
};
|
||||
vi_mode_cursor = {
|
||||
text = nord.n0;
|
||||
cursor = nord.n4;
|
||||
};
|
||||
colors = with pkgs.extra; {
|
||||
|
||||
primary = palette.toRgbHex colorPalette.primary;
|
||||
cursor = palette.toRgbHex colorPalette.cursor;
|
||||
vi_mode_cursor = palette.toRgbHex colorPalette.vi_mode_cursor;
|
||||
selection = {
|
||||
text = "CellForeground";
|
||||
background = nord.n3;
|
||||
background = color.toRgbHex colorPalette.dim.blue;
|
||||
};
|
||||
search = {
|
||||
matches = {
|
||||
matches = {
|
||||
foreground = "CellForeground";
|
||||
background = nord.n8;
|
||||
};
|
||||
background = color.toRgbHex colorPalette.dim.cyan;
|
||||
};
|
||||
bar = {
|
||||
background = nord.n2;
|
||||
foreground = nord.n4;
|
||||
# foreground = "CellForeground";
|
||||
background = color.toRgbHex colorPalette.dim.yellow;
|
||||
};
|
||||
};
|
||||
normal = {
|
||||
black = nord.n0;
|
||||
red = nord.n11;
|
||||
green = nord.n14;
|
||||
yellow = nord.n13;
|
||||
blue = nord.n9;
|
||||
magenta = nord.n15;
|
||||
cyan = nord.n9;
|
||||
white = nord.n5;
|
||||
};
|
||||
bright = {
|
||||
black = nord.n3;
|
||||
red = nord.n11;
|
||||
green = nord.n14;
|
||||
yellow = nord.n13;
|
||||
blue = nord.n9;
|
||||
magenta = nord.n15;
|
||||
cyan = nord.n8;
|
||||
white = nord.n6;
|
||||
};
|
||||
dim = {
|
||||
black = "#373e4d";
|
||||
red = "#94545d";
|
||||
green = "#809575";
|
||||
yellow = "#b29e75";
|
||||
blue = "#68809a";
|
||||
magenta = "#8c738c";
|
||||
cyan = "#6d96a5";
|
||||
white = nord.n4;
|
||||
};
|
||||
normal = palette.toRgbHex colorPalette.normal;
|
||||
bright = palette.toRgbHex colorPalette.bright;
|
||||
dim = palette.toRgbHex colorPalette.dim;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,5 +3,6 @@
|
|||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
enableNixDirenvIntegration = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
19
modules/grobi.nix
Normal file
19
modules/grobi.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
services.grobi = {
|
||||
enable = true;
|
||||
rules = [
|
||||
{
|
||||
name = "Home";
|
||||
outputs_connected = [ "HDMI-0" "eDP-1-1" ];
|
||||
configure_row = [ "eDP-1-1" "HDMI-0" ];
|
||||
primary = "HDMI-0";
|
||||
}
|
||||
{
|
||||
name = "Fallback";
|
||||
configure_single = "eDP-1-1";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -2,7 +2,34 @@
|
|||
let
|
||||
nixpkgs = import <nixpkgs> {};
|
||||
kakCmd = "kak";
|
||||
in {
|
||||
|
||||
rustPlugins = with pkgs; [
|
||||
cargo
|
||||
cargo-watch
|
||||
clippy
|
||||
rust-analyzer
|
||||
rustup
|
||||
];
|
||||
pythonPlugins = with pkgs.python38Packages; [
|
||||
pyls-black
|
||||
python-language-server
|
||||
];
|
||||
nixPlugins = with pkgs; [
|
||||
rnix-lsp
|
||||
];
|
||||
spellingPlugins = with pkgs; [
|
||||
aspell
|
||||
aspellDicts.en
|
||||
aspellDicts.en-computers
|
||||
aspellDicts.en-science
|
||||
aspellDicts.it
|
||||
];
|
||||
dataFormats = with pkgs; [
|
||||
# yaml-language-server
|
||||
];
|
||||
|
||||
in
|
||||
{
|
||||
home.sessionVariables = {
|
||||
EDITOR = kakCmd;
|
||||
VISUAL = kakCmd;
|
||||
|
|
@ -11,8 +38,8 @@ in {
|
|||
programs.zsh.shellAliases = { k = kakCmd; };
|
||||
|
||||
programs.kakoune = {
|
||||
enable = true;
|
||||
config = {
|
||||
enable = true;
|
||||
config = {
|
||||
colorScheme = "nord";
|
||||
tabStop = 2;
|
||||
indentWidth = 2;
|
||||
|
|
@ -36,54 +63,58 @@ in {
|
|||
};
|
||||
keyMappings = [
|
||||
{ mode = "normal"; docstring = "Open file"; key = "<c-o>"; effect = ":edit<space>"; }
|
||||
{ mode = "user"; docstring = "Code actions"; key = "a"; effect = ":lsp-code-actions<ret>"; }
|
||||
{ mode = "user"; docstring = "Comment block"; key = "b"; effect = ":comment-block<ret>"; }
|
||||
{ mode = "user"; docstring = "Comment line"; key = "l"; effect = ":comment-line<ret>"; }
|
||||
{ mode = "user"; docstring = "Show hover info"; key = "q"; effect = ":lsp-hover<ret>"; }
|
||||
{ mode = "user"; docstring = "Jump to definition"; key = "d"; effect = ":lsp-definition<ret>"; }
|
||||
{ mode = "user"; docstring = "List project diagnostics"; key = "i"; effect = ":lsp-diagnostics<ret>"; }
|
||||
{ mode = "user"; docstring = "Jump to type definition"; key = "t"; effect = ":lsp-type-definition<ret>"; }
|
||||
{ mode = "user"; docstring = "Code actions"; key = "a"; effect = ":lsp-code-actions<ret>"; }
|
||||
{ mode = "user"; docstring = "Format code"; key = "F"; effect = ":lsp-formatting-sync<ret>"; }
|
||||
{ mode = "user"; docstring = "Spellcheck"; key = "s"; effect = ":spell "; }
|
||||
{ mode = "user"; docstring = "Spellcheck English"; key = "S"; effect = ":spell en<ret>"; }
|
||||
{ mode = "user"; docstring = "Copy to clipboard"; key = "y"; effect = "<a-|>${pkgs.xclip}/bin/xclip -i -selection clipboard<ret>"; }
|
||||
{ mode = "user"; docstring = "Paste from clipboard (before)"; key = "p"; effect = "!${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>"; }
|
||||
{ mode = "user"; docstring = "Format code"; key = "F"; effect = ":lsp-formatting-sync<ret>"; }
|
||||
{ mode = "user"; docstring = "Jump to definition"; key = "d"; effect = ":lsp-definition<ret>"; }
|
||||
{ mode = "user"; docstring = "Jump to type definition"; key = "t"; effect = ":lsp-type-definition<ret>"; }
|
||||
{ mode = "user"; docstring = "List project diagnostics"; key = "i"; effect = ":lsp-diagnostics<ret>"; }
|
||||
{ mode = "user"; docstring = "Paste from clipboard (after)"; key = "P"; effect = "<a-!>${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>"; }
|
||||
{ mode = "user"; docstring = "Paste from clipboard (before)"; key = "p"; effect = "!${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>"; }
|
||||
{ mode = "user"; docstring = "Show hover info"; key = "q"; effect = ":lsp-hover<ret>"; }
|
||||
{ mode = "user"; docstring = "Spellcheck English"; key = "S"; effect = ":spell en<ret>"; }
|
||||
{ mode = "user"; docstring = "Spellcheck"; key = "s"; effect = ":spell "; }
|
||||
];
|
||||
hooks = [
|
||||
{ name = "WinSetOption"; option = "filetype=(rust|python|c|cpp|latex|javascript|go|nix)"; commands = builtins.concatStringsSep "\n" [ "lsp-enable-window" ]; }
|
||||
# { name = "BufCreate"; option = ".*"; commands = "editorconfig-load"; }
|
||||
{ name = "ModuleLoaded"; option = "powerline"; commands = builtins.concatStringsSep "\n" [ "powerline-enable" ]; }
|
||||
{ name = "ModuleLoaded"; option = "auto-pairs"; commands = "auto-pairs-enable"; }
|
||||
{ name = "InsertCompletionShow"; option = ".*"; commands = builtins.concatStringsSep "\n" [ "map window insert <tab> <c-n>" "map window insert <s-tab> <c-p>" ]; }
|
||||
{ name = "BufCreate"; option = ".*"; commands = "editorconfig-load"; }
|
||||
{ name = "InsertCompletionHide"; option = ".*"; commands = builtins.concatStringsSep "\n" [ "unmap window insert <tab> <c-n>" "unmap window insert <s-tab> <c-p>" ]; }
|
||||
{ name = "InsertCompletionShow"; option = ".*"; commands = builtins.concatStringsSep "\n" [ "map window insert <tab> <c-n>" "map window insert <s-tab> <c-p>" ]; }
|
||||
{ name = "ModuleLoaded"; option = "auto-pairs"; commands = "auto-pairs-enable"; }
|
||||
{ name = "ModuleLoaded"; option = "powerline"; commands = builtins.concatStringsSep "\n" [ "powerline-enable" ]; }
|
||||
{ name = "WinSetOption"; option = "filetype=(rust|python|c|cpp|latex|javascript|go|nix)"; commands = builtins.concatStringsSep "\n" [ "lsp-enable-window" ]; }
|
||||
];
|
||||
};
|
||||
extraConfig = builtins.concatStringsSep "\n" [
|
||||
extraConfig = builtins.concatStringsSep "\n" [
|
||||
"# Custom commands"
|
||||
"define-command -docstring 'save and quit' x 'write-all; quit' # Save and quit with 'x'"
|
||||
"add-highlighter global/ regex \\h+$ 0:Error # Highlight trailing spaces"
|
||||
"eval %sh{kak-lsp --kakoune -s \$kak_session} # Start kak-lsp"
|
||||
"require-module prelude"
|
||||
"# require-module auto-pairs"
|
||||
"require-module connect"
|
||||
"require-module connect-broot"
|
||||
"require-module connect-lf"
|
||||
"require-module connect-rofi"
|
||||
"require-module powerline"
|
||||
];
|
||||
plugins = (with pkgs; [
|
||||
aspell
|
||||
aspellDicts.en
|
||||
aspellDicts.en-computers
|
||||
aspellDicts.en-science
|
||||
aspellDicts.it
|
||||
kak-lsp
|
||||
kakounePlugins.powerline-kak
|
||||
rnix-lsp
|
||||
]) ++ (with nixpkgs; [
|
||||
# kakounePlugins.kak-lsp
|
||||
# kakounePlugins.prelude-kak
|
||||
# kakounePlugins.auto-pairs-kak
|
||||
]);
|
||||
];
|
||||
plugins = (
|
||||
with pkgs; [
|
||||
broot
|
||||
lf
|
||||
editorconfig-core-c
|
||||
kakounePlugins.auto-pairs-kak
|
||||
kakounePlugins.kak-lsp
|
||||
kakounePlugins.powerline-kak
|
||||
kakounePlugins.prelude-kak
|
||||
]
|
||||
) ++ (
|
||||
with nixpkgs; [
|
||||
kakounePlugins.connect-kak
|
||||
]
|
||||
) ++ rustPlugins ++ pythonPlugins ++ nixPlugins ++ spellingPlugins ++ dataFormats;
|
||||
};
|
||||
|
||||
xdg.configFile."kak-lsp/kak-lsp.toml".source = ../configs/kak-lsp/kak-lsp.toml;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -13,5 +13,8 @@ in {
|
|||
# };
|
||||
font = "FuraCode Nerd Font Mono 10";
|
||||
};
|
||||
extraConfig = ''
|
||||
backround_opacity = 0.95;
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
3
modules/lorri.nix
Normal file
3
modules/lorri.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
services.lorri.enable = true;
|
||||
}
|
||||
307
modules/polybar.nix
Normal file
307
modules/polybar.nix
Normal file
|
|
@ -0,0 +1,307 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
grep = "${pkgs.gnugrep}/bin/grep";
|
||||
cut = "${pkgs.coreutils}/bin/cut";
|
||||
pavucontrol = "${pkgs.pavucontrol}/bin/pavucontrol";
|
||||
pgrep = "${pkgs.procps}/bin/pgrep";
|
||||
pkill = "${pkgs.procps}/bin/pkill";
|
||||
playerCtl = "${pkgs.playerctl}/bin/playerctl";
|
||||
playerStatus = "${playerCtl} -f '{{emoji(status)}} {{title}} - {{artist}}' metadata";
|
||||
colors = with pkgs.extra; palette.toARGBHex rec {
|
||||
|
||||
normal = {
|
||||
foreground = colorPalette.normal.white;
|
||||
background = color.tAlphaRgba (v: 240) colorPalette.normal.black;
|
||||
underline = colorPalette.normal.blue;
|
||||
};
|
||||
|
||||
active = palette.tPalette (c: color.brighten c "50%") normal;
|
||||
|
||||
selected = {
|
||||
foreground = colorPalette.bright.white;
|
||||
background = color.tAlphaRgba (v: 240) colorPalette.dim.blue;
|
||||
underline = colorPalette.dim.white;
|
||||
};
|
||||
|
||||
alert = colorPalette.bright.red;
|
||||
|
||||
green = colorPalette.normal.green;
|
||||
yellow = colorPalette.normal.yellow;
|
||||
orange = colorPalette.bright.red;
|
||||
red = colorPalette.normal.red;
|
||||
|
||||
transparent = color.transparent;
|
||||
};
|
||||
|
||||
commonBar = {
|
||||
locale = config.home.language.base;
|
||||
monitor = "\${env:MONITOR}";
|
||||
width = "100%";
|
||||
height = 20;
|
||||
radius = 6.0;
|
||||
fixed-center = false;
|
||||
background = colors.normal.background;
|
||||
foreground = colors.normal.foreground;
|
||||
line-size = 2;
|
||||
line-color = colors.normal.underline;
|
||||
padding = {
|
||||
left = 0;
|
||||
right = 0;
|
||||
};
|
||||
module.margin = { left = 0; right = 0; };
|
||||
separator = " ";
|
||||
border = {
|
||||
color = colors.transparent;
|
||||
left.size = 2;
|
||||
righ.sizet = 2;
|
||||
top.size = 2;
|
||||
bottom.size = 0;
|
||||
};
|
||||
font = [ "FuraCode Nerd Font Mono:pixelsize=10;2" "unifont:fontformat=truetype:size=8:antialias=false;0" "siji:pixelsize=10;1" ];
|
||||
tray = {
|
||||
position = "right";
|
||||
padding = 0;
|
||||
};
|
||||
wm-restack = "bspwm";
|
||||
};
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [ nerdfonts ];
|
||||
services.polybar = {
|
||||
enable = true;
|
||||
package = pkgs.polybarFull;
|
||||
script =
|
||||
''
|
||||
monitor=`polybar -m | ${grep} primary | ${cut} -d":" -f1`
|
||||
MONITOR=$monitor polybar primary &
|
||||
monitors=(`polybar -m | ${grep} -v primary | ${cut} -d":" -f1`)
|
||||
for monitor in "''${monitors[@]}"; do
|
||||
MONITOR=$monitor polybar secondary &
|
||||
done
|
||||
'';
|
||||
|
||||
settings = {
|
||||
"settings" = {
|
||||
screenchange-reload = false;
|
||||
};
|
||||
|
||||
"bar/primary" = commonBar // {
|
||||
modules-left = "bspwm";
|
||||
# modules-center =
|
||||
modules-right = "player pulseaudio temperature cpu memory battery date powermenu";
|
||||
enable-ipc = true;
|
||||
};
|
||||
|
||||
"bar/secondary" = commonBar // {
|
||||
modules-left = "bspwm";
|
||||
# modules-center =
|
||||
modules-right = "player pulseaudio temperature cpu memory battery date powermenu";
|
||||
enable-ipc = true;
|
||||
};
|
||||
|
||||
"module/battery" = {
|
||||
type = "internal/battery";
|
||||
|
||||
adapter = "AC";
|
||||
battery = "BAT0";
|
||||
full.at = 98;
|
||||
|
||||
animation = {
|
||||
charging = {
|
||||
text = [ "" "" "" ];
|
||||
framerate = "750";
|
||||
};
|
||||
discharging = {
|
||||
text = [ "" "" "" ];
|
||||
framerate = "750";
|
||||
};
|
||||
};
|
||||
|
||||
format = {
|
||||
charging = colors.selected // {
|
||||
text = "<animation-charging> <label-charging>";
|
||||
};
|
||||
discharging = colors.active // {
|
||||
text = "<animation-discharging> <label-discharging>";
|
||||
};
|
||||
full = colors.normal // {
|
||||
text = " <label-full>";
|
||||
};
|
||||
};
|
||||
|
||||
label = {
|
||||
chargin = "%percentage%%";
|
||||
dischargin = "%percentage%%";
|
||||
full = "%percentage%%";
|
||||
};
|
||||
};
|
||||
|
||||
"module/bspwm" = {
|
||||
type = "internal/bspwm";
|
||||
format = "<label-state>";
|
||||
|
||||
label = let
|
||||
common = {
|
||||
padding = 1;
|
||||
separator = " ";
|
||||
text = "%name%";
|
||||
};
|
||||
in
|
||||
{
|
||||
focused = colors.selected // common;
|
||||
occupied = colors.active // common;
|
||||
urgent = colors.active // common // { background = colors.alert; };
|
||||
empty = colors.normal // common;
|
||||
};
|
||||
};
|
||||
|
||||
"module/cpu" = {
|
||||
type = "internal/cpu";
|
||||
format = colors.normal // {
|
||||
prefix = "▣ ";
|
||||
padding = 1;
|
||||
};
|
||||
interval = 2;
|
||||
label = "%percentage-sum%%";
|
||||
};
|
||||
|
||||
"module/date" = {
|
||||
type = "internal/date";
|
||||
date = {
|
||||
alt = "%Y-%m-%d";
|
||||
text = "%a %d/%m/%y";
|
||||
};
|
||||
interval = "1";
|
||||
label = "%date% %time%";
|
||||
time = {
|
||||
alt = "%H:%M:%S";
|
||||
text = "%H:%M";
|
||||
};
|
||||
format = colors.normal // {
|
||||
padding = 1;
|
||||
};
|
||||
};
|
||||
|
||||
"module/memory" = {
|
||||
type = "internal/memory";
|
||||
format = colors.normal // {
|
||||
prefix = "▨ ";
|
||||
padding = 1;
|
||||
};
|
||||
interval = 2;
|
||||
label = "%percentage_used%% ~ %percentage_swap_used%%";
|
||||
};
|
||||
|
||||
"module/pulseaudio" = {
|
||||
bar.volume = {
|
||||
empty = {
|
||||
font = "2";
|
||||
text = "─";
|
||||
};
|
||||
fill = {
|
||||
text = "─";
|
||||
font = "2";
|
||||
};
|
||||
foreground = [
|
||||
colors.green
|
||||
colors.green
|
||||
colors.green
|
||||
colors.green
|
||||
colors.green
|
||||
colors.yellow
|
||||
colors.orange
|
||||
colors.red
|
||||
];
|
||||
indicator = {
|
||||
text = "|";
|
||||
font = "2";
|
||||
};
|
||||
width = "10";
|
||||
};
|
||||
click.right = "${pgrep} pavucontrol && ${pkill} pavucontrol || ${pavucontrol}";
|
||||
format = {
|
||||
padding = 1;
|
||||
muted = colors.active;
|
||||
volume = colors.normal // {
|
||||
text = "<label-volume> <bar-volume>";
|
||||
};
|
||||
};
|
||||
label.muted = {
|
||||
text = "VOL muted";
|
||||
};
|
||||
label.volume = {
|
||||
text = "VOL %percentage%%";
|
||||
};
|
||||
type = "internal/pulseaudio";
|
||||
};
|
||||
|
||||
"module/temperature" = {
|
||||
format = colors.normal // {
|
||||
padding = 1;
|
||||
text = "<ramp> <label>";
|
||||
warn = {
|
||||
text = "<ramp> <label-warn>";
|
||||
underline = colors.alert;
|
||||
};
|
||||
};
|
||||
hwmon.path = "/sys/devices/platform/coretemp.0/hwmon/hwmon5/temp1_input";
|
||||
label = {
|
||||
text = "%temperature-c%";
|
||||
warn = "%temperature-c%";
|
||||
};
|
||||
ramp = {
|
||||
text = [ "○" "◒" "●" ];
|
||||
};
|
||||
thermal.zone = "0";
|
||||
type = "internal/temperature";
|
||||
warn.temperature = "90";
|
||||
};
|
||||
|
||||
"module/powermenu" = {
|
||||
type = "custom/menu";
|
||||
expand.right = true;
|
||||
format = {
|
||||
spacing = 1;
|
||||
suffix = " ";
|
||||
};
|
||||
label = {
|
||||
open = colors.normal // {
|
||||
text = " ⏻ ";
|
||||
};
|
||||
close = colors.normal // {
|
||||
text = "Cancel";
|
||||
};
|
||||
separator = {
|
||||
text = "|";
|
||||
};
|
||||
};
|
||||
menu = [
|
||||
[
|
||||
({ text = "Reboot"; exec = "menu-open-1"; })
|
||||
({ text = "Power off"; exec = "menu-open-2"; })
|
||||
]
|
||||
[
|
||||
({ text = "Reboot"; exec = "reboot"; })
|
||||
]
|
||||
[
|
||||
({ text = "Power off"; exec = "poweroff"; })
|
||||
]
|
||||
];
|
||||
};
|
||||
|
||||
"module/player" = {
|
||||
type = "custom/script";
|
||||
format = colors.normal // {
|
||||
padding = 1;
|
||||
};
|
||||
exec = "${playerStatus}";
|
||||
click.left = "${playerCtl} play-pause";
|
||||
scroll = {
|
||||
up = "${playerCtl} previous";
|
||||
down = "${playerCtl} next";
|
||||
};
|
||||
interval = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,8 +1,11 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
i3lock-color = "${pkgs.i3lock-color}/bin/i3lock-color";
|
||||
in
|
||||
{
|
||||
services.screen-locker = {
|
||||
enable = true;
|
||||
lockCmd = ''i3lock-color -B 10 --greetertext="Welcome back $USER"'';
|
||||
inactiveInterval = 10; # miutes
|
||||
};
|
||||
services.screen-locker = {
|
||||
enable = true;
|
||||
lockCmd = '' ${i3lock-color} -B 10 --greeter-text="Welcome back $USER" --greeter-color="#ffffff" --date-color="#ffffff" --time-color="#ffffff" '';
|
||||
inactiveInterval = 10; # miutes
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,5 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
alacritty
|
||||
bash
|
||||
betterlockscreen
|
||||
bspwm
|
||||
# dunst
|
||||
findutils
|
||||
gnome3.nautilus
|
||||
rofi
|
||||
sxhkd
|
||||
terminator
|
||||
i3lock-color
|
||||
];
|
||||
|
||||
services.sxhkd = let
|
||||
alacritty = "${pkgs.alacritty}/bin/alacritty";
|
||||
bspc = "${pkgs.bspwm}/bin/bspc";
|
||||
|
|
@ -23,39 +9,39 @@
|
|||
pulseaudio-ctl = "${pkgs.pulseaudio-ctl}/bin/pulseaudio-ctl";
|
||||
rofi = "${pkgs.rofi}/bin/rofi";
|
||||
terminator = "${pkgs.terminator}/bin/terminator";
|
||||
in {
|
||||
enable = true;
|
||||
keybindings = {
|
||||
"super + alt + {h,j,k,l}" = "bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}";
|
||||
"super + alt + {q,r}" = "bspc {quit,wm -r}";
|
||||
"super + alt + shift + {h,j,k,l}" = "bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}";
|
||||
"super + alt + m" = ''i3lock-color -B 10 --greetertext="Welcome back $USER"'';
|
||||
"super + bracket{left,right}" = "bspc desktop -f {prev,next}.local";
|
||||
"super + ctrl + {1-9}" = "bspc node -o 0.{1-9}";
|
||||
"super + ctrl + {h,j,k,l}" = "bspc node -p {west,south,north,east}";
|
||||
"super + ctrl + {m,x,y,z}" = "bspc node -g {marked,locked,sticky,private}";
|
||||
"super + ctrl + shift + space" = "bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel";
|
||||
"super + ctrl + space" = "bspc node -p cancel";
|
||||
"super + e" = "nautilus -w";
|
||||
"super + Escape" = "pkill -USR1 -x sxhkd";
|
||||
"super + g" = "bspc node -s biggest";
|
||||
"super + {grave,Tab}" = "bspc {node,desktop} -f last";
|
||||
"super + {Left,Down,Up,Right}" = "bspc node -v {-20 0,0 20,0 -20,20 0}";
|
||||
"super + m" = "bspc desktop -l next";
|
||||
"super + {o,i}" = "bspc wm -h off;bspc node {older,newer} -f;bspc wm -h on";
|
||||
"super + {p,b,comma,period}" = "bspc node -f @{parent,brother,first,second}";
|
||||
"super + {_,shift + } Return" = "{alacritty,terminator}";
|
||||
"super + {_,shift + }{1-9,0}" = "bspc {desktop -f,node -d} 'focused:^{1-9,10}'";
|
||||
"super + {_,shift + }c" = "bspc node -f {next,prev}.local";
|
||||
"super + {_,shift + }{h,j,k,l}" = "bspc node -{f,s} {west,south,north,east}";
|
||||
"super + {_,shift + }w" = "bspc node -{c,k}";
|
||||
"super + @space" = "rofi -show drun";
|
||||
"super + {t,shift + t,s,f}" = "bspc node -t {tiled,pseudo_tiled,floating,fullscreen}";
|
||||
"super + y" = "bspc node newest.marked.local -n newest.!automatic.local";
|
||||
"{XF86AudioLowerVolume,XF86AudioMute,XF86AudioRaiseVolume}" = "${dunstify} ${pulseaudio-ctl} {down,mute,up}";
|
||||
# "XF86Audio{LowerVolume,Mute,RaiseVolume}" = "${pulseaudio-ctl} {down,mute,up}";
|
||||
"XF86Audio{Next,Play,Prev}" = "${playerctl} {next,play-pause,previous}";
|
||||
nautilus = "${pkgs.gnome.nautilus}/bin/nautilus";
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
keybindings = {
|
||||
"super + alt + {h,j,k,l}" = "${bspc} node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}";
|
||||
"super + alt + {q,r}" = "${bspc} {quit,wm -r}";
|
||||
"super + alt + shift + {h,j,k,l}" = "${bspc} node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}";
|
||||
"super + alt + m" = '' ${i3lock-color} -B 10 --greeter-text="Welcome back $USER" --greeter-color="#ffffff" --date-color="#ffffff" --time-color="#ffffff" '';
|
||||
"super + bracket{left,right}" = "${bspc} desktop -f {prev,next}.local";
|
||||
"super + ctrl + {1-9}" = "${bspc} node -o 0.{1-9}";
|
||||
"super + ctrl + {h,j,k,l}" = "${bspc} node -p {west,south,north,east}";
|
||||
"super + ctrl + {m,x,y,z}" = "${bspc} node -g {marked,locked,sticky,private}";
|
||||
"super + ctrl + shift + space" = "${bspc} query -N -d | xargs -I id -n 1 ${bspc} node id -p cancel";
|
||||
"super + ctrl + space" = "${bspc} node -p cancel";
|
||||
"super + e" = "${nautilus} -w";
|
||||
"super + Escape" = "pkill -USR1 -x sxhkd";
|
||||
"super + g" = "${bspc} node -s biggest";
|
||||
"super + {grave,Tab}" = "${bspc} {node,desktop} -f last";
|
||||
"super + {Left,Down,Up,Right}" = "${bspc} node -v {-20 0,0 20,0 -20,20 0}";
|
||||
"super + m" = "${bspc} desktop -l next";
|
||||
"super + {o,i}" = "${bspc} wm -h off;${bspc} node {older,newer} -f;${bspc} wm -h on";
|
||||
"super + {p,b,comma,period}" = "${bspc} node -f @{parent,brother,first,second}";
|
||||
"super + {_,shift + } Return" = "{${alacritty} , ${terminator}}";
|
||||
"super + {_,shift + }{1-9,0}" = "${bspc} {desktop -f,node -d} 'focused:^{1-9,10}'";
|
||||
"super + {_,shift + }c" = "${bspc} node -f {next,prev}.local";
|
||||
"super + {_,shift + }{h,j,k,l}" = "${bspc} node -{f,s} {west,south,north,east}";
|
||||
"super + {_,shift + }w" = "${bspc} node -{c,k}";
|
||||
"super + @space" = "rofi -show drun";
|
||||
"super + {t,shift + t,s,f}" = "${bspc} node -t {tiled,pseudo_tiled,floating,fullscreen}";
|
||||
"super + y" = "${bspc} node newest.marked.local -n newest.!automatic.local";
|
||||
"{XF86AudioLowerVolume,XF86AudioMute,XF86AudioRaiseVolume}" = "${pulseaudio-ctl} {down,mute,up}";
|
||||
"XF86Audio{Next,Play,Prev}" = "${playerctl} {next,play-pause,previous}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
enable = true;
|
||||
clock24 = true;
|
||||
escapeTime = 25;
|
||||
terminal = "screen-256color";
|
||||
plugins = with pkgs; [
|
||||
tmuxPlugins.continuum
|
||||
tmuxPlugins.prefix-highlight
|
||||
|
|
@ -12,9 +13,5 @@
|
|||
extraConfig = ''
|
||||
set -g mouse on
|
||||
'';
|
||||
|
||||
# set -g default-terminal "screen"
|
||||
# set -ga terminal-overrides ",col:Tc"
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
nix-zsh-completions
|
||||
zsh-completions
|
||||
];
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autocd = true;
|
||||
|
|
@ -8,9 +13,13 @@
|
|||
# src = pkgs.zsh-powerlevel10k;
|
||||
# file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
||||
# }];
|
||||
# initExtraBeforeCompInit = ''
|
||||
# source $HOME/.p10k.zsh
|
||||
# '';
|
||||
initExtraBeforeCompInit = ''
|
||||
zstyle ':completion:*' menu select
|
||||
setopt CORRECT
|
||||
setopt AUTO_CD
|
||||
setopt CHASE_LINKS
|
||||
setopt PUSHD_TO_HOME
|
||||
'';
|
||||
# localVariables = {
|
||||
# POWERLEVEL9K_LEFT_PROMPT_ELEMENTS = [ "os_icon" "dir" "vcs" "prompt_char" ];
|
||||
# POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS = [ "status" "command_execution_time" "background_jobs" "direnv" "nix_shell" "time" "vpn_ip" ]
|
||||
|
|
@ -21,8 +30,6 @@
|
|||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
settings = {
|
||||
# format = "[$all](inverted)";
|
||||
|
||||
directory.truncation_symbol = "…/";
|
||||
hostname.format = "[$hostname]($style) ";
|
||||
line_break.disabled = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue