From 0a9889ec51cb03ac1e2b4c41212ab9b731220d9f Mon Sep 17 00:00:00 2001 From: Jurn Wubben Date: Wed, 19 Feb 2025 19:20:03 +0100 Subject: [PATCH] Removed legacy files. Switch to different screenshot editor. Made fingerprintreader work! --- home/style/default.nix | 16 +- home/wayland/hyprland/binds.nix | 4 +- home/wayland/hyprlock.nix | 50 +------ home/wayland/ironbar.nix | 257 -------------------------------- system/hardware/default.nix | 1 + system/hardware/fingerprint.nix | 3 + 6 files changed, 25 insertions(+), 306 deletions(-) delete mode 100644 home/wayland/ironbar.nix create mode 100644 system/hardware/fingerprint.nix diff --git a/home/style/default.nix b/home/style/default.nix index 2213ec3..4dc9506 100644 --- a/home/style/default.nix +++ b/home/style/default.nix @@ -10,18 +10,26 @@ stylix = { enable = true; + + image = ./background.png; polarity = "dark"; + + fonts.monospace = { + name = "DejaVuSansMNerdFontMono-Regular"; + package = pkgs.nerd-fonts.dejavu-sans-mono; + }; cursor = { package = pkgs.bibata-cursors; name = "Bibata-Modern-Ice"; size = 21; }; - fonts.monospace = { - name = "DejaVuSansMNerdFontMono-Regular"; - package = pkgs.nerd-fonts.dejavu-sans-mono; + iconTheme = { + enable = true; + package = pkgs.tela-circle-icon-theme; #FIXME: Swap out for normal tela icons once https://github.com/NixOS/nixpkgs/issues/381521 is upstream. + dark = "Tela-circle-dark"; + light = "Tela-circle-dark"; }; # base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-frappe.yaml"; - image = ./background.png; }; } diff --git a/home/wayland/hyprland/binds.nix b/home/wayland/hyprland/binds.nix index 9b87e23..fcd93dd 100644 --- a/home/wayland/hyprland/binds.nix +++ b/home/wayland/hyprland/binds.nix @@ -26,7 +26,7 @@ brightnessctl = appE pkgs.brightnessctl; wpctl = app "${pkgs.wireplumber}/bin/wpctl"; grimblast = appE pkgs.grimblast; - annotator = appE pkgs.annotator; + swappy = appE pkgs.swappy; pulsemixer = termappE pkgs.pulsemixer; bluetui = termappE pkgs.bluetui; @@ -80,7 +80,7 @@ in { '' "$mod, Print, exec, ${grimblast} copy area" - ", Print, exec, ${grimblast} save area - | ${annotator} -i" + ", Print, exec, ${grimblast} save area - | ${swappy} -f -" "$mod, h, movefocus, l" "$mod, l, movefocus, r" diff --git a/home/wayland/hyprlock.nix b/home/wayland/hyprlock.nix index f79f7eb..2f437b2 100644 --- a/home/wayland/hyprlock.nix +++ b/home/wayland/hyprlock.nix @@ -1,9 +1,6 @@ -{ - config, - inputs, - pkgs, - ... -}: { +{config, ...}: let + inherit (config.lib.stylix.colors) base05; +in { programs.hyprlock = { enable = true; @@ -14,49 +11,16 @@ hide_cursor = false; no_fade_in = true; }; - - # background = [ - # { - # monitor = ""; - # path = config.theme.wallpaper; - # } - # ]; - - # input-field = [ - # { - # size = "300, 50"; - # valign = "bottom"; - # position = "0%, 10%"; - # - # outline_thickness = 1; - # - # # font_color = "rgb(b6c4ff)"; - # # outer_color = "rgba(180, 180, 180, 0.5)"; - # # inner_color = "rgba(200, 200, 200, 0.1)"; - # # check_color = "rgba(247, 193, 19, 0.5)"; - # # fail_color = "rgba(255, 106, 134, 0.5)"; - # - # fade_on_empty = false; - # placeholder_text = "Enter Password"; - # - # dots_spacing = 0.2; - # dots_center = true; - # dots_fade_time = 100; - # - # # shadow_color = "rgba(0, 0, 0, 0.1)"; - # shadow_size = 7; - # shadow_passes = 2; - # } - # ]; + auth."fingerprint:enabled" = true; label = [ { monitor = ""; text = "$TIME"; font_size = 150; - color = "rgb(b6c4ff)"; + color = "rgb(${base05})"; - position = "0%, 30%"; + position = "0%, 33%"; valign = "center"; halign = "center"; @@ -70,7 +34,7 @@ monitor = ""; text = "cmd[update:3600000] date +'%a %b %d'"; font_size = 20; - color = "rgb(b6c4ff)"; + color = "rgb(${base05})"; position = "0%, 40%"; diff --git a/home/wayland/ironbar.nix b/home/wayland/ironbar.nix deleted file mode 100644 index 33db171..0000000 --- a/home/wayland/ironbar.nix +++ /dev/null @@ -1,257 +0,0 @@ -{ - config, - pkgs, - lib, - osConfig, - ... -}: let -in { - mainBar = { - layer = "top"; - position = "left"; - # monitor configuration, kind of dirty since it assumes DP-1 is my main monitor - # output = primaryMonitor osConfig; #builtins.elemAt monitors 0; - width = 55; - spacing = 6; - margin-left = null; - margin-top = 6; - margin-bottom = 6; - margin-right = null; - fixed-center = true; - exclusive = true; - modules-left = [ - "custom/search" - "group/info" - ]; - modules-center = ["river/tags"]; - modules-right = [ - "group/info-right" - "battery" - "group/network" - "clock" - "custom/lock" - ]; - - ##### LEFT MODULES ##### - "custom/search" = { - format = " "; - tooltip = false; - on-click = "${lib.getExe pkgs.killall} rofi || run-as-service $(rofi -show drun)"; - }; - - #### INFO MODULE - START #### - "group/info" = { - orientation = "inherit"; - drawer = { - "transition-duration" = 500; - "transition-left-to-right" = false; - }; - modules = [ - "custom/dmark" - "group/gcpu" - "memory" - "disk" - ]; - }; - - "custom/dmark" = { - format = ""; - tooltip = false; - }; - - #### CPU MODULE - START #### - "group/gcpu" = { - orientation = "inherit"; - modules = [ - "custom/cpu-icon" - "cpu" - ]; - }; - - "custom/cpu-icon" = { - format = "󰻠"; - tooltip = false; - }; - - cpu = { - format = "{usage}󱉸"; - "on-click" = "foot btop"; - }; - ##### CPU MODULE - END ##### - - memory = { - format = "  \n{:2}󱉸"; - }; - - disk = { - interval = 600; - format = " 󰋊 \n{percentage_used}󱉸"; - path = "/"; - }; - #### INFO MODULE - END #### - - ##### CENTER MODULES ##### - "river/tags" = { - num-tags = 9; - tag-labels = ["一" "二" "三" "四" "五" "六" "七" "八" "九" "十"]; - }; - - ##### RIGHT MODULES ##### - ##### RIGHT INFO MODULE - START #### - "group/info-right" = { - orientation = "inherit"; - drawer = { - "transition-duration" = 500; - "transition-left-to-right" = false; - }; - modules = [ - "custom/dmark-up" - "pulseaudio" - "backlight" - "bluetooth" - "tray" - ]; - }; - - "custom/dmark-up" = { - format = ""; - tooltip = false; - }; - - pulseaudio = { - scroll-step = 5; - tooltip = true; - tooltip-format = "{volume}"; - on-click = "${pkgs.killall}/bin/killall pavucontrol || ${pkgs.pavucontrol}/bin/pavucontrol"; - format = "{icon}"; - format-muted = "󰝟"; - format-icons = { - default = ["" "" ""]; - }; - }; - - backlight = let - brightnessctl = lib.getExe pkgs.brightnessctl; - in { - format = "{icon}"; - format-icons = ["󰋙" "󰫃" "󰫄" "󰫅" "󰫆" "󰫇" "󰫈"]; - on-scroll-up = "${brightnessctl} s 5%-"; - on-scroll-down = "${brightnessctl} s +5%"; - tooltip = true; - tooltip-format = "Brightness: {percent}% "; - smooth-scrolling-threshold = 1; - }; - - bluetooth = { - # controller = "controller1", // specify the alias of the controller if there are more than 1 on the system - format = ""; - format-disabled = "󰂲"; # an empty format will hide the module - format-connected = "󰂱"; - tooltip-format = "{controller_alias}\t{controller_address}"; - tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{device_enumerate}"; - tooltip-format-disabled = ""; - tooltip-format-enumerate-connected = "{device_alias}\t{device_address}"; - }; - - "tray" = { - spacing = 10; - }; - - ##### RIGHT INFO MODULE - END #### - - battery = { - rotate = 270; - states = { - good = 80; - warning = 30; - critical = 15; - }; - format = "{icon}"; - format-charging = "{icon} "; - format-full = "{icon}"; - format-plugged = "󰂄"; - format-icons = ["󰂃" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; - tooltip-format = "{timeTo} {capacity} % | {power} W"; - }; - - #### NETWORK MODULE - START #### - "group/network" = { - orientation = "inherit"; - drawer = { - "transition-duration" = 500; - "transition-left-to-right" = true; - }; - modules = [ - "network" - "network#speed" - ]; - }; - - network = { - format-wifi = "󰤨"; - format-ethernet = "󰈀"; - format-alt = "󱛇"; - format-disconnected = "󰤭"; - }; - - "network#speed" = let - nm-editor = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor"; - in { - format = " {bandwidthDownBits} "; - rotate = 90; - interval = 5; - tooltip-format = "{ipaddr}"; - tooltip-format-wifi = "{essid} ({signalStrength}%)  \n{ipaddr} | {frequency} MHz{icon} "; - tooltip-format-ethernet = "{ifname} 󰈀 \n{ipaddr} | {frequency} MHz{icon} "; - tooltip-format-disconnected = "Not Connected to any type of Network"; - tooltip = true; - on-click = "${nm-editor}"; - }; - - #### NETWORK MODULE - END #### - - clock = { - format = '' - {:%H - %M}''; - tooltip-format = '' - {:%Y %B} - {calendar} - ''; - }; - - "custom/lock" = { - tooltip = false; - on-click = "${pkgs.bash}/bin/bash -c '(sleep 0.5s; ${lib.getExe pkgs.swaylock-effects} --grace 0)' & disown"; - format = ""; - }; - - "custom/power" = { - tooltip = false; - on-click = let - sudo = pkgs.sudo + "/bin/sudo"; - rofi = config.programs.rofi.package + "/bin/rofi"; - poweroff = pkgs.systemd + "/bin/poweroff"; - reboot = pkgs.systemd + "/bin/reboot"; - in - pkgs.writeShellScript "shutdown-waybar" '' - - #!/bin/sh - - off=" Shutdown" - reboot=" Reboot" - cancel="󰅖 Cancel" - - sure="$(printf '%s\n%s\n%s' "$off" "$reboot" "$cancel" | - ${rofi} -dmenu -p ' Are you sure?')" - - if [ "$sure" = "$off" ]; then - ${sudo} ${poweroff} - elif [ "$sure" = "$reboot" ]; then - ${sudo} ${reboot} - fi - ''; - format = "󰐥"; - }; - }; -} diff --git a/system/hardware/default.nix b/system/hardware/default.nix index ba5e415..edf898b 100644 --- a/system/hardware/default.nix +++ b/system/hardware/default.nix @@ -4,6 +4,7 @@ imports = [ ./bluetooth.nix ./commonGraphics.nix + ./fingerprint.nix ./fwupd.nix ]; } diff --git a/system/hardware/fingerprint.nix b/system/hardware/fingerprint.nix new file mode 100644 index 0000000..366fa60 --- /dev/null +++ b/system/hardware/fingerprint.nix @@ -0,0 +1,3 @@ +{ + services.fprintd.enable = true; +}