Skip to content

Commit

Permalink
feat: theme
Browse files Browse the repository at this point in the history
  • Loading branch information
sioodmy committed Jan 15, 2024
1 parent bac1d5a commit 8d7b4a2
Show file tree
Hide file tree
Showing 16 changed files with 279 additions and 511 deletions.
260 changes: 38 additions & 222 deletions flake.lock

Large diffs are not rendered by default.

14 changes: 1 addition & 13 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@

imports = [
{
config._module.args._inputs = inputs // {inherit (inputs) self;};
config._module.args._inputs = inputs // {inherit (inputs) self;};
}


inputs.flake-parts.flakeModules.easyOverlay
inputs.pre-commit-hooks.flakeModule
inputs.treefmt-nix.flakeModule
Expand Down Expand Up @@ -175,25 +174,14 @@
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
shadower = {
url = "github:n3oney/shadower";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager-wsl = {
url = "github:viperML/home-manager-wsl";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
pre-commit-hooks = {
url = "github:cachix/pre-commit-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};

simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/master";
};
}
# see also:
Expand Down
6 changes: 5 additions & 1 deletion home/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{inputs, config, ...}:
{
inputs,
config,
...
}:
# glue all configs together
{
config.home.stateVersion = "22.05";
Expand Down
1 change: 0 additions & 1 deletion home/misc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
imports = [
./media.nix
./vencord
./khal.nix
./schizofox.nix
./rnnoise.nix
./swayidle.nix
Expand Down
41 changes: 0 additions & 41 deletions home/misc/khal.nix

This file was deleted.

3 changes: 1 addition & 2 deletions home/misc/swayidle.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
fi
'';
in {

programs.swaylock = {
package = pkgs.swaylock-effects;
settings = {
Expand Down Expand Up @@ -55,7 +54,7 @@ in {
services.swayidle = {
enable = true;
events = [
{
{
event = "before-sleep";
command = "${pkgs.swaylock-effects}/bin/swaylock -fF";
}
Expand Down
25 changes: 14 additions & 11 deletions home/rice/dunst.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{pkgs, ...}: {
{pkgs, theme, ...}:
let
inherit (theme) x;
in{
services.dunst = {
enable = true;
package = pkgs.dunst.overrideAttrs (_: {
Expand All @@ -13,10 +16,10 @@
package = pkgs.catppuccin-papirus-folders;
name = "Papirus";
};
settings = {
settings = with theme.colors; {
global = {
frame_color = "#f4b8e495";
separator_color = "#f4b8e4";
frame_color = "#${pink}95";
separator_color = x pink;
width = 220;
height = 280;
offset = "0x15";
Expand All @@ -38,23 +41,23 @@
transparency = 10;
progress_bar = true;
progress_bar_frame_width = 0;
highlight = "#f4b8e4";
highlight = x pink;
};
fullscreen_delay_everything.fullscreen = "delay";
urgency_low = {
background = "#1e1e2e83";
foreground = "#c6d0f5";
background = "#${base}83";
foreground = x text;
timeout = 5;
};
urgency_normal = {
background = "#1e1e2e83";
background = "#${base}83";
foreground = "#c6d0f5";
timeout = 6;
};
urgency_critical = {
background = "#1e1e2e83";
foreground = "#c6d0f5";
frame_color = "#ea999c80";
background = "#${base}83";
foreground = x text;
frame_color = "#${red}80";
timeout = 0;
};
};
Expand Down
6 changes: 5 additions & 1 deletion home/rice/foot.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{pkgs, theme, ...}: {
{
pkgs,
theme,
...
}: {
home.packages = with pkgs; [
libsixel
# for displaying images
Expand Down
1 change: 0 additions & 1 deletion home/rice/hyprland/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -322,5 +322,4 @@ in {
'';
};

}
82 changes: 41 additions & 41 deletions home/rice/hyprland/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
pkgs,
lib,
inputs,
theme,
...
}:
with lib; let
Expand All @@ -13,49 +14,48 @@ with lib; let
in {
imports = [./config.nix];
home.packages = with pkgs;
with inputs.hyprcontrib.packages.${pkgs.system};
[
libnotify
wf-recorder
brightnessctl
pamixer
python39Packages.requests
slurp
grim
hyprpicker
swappy
grimblast
hyprpicker
wl-clip-persist
wl-clipboard
pngquant
cliphist
(writeShellScriptBin
"pauseshot"
''
${hyprpicker}/bin/hyprpicker -r -z &
picker_proc=$!
with inputs.hyprcontrib.packages.${pkgs.system}; [
libnotify
wf-recorder
brightnessctl
pamixer
python39Packages.requests
slurp
grim
hyprpicker
swappy
grimblast
hyprpicker
wl-clip-persist
wl-clipboard
pngquant
cliphist
(writeShellScriptBin
"pauseshot"
''
${hyprpicker}/bin/hyprpicker -r -z &
picker_proc=$!
${grimblast}/bin/grimblast save area - | tee ~/pics/ss$(date +'screenshot-%F') | wl-copy
${grimblast}/bin/grimblast save area - | tee ~/pics/ss$(date +'screenshot-%F') | wl-copy
kill $picker_proc
'')
(
writeShellScriptBin "micmute"
''
#!/bin/sh
kill $picker_proc
'')
(
writeShellScriptBin "micmute"
''
#!/bin/sh
# shellcheck disable=SC2091
if $(pamixer --default-source --get-mute); then
pamixer --default-source --unmute
sudo mic-light-off
else
pamixer --default-source --mute
sudo mic-light-on
fi
''
)
];
# shellcheck disable=SC2091
if $(pamixer --default-source --get-mute); then
pamixer --default-source --unmute
sudo mic-light-off
else
pamixer --default-source --mute
sudo mic-light-on
fi
''
)
];

wayland.windowManager.hyprland = {
enable = true;
Expand Down Expand Up @@ -91,7 +91,7 @@ in {
swaybg = mkService {
Unit.Description = "Wallpaper chooser";
Service = {
ExecStart = "${lib.getExe pkgs.swaybg} -i ${./wall.png}";
ExecStart = "${lib.getExe pkgs.swaybg} -i ${theme.wallpaper}";
Restart = "always";
};
};
Expand Down
9 changes: 5 additions & 4 deletions home/rice/tofi/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{pkgs, ...}: let
{pkgs, theme, ...}: let
tofi-emoji = pkgs.writeShellScriptBin "tofi-emoji" ''
#!/bin/sh
cat ${./emojis} | tofi --prompt-text "Emoji: " | awk '{print $1}' | tr -d '\n' | tee >(wl-copy) >(xargs -I % notify-send "% Emoji" "Emoji copied to clipboard")
'';
inherit (theme) x;
in {
home.packages = [pkgs.tofi tofi-emoji];
xdg.configFile."tofi/config".text = ''
xdg.configFile."tofi/config".text = with theme.colors; ''
anchor = top
width = 100%
height = 38
Expand All @@ -16,8 +17,8 @@ in {
ascii-input = false
outline-width = 0
border-width = 0
background-color = #1e1e2ecc
text-color = #cdd6f4
background-color = #${base}cc
text-color = ${x text}
selection-color = #89b4fa
min-input-width = 120
late-keyboard-init = true
Expand Down
3 changes: 2 additions & 1 deletion home/rice/waybar/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
pkgs,
lib,
config,
theme,
...
}: let
mullvad-status =
Expand All @@ -11,7 +12,7 @@
mullvad status | awk '{print $1;}'
'';
in {
xdg.configFile."waybar/style.css".text = import ./style.nix;
xdg.configFile."waybar/style.css".text = import ./style.nix {inherit theme;};
programs.waybar = {
enable = true;
package = pkgs.waybar;
Expand Down
Loading

0 comments on commit 8d7b4a2

Please sign in to comment.