Move some more things around and restructure things better
This commit is contained in:
parent
84d5732a32
commit
f2cdf01122
8 changed files with 66 additions and 83 deletions
|
@ -1,64 +1,57 @@
|
|||
{ pkgs, config, ... }:
|
||||
let
|
||||
swayLock = pkgs.writeScriptBin "swaylock" ''
|
||||
# Set the lock script
|
||||
lockscript() {
|
||||
BLANK='#00000000'
|
||||
CLEAR='#FFFFFF22'
|
||||
DEFAULT='#${config.look.colors.prime}FF'
|
||||
TEXT='#FFFFFFFF'
|
||||
WRONG='#${config.look.colors.split}FF'
|
||||
VERIFYING='#${config.look.colors.accent}FF'
|
||||
default = "#${config.look.colors.prime}FF";
|
||||
wrong = "#${config.look.colors.split}FF";
|
||||
verifying = "#${config.look.colors.accent}FF";
|
||||
blank = "#00000000";
|
||||
clear = "#FFFFFF22";
|
||||
text = "#FFFFFFFF";
|
||||
in {
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
package = pkgs.swaylock-effects;
|
||||
settings = {
|
||||
clock = true;
|
||||
image = "~/.assets/lockscreen/lock.png";
|
||||
font = config.look.fonts.main;
|
||||
font-size = 30;
|
||||
timestr = "%I:%M%p";
|
||||
datestr = "%a %b %d %Y";
|
||||
|
||||
${pkgs.swaylock-effects}/bin/swaylock -f -e \
|
||||
--key-hl-color=$VERIFYING \
|
||||
--bs-hl-color=$WRONG \
|
||||
\
|
||||
--ring-clear-color=$CLEAR \
|
||||
--ring-ver-color=$VERIFYING \
|
||||
--ring-wrong-color=$WRONG \
|
||||
--ring-color=$DEFAULT \
|
||||
--ring-clear-color=$VERIFYING \
|
||||
\
|
||||
--inside-color=$CLEAR \
|
||||
--inside-ver-color=$CLEAR \
|
||||
--inside-wrong-color=$CLEAR \
|
||||
--inside-clear-color=$CLEAR \
|
||||
\
|
||||
--text-color=$TEXT \
|
||||
--text-clear-color=$TEXT \
|
||||
--text-ver-color=$TEXT \
|
||||
--text-caps-lock-color=$TEXT \
|
||||
--text-wrong-color=$TEXT \
|
||||
\
|
||||
--indicator \
|
||||
--indicator-radius=80 \
|
||||
--image=~/.assets/lockscreen/lock.png \
|
||||
--clock \
|
||||
--font=${config.look.fonts.main} \
|
||||
--font-size=30 \
|
||||
--timestr="%I:%M%p" \
|
||||
--datestr="%a %b %d %Y"
|
||||
}
|
||||
key-hl-color = verifying;
|
||||
bs-hl-color = wrong;
|
||||
|
||||
# Handle whether to lock or sleep
|
||||
if [ "$1" == "--sleep" ]; then
|
||||
lockscript &
|
||||
exec ${pkgs.swayidle}/bin/swayidle -w \
|
||||
ring-clear-color = clear;
|
||||
ring-ver-color = verifying;
|
||||
ring-wrong-color = wrong;
|
||||
ring-color = default;
|
||||
|
||||
inside-color = clear;
|
||||
inside-ver-color = clear;
|
||||
inside-wrong-color = clear;
|
||||
inside-clear-color = clear;
|
||||
|
||||
text-color = text;
|
||||
text-clear-color = text;
|
||||
text-ver-color = text;
|
||||
text-caps-lock-color = text;
|
||||
text-wrong-color = text;
|
||||
|
||||
indicator = true;
|
||||
indicator-radius = 80;
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
(pkgs.writeScriptBin "swaysleep" ''
|
||||
swaylock & ${pkgs.swayidle}/bin/swayidle -w \
|
||||
timeout 1 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"; pkill -9 swayidle'
|
||||
else
|
||||
lockscript
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
# Enable Sway and write some scripts
|
||||
home.packages = with pkgs; [
|
||||
swayLock
|
||||
'')
|
||||
];
|
||||
|
||||
# Enable Sway lock on startup
|
||||
# Enable Swaylock on startup
|
||||
wayland.windowManager.sway.config.startup = [
|
||||
{command = "swaylock";}
|
||||
{ command = "swaylock"; }
|
||||
];
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
./swappy
|
||||
];
|
||||
|
||||
home.packages = let
|
||||
swayShot = pkgs.writeScriptBin "swayshot" ''
|
||||
home.packages = with pkgs; [
|
||||
(pkgs.writeScriptBin "swayshot" ''
|
||||
# Swappy
|
||||
handle_swappy() {
|
||||
# Create an imv window to act as a static screen
|
||||
|
@ -57,8 +57,6 @@
|
|||
else
|
||||
echo "Please use the arguments --swappy or --screen."
|
||||
fi
|
||||
'';
|
||||
in with pkgs; [
|
||||
swayShot
|
||||
'')
|
||||
];
|
||||
}
|
||||
|
|
|
@ -2,12 +2,10 @@
|
|||
{
|
||||
home = {
|
||||
packages = with pkgs; [ swappy ];
|
||||
file = {
|
||||
".config/swappy/config".text = ''
|
||||
[Default]
|
||||
early_exit=true
|
||||
save_dir=$HOME/Pictures/Screenshots
|
||||
'';
|
||||
};
|
||||
file.".config/swappy/config".text = ''
|
||||
[Default]
|
||||
early_exit=true
|
||||
save_dir=$HOME/Pictures/Screenshots
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
checkConfig = false;
|
||||
config = {
|
||||
colors = {
|
||||
focused = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue