From 0db17667552f4f30042b3a3a3915d1c909adc186 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Tue, 12 Dec 2023 12:24:58 -0500 Subject: [PATCH] feat(binto ags): use ags for app launcher --- devices/binto/config/ags/config.js | 8 +- devices/binto/config/ags/scss/main.scss | 1 + .../config/ags/scss/widgets/applauncher.scss | 118 ++++++++++++++++++ devices/binto/config/hypr/main.conf | 6 +- 4 files changed, 130 insertions(+), 3 deletions(-) create mode 100644 devices/binto/config/ags/scss/widgets/applauncher.scss diff --git a/devices/binto/config/ags/config.js b/devices/binto/config/ags/config.js index 1e093aa4..a8aec530 100644 --- a/devices/binto/config/ags/config.js +++ b/devices/binto/config/ags/config.js @@ -3,6 +3,7 @@ import { exec } from 'resource:///com/github/Aylur/ags/utils.js'; import Pointers from 'file:///home/matt/.nix/devices/wim/config/ags/services/pointers.js'; +import AppLauncher from 'file:///home/matt/.nix/devices/wim/config/ags/js/applauncher/main.js'; import Bar from './js/bar/main.js'; import { NotifPopups, NotifCenter } from './js/notifications/main.js'; @@ -18,15 +19,18 @@ export default { cacheNotificationActions: true, onConfigParsed: () => { - globalThis.Ponters = Pointers; + globalThis.Pointers = Pointers; }, closeWindowDelay: { + 'applauncher': 500, 'notification-center': 500, }, windows: [ - Bar(), + AppLauncher(), NotifCenter(), + + Bar(), NotifPopups(), ], }; diff --git a/devices/binto/config/ags/scss/main.scss b/devices/binto/config/ags/scss/main.scss index ac5bfc7d..0d3c7881 100644 --- a/devices/binto/config/ags/scss/main.scss +++ b/devices/binto/config/ags/scss/main.scss @@ -9,6 +9,7 @@ undershoot { } @import '/home/matt/.nix/devices/wim/config/ags/scss/common'; +@import './widgets/applauncher'; @import './widgets/bar'; @import './widgets/notification'; @import './widgets/notification-center'; diff --git a/devices/binto/config/ags/scss/widgets/applauncher.scss b/devices/binto/config/ags/scss/widgets/applauncher.scss new file mode 100644 index 00000000..6ba509db --- /dev/null +++ b/devices/binto/config/ags/scss/widgets/applauncher.scss @@ -0,0 +1,118 @@ +.applauncher { + all: unset; + border: 2px solid $contrast-bg; + background-color: $bg; + color: #f8f8f2; + padding: 2px; + + * { + font-size: 16px; + } + + list, row { + all: unset; + } + + .header { + margin: 16.2px; + margin-bottom: 0; + + image, entry { + all: unset; + border-radius: 9px; + color: #f8f8f2; + background-color: rgba(#44475a, 0.6); + border: 1px solid #44475a; + padding: 4.5px; + } + + image { + margin-right: 9px; + -gtk-icon-transform: scale(0.8); + font-size: 25.6px; + } + } + + scrolledwindow { + padding: 10px; + padding-bottom: 0; + min-width: 900px; + min-height: 650px; + + scrollbar, scrollbar * { + all: unset; + } + + scrollbar.vertical { + transition: 200ms; + background-color: rgba(23, 23, 23, 0.3); + margin: 20px 0; + + &:hover { + background-color: rgba(23, 23, 23, 0.7); + + slider { + background-color: rgba(238, 238, 238, 0.7); + min-width: .6em; + } + } + + slider { + background-color: rgba(238, 238, 238, 0.5); + border-radius: 9px; + min-width: .4em; + min-height: 2em; + transition: 200ms; + } + } + } + + .placeholder { + margin-top: 9px; + color: #f8f8f2; + font-size: 1.2em; + } + + .app { + all: unset; + transition: 200ms; + border-radius: 9px; + + label { + transition: 200ms; + + &.title { + margin-top: 20px; + color: #f8f8f2; + } + + &.description { + color: rgba(238, 238, 238, 0.7); + } + } + + image { + transition: 200ms; + margin: 0 8px; + } + + &:active { + background-color: rgba($contrast-bg, 0.5); + box-shadow: inset 0 0 0 3px rgba(238, 238, 238, 0.03); + } + } + + *:selected, .app:hover, .app:focus { + * { + font-weight: unset; + } + + label.title { + color: $contrast-bg; + } + + image { + -gtk-icon-shadow: 2px 2px $contrast-bg; + } + } +} diff --git a/devices/binto/config/hypr/main.conf b/devices/binto/config/hypr/main.conf index 6afb6165..4973ae05 100644 --- a/devices/binto/config/hypr/main.conf +++ b/devices/binto/config/hypr/main.conf @@ -26,7 +26,11 @@ device:razer-razer-naga-pro { # Binds bind = Alt Shift, Tab, cyclenext -bind = $mainMod, D, exec, killall -r wofi || wofi --show drun + +## Ags & co +bindn = , Escape, exec, ags run-js 'closeAll()' +bind = $mainMod SHIFT, E , exec, ags -t powermenu +bind = $mainMod , D , exec, ags -t applauncher # Rules