diff --git a/config/ags/modules/cliphist.ts b/config/ags/modules/cliphist.ts index 09f37353..f385df43 100644 --- a/config/ags/modules/cliphist.ts +++ b/config/ags/modules/cliphist.ts @@ -1,6 +1,7 @@ const WINDOW_NAME = "cliphist"; import popupwindow from "./misc/popupwindow.ts"; import Gtk from "gi://Gtk?version=3.0"; +import { MaterialIcon } from "icons"; type EntryObject = { id: string; @@ -182,32 +183,36 @@ function ClipHistWidget({ width = 500, height = 500, spacing = 12 }) { on_change: ({ text }) => { const searchText = (text ?? "").toLowerCase(); - - if (searchText === "/clear") { - list.children.forEach((item) => { - item.destroy(); - }); - clipHistItems = []; - Utils.execAsync(`${App.configDir}/scripts/cliphist.sh --clear`).catch(print); - setTimeout(() => { - entry.text = ""; - }, 300); - return; - } - list.children.forEach((item) => { item.visible = item.attribute.content.toLowerCase().includes(searchText); }); } }); + const clearButton = Widget.Button({ + child: MaterialIcon("delete_forever"), + class_name: "clear_button", + on_clicked: () => { + Utils.execAsync(`${App.configDir}/scripts/cliphist.sh --clear`) + .then(() => { + repopulate().catch(print); + }) + .catch(print); + } + }); + + const searchBox = Widget.Box({ + orientation: Gtk.Orientation.HORIZONTAL, + children: [entry, clearButton] + }); + return Widget.Box({ - vertical: true, + orientation: Gtk.Orientation.VERTICAL, class_name: "cliphistory_box", margin_top: 14, margin_right: 14, children: [ - entry, + searchBox, Widget.Separator(), Widget.Scrollable({ hscroll: "never", diff --git a/config/ags/modules/sideleft/weather.ts b/config/ags/modules/sideleft/weather.ts index 74da37b7..f6a27e65 100644 --- a/config/ags/modules/sideleft/weather.ts +++ b/config/ags/modules/sideleft/weather.ts @@ -33,7 +33,7 @@ const reload = () => { const _reload = () => { if (sideleft?.visible) reload(); }; -Utils.interval(1500, _reload); +Utils.interval(15000, _reload); configuration.connect("changed", _reload); App.connect("window-toggled", (_, window_name, visible) => { if (window_name == "sideleft" && visible) reload(); diff --git a/config/ags/style.css b/config/ags/style.css index 185b5ec9..b195237c 100644 --- a/config/ags/style.css +++ b/config/ags/style.css @@ -358,6 +358,26 @@ window.notification-popups box.notifications { color: @tertiary; } +.clear_button { + background-color: @surfaceContainerHigh; + color: @onSurface; + border: none; + outline: none; + border-radius: 50%; + margin-right: 5px; + margin-left: 5px; + margin-top: 11px; + margin-bottom: 11px; +} + +.clear_button:hover { + background-color: mix(@onSurface, @surface, 0.92); +} + +.clear_button:active { + background-color: mix(@onSurface, @surface, 0.8); +} + /* ----------------------------------------------------- * Misc * ----------------------------------------------------- */ diff --git a/config/hypr/UserConfigs/UserKeybinds.conf b/config/hypr/UserConfigs/UserKeybinds.conf index 57e89ad5..7b0fc51c 100644 --- a/config/hypr/UserConfigs/UserKeybinds.conf +++ b/config/hypr/UserConfigs/UserKeybinds.conf @@ -21,12 +21,12 @@ $RunCMD = $scriptsDir/RunCMD.sh bind = ALT SHIFT,Return, exec, kitty --title Kitty --single-instance #! @description: "Terminal Float"; @apps; bind = $mainMod, Return, exec, $scriptsDir/apps.sh terminal #! @description: "Terminal"; @apps; bind = $mainMod, E, exec, $scriptsDir/apps.sh filemanager #! @description: "File Manager"; @apps; -bind = ALT, F, exec, $scriptsDir/apps.sh browser #! @description: "Browser"; @apps; - +bind = $mainMod, B, exec, $scriptsDir/apps.sh browser #! @description: "Browser"; @apps; +bind = $mainMod, T, exec, materialgram #! @description: "Telegram", @apps; # Actions bind = $mainMod SHIFT, G, exec, $RunCMD gamemode #! @description: "Toggle animations"; @actions; -bind = ALT, F3, exec, $RunCMD kb_changer #! @description: "Change Keyboard Layout"; @actions; +bind = $mainMod, F3, exec, $RunCMD kb_changer #! @description: "Change Keyboard Layout"; @actions; bind = $mainMod, space, exec, $RunCMD change_layout #! @description: "Change Layout(master/dwindle)"; @actions; bind = SHIFT ALT,W, exec, python -O $scriptsDir/wallpaper.py -R #! @description: "Random wallpaper"; @actions; bind = $mainMod CTRL, L, exec, pidof hyprlock || hyprlock -q #! @description: "Lock screen"; @actions; @@ -35,23 +35,24 @@ bind = $mainMod CTRL, R, exec, systemctl reboot #! @description: "Restart"; @ bind = $mainMod, Z, exec, $scriptsDir/ScreenShot.sh #! @description: "Screenshot"; @actions; bind = ALT SHIFT, S, exec, $scriptsDir/ScreenShot.sh --window #! @description: "Window screenshot"; @actions; bind = ,Print, exec, $scriptsDir/ScreenShot.sh --active #! @description: "Active screen screenshot"; @actions; -bind = CTRL SHIFT, R, exec, pkill ags ; ags #! @description: "Reload AGS" @actions; +bind = ALT SHIFT, R, exec, pkill ags ; ags #! @description: "Reload AGS" @actions; # Tools bind = $mainMod, D, exec, ags -r "toggleAppsWindow()" #! @description: "App Launcher"; @tools; bind = $mainMod SHIFT, Z, exec, ags -r "toggleMediaWindow()" #! @description: "Players"; @tools; -bind = ALT, R, exec, ags -t sidebar #! @description: "rightbar"; @tools; -bind = ALT, L, exec, ags -t sideleft #! @description: "leftbar"; @tools; +bind = $mainMod, R, exec, ags -t sidebar #! @description: "rightbar"; @tools; +bind = $mainMod, SUPER_L, exec, ags -t sideleft #! @description: "leftbar"; @tools; bind = $mainMod, PERIOD, exec, ags -r "OpenEmojiPicker()" #! @description: "Emoji Picker"; @tools; -bind = SHIFT ALT, C, exec, ags -t "cliphist" #! @description: "Clipboard history"; @tools; +bind = $mainMod, V, exec, ags -t "cliphist" #! @description: "Clipboard history"; @tools; bind = $mainMod, W, exec, ags -r "OpenSettings('wallpaper')" #! @description: "Change wallpaper"; @tools; -bind = $mainMod SHIFT, S, exec, ags -r 'OpenSettings()' #! @description: "Setting"; @tools; -bind = ALT, F1, exec, ags -t cheatsheet #! @description: "List of keybindings"; @tools; +bind = $mainMod, I, exec, ags -r 'OpenSettings()' #! @description: "Setting"; @tools; +bind = $mainMod, SLASH, exec, ags -t cheatsheet #! @description: "List of keybindings"; @tools; # Misc -bind = $mainMod ALT, P, submap, passthru #! @description: "Passthrough mainMod key to Virtual Machine"; @misc; +bind = $mainMod ALT, P, submap, passthru #! @description: "Passthrough mainMod key to Virtual Machine"; @misc; submap = passthru bind = $mainMod ALT, Escape, submap, reset #! @description: "Cancel passthrough"; @misc; submap = reset + diff --git a/config/hypr/UserConfigs/UserSettings.conf b/config/hypr/UserConfigs/UserSettings.conf index 1b242f70..3adbc7c1 100644 --- a/config/hypr/UserConfigs/UserSettings.conf +++ b/config/hypr/UserConfigs/UserSettings.conf @@ -13,11 +13,8 @@ dwindle { master { new_status = master -# new_on_top=1 + new_on_top=1 mfact = 0.5 - smart_resizing = true - new_on_active = true - drop_at_cursor = true } general { @@ -111,7 +108,7 @@ input { touchpad { disable_while_typing = 1 natural_scroll = 0 - clickfinger_behavior = 1 + clickfinger_behavior = 0 middle_button_emulation = 1 tap-to-click = 1 drag_lock = 0 @@ -121,7 +118,7 @@ input { gestures { workspace_swipe=1 workspace_swipe_fingers=3 - workspace_swipe_distance=400 + workspace_swipe_distance=500 workspace_swipe_invert=1 workspace_swipe_min_speed_to_force=30 workspace_swipe_cancel_ratio=0.5 @@ -154,12 +151,14 @@ binds { pass_mouse_when_bound=0 } -#Could help when scaling and not pixelating xwayland { force_zero_scaling = true } -# cursor section for Hyprland v0.41.0 or newer cursor { - enable_hyprcursor = true + no_hardware_cursors = false + enable_hyprcursor = true + warp_on_change_workspace = true } + + diff --git a/config/hypr/assets/bell.png b/config/hypr/assets/bell.png deleted file mode 100644 index e7b35c50..00000000 Binary files a/config/hypr/assets/bell.png and /dev/null differ diff --git a/config/hypr/scripts/Ui_cmd.sh b/config/hypr/scripts/Ui_cmd.sh index df989961..b258ca10 100755 --- a/config/hypr/scripts/Ui_cmd.sh +++ b/config/hypr/scripts/Ui_cmd.sh @@ -95,6 +95,6 @@ kb_changer() { hyprctl switchxkblayout "$name" next || { notify-send -u low -t 2000 'Keyboard layout' 'Error: Layout change failed'; exit 1; } done - notify-send -u low -i "$notif" "Keyboard language changed to $new_layout" + notify-send -u low "Kb_layout" "Changed" }