Lockscreen custom
This commit is contained in:
parent
b3fdc5f573
commit
e080d5b9b8
10 changed files with 134 additions and 49 deletions
|
|
@ -1,14 +1,12 @@
|
||||||
{ system ? builtins.currentSystem }:
|
{ pkgs ? import <nixpkgs> { inherit system; }
|
||||||
|
, system ? builtins.currentSystem
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
pkgs = import <nixpkgs> { inherit system; };
|
|
||||||
# pkgs = import (builtins.fetchTarball {
|
|
||||||
# name = "nixos-unstable-2021-05-26";
|
|
||||||
# url = "https://github.com/nixos/nixpkgs/archive/9b7fb215d4d8399772a4f3d6f00fab3747136f53.tar.gz";
|
|
||||||
# sha256 = "02d1841j7jg161q7cwh7vryxhv7x3bmnhd1jczx14ggfa66vqfhm";
|
|
||||||
# }) { inherit system; };
|
|
||||||
callPackage = pkgs.lib.callPackageWith (pkgs // self);
|
callPackage = pkgs.lib.callPackageWith (pkgs // self);
|
||||||
self = {
|
self = {
|
||||||
gallery-tagger = callPackage ./gallery-tagger {};
|
gallery-tagger = callPackage ./gallery-tagger {};
|
||||||
|
lockscreen = callPackage ./lockscreen pkgs.extra.colorPalette // {};
|
||||||
};
|
};
|
||||||
in(self)
|
in
|
||||||
|
(self)
|
||||||
|
|
|
||||||
55
custom/lockscreen/default.nix
Normal file
55
custom/lockscreen/default.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, extra
|
||||||
|
, roboto
|
||||||
|
, i3lock-color
|
||||||
|
, writeScript
|
||||||
|
, font ? { package = roboto; name = "Roboto"; }
|
||||||
|
, palette ? extra.palette.palette {}
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
strPalette = extra.palette.toRGBAHex palette;
|
||||||
|
in
|
||||||
|
writeScript "lockscreen.sh" ''
|
||||||
|
#!/bin/sh
|
||||||
|
# Using font package ${font.package}
|
||||||
|
${i3lock-color}/bin/i3lock-color \
|
||||||
|
--insidever-color="${strPalette.normal.green}" \
|
||||||
|
--insidewrong-color="${strPalette.normal.red}" \
|
||||||
|
--inside-color="${strPalette.primary.background}" \
|
||||||
|
--ringver-color="${strPalette.bright.green}" \
|
||||||
|
--ringwrong-color="${strPalette.bright.red}" \
|
||||||
|
--ringver-color="${strPalette.bright.green}" \
|
||||||
|
--ringwrong-color="${strPalette.bright.red}" \
|
||||||
|
--ring-color="${strPalette.bright.blue}" \
|
||||||
|
--line-uses-ring \
|
||||||
|
--keyhl-color="${strPalette.bright.red}" \
|
||||||
|
--bshl-color="${strPalette.bright.red}" \
|
||||||
|
--separator-color="${strPalette.primary.background}" \
|
||||||
|
--verif-color="${strPalette.normal.green}" \
|
||||||
|
--wrong-color="${strPalette.normal.red}" \
|
||||||
|
--layout-color="${strPalette.normal.blue}" \
|
||||||
|
--date-color="${strPalette.normal.blue}" \
|
||||||
|
--time-color="${strPalette.normal.blue}" \
|
||||||
|
--blur 10 \
|
||||||
|
--clock \
|
||||||
|
--indicator \
|
||||||
|
--time-str="%H:%M:%S" \
|
||||||
|
--date-str="%a %e %b %Y" \
|
||||||
|
--verif-text="Verifying..." \
|
||||||
|
--wrong-text="Auth Failed" \
|
||||||
|
--noinput="No Input" \
|
||||||
|
--lock-text="Locking..." \
|
||||||
|
--lockfailed="Lock Failed" \
|
||||||
|
--time-font="${font.name}" \
|
||||||
|
--date-font="${font.name}" \
|
||||||
|
--layout-font="${font.name}" \
|
||||||
|
--verif-font="${font.name}" \
|
||||||
|
--wrong-font="${font.name}" \
|
||||||
|
--radius=120 \
|
||||||
|
--ring-width=20 \
|
||||||
|
--pass-media-keys \
|
||||||
|
--pass-screen-keys \
|
||||||
|
--pass-volume-keys \
|
||||||
|
''
|
||||||
23
home.nix
23
home.nix
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
nixpkgs = import <nixpkgs> {};
|
nixpkgs = import <nixpkgs> {};
|
||||||
|
|
@ -15,7 +15,7 @@ in
|
||||||
(final: prev: { extra = (prev.lib.callPackageWith prev) ./extra/default.nix {}; }) # Custom library
|
(final: prev: { extra = (prev.lib.callPackageWith prev) ./extra/default.nix {}; }) # Custom library
|
||||||
(final: prev: (prev.lib.callPackageWith prev) ./custom/default.nix {}) # Custom packges
|
(final: prev: (prev.lib.callPackageWith prev) ./custom/default.nix {}) # Custom packges
|
||||||
(
|
(
|
||||||
final: prev: {
|
final: prev: rec {
|
||||||
extra = prev.extra // {
|
extra = prev.extra // {
|
||||||
colorPalette = with pkgs.extra; palette.palette {
|
colorPalette = with pkgs.extra; palette.palette {
|
||||||
black = color.hexToRgba nord.n0;
|
black = color.hexToRgba nord.n0;
|
||||||
|
|
@ -31,6 +31,18 @@ in
|
||||||
bright-red = color.hexToRgba nord.n12;
|
bright-red = color.hexToRgba nord.n12;
|
||||||
cursor-cursor = color.hexToRgba nord.n4;
|
cursor-cursor = color.hexToRgba nord.n4;
|
||||||
};
|
};
|
||||||
|
font = {
|
||||||
|
normal = { package = pkgs.cantarell-fonts; name = "Cantarell"; };
|
||||||
|
monospace = { package = pkgs.nerdfonts; name = "FuraCode Nerd Font Mono"; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
)
|
||||||
|
(
|
||||||
|
final: prev: {
|
||||||
|
lockscreen = prev.lockscreen.override {
|
||||||
|
palette = prev.extra.colorPalette;
|
||||||
|
font = prev.extra.font.normal;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
@ -41,8 +53,6 @@ in
|
||||||
keyboard.layout = "it";
|
keyboard.layout = "it";
|
||||||
keyboard.options = [ "terminate:ctrl_alt_bksp" "compose:rctrl" ];
|
keyboard.options = [ "terminate:ctrl_alt_bksp" "compose:rctrl" ];
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
|
|
||||||
|
|
||||||
audacity
|
audacity
|
||||||
authy
|
authy
|
||||||
blender
|
blender
|
||||||
|
|
@ -95,11 +105,12 @@ in
|
||||||
transmission-gtk
|
transmission-gtk
|
||||||
wineFull
|
wineFull
|
||||||
wireguard
|
wireguard
|
||||||
|
xclip
|
||||||
zoom-us
|
zoom-us
|
||||||
zotero
|
zotero
|
||||||
|
] ++ [
|
||||||
(
|
(
|
||||||
dwarf-fortress-packages.dwarf-fortress-full.override {
|
pkgs.dwarf-fortress-packages.dwarf-fortress-full.override {
|
||||||
enableLegendsBrowser = false;
|
enableLegendsBrowser = false;
|
||||||
enableTextMode = true;
|
enableTextMode = true;
|
||||||
theme = "cla";
|
theme = "cla";
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
# Include fonts packages
|
# Include fonts packages
|
||||||
home.packages = with pkgs; [ nerdfonts ];
|
home.packages = [ pkgs.extra.font.monospace.package ];
|
||||||
programs.alacritty = {
|
programs.alacritty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
env.TERM = "xterm-256color";
|
env.TERM = "xterm-256color";
|
||||||
scrolling.history = 3000;
|
scrolling.history = 3000;
|
||||||
font = {
|
font = {
|
||||||
normal.family = "FuraCode Nerd Font Mono";
|
normal.family = pkgs.extra.font.monospace.name;
|
||||||
size = 9.0;
|
size = 9.0;
|
||||||
};
|
};
|
||||||
background_opacity = 0.95;
|
background_opacity = 0.95;
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let rofi_dmenu = "${pkgs.rofi} -dmenu";
|
let
|
||||||
firefox = "${pkgs.firefox}/bin/firefox";
|
rofi_dmenu = "${pkgs.rofi} -dmenu";
|
||||||
dmenu = "${pkgs.dmenu}/bin/dmenu";
|
firefox = "${pkgs.firefox}/bin/firefox";
|
||||||
in {
|
dmenu = "${pkgs.dmenu}/bin/dmenu";
|
||||||
home.packages = with pkgs; [ dunst nerdfonts ];
|
palette = pkgs.extra.palette.toRGBHex pkgs.extra.colorPalette;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [ dunst extra.font.normal.package ];
|
||||||
services.dunst = {
|
services.dunst = {
|
||||||
enable = true;
|
enable = true;
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
|
|
@ -13,7 +16,7 @@ in {
|
||||||
settings = {
|
settings = {
|
||||||
global = {
|
global = {
|
||||||
monitor = 0;
|
monitor = 0;
|
||||||
follow = "keyboard";
|
follow = "mouse";
|
||||||
geometry = "300x6-20+50";
|
geometry = "300x6-20+50";
|
||||||
indicate_hidden = "yes";
|
indicate_hidden = "yes";
|
||||||
shrink = "yes";
|
shrink = "yes";
|
||||||
|
|
@ -23,12 +26,12 @@ in {
|
||||||
padding = 8;
|
padding = 8;
|
||||||
horizontal_padding = 8;
|
horizontal_padding = 8;
|
||||||
frame_width = 2;
|
frame_width = 2;
|
||||||
frame_color = "#2E3440";
|
frame_color = palette.normal.black;
|
||||||
separator_color = "#404859";
|
separator_color = palette.normal.blue;
|
||||||
sort = "yes";
|
sort = "yes";
|
||||||
idle_threshold = 120;
|
idle_threshold = 120;
|
||||||
|
|
||||||
font = "FuraCode Nerd Font Mono 10";
|
font = "${pkgs.extra.font.normal.name} 10";
|
||||||
line_height = 0;
|
line_height = 0;
|
||||||
markup = "full";
|
markup = "full";
|
||||||
format = "<b>%s</b>\\n%b";
|
format = "<b>%s</b>\\n%b";
|
||||||
|
|
@ -58,27 +61,27 @@ in {
|
||||||
mouse_right_click = "close_all";
|
mouse_right_click = "close_all";
|
||||||
};
|
};
|
||||||
urgency_low = {
|
urgency_low = {
|
||||||
background = "#2E3440";
|
background = palette.primary.background;
|
||||||
foreground = "#D8DEE9";
|
foreground = palette.primary.foreground;
|
||||||
timeout = 10;
|
timeout = 10;
|
||||||
};
|
};
|
||||||
urgency_normal = {
|
urgency_normal = {
|
||||||
background = "#2E3440";
|
background = palette.primary.background;
|
||||||
foreground = "#D8DEE9";
|
foreground = palette.primary.foreground;
|
||||||
timeout = 10;
|
timeout = 10;
|
||||||
};
|
};
|
||||||
urgency_critical = {
|
urgency_critical = {
|
||||||
background = "#2E3440";
|
background = palette.primary.background;
|
||||||
foreground = "#D8DEE9";
|
foreground = palette.primary.foreground;
|
||||||
frame_color = "#ff0000";
|
frame_color = palette.bright.red;
|
||||||
timeout = 0;
|
timeout = 0;
|
||||||
};
|
};
|
||||||
shortcuts = {
|
shortcuts = {
|
||||||
close = "ctrl+space";
|
close = "ctrl+space";
|
||||||
close_all = "ctrl+shift+space";
|
close_all = "ctrl+shift+space";
|
||||||
history = "ctrl+backslash";
|
history = "ctrl+backslash";
|
||||||
context = "ctrl+shift+period";
|
context = "ctrl+shift+period";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,8 @@
|
||||||
{
|
{
|
||||||
programs.obs-studio = {
|
programs.obs-studio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = with pkgs; [
|
plugins = with pkgs.obs-studio-plugins; [
|
||||||
# obs-linuxbrowser
|
# obs-linuxbrowser
|
||||||
obs-v4l2sink
|
|
||||||
obs-gstreamer
|
obs-gstreamer
|
||||||
obs-move-transition
|
obs-move-transition
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -60,8 +60,10 @@ let
|
||||||
};
|
};
|
||||||
font = [
|
font = [
|
||||||
"FuraCode Nerd Font Mono:pixelsize=10;2"
|
"FuraCode Nerd Font Mono:pixelsize=10;2"
|
||||||
# "EmojiOne Color;0"
|
"Material Design Icons;2"
|
||||||
|
"EmojiOne Color;0"
|
||||||
"NotoEmoji Nerd Font Mono;0"
|
"NotoEmoji Nerd Font Mono;0"
|
||||||
|
"Noto Color Emoji;0"
|
||||||
];
|
];
|
||||||
wm-restack = "bspwm";
|
wm-restack = "bspwm";
|
||||||
};
|
};
|
||||||
|
|
@ -236,7 +238,7 @@ in
|
||||||
};
|
};
|
||||||
volume = colors.normal // {
|
volume = colors.normal // {
|
||||||
padding = 1;
|
padding = 1;
|
||||||
text = "VOL <bar-volume> <label-volume>";
|
text = "VOL <bar-volume> <label-volume> <ramp-volume>";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
label.muted = {
|
label.muted = {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,8 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
|
||||||
i3lock-color = "${pkgs.i3lock-color}/bin/i3lock-color";
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
services.screen-locker = {
|
services.screen-locker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
lockCmd = '' ${i3lock-color} -B 10 --greeter-text="Welcome back $USER" --greeter-color="#ffffff" --date-color="#ffffff" --time-color="#ffffff" '';
|
lockCmd = "${pkgs.lockscreen}";
|
||||||
inactiveInterval = 10; # miutes
|
inactiveInterval = 10; # miutes
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
alacritty = "${pkgs.alacritty}/bin/alacritty";
|
alacritty = "${pkgs.alacritty}/bin/alacritty";
|
||||||
bspc = "${pkgs.bspwm}/bin/bspc";
|
bspc = "${pkgs.bspwm}/bin/bspc";
|
||||||
dunstify = "${pkgs.dunst}/bin/dunstify";
|
dunstify = "${pkgs.dunst}/bin/dunstify";
|
||||||
i3lock-color = "${pkgs.i3lock-color}/bin/i3lock-color";
|
|
||||||
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
||||||
pulseaudio-ctl = "${pkgs.pulseaudio-ctl}/bin/pulseaudio-ctl";
|
pulseaudio-ctl = "${pkgs.pulseaudio-ctl}/bin/pulseaudio-ctl";
|
||||||
rofi = "${pkgs.rofi}/bin/rofi";
|
rofi = "${pkgs.rofi}/bin/rofi";
|
||||||
|
|
@ -17,7 +16,7 @@
|
||||||
"super + alt + {h,j,k,l}" = "${bspc} node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}";
|
"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 + {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 + 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 + alt + m" = "${pkgs.lockscreen}";
|
||||||
"super + bracket{left,right}" = "${bspc} desktop -f {prev,next}.local";
|
"super + bracket{left,right}" = "${bspc} desktop -f {prev,next}.local";
|
||||||
"super + ctrl + {1-9}" = "${bspc} node -o 0.{1-9}";
|
"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 + {h,j,k,l}" = "${bspc} node -p {west,south,north,east}";
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,13 @@
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autocd = true;
|
autocd = true;
|
||||||
# plugins = [{
|
plugins = [
|
||||||
# name = "powerlevel10k";
|
# {
|
||||||
# src = pkgs.zsh-powerlevel10k;
|
# name = "powerlevel10k";
|
||||||
# file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
# src = pkgs.zsh-powerlevel10k;
|
||||||
# }];
|
# file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
||||||
|
# }
|
||||||
|
];
|
||||||
initExtraBeforeCompInit = ''
|
initExtraBeforeCompInit = ''
|
||||||
zstyle ':completion:*' menu select
|
zstyle ':completion:*' menu select
|
||||||
setopt CORRECT
|
setopt CORRECT
|
||||||
|
|
@ -24,7 +26,26 @@
|
||||||
# POWERLEVEL9K_LEFT_PROMPT_ELEMENTS = [ "os_icon" "dir" "vcs" "prompt_char" ];
|
# 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" ]
|
# POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS = [ "status" "command_execution_time" "background_jobs" "direnv" "nix_shell" "time" "vpn_ip" ]
|
||||||
# };
|
# };
|
||||||
|
|
||||||
|
oh-my-zsh = {
|
||||||
|
enable = true;
|
||||||
|
plugins = [
|
||||||
|
"alias-finder"
|
||||||
|
"common-aliases"
|
||||||
|
"cp"
|
||||||
|
"dirhistory"
|
||||||
|
"docker-compose"
|
||||||
|
"docker"
|
||||||
|
"extract"
|
||||||
|
"git-auto-fetch"
|
||||||
|
"git"
|
||||||
|
"sudo"
|
||||||
|
];
|
||||||
|
extraConfig = "";
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue