From 3c4df0816f1ae7a67ad1835db84b7be3d3a0459e Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Sat, 3 Aug 2024 22:22:59 +0545 Subject: [PATCH] update --- config/ags/main.ts | 11 ++++++++++- config/ags/modules/bar.ts | 1 + config/ags/scripts/cliphist.sh | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/config/ags/main.ts b/config/ags/main.ts index 2c90da79..a937f614 100644 --- a/config/ags/main.ts +++ b/config/ags/main.ts @@ -12,6 +12,7 @@ import { cheatsheet } from "modules/cheatsheet.ts"; import Window from "types/widgets/window"; import { popups } from "modules/popups.ts"; import { start_battery_warning_service } from "services/battery_warning.ts"; +import Gtk from "gi://Gtk?version=3.0"; const GLib = imports.gi.GLib; const range = (length: number, start = 1) => Array.from({ length }, (_, i) => i + start); @@ -31,7 +32,7 @@ const Windows = () => [ sideright, cheatsheet, sideleft, - forMonitors(popups) + forMonitors(popups), ]; App.config({ @@ -56,7 +57,15 @@ Utils.monitorFile(`${GLib.get_home_dir()}/.cache/material/colors.css`, ReloadCSS forMonitorsAsync(Bar); ReloadCSS(); +function enableAnimations(bool: boolean) { + const settings = Gtk.Settings.get_default()!; + + settings.gtk_enable_animations = bool; +} + globalThis.ReloadCSS = ReloadCSS; globalThis.ReloadColors = ReloadColors; +globalThis.enableAnimations = enableAnimations; start_battery_warning_service(); + diff --git a/config/ags/modules/bar.ts b/config/ags/modules/bar.ts index a6e6b3e2..d271b52f 100644 --- a/config/ags/modules/bar.ts +++ b/config/ags/modules/bar.ts @@ -20,6 +20,7 @@ import config from "services/configuration.ts"; import { toggleAppsWindow, toggleMediaWindow } from "./sideleft/main.js"; import { Variable as VariableType } from "types/variable"; + const keyboard_layout = Variable("none"); hyprland.connect("keyboard-layout", (hyprland, keyboardname, layoutname) => { keyboard_layout.setValue(layoutname.trim().toLowerCase().substr(0, 2)); diff --git a/config/ags/scripts/cliphist.sh b/config/ags/scripts/cliphist.sh index bf6c9a54..cdf6d547 100755 --- a/config/ags/scripts/cliphist.sh +++ b/config/ags/scripts/cliphist.sh @@ -1,7 +1,7 @@ #!/bin/bash get() { - cliphist list + cliphist list | iconv -f $(locale charmap) -t UTF-8 -c } copy_by_id() {