diff --git a/app.ts b/app.ts deleted file mode 100644 index 40c1804..0000000 --- a/app.ts +++ /dev/null @@ -1,67 +0,0 @@ -import style from "./styles/style.scss" - -import { GLib, monitorFile, exec } from "astal"; -import { App, Gtk } from "astal/gtk4"; -import Hyprland from "gi://AstalHyprland"; - -import QuickSettings from "widget/quick_settings/quick_settings"; -import BluetoothWindow from "widget/quick_settings/bluetooth"; -import Launcher from "widget/launcher/launcher"; -import BatteryInfo from "@/widget/bar/battery_info"; -import Bar from "widget/bar/bar"; - -const hypr = Hyprland.get_default(); -const windows = new Map(); -const components = [ - Bar, - Launcher, - QuickSettings, - BluetoothWindow, - BatteryInfo -]; - -const setupBars = async (monitor_id: number) => { - const windows = await Promise.all( - components.map(item => Promise.resolve(item(monitor_id)) as Promise) - ); - - return windows; -}; - -const STYLES = `${GLib.get_user_config_dir()}/ags/styles`; -const monitorCSS = () => monitorFile( - STYLES + '/colors.scss', - () => { - exec(`sass ${STYLES}/style.scss /tmp/ags-style.css`); - App.apply_css('/tmp/ags-style.css', true); - } -); - -App.start({ - css: style, - async main() { - App.add_icons(`${GLib.get_user_data_dir()}/icons/Astal`); - monitorCSS(); - - const monitors = App.get_monitors(); - for (const monitor of monitors) { - const index = monitors.indexOf(monitor); - windows.set(index, await setupBars(index)); - - hypr.connect("monitor-added", async (_, monitor: Hyprland.Monitor) => { - if (!windows.has(monitor.id)) windows.set(monitor.id, await setupBars(monitor.id)) - }); - - hypr.connect("monitor-removed", (_, monitor_id: number) => { - const monitorWindows = windows.get(monitor_id) - if (monitorWindows) { - for (const monitorWindow of monitorWindows) { - monitorWindow.destroy(); - }; - - windows.delete(monitor_id); - }; - }); - } - }, -}) diff --git a/config/animations.conf b/config/animations.conf deleted file mode 100644 index 12578b3..0000000 --- a/config/animations.conf +++ /dev/null @@ -1,20 +0,0 @@ -animations { - enabled = yes - - bezier = menuOpen, 0.1, 1, 0, 1 - bezier = menuClose, 0.38, 0.04, 1, 0.07 - - bezier = bezier, 0.05, 1, 0, 1 - animation = windows, 1, 3, bezier - animation = windowsOut, 1, 7, bezier, popin 80% - - animation = border, 1, 10, default - animation = borderangle, 1, 8, default - animation = fade, 1, 7, default - animation = workspaces, 1, 6, default - - animation = layersIn, 1, 3, menuOpen, slide - animation = layersOut, 1, 1.6, menuClose - animation = fadeLayersIn, 1, 2, menuOpen - animation = fadeLayersOut, 1, 4.5, menuClose -} diff --git a/config/autostart.conf b/config/autostart.conf deleted file mode 100644 index 06dcb75..0000000 --- a/config/autostart.conf +++ /dev/null @@ -1,12 +0,0 @@ -exec-once = $SHELL -c 'hypridle' - -# Wallpaper engine -exec-once = swww-daemon & -exec-once = ~/.config/hypr/scripts/random-wallpaper.sh - -# Clipboard -exec-once = wl-paste --watch cliphist store - -# AGS + Birdtray -exec-once = $SHELL -c 'ags run --gtk4 &' -exec-once = $SHELL -c 'sleep 10 && birdtray &' diff --git a/config/binds.conf b/config/binds.conf deleted file mode 100644 index 00c8b2d..0000000 --- a/config/binds.conf +++ /dev/null @@ -1,78 +0,0 @@ -$mainMod = SUPER - -bindd = $mainMod, Return, Run terminal, exec, $terminal -bindd = $mainMod, Q, Kill active window, killactive, -bindd = $mainMod + Shift, Q, Exit Hyprland, exit, -bindd = $mainMod, E, File manager, exec, $fileManager -bindd = $mainMod, B, Browser, exec, $browser -bindd = $mainMod, P, Open e-mail client, exec, $email -bindd = $mainMod, J, Toggle split, togglesplit, - -bindd = $mainMod + Shift, V, Toggle floating state, togglefloating, -bindd = $mainMod, F, Toggle fullscreen, fullscreen, -bindd = $mainMod + Shift, F, Toggle fullscreen (bars), fullscreen, 1 - -bindd = $mainMod, Left, Move focus left, movefocus, l -bindd = $mainMod, Right, Move focus right, movefocus, r -bindd = $mainMod, Up, Move focus up, movefocus, u -bindd = $mainMod, Down, Move focus down, movefocus, d - -bindd = Alt, Tab, Go to next window, cyclenext -bindd = Alt + Shift, Tab, Go to previous window, cyclenext, prev -bind = Alt, Tab, bringactivetotop -bind = Alt + Shift, Tab, bringactivetotop - -bindd = $mainMod, 1, Switch to workspace 1, workspace, 1 -bindd = $mainMod, 2, Switch to workspace 2, workspace, 2 -bindd = $mainMod, 3, Switch to workspace 3, workspace, 3 -bindd = $mainMod, 4, Switch to workspace 4, workspace, 4 -bindd = $mainMod, 5, Switch to workspace 5, workspace, 5 -bindd = $mainMod, 6, Switch to workspace 6, workspace, 6 -bindd = $mainMod, 7, Switch to workspace 7, workspace, 7 -bindd = $mainMod, 8, Switch to workspace 8, workspace, 8 -bindd = $mainMod, 9, Switch to workspace 9, workspace, 9 -bindd = $mainMod, 0, Switch to workspace 10, workspace, 10 - -bindd = $mainMod + Shift, 1, Move to workspace 1, movetoworkspace, 1 -bindd = $mainMod + Shift, 2, Move to workspace 2, movetoworkspace, 2 -bindd = $mainMod + Shift, 3, Move to workspace 3, movetoworkspace, 3 -bindd = $mainMod + Shift, 4, Move to workspace 4, movetoworkspace, 4 -bindd = $mainMod + Shift, 5, Move to workspace 5, movetoworkspace, 5 -bindd = $mainMod + Shift, 6, Move to workspace 6, movetoworkspace, 6 -bindd = $mainMod + Shift, 7, Move to workspace 7, movetoworkspace, 7 -bindd = $mainMod + Shift, 8, Move to workspace 8, movetoworkspace, 8 -bindd = $mainMod + Shift, 9, Move to workspace 9, movetoworkspace, 9 -bindd = $mainMod + Shift, 0, Move to workspace 10, movetoworkspace, 10 - -bindd = $mainMod, Tab, Toggle workspace overview, overview:toggle -bindd = $mainMod, S, Toggle special workspace, togglespecialworkspace, magic -bindd = $mainMod + Shift, S, Move to special workspace, movetoworkspace, special:magic - -bindd = $mainMod, mouse_down, Switch to next workspace, workspace, e+1 -bindd = $mainMod, mouse_up, Switch to prev workspace, workspace, e-1 - -bindmd = $mainMod, mouse:272, Move window, movewindow -bindmd = $mainMod, mouse:273, Resize window, resizewindow - -bindd = , PRINT, Take partial screenshot, exec, hyprshot -zm region -o $screenshot_dir -bindd = $mainMod, PRINT, Take fullscreen screenshot, exec, hyprshot -zm output -o $screenshot_dir - -bindd = $mainMod, Space, Open app launcher, exec, ags toggle launcher -bindd = $mainMod + Shift, T, Toggle bar, exec, ~/.config/hypr/scripts/toggle-bar-visibility.sh -bindd = $mainMod, SUPER_L, Open quick settings, exec, ags toggle quick_settings -bindd = Ctrl+Shift, R, Reload AGS, exec, ags quit; ags run --gtk4 & - -bindd = , XF86AudioRaiseVolume, Raise volume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -bindd = , XF86AudioLowerVolume, Lower volume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -bindd = , XF86AudioMute, Mute audio, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle -bindd = , XF86AudioMicMute, Mute mic, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle -bindd = , XF86MonBrightnessUp, Increase brightness, exec, light -A 15 -bindd = , XF86MonBrightnessDown, Decrease brightness, exec, light -U 15 - -bindd = , XF86AudioNext, Next track, exec, playerctl next -bindd = , XF86AudioPause, Play/pause track, exec, playerctl play-pause -bindd = , XF86AudioPlay, Play/pause track, exec, playerctl play-pause -bindd = , XF86AudioPrev, Previous track, exec, playerctl previous - -bindd = , XF86RFKill, Toggle wireless, exec, nmcli radio all toggle -bindd = , XF86Bluetooth, Toggle Bluetooth, exec, bluetoothctl power toggle diff --git a/config/io.conf b/config/io.conf deleted file mode 100644 index 922d032..0000000 --- a/config/io.conf +++ /dev/null @@ -1,17 +0,0 @@ -input { - kb_layout = pl - kb_variant = - kb_model = - kb_options = - kb_rules = - - follow_mouse = 1 - sensitivity = 0.7 - - touchpad { - natural_scroll = false - } -} - -monitor = eDP-1, 3840x2160@60, 0x0, 1 -#monitor = HDMI-A-2, 1920x1080@60, 0x3840, 1 diff --git a/config/misc.conf b/config/misc.conf deleted file mode 100644 index 5caa473..0000000 --- a/config/misc.conf +++ /dev/null @@ -1,38 +0,0 @@ -general { - gaps_in = 5 - gaps_out = 5 - - layout = master -} - -decoration { - rounding = 10 - - active_opacity = 1.0 - inactive_opacity = 0.8 - - shadow { - enabled = false - } - - blur { - enabled = false - } -} - -gestures { - workspace_swipe = true - workspace_swipe_fingers = 3 - workspace_swipe_create_new = true -} - -misc { - vfr = true - allow_session_lock_restore = true - force_default_wallpaper = 0 - disable_hyprland_logo = true -} - -xwayland { - force_zero_scaling = true -} diff --git a/config/rules.conf b/config/rules.conf deleted file mode 100644 index 7538ad8..0000000 --- a/config/rules.conf +++ /dev/null @@ -1,20 +0,0 @@ -windowrule = center, title:^(Open File)(.*)$ -windowrule = center, title:^(Select a File)(.*)$ -windowrule = center, title:^(Choose wallpaper)(.*)$ -windowrule = center, title:^(Open Folder)(.*)$ -windowrule = center, title:^(Save As)(.*)$ -windowrule = center, title:^(Library)(.*)$ -windowrule = center, title:^(File Upload)(.*)$ - -windowrule = float, title:^(Open File)(.*)$ -windowrule = float, title:^(Select a File)(.*)$ -windowrule = float, title:^(Choose wallpaper)(.*)$ -windowrule = float, title:^(Open Folder)(.*)$ -windowrule = float, title:^(Save As)(.*)$ -windowrule = float, title:^(Library)(.*)$ -windowrule = float, title:^(File Upload)(.*)$ - -windowrulev2 = size 1280 720, title:(.*)(Mozilla Thunderbird) -windowrulev2 = float, initialClass:thunderbird - -layerrule = noanim, selection diff --git a/config/workspaces.conf b/config/workspaces.conf deleted file mode 100644 index 2fe2837..0000000 --- a/config/workspaces.conf +++ /dev/null @@ -1,10 +0,0 @@ -workspace=1,monitor:eDP-1 -workspace=2,monitor:eDP-1 -workspace=3,monitor:eDP-1 -workspace=4,monitor:eDP-1 -workspace=5,monitor:eDP-1 -workspace=6,monitor:HDMI-A-2 -workspace=7,monitor:HDMI-A-2 -workspace=8,monitor:HDMI-A-2 -workspace=9,monitor:HDMI-A-2 -workspace=10,monitor:HDMI-A-2 diff --git a/env.d.ts b/env.d.ts deleted file mode 100644 index 467c0a4..0000000 --- a/env.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -declare const SRC: string - -declare module "inline:*" { - const content: string - export default content -} - -declare module "*.scss" { - const content: string - export default content -} - -declare module "*.blp" { - const content: string - export default content -} - -declare module "*.css" { - const content: string - export default content -} diff --git a/hypridle.conf b/hypridle.conf deleted file mode 100644 index 0fcd45f..0000000 --- a/hypridle.conf +++ /dev/null @@ -1,30 +0,0 @@ -$lock_cmd = pidof hyprlock || hyprlock -$suspend_cmd = pidof steam || systemctl suspend || loginctl suspend - -general { - lock_cmd = $lock_cmd - before_sleep_cmd = loginctl lock-session - after_sleep_cmd = hyprctl dispatch dpms on -} - -listener { - timeout = 180 - on-timeout = loginctl lock-session -} - -listener { - timeout = 240 - on-timeout = hyprctl dispatch dpms off - on-resume = hyprctl dispatch dpms on -} - -listener { - timeout = 320 - on-timeout = brightnessctl -sd rgb:kbd_backlight set 0 - on-resume = brightnessctl -rd rgb:kbd_backlight -} - -listener { - timeout = 540 - on-timeout = $suspend_cmd -} diff --git a/hyprlock.conf b/hyprlock.conf deleted file mode 100644 index 6e6a4f1..0000000 --- a/hyprlock.conf +++ /dev/null @@ -1,61 +0,0 @@ -general { - enable_fingerprint = true - fingerprint_ready_message = Place your finger on the sensor - fingerprint_present_message = Scanning finger -} - -background { - color = rgba(00000085) - blur_size = 5 - blur_passes = 4 -} - -input-field { - monitor = - size = 250, 50 - outline_thickness = 2 - dots_size = 0.1 - dots_spacing = 0.3 - font_color = rgb(FFFFFF) - fade_on_empty = true - - position = 0, 20 - halign = center - valign = center -} - -label { - monitor = - text = $TIME - color = rgb(FFFFFF) - font_size = 65 - font_family = SF Pro Display Bold - - position = 0, 300 - halign = center - valign = center -} - -label { - monitor = - text = hello, $USER - color = rgb(FFFFFF) - font_size = 20 - font_family = SF Pro Display Bold - - position = 0, 240 - halign = center - valign = center -} - -label { - monitor = - text = $FPRINTMESSAGE - color = rgb(FFFFFF) - font_size = 15 - - position = 0, 180 - halign = center - valign = center -} - diff --git a/lib/icons.ts b/lib/icons.ts deleted file mode 100644 index 3e30ea8..0000000 --- a/lib/icons.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Binding } from "astal"; - -type Substitution = { charging?: string, idle?: string } - -export const getBatteryIcon = (percentage: number, charging: Binding) => { - const levels = Array.from({ length: 10 }, (_, i) => (i + 1) * 10); - const level = levels.find((level) => percentage <= level)!; - - const substitutions: Record = { - 100: { charging: "battery-level-100-charged-symbolic" } - }; - - return charging.as(c => c - ? substitutions[level]?.charging || `battery-level-${level}-charging-symbolic` - : substitutions[level]?.idle || `battery-level-${level}-symbolic` - ); -}; \ No newline at end of file diff --git a/lib/utils.ts b/lib/utils.ts deleted file mode 100644 index 1c58da2..0000000 --- a/lib/utils.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Gtk, Gdk } from "astal/gtk4"; - -export type If = Condition extends true ? Then : Else; -export type Belongs = { - [K in keyof T]: T[K] extends U ? K : never; -}[keyof T]; - -export const hideWindow = (self: Gtk.Window, keyval: number) => { - const keys = ["quick_settings"].includes(self.name) - ? [Gdk.KEY_Escape] - : [ - Gdk.KEY_Escape, - Gdk.KEY_Super_L, - Gdk.KEY_Super_R - ]; - - if (keys.some(key => key === keyval)) self.hide(); -} - -export const openOnButton = (event: Gdk.ButtonEvent, keyval: number) => (action: () => void) => { - if (event.get_button() !== keyval) return; - - action(); -} \ No newline at end of file diff --git a/lib/widgets/datetime.tsx b/lib/widgets/datetime.tsx deleted file mode 100644 index 8ae205e..0000000 --- a/lib/widgets/datetime.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { Variable, GLib } from "astal"; -import { Widget } from "astal/gtk4"; - -type Props = { - format: string, - interval?: number -} & Widget.LabelProps; - -export default function DateTime({ format, interval, ...props }: Props) { - const shouldPoll = typeof interval === "number" && interval >= 1; - - const currentTime = () => { - const dateTime = GLib.DateTime.new_now_local(); - return dateTime.format(format)!; - } - - if (shouldPoll) { - const pollTime = new Variable(currentTime()).poll(interval || 1000, currentTime); - return