Compare commits

..

13 commits

Author SHA1 Message Date
efe09d0045
WE DID IT. QT ICONS 2025-01-09 21:25:47 -08:00
044bed7bac
this is good i think 2025-01-09 21:25:41 -08:00
c89c09578f
wlinhibit 2025-01-03 18:51:25 -06:00
e49f2c84bc
nwg-drawer crashes no longer pain 2025-01-03 18:41:40 -06:00
c4fa167aaa
oh hey thats nice 2025-01-02 16:19:49 -06:00
542d57342e
more scripts 2025-01-02 16:15:26 -06:00
20c1d5601b
use a better hex editor 2025-01-02 11:54:24 -06:00
e62e519475
update todo 2025-01-01 19:49:37 -06:00
d14b5e7aab
minor annoyances 2025-01-01 19:49:32 -06:00
72f438bdae
time zone and weather is now location based!! 2025-01-01 19:49:21 -06:00
696e37e35c
noisetorch 2024-12-30 20:24:51 -08:00
e9a52bfa01
better theme polarity methods 2024-12-27 01:46:05 -08:00
88f79cc468
use xdg.configfile instead of home.file 2024-12-27 01:25:34 -08:00
15 changed files with 133 additions and 34 deletions

View file

@ -24,6 +24,5 @@ each host should have these files:
- tags for pip and popups in hyprland config - tags for pip and popups in hyprland config
- make wl-clip-persist and networkmanager applet systemd services? - make wl-clip-persist and networkmanager applet systemd services?
- gtk cursors are MESSED UP. top priority rn - gtk cursors are MESSED UP. top priority rn
- qt icons just... don't apply
- niri.. yum - niri.. yum
- do lockscreen better somehow - international keyboard for Spanish

View file

@ -50,28 +50,43 @@ in {
}; };
}; };
system.stateVersion = mkDefault "23.11"; system.stateVersion = "23.11";
system.configurationRevision = with inputs; mkIf (self ? rev) self.rev; system.configurationRevision = with inputs; mkIf (self ? rev) self.rev;
hm.home.stateVersion = config.system.stateVersion; hm.home.stateVersion = config.system.stateVersion;
boot = { boot = {
kernelPackages = mkDefault pkgs.linuxPackages_latest; kernelPackages = mkDefault pkgs.linuxPackages_latest;
kernelParams = ["pci_aspm.policy=performance"]; kernelParams = [ "pci_aspm.policy=performance" ];
}; };
# configure keymap in x11 # configure keymap in x11
services.xserver.xkb = { services.xserver.xkb = {
layout = "us"; layout = "us";
# i need to learn this sometime variant = "qwerty";
# variant = "workman";
}; };
console = { console = {
useXkbConfig = mkDefault true; useXkbConfig = mkDefault true;
}; };
time.timeZone = mkDefault "America/Los_Angeles"; # set the time zone
services.automatic-timezoned.enable = mkDefault true;
time.timeZone = mkDefault null; # handled by automatic-timezoned
i18n.defaultLocale = mkDefault "en_US.UTF-8"; i18n = mkDefault {
defaultLocale = "en_US.UTF-8";
supportedLocales = [ "en_US.UTF-8/UTF-8" ];
};
# set the location
location.provider = mkDefault "geoclue2";
services.geoclue2 = {
enable = mkDefault true;
# the default provider is Geeked
geoProviderUrl = "https://beacondb.net/v1/geolocate";
submissionUrl = "https://beacondb.net/v2/geosubmit";
submissionNick = "geoclue";
};
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;

View file

@ -17,18 +17,18 @@
# debug # debug
strace ltrace lsof helvum strace ltrace lsof helvum
# apps # apps
firefox qalculate-gtk krita inkscape onlyoffice-desktopeditors vlc nicotine-plus transmission_4-gtk font-manager obs-studio kdePackages.kdenlive firefox qalculate-gtk krita inkscape onlyoffice-desktopeditors vlc nicotine-plus transmission_4-gtk font-manager obs-studio imhex kdePackages.kdenlive
# compatibility # compatibility
wineWowPackages.waylandFull winetricks wineWowPackages.waylandFull winetricks
# misc # misc
bat file which packwiz yt-dlp fastfetch hyfetch bat file which packwiz yt-dlp fastfetch hyfetch trashy wev
# games # games
prismlauncher prismlauncher
] ++ (with pkgs.my; [ ] ++ (with pkgs.my; [
# none yet # none yet
]) ++ (with pkgs.gnome; [ ]) ++ (with pkgs.gnome; [
# yay gnomeware!!!!!!!!!!!!!! yum # yay gnomeware!!!!!!!!!!!!!! yum
nautilus gnome-disk-utility ghex pkgs.gnome-text-editor pkgs.baobab file-roller gnome-system-monitor loupe nautilus gnome-disk-utility pkgs.gnome-text-editor pkgs.baobab file-roller gnome-system-monitor loupe pkgs.gnome-weather
]); ]);
modules = { modules = {
@ -91,6 +91,7 @@
# tools # tools
tools.gpg.enable = true; tools.gpg.enable = true;
tools.rbw.enable = true; tools.rbw.enable = true;
tools.noisetorch.enable = true;
}; };
}; };
} }

View file

@ -13,10 +13,7 @@ in {
enable = true; enable = true;
tray = true; tray = true;
# portland, oregon provider = "geoclue2";
latitude = 45.3112;
longitude = -122.4055;
provider = "manual";
}; };
}; };
} }

View file

@ -92,6 +92,8 @@ in {
]; ];
bind = let bind = let
screenshotScript = pkgs.writeShellScript "screenshot" '' screenshotScript = pkgs.writeShellScript "screenshot" ''
set -euo pipefail
temp_file=$(mktemp) temp_file=$(mktemp)
trap 'rm -f "$temp_file"' EXIT trap 'rm -f "$temp_file"' EXIT
@ -112,15 +114,15 @@ in {
;; ;;
esac esac
${lib.getExe pkgs.grimblast} --freeze save "$mode" - > "$temp_file" || exit 0 # exit successful, highly unlikely that grimblast failed, and it is more likely that the user cancelled the screenshot ${lib.getExe pkgs.grimblast} --freeze save "$mode" - > "$temp_file"
cat "$temp_file" | ${lib.getExe pkgs.wl-clipboard-x11} -selection clipboard -t image/png cat "$temp_file" | ${lib.getExe pkgs.wl-clipboard-x11} -selection clipboard -t image/png
action=$(${pkgs.libnotify}/bin/notify-send "Screenshot Captured" \ action=$(${pkgs.libnotify}/bin/notify-send "Screenshot Captured" \
--app-name="Screenshot" \ --app-name="Screenshot" \
--urgency=normal \ --urgency="normal" \
--action="default=Edit Image" \ --action="default=Edit Image" \
--icon "$temp_file" \ --icon="$temp_file" \
"Click to annotate image") "Click to annotate image")
case "$action" in case "$action" in
@ -129,8 +131,28 @@ in {
;; ;;
esac esac
''; '';
pickerScript = pkgs.writeShellScript "color-picker" '' pickerScript = pkgs.writeShellScript "picker" ''
${lib.getExe pkgs.zenity} --color-selection --color $(${lib.getExe pkgs.hyprpicker}) set -euo pipefail
${lib.getExe pkgs.hyprpicker} --render-inactive --format hex | sed -z 's/\n//g' | ${lib.getExe pkgs.wl-clipboard-x11} -selection clipboard -t text/plain
${pkgs.libnotify}/bin/notify-send "Color Captured" \
--app-name="Picker" \
--urgency="normal" \
"Color copied to clipboard"
'';
ocrScript = pkgs.writeShellScript "ocr" ''
set -euo pipefail
output=$(${lib.getExe pkgs.grimblast} --freeze save area - | ${lib.getExe pkgs.tesseract5} - -)
echo "$output" | ${lib.getExe pkgs.wl-clipboard-x11} -selection clipboard -t text/plain
${pkgs.libnotify}/bin/notify-send "OCR Captured" \
--app-name="OCR" \
--urgency="normal" \
--icon="text-x-generic-symbolic" \
"Text copied to clipboard"
''; '';
in [ in [
"$mod, Q, killactive, " "$mod, Q, killactive, "
@ -178,6 +200,8 @@ in {
"$mod SHIFT ALT, S, exec, ${screenshotScript} window" "$mod SHIFT ALT, S, exec, ${screenshotScript} window"
# pick color # pick color
"$mod SHIFT, C, exec, ${pickerScript}" "$mod SHIFT, C, exec, ${pickerScript}"
# ocr
"$mod SHIFT, T, exec, ${ocrScript}"
", XF86LaunchA, exec, ${screenshotScript} area" ", XF86LaunchA, exec, ${screenshotScript} area"
", XF86LaunchB, exec, ${lib.getExe pkgs.rofi-rbw-wayland} -a copy -t password --clear-after 20" ", XF86LaunchB, exec, ${lib.getExe pkgs.rofi-rbw-wayland} -a copy -t password --clear-after 20"
@ -260,9 +284,6 @@ in {
"float, initialTitle:^Save As$" "float, initialTitle:^Save As$"
"size 1100 650, initialTitle:^Save As$" "size 1100 650, initialTitle:^Save As$"
"center, initialTitle:^Save As$" "center, initialTitle:^Save As$"
"float, initialTitle:^Select a file to open$"
"size 1100 650, initialTitle:^Select a file to open$"
"center, initialTitle:^Select a file to open$"
"float, initialTitle:^File Upload$" "float, initialTitle:^File Upload$"
"size 1100 650, initialTitle:^File Upload$" "size 1100 650, initialTitle:^File Upload$"
"center, initialTitle:^File Upload$" "center, initialTitle:^File Upload$"

View file

@ -15,7 +15,7 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
security.pam.services.hyprlock.text = "auth include login"; security.pam.services.hyprlock.text = "auth include login";
hm.home.packages = [ cfg.package ]; hm.home.packages = with pkgs; [ cfg.package wlinhibit ];
hm.programs.hyprlock = { hm.programs.hyprlock = {
enable = true; enable = true;
package = cfg.package; package = cfg.package;

View file

@ -27,7 +27,7 @@ in {
Service = { Service = {
Type = "simple"; Type = "simple";
ExecStart = "${lib.getExe cfg.package} -r -nofs -nocats -ovl -term wezterm -spacing 15 -fm nautilus"; ExecStart = "${lib.getExe cfg.package} -r -nofs -nocats -ovl -term wezterm -spacing 15 -fm nautilus -wm hyprland";
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 5; RestartSec = 5;
}; };

View file

@ -15,6 +15,7 @@ in {
themePackages = [ config.modules.desktop.themes.plymouthTheme.package ]; themePackages = [ config.modules.desktop.themes.plymouthTheme.package ];
theme = config.modules.desktop.themes.plymouthTheme.name; theme = config.modules.desktop.themes.plymouthTheme.name;
}; };
boot.kernelParams = [ "plymouth.use-simpledrm" ];
# smooth transition from plymouth to the login manager # smooth transition from plymouth to the login manager
# honestly, i have No Clue what this does, but it's in the arch wiki so it must be good # honestly, i have No Clue what this does, but it's in the arch wiki so it must be good

View file

@ -17,6 +17,8 @@ in {
setScript = mkOption { setScript = mkOption {
type = types.package; type = types.package;
default = pkgs.writeShellScript "swww-set" '' default = pkgs.writeShellScript "swww-set" ''
set -euo pipefail
if [ ! -f "${lastWallpaper}" ]; then if [ ! -f "${lastWallpaper}" ]; then
echo "$(ls ${wallpapersFolder} | shuf -n 1)" > "${lastWallpaper}" echo "$(ls ${wallpapersFolder} | shuf -n 1)" > "${lastWallpaper}"
fi fi
@ -27,6 +29,8 @@ in {
swapScript = mkOption { swapScript = mkOption {
type = types.package; type = types.package;
default = pkgs.writeShellScript "swww-swap" '' default = pkgs.writeShellScript "swww-swap" ''
set -euo pipefail
file=$(ls ${wallpapersFolder} | ${lib.getExe config.modules.desktop.rofi.package} -dmenu -sep '\n' -i -p "select a wallpaper") file=$(ls ${wallpapersFolder} | ${lib.getExe config.modules.desktop.rofi.package} -dmenu -sep '\n' -i -p "select a wallpaper")
wallpaper="${wallpapersFolder}/$file" wallpaper="${wallpapersFolder}/$file"

View file

@ -5,6 +5,8 @@ let
cfg = config.modules.desktop.themes; cfg = config.modules.desktop.themes;
accent = "pink"; accent = "pink";
variant = "mocha"; variant = "mocha";
dark = variant != "latte";
colorScheme = inputs.nix-colors.colorSchemes.${"catppuccin-${variant}"}; colorScheme = inputs.nix-colors.colorSchemes.${"catppuccin-${variant}"};
pascalCase = s: (toUpper (substring 0 1 s)) + (toLower (substring 1 (stringLength s) s)); pascalCase = s: (toUpper (substring 0 1 s)) + (toLower (substring 1 (stringLength s) s));
in { in {
@ -12,7 +14,7 @@ in {
colorScheme = colorScheme; colorScheme = colorScheme;
modules.desktop.themes = { modules.desktop.themes = {
dark = variant != "latte"; dark = dark;
gtkTheme = { gtkTheme = {
name = "catppuccin-${variant}-${accent}-compact+rimless"; name = "catppuccin-${variant}-${accent}-compact+rimless";
@ -33,12 +35,12 @@ in {
}; };
iconTheme = { iconTheme = {
name = "WhiteSur-dark"; name = "WhiteSur-${if dark then "dark" else "light"}";
package = pkgs.whitesur-icon-theme; package = pkgs.whitesur-icon-theme;
}; };
cursorTheme = { cursorTheme = {
name = "graphite-dark"; name = "graphite-${if dark then "dark" else "light"}";
package = pkgs.graphite-cursors; package = pkgs.graphite-cursors;
size = 24; size = 24;
}; };

View file

@ -104,6 +104,15 @@ in {
platformTheme.name = "qtct"; platformTheme.name = "qtct";
style.name = "kvantum"; style.name = "kvantum";
}; };
# needed for svg icons in qt to work,
# so we just install them unconditionally
hm.home.packages = with pkgs; [
cfg.iconTheme.package
libsForQt5.breeze-icons
libsForQt5.qt5.qtsvg
# kdePackages.breeze-icons
kdePackages.qtsvg
];
hm.home.pointerCursor = { hm.home.pointerCursor = {
gtk.enable = true; gtk.enable = true;
@ -172,6 +181,11 @@ in {
}; };
}; };
in { in {
"kdeglobals".text = ''
[Icons]
Theme=${cfg.iconTheme.name}
'';
"Kvantum/${cfg.kvantumTheme.name}".source = "${cfg.kvantumTheme.package}/share/Kvantum/${cfg.kvantumTheme.name}"; "Kvantum/${cfg.kvantumTheme.name}".source = "${cfg.kvantumTheme.package}/share/Kvantum/${cfg.kvantumTheme.name}";
"Kvantum/kvantum.kvconfig".text = '' "Kvantum/kvantum.kvconfig".text = ''
[General] [General]

View file

@ -75,7 +75,9 @@ in {
]; ];
}; };
"custom/power" = let "custom/power" = let
powerSelect = pkgs.writeShellScript "power-menu" '' powerMenuScript = pkgs.writeShellScript "power-menu" ''
set -euo pipefail
cmd=$(echo ' shutdown| reboot| lock| exit desktop environment' | ${lib.getExe pkgs.rofi-wayland} -dmenu -sep '|' -i -p 'what to do ?' -theme-str 'window { height: 132px; }') cmd=$(echo ' shutdown| reboot| lock| exit desktop environment' | ${lib.getExe pkgs.rofi-wayland} -dmenu -sep '|' -i -p 'what to do ?' -theme-str 'window { height: 132px; }')
case "$cmd" in case "$cmd" in
" shutdown") " shutdown")
@ -96,7 +98,7 @@ in {
format = ""; format = "";
tooltip = true; tooltip = true;
tooltip-format = "Power menu"; tooltip-format = "Power menu";
on-click = "${powerSelect}"; on-click = "${powerMenuScript}";
}; };
"custom/wallpaper" = { "custom/wallpaper" = {
format = ""; format = "";
@ -258,12 +260,41 @@ in {
icon-size = 16; icon-size = 16;
spacing = 4; spacing = 4;
}; };
"custom/weather" = { "custom/weather" = let
# this *should* be from coordinates, but we have to make it city because...
# https://github.com/chubin/wttr.in/issues/795
# i was NOT going to let ip-based location be a thing. i was suprisingly medicated when i wrote this
locationScript = pkgs.writeShellScript "location" ''
set -euo pipefail
lon=""
lat=""
while IFS= read -r line; do
if [[ "$line" == *"Latitude"* ]]; then
lat=$(echo "$line" | awk '{ gsub(/[" ]/, "", $2); printf("%.2f", $2) }')
elif [[ "$line" == *"Longitude"* ]]; then
lon=$(echo "$line" | awk '{ gsub(/[" ]/, "", $2); printf("%.2f", $2) }')
fi
if [[ -n "$lat" && -n "$lon" ]]; then
break
fi
# -a 4 -- set accuracy to city
done < <(${pkgs.geoclue2}/libexec/geoclue-2.0/demos/where-am-i -a 4)
# i've had issues including country *and* state here, so state has higher priority and falls back to country. works fine for my current place and home town, so good enough <3
# zoom=10 -- set zoom to city
# addressdetails=1 -- get address details, includes neighborhood (if requested) to city
echo $(curl "https://nominatim.openstreetmap.org/reverse?lat=''${lat}&lon=''${lon}&addressdetails=1&zoom=10&format=json" | ${lib.getExe pkgs.jq} -r '.address | "\((to_entries[0].value)), \(.state // "\(.country)")"')
'';
in {
format = "{}°"; format = "{}°";
tooltip = true; tooltip = true;
on-click = "${lib.getExe pkgs.gnome-weather}";
interval = 3600; interval = 3600;
# doxxing live stream # doxxing live stream
exec = "${lib.getExe pkgs.wttrbar} --location 'Corvallis, Oregon, United States' --hide-conditions --fahrenheit --mph"; # edit: no longer doxxing, you will be remembered
exec = ''${lib.getExe pkgs.wttrbar} --location "$(${locationScript})" --hide-conditions --fahrenheit --mph'';
return-type = "json"; return-type = "json";
}; };
}; };

View file

@ -28,7 +28,7 @@ in {
}; };
}; };
hm.home.file.".config/micro/colorschemes/${schemeName}.micro".text = with config.colorScheme.palette; '' hm.xdg.configFile."micro/colorschemes/${schemeName}.micro".text = with config.colorScheme.palette; ''
color-link default "#${base05},#${base00}" color-link default "#${base05},#${base00}"
color-link comment "#${base03},#${base00}" color-link comment "#${base03},#${base00}"
color-link identifier "#${base0D},#${base00}" color-link identifier "#${base0D},#${base00}"

View file

@ -67,7 +67,7 @@ in {
"nix.enableLanguageServer" = true; "nix.enableLanguageServer" = true;
"nix.serverPath" = "${lib.getExe pkgs.nil}"; "nix.serverPath" = "${lib.getExe pkgs.nil}";
"security.workspace.trust.untrustedFiles" = "open"; "security.workspace.trust.enabled" = "false";
"explorer.compactFolders" = false; "explorer.compactFolders" = false;
"explorer.confirmDelete" = false; "explorer.confirmDelete" = false;

View file

@ -0,0 +1,14 @@
{ config, lib, ... }:
with lib;
let
cfg = config.modules.software.tools.noisetorch;
in {
options.modules.software.tools.noisetorch = {
enable = mkEnableOption "Enable noisetorch, a microphone noise supression tool";
};
config = mkIf cfg.enable {
programs.noisetorch.enable = true;
};
}