Move some more things around and restructure things better

This commit is contained in:
Jimbo 2024-11-05 16:09:49 -05:00
parent 84d5732a32
commit f2cdf01122
8 changed files with 66 additions and 83 deletions

View file

@ -22,8 +22,8 @@
''; '';
}; };
home.packages = let home.packages = with pkgs; [
makoToggle = pkgs.writeScriptBin "makotoggle" '' (pkgs.writeScriptBin "makotoggle" ''
# Run makoctl mode and store the output in a variable # Run makoctl mode and store the output in a variable
mode_output=$(makoctl mode) mode_output=$(makoctl mode)
@ -40,6 +40,6 @@
sleep 2 sleep 2
makoctl mode -a do-not-disturb makoctl mode -a do-not-disturb
fi fi
''; '')
in with pkgs; [ makoToggle ]; ];
} }

View file

@ -123,9 +123,8 @@
}; };
}; };
}; };
home.packages = let home.packages = with pkgs; [
# A script to execute commands with Rofi (pkgs.writeScriptBin "rofiscripts" ''
rofiScripts = pkgs.writeScriptBin "rofiscripts" ''
# Scratchpad function # Scratchpad function
handle_scratchpads() { handle_scratchpads() {
SCRATCHPADS=$(echo -e "Gotop\nMusic\nSound\nEasyEffects" | rofi -dmenu -i -p "Scratchpads") SCRATCHPADS=$(echo -e "Gotop\nMusic\nSound\nEasyEffects" | rofi -dmenu -i -p "Scratchpads")
@ -143,7 +142,7 @@
case $POWER in case $POWER in
Shutdown) poweroff;; Shutdown) poweroff;;
Reboot) reboot;; Reboot) reboot;;
Sleep) swaylock --sleep &;; Sleep) swaysleep &;;
Lock) swaylock &;; Lock) swaylock &;;
Kill) pkill -9 sway;; Kill) pkill -9 sway;;
esac esac
@ -176,9 +175,7 @@
else else
echo "Please use a valid argument." echo "Please use a valid argument."
fi fi
''; '')
in with pkgs; [
rofiScripts
rofi-bluetooth rofi-bluetooth
bemoji bemoji
]; ];

View file

@ -2,8 +2,8 @@
{ {
home = { home = {
file.".config/fastfetch/small.jsonc".source = ./small.jsonc; file.".config/fastfetch/small.jsonc".source = ./small.jsonc;
packages = let packages = with pkgs; [
pFetch = pkgs.writeScriptBin "pfetch" "fastfetch --config ~/.config/fastfetch/small.jsonc"; (pkgs.writeScriptBin "pfetch" "fastfetch --config ~/.config/fastfetch/small.jsonc")
in with pkgs; [ pFetch ]; ];
}; };
} }

View file

@ -1,64 +1,57 @@
{ pkgs, config, ... }: { pkgs, config, ... }:
let let
swayLock = pkgs.writeScriptBin "swaylock" '' default = "#${config.look.colors.prime}FF";
# Set the lock script wrong = "#${config.look.colors.split}FF";
lockscript() { verifying = "#${config.look.colors.accent}FF";
BLANK='#00000000' blank = "#00000000";
CLEAR='#FFFFFF22' clear = "#FFFFFF22";
DEFAULT='#${config.look.colors.prime}FF' text = "#FFFFFFFF";
TEXT='#FFFFFFFF' in {
WRONG='#${config.look.colors.split}FF' programs.swaylock = {
VERIFYING='#${config.look.colors.accent}FF' 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;
--key-hl-color=$VERIFYING \ bs-hl-color = wrong;
--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"
}
# Handle whether to lock or sleep ring-clear-color = clear;
if [ "$1" == "--sleep" ]; then ring-ver-color = verifying;
lockscript & ring-wrong-color = wrong;
exec ${pkgs.swayidle}/bin/swayidle -w \ 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"' \ timeout 1 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"; pkill -9 swayidle' 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 = [ wayland.windowManager.sway.config.startup = [
{command = "swaylock";} { command = "swaylock"; }
]; ];
} }

View file

@ -4,8 +4,8 @@
./swappy ./swappy
]; ];
home.packages = let home.packages = with pkgs; [
swayShot = pkgs.writeScriptBin "swayshot" '' (pkgs.writeScriptBin "swayshot" ''
# Swappy # Swappy
handle_swappy() { handle_swappy() {
# Create an imv window to act as a static screen # Create an imv window to act as a static screen
@ -57,8 +57,6 @@
else else
echo "Please use the arguments --swappy or --screen." echo "Please use the arguments --swappy or --screen."
fi fi
''; '')
in with pkgs; [
swayShot
]; ];
} }

View file

@ -2,12 +2,10 @@
{ {
home = { home = {
packages = with pkgs; [ swappy ]; packages = with pkgs; [ swappy ];
file = { file.".config/swappy/config".text = ''
".config/swappy/config".text = ''
[Default] [Default]
early_exit=true early_exit=true
save_dir=$HOME/Pictures/Screenshots save_dir=$HOME/Pictures/Screenshots
''; '';
}; };
};
} }

View file

@ -1,9 +1,6 @@
{ config, ... }: { config, ... }:
{ {
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true;
wrapperFeatures.gtk = true;
checkConfig = false;
config = { config = {
colors = { colors = {
focused = { focused = {