diff --git a/flake.lock b/flake.lock index 4b30b877..1329d881 100644 --- a/flake.lock +++ b/flake.lock @@ -438,26 +438,6 @@ "type": "github" } }, - "gtk-session-lock": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1713713322, - "narHash": "sha256-A9U/BnzdypE1rt53uhw5X4JQkayR8CkD2Qhn/vhmUSU=", - "owner": "Cu3PO42", - "repo": "gtk-session-lock", - "rev": "b9ddb2792b613d14622acada73c64f16a2635b40", - "type": "github" - }, - "original": { - "owner": "Cu3PO42", - "repo": "gtk-session-lock", - "type": "github" - } - }, "gtk-theme-src": { "flake": false, "locked": { @@ -1652,7 +1632,6 @@ "git-theme-src": "git-theme-src", "gpu-screen-recorder-src": "gpu-screen-recorder-src", "grim-hyprland": "grim-hyprland", - "gtk-session-lock": "gtk-session-lock", "gtk-theme-src": "gtk-theme-src", "home-manager": "home-manager", "hyprgrass": "hyprgrass", diff --git a/flake.nix b/flake.nix index b9b7bd8d..7a33f290 100644 --- a/flake.nix +++ b/flake.nix @@ -127,12 +127,6 @@ repo = "grim-hyprland"; type = "github"; }; - gtk-session-lock = { - inputs.nixpkgs.follows = "nixpkgs"; - owner = "Cu3PO42"; - repo = "gtk-session-lock"; - type = "github"; - }; gtk-theme-src = { flake = false; owner = "dracula"; diff --git a/inputs/default.nix b/inputs/default.nix index 3963e9d1..0728fc56 100644 --- a/inputs/default.nix +++ b/inputs/default.nix @@ -221,11 +221,6 @@ let inputs.astal.follows = "astal"; }; - gtk-session-lock = mkInput { - owner = "Cu3PO42"; - repo = "gtk-session-lock"; - }; - virtualkeyboard-adapter = mkInput { owner = "horriblename"; repo = "fcitx-virtualkeyboard-adapter"; diff --git a/modules/ags/config/app.ts b/modules/ags/config/app.ts index b5f881b4..d3f5570b 100644 --- a/modules/ags/config/app.ts +++ b/modules/ags/config/app.ts @@ -9,7 +9,6 @@ import binto from './configurations/binto'; import wim from './configurations/wim'; import greeter from './configurations/greeter'; -import lock from './configurations/lock'; switch (programArgs[0]) { @@ -18,6 +17,4 @@ switch (programArgs[0]) { case 'wim': wim(); break; case 'greeter': greeter(); break; - - case 'lock': lock(); break; } diff --git a/modules/ags/config/style/lock.scss b/modules/ags/config/style/lock.scss deleted file mode 100644 index 853a0dce..00000000 --- a/modules/ags/config/style/lock.scss +++ /dev/null @@ -1,3 +0,0 @@ -@use 'common'; - -@use '../widgets/lockscreen'; diff --git a/modules/ags/config/widgets/lockscreen/_index.scss b/modules/ags/config/widgets/lockscreen/_index.scss deleted file mode 100644 index e78c2bb5..00000000 --- a/modules/ags/config/widgets/lockscreen/_index.scss +++ /dev/null @@ -1,4 +0,0 @@ -.lock-clock { - font-size: 80pt; - font-family: 'Ubuntu Mono'; -} diff --git a/modules/ags/config/widgets/lockscreen/index.tsx b/modules/ags/config/widgets/lockscreen/index.tsx deleted file mode 100644 index 3547df46..00000000 --- a/modules/ags/config/widgets/lockscreen/index.tsx +++ /dev/null @@ -1,241 +0,0 @@ -import { bind, idle, timeout, Variable } from 'astal'; -import { App, Astal, Gdk, Gtk, Widget } from 'astal/gtk3'; -import { register } from 'astal/gobject'; - -import AstalAuth from 'gi://AstalAuth'; -import Lock from 'gi://GtkSessionLock'; - -import Separator from '../misc/separator'; -import { get_hyprland_monitor_desc } from '../../lib'; - -// This file is generated by Nix -import Vars from './vars'; - -/* Types */ -declare global { - function authFinger(): void; -} -@register() -class BlurredBox extends Widget.Box { - geometry = {} as { w: number, h: number }; -} - - -export default () => { - const windows = new Map(); - const blurBGs: BlurredBox[] = []; - - const transition_duration = 1000; - const WINDOW_MARGINS = -2; - const ENTRY_SPACING = 20; - const CLOCK_SPACING = 60; - - const bgCSS = ({ w = 1, h = 1 } = {}) => ` - border: 2px solid rgba(189, 147, 249, 0.8); - background: rgba(0, 0, 0, 0.2); - min-height: ${h}px; - min-width: ${w}px; - transition: min-height ${transition_duration / 2}ms, - min-width ${transition_duration / 2}ms; -`; - - const lock = Lock.prepare_lock(); - - const unlock = () => { - blurBGs.forEach((b) => { - b.set_css(bgCSS({ - w: b.geometry.w, - h: 1, - })); - - timeout(transition_duration / 2, () => { - b.set_css(bgCSS({ - w: 1, - h: 1, - })); - }); - }); - timeout(transition_duration, () => { - lock.unlock_and_destroy(); - Gdk.Display.get_default()?.sync(); - App.quit(); - }); - }; - - const Clock = () => { - const time = Variable('').poll(1000, () => { - return (new Date().toLocaleString([], { - hour: 'numeric', - minute: 'numeric', - hour12: true, - }) ?? '') - .replace('a.m.', 'AM') - .replace('p.m.', 'PM'); - }); - - return ( -