[
  {
    "path": ".gitignore",
    "content": "Backups/\ndependencies..\nbackgrounds/last/image.png\nbackgrounds/last/image_blurred.png\nhypr/monitors.conf\nhypr/Workspaces.conf\nCode/\n"
  },
  {
    "path": "README.md",
    "content": "![alt text](https://raw.githubusercontent.com/trinib/trinib/82213791fa9ff58d3ca768ddd6de2489ec23ffca/images/footer.svg)\n\n# 👀 **Screenshots** \n![Hyprland_new](https://github.com/RoccoRakete/hyprland-dots/assets/44879342/0acf96c1-93b5-4c9a-9e71-7775172904d4)\n\n---\n\n# ⏰ **Updates**\n * This has changed quiet a lot...\n   * These dotfiles are now intended to be used with NixOS. \n   * I removed the ability to set GTK-Themes/Icons due to weird behaviors... This styling is now to be done with home-manager.\n   * More small changes has been made. \n * works with ags > 1.5.0! If you want to use it with ags < 1.5.0 please use: \"ags_old_working_1.4.x\"\n * Added the ability to set GTK-Themes/Icons directly from the ags config. -> This got removed! \n * Pywal-Themes can also be set from the ags config.\n * Needs Ags v1.4.0 to work correctly now... \n * Rofi Wallpaper switcher is now available. \n * Added a systemresource monitor to the bar.\n\n# 🔧 **Stuff used** \n* GTK-Theme: [Mostly Adwaita/adw-gtk3.](https://github.com/lassekongo83/adw-gtk3)\n* Icons: [MoreWaita](https://github.com/somepaulo/MoreWaita)\n* Compositor: [Hyprland](https://github.com/hyprwm/Hyprland)\n* Shell: [ags](https://github.com/Aylur/ags)\n* Terminal: [Kitty](https://github.com/kovidgoyal/kitty)\n* [Wallaper shown on the pictures](https://github.com/AngelJumbo/gruvbox-wallpapers/blob/main/wallpapers/irl/stairs.jpg)\n\n# 🎨 **The Ags-Shell** \nWhen I first started using ags I thought, OMG: Why is this so hard and complicated ...\n\n... but it's really not. If you want to make some minor adjustments to the shell, it's highly recommended, that you learn some JavaScript and (S)CSS for styling.\n\nJavaScript is a quiet simple programming language and since you already have a useful project to work with, it's easy to try out and make changes on the fly :) \n\nThere is also a nice [Wiki](https://github.com/Aylur/ags/wiki)!\n\nThe volume is controlled by ags, with Hyprland like this:\n```\nbind = , XF86AudioRaiseVolume , exec , ags run-js \"audio.speaker.volume += 0.05; indicator.speaker()\"\nbind = , XF86AudioLowerVolume , exec , ags run-js \"audio.speaker.volume -= 0.05; indicator.speaker()\"\n```\n... this triggers the OSD to show up too!\nThis should work with brightness control too, but I can't verify this, since I'm not using Linux on a Laptop.\n\n# ⚙️ **!!obsolete!! GTK-Themes / GTK-Icons / PyWall-Themes**\n![Screenshot_19-11-23_12-20](https://github.com/RoccoRakete/hyprland-dots/assets/44879342/0a197c8a-e0d8-40e4-acf2-7d17771c5bb7)\n\n\n* The refering options are: ```misc.pywal.theme:``` ```misc.gtk.theme:``` ```misc.gtkIcons.theme:```\n\n  ### Make sure these namings match exactly the themes you want to use! \n  Otherwise the last used theme will be used.\n  * Pywall-Themes can be found [here.](https://adamrutter.github.io/pywal-themes-preview/)\n    Or simply by running ```wal --theme``` in your terminal and just picking one.\n    \n  GTK-Icons and GTK-Themes should have the exact same naming as found in ```~/.themes/``` for example.\n  \n  After you have set up everything, it's just a matter of chaning the themes from the settings panel! :)\n  \n  Have fun! \n\n# 📜 **Installation**\nIf you still want to use this with anything other than NixOS, this is the stuff you need to install:\n\nIf you install [ags](https://github.com/Aylur/ags/wiki/installation) and [Hyprland](https://wiki.hyprland.org/Getting-Started/Installation/) you're 99% ready to go. \n\nForthermore I recommend installing the following things: \n* [playerctl](https://github.com/altdesktop/playerctl) for proper media control.\n* [A nerdfont](https://www.nerdfonts.com/) for displaying icons.\n* [Anyrun](https://github.com/Kirottu/anyrun) as an application launcher, web search and many more. Although ags has it's own application launcher, I like anyrun much more since It's capable of also doing websearches and much more! :D \n* [GTK-Lock](https://github.com/jovanlanik/gtklock) ... same thing goes with anyrun. I just like it much more, but this is totaly up to you!\n\n\n\n[![Anurag's GitHub stats-Dark](https://github-readme-stats.vercel.app/api?username=RoccoRakete&show_icons=true&theme=dark#gh-dark-mode-only)](https://github.com/anuraghazra/github-readme-stats#gh-dark-mode-only)\n"
  },
  {
    "path": "backgrounds/last/.comments/image_blurred.png.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<comment version=\"3.0\">\n  <caption>rosé pine</caption>\n  <note/>\n  <place/>\n  <categories/>\n</comment>\n"
  },
  {
    "path": "cfg/anyrun/adwaita-dark/config.ron",
    "content": "Config(\n  x: Fraction(0.500000),\n  y: Fraction(0.300000),\n  width: Fraction(0.250000),\n  height: Absolute(0),\n  hide_icons: false,\n  ignore_exclusive_zones: true,\n  layer: Overlay,\n  hide_plugin_info: true,\n  close_on_click: true,\n  show_results_immediately: true,\n  max_entries: None,\n  plugins: [\"/nix/store/78s37pd0a67zzwvvy9nf5c26yp98pcc3-applications-0.1.0/lib/libapplications.so\"],\n)\n"
  },
  {
    "path": "cfg/anyrun/adwaita-dark/launch.sh",
    "content": "#!/usr/bin/env sh\n\n# Adwaita\n\nsassc $HOME/.config/anyrun/style-adwaita.scss $HOME/.config/anyrun/style.css\n\nanyrun\n"
  },
  {
    "path": "cfg/anyrun/adwaita-dark/style-adwaita.scss",
    "content": "@import \"./adwaita.scss\";\n\nwindow {\n  background: transparent;\n  /* rgba(0, 0, 0, 0.8);*/\n}\n\n#match,\n#entry,\n#plugin,\n#main {\n  background: transparent;\n}\n\n#match.activatable {\n  padding: 12px 14px;\n  border-radius: 12px;\n\n  color: white;\n  margin-top: 4px;\n  border: 2px solid transparent;\n  transition: all 0.3s ease;\n}\n\n#match.activatable:not(:first-child) {\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n  /* border-top: 2px solid rgba(255, 255, 255, 0.1); */\n}\n\n#match.activatable #match-title {\n  font-size: 1.3rem;\n  font-weight: bolder;\n}\n\n#match.activatable:hover {\n  background: $bg-color;\n}\n\n#match-title,\n#match-desc {\n  color: inherit;\n}\n\n#match.activatable:hover,\n#match.activatable:selected {\n  border-top-left-radius: 12px;\n  border-top-right-radius: 12px;\n}\n\n#match.activatable:selected+#match.activatable,\n#match.activatable:hover+#match.activatable {\n  border-top: 2px solid transparent;\n}\n\n#match.activatable:selected,\n#match.activatable:hover:selected {\n  background: $bg-color;\n}\n\n#match,\n#plugin {\n  box-shadow: none;\n}\n\n#entry {\n  padding-left: 18px;\n  font-size: 1.2rem;\n  font-weight: bolder;\n  color: $fg_color;\n  background: $bg_color;\n  box-shadow: none;\n  border-radius: 12px;\n  border: $border $selected_bg_color;\n}\n\nbox#main {\n  background: $widget-bg;\n  border-radius: 20px;\n  padding: 15px;\n  /* box-shadow: 0px 2px 33px -5px rgba(0, 0, 0, 0.5); */\n}\n\nrow:first-child {\n  margin-top: 6px;\n}\n"
  },
  {
    "path": "cfg/anyrun/catppuccin-mocha/config.ron",
    "content": "Config(\n  x: Fraction(0.500000),\n  y: Fraction(0.300000),\n  width: Fraction(0.250000),\n  height: Absolute(0),\n  hide_icons: false,\n  ignore_exclusive_zones: true,\n  layer: Overlay,\n  hide_plugin_info: true,\n  close_on_click: true,\n  show_results_immediately: true,\n  max_entries: None,\n  plugins: [\"libapplications.so\"],\n)\n"
  },
  {
    "path": "cfg/anyrun/catppuccin-mocha/launch.sh",
    "content": "#!/usr/bin/env sh\n\n# Catppuccin-Mocha\n\nsassc $HOME/.config/anyrun/style-catppuccin-mocha.scss $HOME/.config/anyrun/style.css\n\nanyrun\n"
  },
  {
    "path": "cfg/anyrun/catppuccin-mocha/style-catppuccin-mocha.scss",
    "content": "@import \"./catppuccin-mocha.scss\";\n\nwindow {\n  background: transparent;\n  /* rgba(0, 0, 0, 0.8);*/\n}\n\n#match,\n#entry,\n#plugin,\n#main {\n  background: transparent;\n}\n\n#match.activatable {\n  padding: 12px 14px;\n  border-radius: 12px;\n\n  color: white;\n  margin-top: 4px;\n  border: 2px solid transparent;\n  transition: all 0.3s ease;\n}\n\n#match.activatable:not(:first-child) {\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n  /* border-top: 2px solid rgba(255, 255, 255, 0.1); */\n}\n\n#match.activatable #match-title {\n  font-size: 1.3rem;\n  font-weight: bolder;\n}\n\n#match.activatable:hover {\n  background: $bg_color;\n}\n\n#match-title,\n#match-desc {\n  color: inherit;\n}\n\n#match.activatable:hover,\n#match.activatable:selected {\n  border-top-left-radius: 12px;\n  border-top-right-radius: 12px;\n}\n\n#match.activatable:selected+#match.activatable,\n#match.activatable:hover+#match.activatable {\n  border-top: 2px solid transparent;\n}\n\n#match.activatable:selected,\n#match.activatable:hover:selected {\n  color: $color-fg;\n  background: $selected_bg_color;\n}\n\n#match,\n#plugin {\n  box-shadow: none;\n}\n\n#entry {\n  padding-left: 18px;\n  font-size: 1.2rem;\n  font-weight: bolder;\n  color: $fg_color;\n  background: $bg_color;\n  box-shadow: none;\n  border-radius: 12px;\n  border: $border $selected_bg_color;\n  background-color: $grid-bg;\n}\n\nbox#main {\n  background: $widget-bg;\n  border-radius: 20px;\n  padding: 15px;\n  /* box-shadow: 0px 2px 33px -5px rgba(0, 0, 0, 0.5); */\n}\n\nrow:first-child {\n  margin-top: 6px;\n}\n"
  },
  {
    "path": "cfg/hypr/adwaita-dark/Decoration.conf",
    "content": "# ############################################################################# #\n#   _   _                  _                 _    ____             __ _         #\n#  | | | |_   _ _ __  _ __| | __ _ _ __   __| |  / ___|___  _ __  / _(_) __ _   #\n#  | |_| | | | | '_ \\| '__| |/ _` | '_ \\ / _` | | |   / _ \\| '_ \\| |_| |/ _` |  #\n#  |  _  | |_| | |_) | |  | | (_| | | | | (_| | | |__| (_) | | | |  _| | (_| |  #\n#  |_| |_|\\__, | .__/|_|  |_|\\__,_|_| |_|\\__,_|  \\____\\___/|_| |_|_| |_|\\__, |  #\n#        |___/|_|                                                      |___/    #\n#                                                                               #\n# ############################################################################# #\n\n\n# See https://wiki.hyprland.org/Configuring/Variables/ for more\ngeneral {\n    gaps_in                 = 3\n    gaps_out                = 10\n    border_size             = 0\n    col.active_border       = rgba(b4befecc)\n    col.inactive_border     = rgba(77767bcc)\n    layout                  = dwindle\n    resize_on_border        = true\n    allow_tearing           = true\n}\n\n\n# See https://wiki.hyprland.org/Configuring/Variables/ for more\ndecoration {\n    # rounding\n    rounding              = 10\n    dim_inactive          = true \n    dim_strength          = 0.3\n\n    blur {\n        # blur\n        enabled           = false\n        new_optimizations = true\n        \n        #enabled           = true\n        #brightness        = 1.0\n        #contrast          = 1.0\n        #noise             = 2.0e-2\n        #passes            = 3\n        #popups            = true\n        #size              = 10\n        #new_optimizations = true\n    }\n\n    # shadow\n    drop_shadow            = true \n    shadow_range           = 10\n    shadow_ignore_window   = true\n    shadow_offset          = 0 2\n    shadow_range           = 30\n    shadow_render_power    = 3\n    col.shadow             = rgba(00000055)\n}\n\nanimations {\n    enabled   = true\n    bezier    = fluent_decel  , 0    , 0.2  , 0.4  , 1\n    bezier    = easeOutCirc   , 0    , 0.55 , 0.45 , 1\n    bezier    = easeOutCubic  , 0.33 , 1    , 0.68 , 1\n    bezier    = easeinoutsine , 0.37 , 0    , 0.63 , 1\n\n    # Windows\n    animation = windowsIn   , 1 , 3 , fluent_decel  ,       # window open\n    animation = windowsOut  , 1 , 5 , fluent_decel  ,       # window close.\n    animation = windowsMove , 1 , 2 , easeinoutsine , slide # everything in between, moving, dragging, resizing.\n    \n    # Fade\n    animation = fadeIn      , 1 , 3   , easeOutCubic        # fade in (open) -> layers and windows\n    animation = fadeOut     , 1 , 1.7 , easeOutCubic        # fade out (close) -> layers and windows\n    animation = fadeSwitch  , 0 , 1   , easeOutCirc         # fade on changing activewindow and its opacity\n    animation = fadeShadow  , 1 , 10  , easeOutCirc         # fade on changing activewindow for shadows\n    animation = fadeDim     , 1 , 4   , fluent_decel        # the easing of the dimming of inactive windows\n    animation = border      , 1 , 2.7 , easeOutCirc         # for animating the border's color switch speed\n    animation = borderangle , 1 , 30  , fluent_decel , once # for animating the border's gradient angle - styles: once (default), loop\n    animation = workspaces  , 1 , 2   , easeOutCubic\n}\n\n# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more\ndwindle {\n    pseudotile     = false \n    preserve_split = true # you probably want this\n    force_split    = 2\n    smart_split    = false\n    smart_resizing = true\n}\n\n# Layerrules\n#layerrule = blur, waybar \nlayerrule = animation workspaces, swaync-control-center \n"
  },
  {
    "path": "cfg/hypr/catppuccin-mocha/Decoration.conf",
    "content": "# ############################################################################# #\n#   _   _                  _                 _    ____             __ _         #\n#  | | | |_   _ _ __  _ __| | __ _ _ __   __| |  / ___|___  _ __  / _(_) __ _   #\n#  | |_| | | | | '_ \\| '__| |/ _` | '_ \\ / _` | | |   / _ \\| '_ \\| |_| |/ _` |  #\n#  |  _  | |_| | |_) | |  | | (_| | | | | (_| | | |__| (_) | | | |  _| | (_| |  #\n#  |_| |_|\\__, | .__/|_|  |_|\\__,_|_| |_|\\__,_|  \\____\\___/|_| |_|_| |_|\\__, |  #\n#        |___/|_|                                                      |___/    #\n#                                                                               #\n# ############################################################################# #\n\n\n# See https://wiki.hyprland.org/Configuring/Variables/ for more\ngeneral {\n    gaps_in                 = 3\n    gaps_out                = 10\n    border_size             = 3\n    col.active_border       = rgba(b4befecc)\n    col.inactive_border     = rgba(77767bcc)\n    layout                  = dwindle\n    resize_on_border        = true\n    allow_tearing           = true\n}\n\n\n# See https://wiki.hyprland.org/Configuring/Variables/ for more\ndecoration {\n    # rounding\n    rounding              = 10\n    dim_inactive          = true \n    dim_strength          = 0.2\n\n    blur {\n        # blur\n        #enabled           = false\n        #new_optimizations = true\n        \n        enabled           = true\n        brightness        = 1.0\n        contrast          = 1.0\n        noise             = 2.0e-2\n        passes            = 3\n        popups            = true\n        size              = 10\n        new_optimizations = true\n    }\n\n    # shadow\n    drop_shadow            = true \n    shadow_range           = 10\n    shadow_ignore_window   = true\n    shadow_offset          = 0 2\n    shadow_range           = 30\n    shadow_render_power    = 3\n    col.shadow             = rgba(00000055)\n}\n\nanimations {\n    enabled   = true\n    bezier    = fluent_decel  , 0    , 0.2  , 0.4  , 1\n    bezier    = easeOutCirc   , 0    , 0.55 , 0.45 , 1\n    bezier    = easeOutCubic  , 0.33 , 1    , 0.68 , 1\n    bezier    = easeinoutsine , 0.37 , 0    , 0.63 , 1\n\n    # Windows\n    animation = windowsIn   , 1 , 3 , fluent_decel  ,       # window open\n    animation = windowsOut  , 1 , 5 , fluent_decel  ,       # window close.\n    animation = windowsMove , 1 , 2 , easeinoutsine , slide # everything in between, moving, dragging, resizing.\n    \n    # Fade\n    animation = fadeIn      , 1 , 3   , easeOutCubic        # fade in (open) -> layers and windows\n    animation = fadeOut     , 1 , 1.7 , easeOutCubic        # fade out (close) -> layers and windows\n    animation = fadeSwitch  , 0 , 1   , easeOutCirc         # fade on changing activewindow and its opacity\n    animation = fadeShadow  , 1 , 10  , easeOutCirc         # fade on changing activewindow for shadows\n    animation = fadeDim     , 1 , 4   , fluent_decel        # the easing of the dimming of inactive windows\n    animation = border      , 1 , 2.7 , easeOutCirc         # for animating the border's color switch speed\n    animation = borderangle , 1 , 30  , fluent_decel , once # for animating the border's gradient angle - styles: once (default), loop\n    animation = workspaces  , 1 , 2   , easeOutCubic\n}\n\n# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more\ndwindle {\n    pseudotile     = false \n    preserve_split = true # you probably want this\n    force_split    = 2\n    smart_split    = false\n    smart_resizing = true\n}\n\n# Layerrules\nlayerrule = blur, waybar \nlayerrule = animation workspaces, swaync-control-center \n"
  },
  {
    "path": "cfg/swaync/adwaita-dark/config.json",
    "content": "{\n  \"$schema\": \"./configSchema.json\",\n  \"positionX\": \"right\",\n  \"positionY\": \"top\",\n  \"control-center-margin-top\": 0,\n  \"control-center-margin-bottom\": 0,\n  \"control-center-margin-right\": 0,\n  \"control-center-margin-left\": 0,\n  \"notification-icon-size\": 64,\n  \"notification-body-image-height\": 100,\n  \"notification-body-image-width\": 200,\n  \"timeout\": 10,\n  \"timeout-low\": 5,\n  \"timeout-critical\": 0,\n  \"fit-to-screen\": false,\n  \"control-center-width\": 500,\n  \"control-center-height\": 800,\n  \"notification-window-width\": 500,\n  \"keyboard-shortcuts\": true,\n  \"image-visibility\": \"when-available\",\n  \"transition-time\": 200,\n  \"hide-on-clear\": false,\n  \"hide-on-action\": true,\n  \"script-fail-notify\": true,\n  \"scripts\": {\n    \"example-script\": {\n      \"exec\": \"echo 'Do something...'\",\n      \"urgency\": \"Normal\"\n    }\n  },\n  \"notification-visibility\": {\n    \"example-name\": {\n      \"state\": \"muted\",\n      \"urgency\": \"Low\",\n      \"app-name\": \"Spotify\"\n    }\n  },\n  \"widgets\": [\n    \"label\",\n    \"buttons-grid\",\n    \"volume\",\n    \"backlight\",\n    \"title\",\n    \"dnd\",\n    \"notifications\",\n    \"mpris\"\n  ],\n  \"widget-config\": {\n    \"title\": {\n      \"text\": \"Notifications\",\n      \"clear-all-button\": true,\n      \"button-text\": \"Clear All\"\n    },\n    \"dnd\": {\n      \"text\": \"Do Not Disturb\"\n    },\n    \"label\": {\n      \"max-lines\": 1,\n      \"text\": \"Control Center\"\n    },\n    \"mpris\": {\n      \"image-size\": 96,\n      \"image-radius\": 12\n    },\n    \"backlight\": {\n      \"label\": \"\",\n      \"device\": \"intel_backlight\",\n      \"min\": 10\n    },\n    \"backlight#KB\": {\n      \"label\": \" \",\n      \"device\": \"asus::kbd_backlight\",\n      \"subsystem\": \"leds\"\n    },\n    \"volume\": {\n      \"label\": \"\"\n    },\n    \"menubar#label\": {\n      \"menu#power-buttons\": {\n        \"label\": \"\",\n        \"position\": \"right\",\n        \"actions\": [\n          {\n            \"label\": \" Reboot\",\n            \"command\": \"systemctl reboot\"\n          },\n          {\n            \"label\": \" Lock\",\n            \"command\": \"hyprlock\"\n          },\n          {\n            \"label\": \" Logout\",\n            \"command\": \"hyprctl exit\"\n          },\n          {\n            \"label\": \" Shut down\",\n            \"command\": \"systemctl poweroff\"\n          }\n        ]\n      },\n      \"buttons#topbar-buttons\": {\n        \"position\": \"left\",\n        \"actions\": [\n          {\n            \"label\": \"\",\n            \"command\": \"grim\"\n          },\n          {\n            \"label\": \"\",\n            \"command\": \"grim\"\n          }\n        ]\n      }\n    },\n    \"buttons-grid\": {\n      \"actions\": [\n        {\n          \"label\": \"\",\n          \"command\": \"/home/martin/.dots/scripts/wifipower.sh\"\n        },\n        {\n          \"label\": \"\",\n          \"command\": \"/home/martin/.dots/scripts/blepower.sh\"\n        },\n        {\n          \"label\": \"󰒲\",\n          \"command\": \"/home/martin/.dots/scripts/sleep.sh\"\n        },\n        {\n          \"label\": \"󰚰\",\n          \"command\": \"/home/martin/.dots/scripts/update.sh\"\n        },\n        {\n          \"label\": \"\",\n          \"command\": \"/home/martin/.dots/scripts/update.sh\"\n        },\n        {\n          \"label\": \"󰚰\",\n          \"command\": \"/home/martin/.dots/scripts/update.sh\"\n        }\n      ]\n    }\n  }\n}\n"
  },
  {
    "path": "cfg/swaync/adwaita-dark/configSchema.json",
    "content": "{\n  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n  \"title\": \"SwayNotificationCenter JSON schema\",\n  \"type\": \"object\",\n  \"additionalProperties\": false,\n  \"properties\": {\n    \"$schema\": {\n      \"type\": \"string\",\n      \"description\": \"Pointer to the schema against which this document should be validated.\"\n    },\n    \"positionX\": {\n      \"type\": \"string\",\n      \"description\": \"Horizontal position of control center and notification window\",\n      \"default\": \"right\",\n      \"enum\": [\"right\", \"left\", \"center\"]\n    },\n    \"layer\": {\n      \"type\": \"string\",\n      \"description\": \"Layer of notification window\",\n      \"default\": \"overlay\",\n      \"enum\": [\"background\", \"bottom\", \"top\", \"overlay\"]\n    },\n    \"layer-shell\": {\n      \"type\": \"boolean\",\n      \"description\": \"Wether or not the windows should be opened as layer-shell surfaces. Note: Requires swaync restart to apply\",\n      \"default\": true\n    },\n    \"cssPriority\": {\n      \"type\": \"string\",\n      \"description\": \"Which GTK priority to use when loading the default and user CSS files. Pick \\\"user\\\" to override XDG_CONFIG_HOME/gtk-3.0/gtk.css\",\n      \"default\": \"user\",\n      \"enum\": [\"user\"]\n    },\n    \"positionY\": {\n      \"type\": \"string\",\n      \"description\": \"Vertical position of control center and notification window\",\n      \"default\": \"top\",\n      \"enum\": [\"top\", \"center\", \"bottom\"]\n    },\n    \"control-center-positionX\": {\n      \"type\": \"string\",\n      \"description\": \"Optional: Horizontal position of the control center. Supersedes positionX if not set to `none`\",\n      \"default\": \"none\",\n      \"enum\": [\"right\", \"left\", \"center\", \"none\"]\n    },\n    \"control-center-positionY\": {\n      \"type\": \"string\",\n      \"description\": \"Optional: Vertical position of the control center. Supersedes positionY if not set to `none`\",\n      \"default\": \"none\",\n      \"enum\": [\"top\", \"bottom\", \"none\"]\n    },\n    \"control-center-margin-top\": {\n      \"type\": \"integer\",\n      \"description\": \"The margin (in pixels) at the top of the control center. 0 to disable\",\n      \"default\": 0\n    },\n    \"control-center-margin-bottom\": {\n      \"type\": \"integer\",\n      \"description\": \"The margin (in pixels) at the bottom of the control center. 0 to disable\",\n      \"default\": 0\n    },\n    \"control-center-margin-right\": {\n      \"type\": \"integer\",\n      \"description\": \"The margin (in pixels) at the right of the control center. 0 to disable\",\n      \"default\": 0\n    },\n    \"control-center-margin-left\": {\n      \"type\": \"integer\",\n      \"description\": \"The margin (in pixels) at the left of the control center. 0 to disable\",\n      \"default\": 0\n    },\n    \"control-center-layer\": {\n      \"type\": \"string\",\n      \"description\": \"Layer of control center window\",\n      \"default\": \"none\",\n      \"enum\": [\"background\", \"bottom\", \"top\", \"overlay\", \"none\"]\n    },\n    \"control-center-exclusive-zone\": {\n      \"type\": \"boolean\",\n      \"description\": \"Whether or not the control center should follow the compositors exclusive zones. An example would be setting it to \\\"false\\\" to cover your panel/dock.\",\n      \"default\": true\n    },\n    \"notification-2fa-action\": {\n      \"type\": \"boolean\",\n      \"description\": \"If each notification should display a 'COPY \\\"1234\\\"' action\",\n      \"default\": true\n    },\n    \"notification-inline-replies\": {\n      \"type\": \"boolean\",\n      \"description\": \"If notifications should display a text field to reply if the sender requests it. NOTE: Replying in popup notifications is only available if the compositor supports GTK Layer-Shell ON_DEMAND keyboard interactivity.\",\n      \"default\": false\n    },\n    \"notification-icon-size\": {\n      \"type\": \"integer\",\n      \"description\": \"The notification icon size (in pixels). The app icon size is 1/3\",\n      \"default\": 64,\n      \"minimum\": 16\n    },\n    \"notification-body-image-height\": {\n      \"type\": \"integer\",\n      \"description\": \"The notification body image height (in pixels)\",\n      \"default\": 100,\n      \"minimum\": 100\n    },\n    \"notification-body-image-width\": {\n      \"type\": \"integer\",\n      \"description\": \"The notification body image width (in pixels)\",\n      \"default\": 200,\n      \"minimum\": 200\n    },\n    \"timeout\": {\n      \"type\": \"integer\",\n      \"description\": \"The notification timeout for notifications with normal priority\",\n      \"default\": 10\n    },\n    \"timeout-low\": {\n      \"type\": \"integer\",\n      \"description\": \"The notification timeout for notifications with low priority\",\n      \"default\": 5\n    },\n    \"timeout-critical\": {\n      \"type\": \"integer\",\n      \"description\": \"The notification timeout for notifications with critical priority. 0 to disable\",\n      \"default\": 0\n    },\n    \"notification-window-width\": {\n      \"type\": \"integer\",\n      \"description\": \"Width of the notification in pixels\",\n      \"default\": 500\n    },\n    \"fit-to-screen\": {\n      \"type\": \"boolean\",\n      \"description\": \"If the control center should expand to both edges of the screen\",\n      \"default\": true\n    },\n    \"relative-timestamps\": {\n      \"type\": \"boolean\",\n      \"description\": \"Display notification timestamps relative to now e.g. \\\"26 minutes ago\\\". If false, a local iso8601-formatted absolute timestamp is displayed.\",\n      \"default\": true\n    },\n    \"control-center-height\": {\n      \"type\": \"integer\",\n      \"description\": \"Height of the control center in pixels. Ignored when 'fit-to-screen' is set to 'true'\",\n      \"default\": 600,\n      \"minimum\": 300\n    },\n    \"control-center-width\": {\n      \"type\": \"integer\",\n      \"description\": \"Width of the control center in pixels\",\n      \"default\": 500,\n      \"minimum\": 300\n    },\n    \"keyboard-shortcuts\": {\n      \"type\": \"boolean\",\n      \"description\": \"If control center should use keyboard shortcuts\",\n      \"default\": true\n    },\n    \"image-visibility\": {\n      \"type\": \"string\",\n      \"description\": \"The notification image visibility when no icon is available.\",\n      \"default\": \"when-available\",\n      \"enum\": [\"always\", \"when-available\", \"never\"]\n    },\n    \"transition-time\": {\n      \"type\": \"integer\",\n      \"description\": \"The notification animation duration. 0 to disable\",\n      \"default\": 200\n    },\n    \"hide-on-clear\": {\n      \"type\": \"boolean\",\n      \"description\": \"Hides the control center after pressing \\\"Clear All\\\"\",\n      \"default\": false\n    },\n    \"hide-on-action\": {\n      \"type\": \"boolean\",\n      \"description\": \"Hides the control center when clicking on notification action\",\n      \"default\": true\n    },\n    \"script-fail-notify\": {\n      \"type\": \"boolean\",\n      \"description\": \"Sends a notification if a script fails to run\",\n      \"default\": true\n    },\n    \"scripts\": {\n      \"type\": \"object\",\n      \"description\": \"Which scripts to check and potentially run for every notification. If the notification doesn't include one of the properties, that property will be ignored. All properties (except for exec) use regex. If all properties match the given notification, the script will be run. Only the first matching script will be run.\",\n      \"minProperties\": 1,\n      \"additionalProperties\": false,\n      \"patternProperties\": {\n        \"^.{1,}$\": {\n          \"type\": \"object\",\n          \"description\": \"Your script object.\",\n          \"required\": [\"exec\"],\n          \"minProperties\": 2,\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"exec\": {\n              \"type\": \"string\",\n              \"description\": \"The script to run. Can also run regular shell commands.\"\n            },\n            \"app-name\": {\n              \"type\": \"string\",\n              \"description\": \"The app-name. Uses Regex.\"\n            },\n            \"desktop-entry\": {\n              \"type\": \"string\",\n              \"description\": \"The desktop-entry. Uses Regex.\"\n            },\n            \"summary\": {\n              \"type\": \"string\",\n              \"description\": \"The summary of the notification. Uses Regex.\"\n            },\n            \"body\": {\n              \"type\": \"string\",\n              \"description\": \"The body of the notification. Uses Regex.\"\n            },\n            \"urgency\": {\n              \"type\": \"string\",\n              \"description\": \"The urgency of the notification.\",\n              \"default\": \"Normal\",\n              \"enum\": [\"Low\", \"Normal\", \"Critical\"]\n            },\n            \"category\": {\n              \"type\": \"string\",\n              \"description\": \"Which category the notification belongs to. Uses Regex.\"\n            },\n            \"run-on\": {\n              \"type\": \"string\",\n              \"description\": \"Whether to run the script on an action being activated, or when the notification is received.\",\n              \"enum\": [\"action\", \"receive\"],\n              \"default\": \"receive\"\n            }\n          }\n        }\n      }\n    },\n    \"notification-visibility\": {\n      \"type\": \"object\",\n      \"description\": \"Set the visibility of each incoming notification. If the notification doesn't include one of the properties, that property will be ignored. All properties (except for state) use regex. If all properties match the given notification, the notification will be follow the provided state. Only the first matching object will be used.\",\n      \"minProperties\": 1,\n      \"additionalProperties\": false,\n      \"patternProperties\": {\n        \"^.{1,}$\": {\n          \"type\": \"object\",\n          \"description\": \"Your script object.\",\n          \"required\": [\"state\"],\n          \"minProperties\": 2,\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"state\": {\n              \"type\": \"string\",\n              \"description\": \"The notification visibility state.\",\n              \"default\": \"enabled\",\n              \"enum\": [\"ignored\", \"muted\", \"enabled\", \"transient\"]\n            },\n            \"app-name\": {\n              \"type\": \"string\",\n              \"description\": \"The app-name. Uses Regex.\"\n            },\n            \"desktop-entry\": {\n              \"type\": \"string\",\n              \"description\": \"The desktop-entry. Uses Regex.\"\n            },\n            \"summary\": {\n              \"type\": \"string\",\n              \"description\": \"The summary of the notification. Uses Regex.\"\n            },\n            \"body\": {\n              \"type\": \"string\",\n              \"description\": \"The body of the notification. Uses Regex.\"\n            },\n            \"urgency\": {\n              \"type\": \"string\",\n              \"description\": \"The urgency of the notification.\",\n              \"default\": \"Normal\",\n              \"enum\": [\"Low\", \"Normal\", \"Critical\"]\n            },\n            \"override-urgency\": {\n              \"type\": \"string\",\n              \"description\": \"The new urgency of the notification (optional)\",\n              \"default\": \"unset\",\n              \"enum\": [\"unset\", \"low\", \"normal\", \"critical\"]\n            },\n            \"category\": {\n              \"type\": \"string\",\n              \"description\": \"Which category the notification belongs to. Uses Regex.\"\n            }\n          }\n        }\n      }\n    },\n    \"widgets\": {\n      \"type\": \"array\",\n      \"description\": \"Which order and which widgets to display. If the \\\"notifications\\\" widget isn't specified, it will be placed at the bottom.\",\n      \"default\": [\"inhibitors\", \"title\", \"dnd\", \"notifications\"],\n      \"items\": {\n        \"type\": \"string\",\n        \"$comment\": \"Sadly can't use regex and enums at the same time. Fix in the future?\",\n        \"pattern\": \"^[a-zA-Z0-9_-]{1,}(#[a-zA-Z0-9_-]{1,}){0,1}?$\"\n      }\n    },\n    \"widget-config\": {\n      \"type\": \"object\",\n      \"description\": \"Configure specific widget properties.\",\n      \"additionalProperties\": false,\n      \"$comment\": \"New widgets go here in \\\"patternProperties\\\" ↓\",\n      \"patternProperties\": {\n        \"^title(#[a-zA-Z0-9_-]{1,}){0,1}?$\": {\n          \"$comment\": \"References the widget structure from \\\"widgets\\\" below\",\n          \"$ref\": \"#/widgets/title\"\n        },\n        \"^dnd(#[a-zA-Z0-9_-]{1,}){0,1}?$\": {\n          \"$ref\": \"#/widgets/dnd\"\n        },\n        \"^label(#[a-zA-Z0-9_-]{1,}){0,1}?$\": {\n          \"$ref\": \"#/widgets/label\"\n        },\n        \"^mpris(#[a-zA-Z0-9_-]{1,}){0,1}?$\": {\n          \"$ref\": \"#/widgets/mpris\"\n        },\n        \"^buttons-grid(#[a-zA-Z0-9_-]{1,}){0,1}?$\": {\n          \"$ref\": \"#/widgets/buttons-grid\"\n        },\n        \"^menubar(#[a-zA-Z0-9_-]{1,}){0,1}?$\": {\n          \"$ref\": \"#/widgets/menubar\"\n        },\n        \"^volume(#[a-zA-Z0-9_-]{1,}){0,1}?$\": {\n          \"$ref\": \"#/widgets/volume\"\n        },\n        \"^backlight(#[a-zA-Z0-9_-]{1,}){0,1}?$\": {\n          \"$ref\": \"#/widgets/backlight\"\n        },\n        \"^inhibitors(#[a-zA-Z0-9_-]{1,}){0,1}?$\": {\n          \"$comment\": \"References the widget structure from \\\"widgets\\\" below\",\n          \"$ref\": \"#/widgets/inhibitors\"\n        }\n      }\n    }\n  },\n  \"widgets\": {\n    \"$comment\": \"New widgets go here\",\n    \"title\": {\n      \"type\": \"object\",\n      \"description\": \"Control Center Title Widget\",\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"text\": {\n          \"type\": \"string\",\n          \"description\": \"The title of the widget\",\n          \"default\": \"Notifications\"\n        },\n        \"clear-all-button\": {\n          \"type\": \"boolean\",\n          \"description\": \"Wether to display a \\\"Clear All\\\" button\",\n          \"default\": true\n        },\n        \"button-text\": {\n          \"type\": \"string\",\n          \"description\": \"\\\"Clear All\\\" button text\",\n          \"default\": \"Clear All\"\n        }\n      }\n    },\n    \"dnd\": {\n      \"type\": \"object\",\n      \"description\": \"Control Center Do Not Disturb Widget\",\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"text\": {\n          \"type\": \"string\",\n          \"description\": \"The title of the widget\",\n          \"default\": \"Do Not Disturb\"\n        }\n      }\n    },\n    \"label\": {\n      \"type\": \"object\",\n      \"description\": \"A generic widget that allows the user to add custom text\",\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"text\": {\n          \"type\": \"string\",\n          \"description\": \"The text content of the widget\",\n          \"default\": \"Label Text\"\n        },\n        \"max-lines\": {\n          \"type\": \"integer\",\n          \"description\": \"The maximum lines\",\n          \"default\": 5\n        }\n      }\n    },\n    \"mpris\": {\n      \"type\": \"object\",\n      \"description\": \"A widget that displays multiple music players\",\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"image-size\": {\n          \"type\": \"integer\",\n          \"description\": \"The size of the album art\",\n          \"default\": 96\n        },\n        \"image-radius\": {\n          \"type\": \"integer\",\n          \"description\": \"The border radius of the album art. Will be overriden by setting the border-radius in the style.css for the \\\".widget-mpris-album-art\\\" class\",\n\n          \"default\": 12\n        },\n        \"blur\": {\n          \"type\": \"bool\",\n          \"description\": \"Appy the artwork as the MPRIS background and blur it\",\n          \"default\": true\n        }\n      }\n    },\n    \"buttons-grid\": {\n      \"type\": \"object\",\n      \"description\": \"A widget to add a grid of buttons that execute shell commands\",\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"actions\": {\n          \"type\": \"array\",\n          \"description\": \"A list of actions containing a label and a command\",\n          \"items\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"label\": {\n                \"type\": \"string\",\n                \"description\": \"Text to be displayed in button\",\n                \"default\": \"label\"\n              },\n              \"command\": {\n                \"type\": \"string\",\n                \"description\": \"Command to be executed on click\",\n                \"default\": \"\"\n              },\n              \"type\": {\n                \"type\": \"string\",\n                \"description\": \"Type of the button; toggle buttons receive the .active css class and an env variable 'SWAYNC_TOGGLE_STATE' is set. See example in the default config.json\",\n                \"default\": \"normal\",\n                \"enum\": [\"normal\", \"toggle\"]\n              },\n              \"update-command\": {\n                \"type\": \"string\",\n                \"description\": \"Command to be executed on visibility change of cc to update the active state of the toggle button (should echo true or false)\",\n                \"default\": \"\"\n              },\n              \"active\": {\n                  \"type\": \"bool\",\n                  \"description\": \"Wether the toggle button is active as default or not\",\n                  \"default\": false\n              }\n            }\n          }\n        }\n      }\n    },\n    \"menubar\": {\n      \"type\": \"object\",\n      \"description\": \"A bar that contains action-buttons and buttons to open a dropdown with action-buttons\",\n      \"additionalProperties\": false,\n      \"patternProperties\": {\n        \"^menu(#[a-zA-Z0-9_-]{1,}){0,1}?$\": {\n          \"type\": \"object\",\n          \"description\": \"A button that opens a dropdown with action-buttons\",\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"label\": {\n              \"type\": \"string\",\n              \"description\": \"Text to be displayed in button\",\n              \"default\": \"Menu\"\n            },\n            \"position\": {\n              \"type\": \"string\",\n              \"description\": \"Horizontal position of the button in the bar\",\n              \"default\": \"right\",\n              \"enum\": [\"right\", \"left\"]\n            },\n            \"animation-type\": {\n              \"type\": \"string\",\n              \"default\": \"slide_down\",\n              \"description\": \"Animation type for menu\",\n              \"enum\": [\"slide_down\", \"slide_up\", \"none\"]\n            },\n            \"animation-duration\":{\n              \"type\": \"integer\",\n              \"default\": 250,\n              \"description\": \"Duration of animation in milliseconds\"\n            },\n            \"actions\": {\n              \"$ref\" : \"#/widgets/buttons-grid/properties/actions\"\n            }\n          }\n        },\n        \"^buttons(#[a-zA-Z0-9_-]{1,}){0,1}?$\": {\n          \"type\": \"object\",\n          \"description\": \"A list of action-buttons to be displayed in the topbar\",\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"position\": {\n              \"type\": \"string\",\n              \"description\": \"Horizontal position of the button in the bar\",\n              \"default\": \"right\",\n              \"enum\": [\"right\", \"left\"]\n            },\n            \"actions\": {\n              \"$ref\" : \"#/widgets/buttons-grid/properties/actions\"\n            }\n          }\n        }\n      }\n    },\n    \"volume\": {\n      \"type\": \"object\",\n      \"description\": \"Slider to control pulse volume\",\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"label\": {\n          \"type\": \"string\",\n          \"description\": \"Text displayed in front of the volume slider\",\n          \"default\": \"Volume\"\n        },\n        \"show-per-app\": {\n          \"type\": \"boolean\",\n          \"default\": false,\n          \"description\": \"Show per app volume control\"\n        },\n        \"show-per-app-icon\": {\n          \"type\": \"boolean\",\n          \"default\": true,\n          \"description\": \"Show application icon in per app control\"\n        },\n        \"show-per-app-label\": {\n          \"type\": \"boolean\",\n          \"default\": false,\n          \"description\": \"Show application name in per app control\"\n        },\n        \"empty-list-label\": {\n          \"type\": \"string\",\n          \"default\": \"No active sink input\",\n          \"description\": \"Text displayed when there are not active sink inputs\"\n        },\n        \"expand-button-label\": {\n          \"type\": \"string\",\n          \"default\": \"⇧\",\n          \"description\": \"Label displayed on button to show per app volume control\"\n        },\n        \"collapse-button-label\": {\n          \"type\": \"string\",\n          \"default\": \"⇩\",\n          \"description\": \"Label displayed on button to hide per app volume control\"\n        },\n        \"icon-size\": {\n          \"type\": \"integer\",\n          \"default\": 24,\n          \"description\": \"Size of the application icon in per app volume control\"\n        },\n        \"animation-type\": {\n          \"type\": \"string\",\n          \"default\": \"slide_down\",\n          \"description\": \"Animation type for menu\",\n          \"enum\": [\"slide_down\", \"slide_up\", \"none\"]\n        },\n        \"animation-duration\":{\n          \"type\": \"integer\",\n          \"default\": 250,\n          \"description\": \"Duration of animation in milliseconds\"\n        }\n      }\n    },\n    \"backlight\": {\n      \"type\": \"object\",\n      \"description\": \"Slider to control monitor brightness\",\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"label\": {\n          \"type\": \"string\",\n          \"description\": \"Text displayed in front of the backlight slider\",\n          \"default\": \"Brightness\"\n        },\n        \"device\": {\n          \"type\": \"string\",\n          \"description\": \"Name of monitor (find possible devices using `ls /sys/class/backlight` or `ls /sys/class/leds`)\",\n          \"default\": \"intel_backlight\"\n        },\n        \"subsystem\": {\n          \"type\": \"string\",\n          \"description\": \"Kernel subsystem for brightness control\",\n          \"default\": \"backlight\",\n          \"enum\": [\"backlight\", \"leds\"]\n        },\n        \"min\": {\n          \"type\": \"integer\",\n          \"default\": 0,\n          \"description\": \"Lowest possible value for brightness\"\n        }\n      }\n    },\n    \"inhibitors\": {\n      \"type\": \"object\",\n      \"description\": \"Control Center Inhibitors Widget\",\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"text\": {\n          \"type\": \"string\",\n          \"description\": \"The title of the widget\",\n          \"default\": \"Inhibitors\"\n        },\n        \"clear-all-button\": {\n          \"type\": \"boolean\",\n          \"description\": \"Wether to display a \\\"Clear All\\\" button\",\n          \"default\": true\n        },\n        \"button-text\": {\n          \"type\": \"string\",\n          \"description\": \"\\\"Clear All\\\" button text\",\n          \"default\": \"Clear All\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "cfg/swaync/adwaita-dark/launch.sh",
    "content": "#!/usr/bin/env sh\n\n# Adwaita\n\nsassc $HOME/.config/swaync/style-adwaita.scss $HOME/.config/swaync/style.css\n\nswaync-client -R\nswaync-client -rs\nswaync-client -t\n"
  },
  {
    "path": "cfg/swaync/adwaita-dark/style-adwaita.scss",
    "content": "@import \"./catppuccin-mocha.scss\";\n\n.text-button:hover,\n.text-button.control-center-clear-all:hover {\n  color: $color-fg;\n  background-color: $button-bg-focus;\n  transition: linear 0.25s;\n}\n\n.notification-row {\n  outline: none;\n}\n\n.notification-row:focus,\n.notification-row:hover {\n  background: $button-bg-focus;\n}\n\n.notification-row .notification-background {\n  padding: $widget-margin $widget-margin;\n}\n\n.notification-row .notification-background .close-button {\n  /* The notification Close Button */\n  background: $grid-bg;\n  color: $text-color;\n  text-shadow: none;\n  padding: 0;\n  border-radius: 100%;\n  margin-top: $spacing;\n  margin-right: $spacing;\n  box-shadow: none;\n  border: none;\n  min-width: $font-size*1.5;\n  min-height: $font-size*1.5;\n}\n\n.notification-row .notification-background .close-button:hover {\n  box-shadow: none;\n  background: $close-button-bg;\n  transition: background 0.15s ease-in-out;\n  border: none;\n}\n\n.notification-row .notification-background .notification {\n  /* The actual notification */\n  border-radius: $radii;\n  border: $widget-border;\n  border-radius: $radii;\n  padding: 0;\n  transition: background 0.15s ease-in-out;\n  background: $widget-bg;\n}\n\n.notification-row .notification-background .notification.low {\n  /* Low Priority Notification */\n}\n\n.notification-row .notification-background .notification.normal {\n  /* Normal Priority Notification */\n}\n\n.notification-row .notification-background .notification.critical {\n  /* Critical Priority Notification */\n}\n\n.notification-row .notification-background .notification .notification-action,\n.notification-row .notification-background .notification .notification-default-action {\n  padding: 0px;\n  margin: 0;\n  box-shadow: none;\n  background: transparent;\n  border: none;\n  color: $text-color;\n  transition: background 0.15s ease-in-out;\n}\n\n.notification-row .notification-background .notification .notification-action:hover,\n.notification-row .notification-background .notification .notification-default-action:hover {\n  -gtk-icon-effect: none;\n  background: $button-bg;\n}\n\n.notification-row .notification-background .notification .notification-default-action {\n  /* The large action that also displays the notification summary and body */\n  border-radius: $radii;\n}\n\n.notification-row .notification-background .notification .notification-default-action:not(:only-child) {\n  /* When alternative actions are visible */\n  border-bottom-left-radius: 0px;\n  border-bottom-right-radius: 0px;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content {\n  background: transparent;\n  border-radius: $radii;\n  padding: $spacing;\n  padding-right: $spacing*3;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content .image {\n  /* Notification Primary Image */\n  -gtk-icon-effect: none;\n  border-radius: $radii;\n  /* Size in px */\n  margin: $spacing;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content .app-icon {\n  /* Notification app icon (only visible when the primary image is set) */\n  -gtk-icon-effect: none;\n  -gtk-icon-shadow: 0 1px 4px black;\n  margin: $spacing*2;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content .text-box .summary {\n  /* Notification summary/title */\n  font-size: 1.1em;\n  font-weight: bolder;\n  background: transparent;\n  color: $text-color;\n  text-shadow: none;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content .text-box .time {\n  /* Notification time-ago */\n  font-size: 1.1em;\n  font-weight: bolder;\n  background: transparent;\n  color: $text-color;\n  text-shadow: none;\n  margin-right: $spacing*10;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content .text-box .body {\n  /* Notification body */\n  font-size: 1.1em;\n  font-weight: normal;\n  background: transparent;\n  color: $text-color;\n  text-shadow: none;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content progressbar {\n  /* The optional notification progress bar */\n  margin-top: $spacing;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content .body-image {\n  /* The \"extra\" optional bottom notification image */\n  margin-top: $spacing;\n  background-color: $text-color;\n  border-radius: $radii;\n  -gtk-icon-effect: none;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply {\n  /* The inline reply section */\n  margin-top: $spacing;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply .inline-reply-entry {\n  background: $button-bg-darker;\n  color: $text-color;\n  caret-color: $text-color;\n  border: 1px solid $dark_1;\n  border-radius: $radii;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply .inline-reply-button {\n  margin-left: $spacing;\n  background: $grid-bg;\n  border: 1px solid $dark_1;\n  border-radius: $radii;\n  color: $text-color;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply .inline-reply-button:disabled {\n  background: initial;\n  color: $text-color-disabled;\n  border: 1px solid $dark_1;\n  border-color: transparent;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply .inline-reply-button:hover {\n  background: $button-bg;\n}\n\n.notification-row .notification-background .notification .notification-action {\n  /* The alternative actions below the default action */\n  border-top: 1px solid $dark_1;\n  border-radius: 0px;\n  border-right: 1px solid $dark_1;\n}\n\n.notification-row .notification-background .notification .notification-action:first-child {\n  /* add bottom border radius to eliminate clipping */\n  border-bottom-left-radius: $radii;\n}\n\n.notification-row .notification-background .notification .notification-action:last-child {\n  border-bottom-right-radius: $radii;\n  border-right: none;\n}\n\n.notification-group {\n  /* Styling only for Grouped Notifications */\n}\n\n.notification-group.low {\n  /* Low Priority Group */\n}\n\n.notification-group.normal {\n  /* Low Priority Group */\n}\n\n.notification-group.critical {\n  /* Low Priority Group */\n}\n\n.notification-group .notification-group-buttons,\n.notification-group .notification-group-headers {\n  margin: 0 16px;\n  color: $text-color;\n}\n\n.notification-group .notification-group-headers {\n  /* Notification Group Headers */\n}\n\n.notification-group .notification-group-headers .notification-group-icon {\n  color: $text-color;\n}\n\n.notification-group .notification-group-headers .notification-group-header {\n  color: $text-color;\n}\n\n.notification-group .notification-group-buttons {\n  /* Notification Group Buttons */\n}\n\n.notification-group.collapsed .notification-row .notification {\n  background-color: $button-bg;\n}\n\n.notification-group.collapsed .notification-row:not(:last-child) {\n  /* Top notification in stack */\n  /* Set lower stacked notifications opacity to 0 */\n}\n\n.notification-group.collapsed .notification-row:not(:last-child) .notification-action,\n.notification-group.collapsed .notification-row:not(:last-child) .notification-default-action {\n  opacity: 0;\n}\n\n.notification-group.collapsed:hover .notification-row:not(:only-child) .notification {\n  background-color: $button-bg;\n}\n\n.control-center {\n  /* The Control Center which contains the old notifications + widgets */\n  background: $widget-bg;\n  color: $text-color;\n  margin: $widget-margin;\n  border: $widget-border;\n  border-radius: $widget-radii;\n}\n\n.control-center .control-center-list-placeholder {\n  /* The placeholder when there are no notifications */\n  opacity: 0.5;\n}\n\n.control-center .control-center-list {\n  /* List of notifications */\n  background: transparent;\n}\n\n.control-center .control-center-list .notification {\n  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.7), 0 2px 6px 2px rgba(0, 0, 0, 0.3);\n}\n\n.control-center .control-center-list .notification .notification-default-action,\n.control-center .control-center-list .notification .notification-action {\n  transition: opacity 400ms ease-in-out, background 0.15s ease-in-out;\n}\n\n.control-center .control-center-list .notification .notification-default-action:hover,\n.control-center .control-center-list .notification .notification-action:hover {\n  background-color: $button-bg;\n}\n\n.blank-window {\n  /* Window behind control center and on all other monitors */\n  background: transparent;\n}\n\n.floating-notifications {\n  background: transparent;\n}\n\n.floating-notifications .notification {\n  box-shadow: none;\n}\n\n/*** Widgets ***/\n/* Title widget */\n.widget-title {\n  color: $text-color;\n  margin: $widget-margin;\n  font-size: 1.5rem;\n}\n\n.widget-title>button {\n  font-size: initial;\n  color: $text-color;\n  text-shadow: none;\n  background: $button-bg;\n  border: 1px solid $dark_1;\n  box-shadow: none;\n  border-radius: $radii;\n}\n\n.widget-title>button:hover {\n  background: $button-bg;\n}\n\n/* DND widget */\n.widget-dnd {\n  color: $text-color;\n  margin: $widget-margin;\n  font-size: 1.1rem;\n}\n\n.widget-dnd>switch {\n  font-size: initial;\n  border-radius: $radii;\n  background: $grid-bg;\n  border: 1px solid $dark_1;\n  box-shadow: none;\n}\n\n.widget-dnd>switch:checked {\n  background: $bg-selected;\n  color: white;\n}\n\n.widget-dnd>switch slider {\n  background: $button-bg;\n  border-radius: $radii;\n}\n\n/* Label widget */\n.widget-label {\n  margin: $widget-margin;\n  margin-left: $widget-margin*2;\n}\n\n.widget-label>label {\n  font-weight: bold;\n  font-size: 1.5em;\n}\n\n/* Mpris widget */\n$mpris-album-art-overlay: rgba(0, 0, 0, 0.55);\n$mpris-button-hover: rgba(0, 0, 0, 0.50);\n\n.widget-mpris {\n  /* The parent to all players */\n}\n\n.widget-mpris .widget-mpris-player {\n  padding: $widget-padding;\n  margin: $widget-margin $widget-margin;\n  background-color: $mpris-album-art-overlay;\n  border-radius: $widget-radii;\n  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.75);\n}\n\n.widget-mpris .widget-mpris-player button:hover {\n  /* The media player buttons (play, pause, next, etc...) */\n  background: $button-bg;\n}\n\n.widget-mpris .widget-mpris-player .widget-mpris-album-art {\n  border-radius: $radii;\n  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.75);\n}\n\n.widget-mpris .widget-mpris-player .widget-mpris-title {\n  font-weight: bold;\n  font-size: 1.25rem;\n}\n\n.widget-mpris .widget-mpris-player .widget-mpris-subtitle {\n  font-size: 1.1rem;\n}\n\n.widget-mpris .widget-mpris-player>box>button {\n  /* Change player control buttons */\n}\n\n.widget-mpris .widget-mpris-player>box>button:hover {\n  background-color: $mpris-button-hover;\n}\n\n.widget-mpris>box>button {\n  /* Change player side buttons */\n}\n\n.widget-mpris>box>button:disabled {\n  /* Change player side buttons insensitive */\n}\n\n/* Buttons widget */\n.widget-buttons-grid {\n  padding: $widget-padding;\n  margin: $widget-margin;\n  border-radius: $widget-radii;\n  background-color: $grid-bg;\n}\n\n.widget-buttons-grid>flowbox>flowboxchild>button {\n  background: $button-bg;\n  border-radius: $radii;\n}\n\n.widget-buttons-grid>flowbox>flowboxchild>button.toggle:checked {\n  /* style given to the active toggle button */\n}\n\n/* Menubar widget */\n.widget-menubar>box>.menu-button-bar>button {\n  border: none;\n  background: transparent;\n}\n\n/* .AnyName { Name defined in config after #\n  background-color: $noti-bg;\n  padding: 8px;\n  margin: 8px;\n  border-radius: 12px;\n}\n\n.AnyName>button {\n  background: transparent;\n  border: none;\n}\n\n.AnyName>button:hover {\n  background-color: $noti-bg-hover;\n} */\n.topbar-buttons>button {\n  /* Name defined in config after # */\n  border: none;\n  background: transparent;\n}\n\n/* Volume widget */\n.widget-volume,\n.widget-backlight {\n  background-color: $grid-bg;\n  padding: $widget-padding;\n  padding-left: $widget-padding*2;\n  margin: $widget-margin;\n  margin-left: $widget-margin;\n  margin-right: $widget-margin;\n  border-radius: $widget-radii;\n}\n\n.widget-volume {\n  margin-top: 0;\n  margin-bottom: 0;\n  border-bottom-left-radius: 0;\n  border-bottom-right-radius: 0;\n}\n\n.widget-backlight {\n  margin-top: 0;\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n}\n\n.widget-volume>box>button {\n  background: transparent;\n  border: none;\n}\n\n.per-app-volume {\n  padding: 4px 8px 8px 8px;\n  margin: 0px 8px 8px 8px;\n  border-radius: $radii;\n}\n\n/* Inhibitors widget */\n.widget-inhibitors {\n  margin: $widget-margin;\n  font-size: 1.5rem;\n}\n\n.widget-inhibitors>button {\n  font-size: initial;\n  color: $text-color;\n  text-shadow: none;\n  background: $grid-bg;\n  border: 1px solid $dark_1;\n  box-shadow: none;\n  border-radius: $radii;\n}\n\n.widget-inhibitors>button:hover {\n  background: $button-bg;\n}\n"
  },
  {
    "path": "cfg/swaync/catppuccin-mocha/config.json",
    "content": "{\n  \"$schema\": \"./configSchema.json\",\n  \"positionX\": \"right\",\n  \"positionY\": \"top\",\n  \"control-center-margin-top\": 0,\n  \"control-center-margin-bottom\": 0,\n  \"control-center-margin-right\": 0,\n  \"control-center-margin-left\": 0,\n  \"notification-icon-size\": 64,\n  \"notification-body-image-height\": 100,\n  \"notification-body-image-width\": 200,\n  \"timeout\": 10,\n  \"timeout-low\": 5,\n  \"timeout-critical\": 0,\n  \"fit-to-screen\": false,\n  \"control-center-width\": 500,\n  \"control-center-height\": 800,\n  \"notification-window-width\": 500,\n  \"keyboard-shortcuts\": true,\n  \"image-visibility\": \"when-available\",\n  \"transition-time\": 200,\n  \"hide-on-clear\": false,\n  \"hide-on-action\": true,\n  \"script-fail-notify\": true,\n  \"scripts\": {\n    \"example-script\": {\n      \"exec\": \"echo 'Do something...'\",\n      \"urgency\": \"Normal\"\n    }\n  },\n  \"notification-visibility\": {\n    \"example-name\": {\n      \"state\": \"muted\",\n      \"urgency\": \"Low\",\n      \"app-name\": \"Spotify\"\n    }\n  },\n  \"widgets\": [\n    \"label\",\n    \"buttons-grid\",\n    \"volume\",\n    \"backlight\",\n    \"title\",\n    \"dnd\",\n    \"notifications\",\n    \"mpris\"\n  ],\n  \"widget-config\": {\n    \"title\": {\n      \"text\": \"Notifications\",\n      \"clear-all-button\": true,\n      \"button-text\": \"Clear All\"\n    },\n    \"dnd\": {\n      \"text\": \"Do Not Disturb\"\n    },\n    \"label\": {\n      \"max-lines\": 1,\n      \"text\": \"Control Center\"\n    },\n    \"mpris\": {\n      \"image-size\": 96,\n      \"image-radius\": 12\n    },\n    \"backlight\": {\n      \"label\": \"\",\n      \"device\": \"intel_backlight\",\n      \"min\": 10\n    },\n    \"backlight#KB\": {\n      \"label\": \" \",\n      \"device\": \"asus::kbd_backlight\",\n      \"subsystem\": \"leds\"\n    },\n    \"volume\": {\n      \"label\": \"\"\n    },\n    \"menubar#label\": {\n      \"menu#power-buttons\": {\n        \"label\": \"\",\n        \"position\": \"right\",\n        \"actions\": [\n          {\n            \"label\": \" Reboot\",\n            \"command\": \"systemctl reboot\"\n          },\n          {\n            \"label\": \" Lock\",\n            \"command\": \"hyprlock\"\n          },\n          {\n            \"label\": \" Logout\",\n            \"command\": \"hyprctl exit\"\n          },\n          {\n            \"label\": \" Shut down\",\n            \"command\": \"systemctl poweroff\"\n          }\n        ]\n      },\n      \"buttons#topbar-buttons\": {\n        \"position\": \"left\",\n        \"actions\": [\n          {\n            \"label\": \"\",\n            \"command\": \"grim\"\n          },\n          {\n            \"label\": \"\",\n            \"command\": \"grim\"\n          }\n        ]\n      }\n    },\n    \"buttons-grid\": {\n      \"actions\": [\n        {\n          \"label\": \"\",\n          \"command\": \"/home/martin/.dots/scripts/wifipower.sh\"\n        },\n        {\n          \"label\": \"\",\n          \"command\": \"/home/martin/.dots/scripts/blepower.sh\"\n        },\n        {\n          \"label\": \"󰒲\",\n          \"command\": \"/home/martin/.dots/scripts/sleep.sh\"\n        },\n        {\n          \"label\": \"󰚰\",\n          \"command\": \"/home/martin/.dots/scripts/update.sh\"\n        },\n        {\n          \"label\": \"\",\n          \"command\": \"/home/martin/.dots/scripts/update.sh\"\n        },\n        {\n          \"label\": \"󰚰\",\n          \"command\": \"/home/martin/.dots/scripts/update.sh\"\n        }\n      ]\n    }\n  }\n}\n"
  },
  {
    "path": "cfg/swaync/catppuccin-mocha/configSchema.json",
    "content": "{\n  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n  \"title\": \"SwayNotificationCenter JSON schema\",\n  \"type\": \"object\",\n  \"additionalProperties\": false,\n  \"properties\": {\n    \"$schema\": {\n      \"type\": \"string\",\n      \"description\": \"Pointer to the schema against which this document should be validated.\"\n    },\n    \"positionX\": {\n      \"type\": \"string\",\n      \"description\": \"Horizontal position of control center and notification window\",\n      \"default\": \"right\",\n      \"enum\": [\"right\", \"left\", \"center\"]\n    },\n    \"layer\": {\n      \"type\": \"string\",\n      \"description\": \"Layer of notification window\",\n      \"default\": \"overlay\",\n      \"enum\": [\"background\", \"bottom\", \"top\", \"overlay\"]\n    },\n    \"layer-shell\": {\n      \"type\": \"boolean\",\n      \"description\": \"Wether or not the windows should be opened as layer-shell surfaces. Note: Requires swaync restart to apply\",\n      \"default\": true\n    },\n    \"cssPriority\": {\n      \"type\": \"string\",\n      \"description\": \"Which GTK priority to use when loading the default and user CSS files. Pick \\\"user\\\" to override XDG_CONFIG_HOME/gtk-3.0/gtk.css\",\n      \"default\": \"user\",\n      \"enum\": [\"user\"]\n    },\n    \"positionY\": {\n      \"type\": \"string\",\n      \"description\": \"Vertical position of control center and notification window\",\n      \"default\": \"top\",\n      \"enum\": [\"top\", \"center\", \"bottom\"]\n    },\n    \"control-center-positionX\": {\n      \"type\": \"string\",\n      \"description\": \"Optional: Horizontal position of the control center. Supersedes positionX if not set to `none`\",\n      \"default\": \"none\",\n      \"enum\": [\"right\", \"left\", \"center\", \"none\"]\n    },\n    \"control-center-positionY\": {\n      \"type\": \"string\",\n      \"description\": \"Optional: Vertical position of the control center. Supersedes positionY if not set to `none`\",\n      \"default\": \"none\",\n      \"enum\": [\"top\", \"bottom\", \"none\"]\n    },\n    \"control-center-margin-top\": {\n      \"type\": \"integer\",\n      \"description\": \"The margin (in pixels) at the top of the control center. 0 to disable\",\n      \"default\": 0\n    },\n    \"control-center-margin-bottom\": {\n      \"type\": \"integer\",\n      \"description\": \"The margin (in pixels) at the bottom of the control center. 0 to disable\",\n      \"default\": 0\n    },\n    \"control-center-margin-right\": {\n      \"type\": \"integer\",\n      \"description\": \"The margin (in pixels) at the right of the control center. 0 to disable\",\n      \"default\": 0\n    },\n    \"control-center-margin-left\": {\n      \"type\": \"integer\",\n      \"description\": \"The margin (in pixels) at the left of the control center. 0 to disable\",\n      \"default\": 0\n    },\n    \"control-center-layer\": {\n      \"type\": \"string\",\n      \"description\": \"Layer of control center window\",\n      \"default\": \"none\",\n      \"enum\": [\"background\", \"bottom\", \"top\", \"overlay\", \"none\"]\n    },\n    \"control-center-exclusive-zone\": {\n      \"type\": \"boolean\",\n      \"description\": \"Whether or not the control center should follow the compositors exclusive zones. An example would be setting it to \\\"false\\\" to cover your panel/dock.\",\n      \"default\": true\n    },\n    \"notification-2fa-action\": {\n      \"type\": \"boolean\",\n      \"description\": \"If each notification should display a 'COPY \\\"1234\\\"' action\",\n      \"default\": true\n    },\n    \"notification-inline-replies\": {\n      \"type\": \"boolean\",\n      \"description\": \"If notifications should display a text field to reply if the sender requests it. NOTE: Replying in popup notifications is only available if the compositor supports GTK Layer-Shell ON_DEMAND keyboard interactivity.\",\n      \"default\": false\n    },\n    \"notification-icon-size\": {\n      \"type\": \"integer\",\n      \"description\": \"The notification icon size (in pixels). The app icon size is 1/3\",\n      \"default\": 64,\n      \"minimum\": 16\n    },\n    \"notification-body-image-height\": {\n      \"type\": \"integer\",\n      \"description\": \"The notification body image height (in pixels)\",\n      \"default\": 100,\n      \"minimum\": 100\n    },\n    \"notification-body-image-width\": {\n      \"type\": \"integer\",\n      \"description\": \"The notification body image width (in pixels)\",\n      \"default\": 200,\n      \"minimum\": 200\n    },\n    \"timeout\": {\n      \"type\": \"integer\",\n      \"description\": \"The notification timeout for notifications with normal priority\",\n      \"default\": 10\n    },\n    \"timeout-low\": {\n      \"type\": \"integer\",\n      \"description\": \"The notification timeout for notifications with low priority\",\n      \"default\": 5\n    },\n    \"timeout-critical\": {\n      \"type\": \"integer\",\n      \"description\": \"The notification timeout for notifications with critical priority. 0 to disable\",\n      \"default\": 0\n    },\n    \"notification-window-width\": {\n      \"type\": \"integer\",\n      \"description\": \"Width of the notification in pixels\",\n      \"default\": 500\n    },\n    \"fit-to-screen\": {\n      \"type\": \"boolean\",\n      \"description\": \"If the control center should expand to both edges of the screen\",\n      \"default\": true\n    },\n    \"relative-timestamps\": {\n      \"type\": \"boolean\",\n      \"description\": \"Display notification timestamps relative to now e.g. \\\"26 minutes ago\\\". If false, a local iso8601-formatted absolute timestamp is displayed.\",\n      \"default\": true\n    },\n    \"control-center-height\": {\n      \"type\": \"integer\",\n      \"description\": \"Height of the control center in pixels. Ignored when 'fit-to-screen' is set to 'true'\",\n      \"default\": 600,\n      \"minimum\": 300\n    },\n    \"control-center-width\": {\n      \"type\": \"integer\",\n      \"description\": \"Width of the control center in pixels\",\n      \"default\": 500,\n      \"minimum\": 300\n    },\n    \"keyboard-shortcuts\": {\n      \"type\": \"boolean\",\n      \"description\": \"If control center should use keyboard shortcuts\",\n      \"default\": true\n    },\n    \"image-visibility\": {\n      \"type\": \"string\",\n      \"description\": \"The notification image visibility when no icon is available.\",\n      \"default\": \"when-available\",\n      \"enum\": [\"always\", \"when-available\", \"never\"]\n    },\n    \"transition-time\": {\n      \"type\": \"integer\",\n      \"description\": \"The notification animation duration. 0 to disable\",\n      \"default\": 200\n    },\n    \"hide-on-clear\": {\n      \"type\": \"boolean\",\n      \"description\": \"Hides the control center after pressing \\\"Clear All\\\"\",\n      \"default\": false\n    },\n    \"hide-on-action\": {\n      \"type\": \"boolean\",\n      \"description\": \"Hides the control center when clicking on notification action\",\n      \"default\": true\n    },\n    \"script-fail-notify\": {\n      \"type\": \"boolean\",\n      \"description\": \"Sends a notification if a script fails to run\",\n      \"default\": true\n    },\n    \"scripts\": {\n      \"type\": \"object\",\n      \"description\": \"Which scripts to check and potentially run for every notification. If the notification doesn't include one of the properties, that property will be ignored. All properties (except for exec) use regex. If all properties match the given notification, the script will be run. Only the first matching script will be run.\",\n      \"minProperties\": 1,\n      \"additionalProperties\": false,\n      \"patternProperties\": {\n        \"^.{1,}$\": {\n          \"type\": \"object\",\n          \"description\": \"Your script object.\",\n          \"required\": [\"exec\"],\n          \"minProperties\": 2,\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"exec\": {\n              \"type\": \"string\",\n              \"description\": \"The script to run. Can also run regular shell commands.\"\n            },\n            \"app-name\": {\n              \"type\": \"string\",\n              \"description\": \"The app-name. Uses Regex.\"\n            },\n            \"desktop-entry\": {\n              \"type\": \"string\",\n              \"description\": \"The desktop-entry. Uses Regex.\"\n            },\n            \"summary\": {\n              \"type\": \"string\",\n              \"description\": \"The summary of the notification. Uses Regex.\"\n            },\n            \"body\": {\n              \"type\": \"string\",\n              \"description\": \"The body of the notification. Uses Regex.\"\n            },\n            \"urgency\": {\n              \"type\": \"string\",\n              \"description\": \"The urgency of the notification.\",\n              \"default\": \"Normal\",\n              \"enum\": [\"Low\", \"Normal\", \"Critical\"]\n            },\n            \"category\": {\n              \"type\": \"string\",\n              \"description\": \"Which category the notification belongs to. Uses Regex.\"\n            },\n            \"run-on\": {\n              \"type\": \"string\",\n              \"description\": \"Whether to run the script on an action being activated, or when the notification is received.\",\n              \"enum\": [\"action\", \"receive\"],\n              \"default\": \"receive\"\n            }\n          }\n        }\n      }\n    },\n    \"notification-visibility\": {\n      \"type\": \"object\",\n      \"description\": \"Set the visibility of each incoming notification. If the notification doesn't include one of the properties, that property will be ignored. All properties (except for state) use regex. If all properties match the given notification, the notification will be follow the provided state. Only the first matching object will be used.\",\n      \"minProperties\": 1,\n      \"additionalProperties\": false,\n      \"patternProperties\": {\n        \"^.{1,}$\": {\n          \"type\": \"object\",\n          \"description\": \"Your script object.\",\n          \"required\": [\"state\"],\n          \"minProperties\": 2,\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"state\": {\n              \"type\": \"string\",\n              \"description\": \"The notification visibility state.\",\n              \"default\": \"enabled\",\n              \"enum\": [\"ignored\", \"muted\", \"enabled\", \"transient\"]\n            },\n            \"app-name\": {\n              \"type\": \"string\",\n              \"description\": \"The app-name. Uses Regex.\"\n            },\n            \"desktop-entry\": {\n              \"type\": \"string\",\n              \"description\": \"The desktop-entry. Uses Regex.\"\n            },\n            \"summary\": {\n              \"type\": \"string\",\n              \"description\": \"The summary of the notification. Uses Regex.\"\n            },\n            \"body\": {\n              \"type\": \"string\",\n              \"description\": \"The body of the notification. Uses Regex.\"\n            },\n            \"urgency\": {\n              \"type\": \"string\",\n              \"description\": \"The urgency of the notification.\",\n              \"default\": \"Normal\",\n              \"enum\": [\"Low\", \"Normal\", \"Critical\"]\n            },\n            \"override-urgency\": {\n              \"type\": \"string\",\n              \"description\": \"The new urgency of the notification (optional)\",\n              \"default\": \"unset\",\n              \"enum\": [\"unset\", \"low\", \"normal\", \"critical\"]\n            },\n            \"category\": {\n              \"type\": \"string\",\n              \"description\": \"Which category the notification belongs to. Uses Regex.\"\n            }\n          }\n        }\n      }\n    },\n    \"widgets\": {\n      \"type\": \"array\",\n      \"description\": \"Which order and which widgets to display. If the \\\"notifications\\\" widget isn't specified, it will be placed at the bottom.\",\n      \"default\": [\"inhibitors\", \"title\", \"dnd\", \"notifications\"],\n      \"items\": {\n        \"type\": \"string\",\n        \"$comment\": \"Sadly can't use regex and enums at the same time. Fix in the future?\",\n        \"pattern\": \"^[a-zA-Z0-9_-]{1,}(#[a-zA-Z0-9_-]{1,}){0,1}?$\"\n      }\n    },\n    \"widget-config\": {\n      \"type\": \"object\",\n      \"description\": \"Configure specific widget properties.\",\n      \"additionalProperties\": false,\n      \"$comment\": \"New widgets go here in \\\"patternProperties\\\" ↓\",\n      \"patternProperties\": {\n        \"^title(#[a-zA-Z0-9_-]{1,}){0,1}?$\": {\n          \"$comment\": \"References the widget structure from \\\"widgets\\\" below\",\n          \"$ref\": \"#/widgets/title\"\n        },\n        \"^dnd(#[a-zA-Z0-9_-]{1,}){0,1}?$\": {\n          \"$ref\": \"#/widgets/dnd\"\n        },\n        \"^label(#[a-zA-Z0-9_-]{1,}){0,1}?$\": {\n          \"$ref\": \"#/widgets/label\"\n        },\n        \"^mpris(#[a-zA-Z0-9_-]{1,}){0,1}?$\": {\n          \"$ref\": \"#/widgets/mpris\"\n        },\n        \"^buttons-grid(#[a-zA-Z0-9_-]{1,}){0,1}?$\": {\n          \"$ref\": \"#/widgets/buttons-grid\"\n        },\n        \"^menubar(#[a-zA-Z0-9_-]{1,}){0,1}?$\": {\n          \"$ref\": \"#/widgets/menubar\"\n        },\n        \"^volume(#[a-zA-Z0-9_-]{1,}){0,1}?$\": {\n          \"$ref\": \"#/widgets/volume\"\n        },\n        \"^backlight(#[a-zA-Z0-9_-]{1,}){0,1}?$\": {\n          \"$ref\": \"#/widgets/backlight\"\n        },\n        \"^inhibitors(#[a-zA-Z0-9_-]{1,}){0,1}?$\": {\n          \"$comment\": \"References the widget structure from \\\"widgets\\\" below\",\n          \"$ref\": \"#/widgets/inhibitors\"\n        }\n      }\n    }\n  },\n  \"widgets\": {\n    \"$comment\": \"New widgets go here\",\n    \"title\": {\n      \"type\": \"object\",\n      \"description\": \"Control Center Title Widget\",\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"text\": {\n          \"type\": \"string\",\n          \"description\": \"The title of the widget\",\n          \"default\": \"Notifications\"\n        },\n        \"clear-all-button\": {\n          \"type\": \"boolean\",\n          \"description\": \"Wether to display a \\\"Clear All\\\" button\",\n          \"default\": true\n        },\n        \"button-text\": {\n          \"type\": \"string\",\n          \"description\": \"\\\"Clear All\\\" button text\",\n          \"default\": \"Clear All\"\n        }\n      }\n    },\n    \"dnd\": {\n      \"type\": \"object\",\n      \"description\": \"Control Center Do Not Disturb Widget\",\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"text\": {\n          \"type\": \"string\",\n          \"description\": \"The title of the widget\",\n          \"default\": \"Do Not Disturb\"\n        }\n      }\n    },\n    \"label\": {\n      \"type\": \"object\",\n      \"description\": \"A generic widget that allows the user to add custom text\",\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"text\": {\n          \"type\": \"string\",\n          \"description\": \"The text content of the widget\",\n          \"default\": \"Label Text\"\n        },\n        \"max-lines\": {\n          \"type\": \"integer\",\n          \"description\": \"The maximum lines\",\n          \"default\": 5\n        }\n      }\n    },\n    \"mpris\": {\n      \"type\": \"object\",\n      \"description\": \"A widget that displays multiple music players\",\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"image-size\": {\n          \"type\": \"integer\",\n          \"description\": \"The size of the album art\",\n          \"default\": 96\n        },\n        \"image-radius\": {\n          \"type\": \"integer\",\n          \"description\": \"The border radius of the album art. Will be overriden by setting the border-radius in the style.css for the \\\".widget-mpris-album-art\\\" class\",\n\n          \"default\": 12\n        },\n        \"blur\": {\n          \"type\": \"bool\",\n          \"description\": \"Appy the artwork as the MPRIS background and blur it\",\n          \"default\": true\n        }\n      }\n    },\n    \"buttons-grid\": {\n      \"type\": \"object\",\n      \"description\": \"A widget to add a grid of buttons that execute shell commands\",\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"actions\": {\n          \"type\": \"array\",\n          \"description\": \"A list of actions containing a label and a command\",\n          \"items\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"label\": {\n                \"type\": \"string\",\n                \"description\": \"Text to be displayed in button\",\n                \"default\": \"label\"\n              },\n              \"command\": {\n                \"type\": \"string\",\n                \"description\": \"Command to be executed on click\",\n                \"default\": \"\"\n              },\n              \"type\": {\n                \"type\": \"string\",\n                \"description\": \"Type of the button; toggle buttons receive the .active css class and an env variable 'SWAYNC_TOGGLE_STATE' is set. See example in the default config.json\",\n                \"default\": \"normal\",\n                \"enum\": [\"normal\", \"toggle\"]\n              },\n              \"update-command\": {\n                \"type\": \"string\",\n                \"description\": \"Command to be executed on visibility change of cc to update the active state of the toggle button (should echo true or false)\",\n                \"default\": \"\"\n              },\n              \"active\": {\n                  \"type\": \"bool\",\n                  \"description\": \"Wether the toggle button is active as default or not\",\n                  \"default\": false\n              }\n            }\n          }\n        }\n      }\n    },\n    \"menubar\": {\n      \"type\": \"object\",\n      \"description\": \"A bar that contains action-buttons and buttons to open a dropdown with action-buttons\",\n      \"additionalProperties\": false,\n      \"patternProperties\": {\n        \"^menu(#[a-zA-Z0-9_-]{1,}){0,1}?$\": {\n          \"type\": \"object\",\n          \"description\": \"A button that opens a dropdown with action-buttons\",\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"label\": {\n              \"type\": \"string\",\n              \"description\": \"Text to be displayed in button\",\n              \"default\": \"Menu\"\n            },\n            \"position\": {\n              \"type\": \"string\",\n              \"description\": \"Horizontal position of the button in the bar\",\n              \"default\": \"right\",\n              \"enum\": [\"right\", \"left\"]\n            },\n            \"animation-type\": {\n              \"type\": \"string\",\n              \"default\": \"slide_down\",\n              \"description\": \"Animation type for menu\",\n              \"enum\": [\"slide_down\", \"slide_up\", \"none\"]\n            },\n            \"animation-duration\":{\n              \"type\": \"integer\",\n              \"default\": 250,\n              \"description\": \"Duration of animation in milliseconds\"\n            },\n            \"actions\": {\n              \"$ref\" : \"#/widgets/buttons-grid/properties/actions\"\n            }\n          }\n        },\n        \"^buttons(#[a-zA-Z0-9_-]{1,}){0,1}?$\": {\n          \"type\": \"object\",\n          \"description\": \"A list of action-buttons to be displayed in the topbar\",\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"position\": {\n              \"type\": \"string\",\n              \"description\": \"Horizontal position of the button in the bar\",\n              \"default\": \"right\",\n              \"enum\": [\"right\", \"left\"]\n            },\n            \"actions\": {\n              \"$ref\" : \"#/widgets/buttons-grid/properties/actions\"\n            }\n          }\n        }\n      }\n    },\n    \"volume\": {\n      \"type\": \"object\",\n      \"description\": \"Slider to control pulse volume\",\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"label\": {\n          \"type\": \"string\",\n          \"description\": \"Text displayed in front of the volume slider\",\n          \"default\": \"Volume\"\n        },\n        \"show-per-app\": {\n          \"type\": \"boolean\",\n          \"default\": false,\n          \"description\": \"Show per app volume control\"\n        },\n        \"show-per-app-icon\": {\n          \"type\": \"boolean\",\n          \"default\": true,\n          \"description\": \"Show application icon in per app control\"\n        },\n        \"show-per-app-label\": {\n          \"type\": \"boolean\",\n          \"default\": false,\n          \"description\": \"Show application name in per app control\"\n        },\n        \"empty-list-label\": {\n          \"type\": \"string\",\n          \"default\": \"No active sink input\",\n          \"description\": \"Text displayed when there are not active sink inputs\"\n        },\n        \"expand-button-label\": {\n          \"type\": \"string\",\n          \"default\": \"⇧\",\n          \"description\": \"Label displayed on button to show per app volume control\"\n        },\n        \"collapse-button-label\": {\n          \"type\": \"string\",\n          \"default\": \"⇩\",\n          \"description\": \"Label displayed on button to hide per app volume control\"\n        },\n        \"icon-size\": {\n          \"type\": \"integer\",\n          \"default\": 24,\n          \"description\": \"Size of the application icon in per app volume control\"\n        },\n        \"animation-type\": {\n          \"type\": \"string\",\n          \"default\": \"slide_down\",\n          \"description\": \"Animation type for menu\",\n          \"enum\": [\"slide_down\", \"slide_up\", \"none\"]\n        },\n        \"animation-duration\":{\n          \"type\": \"integer\",\n          \"default\": 250,\n          \"description\": \"Duration of animation in milliseconds\"\n        }\n      }\n    },\n    \"backlight\": {\n      \"type\": \"object\",\n      \"description\": \"Slider to control monitor brightness\",\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"label\": {\n          \"type\": \"string\",\n          \"description\": \"Text displayed in front of the backlight slider\",\n          \"default\": \"Brightness\"\n        },\n        \"device\": {\n          \"type\": \"string\",\n          \"description\": \"Name of monitor (find possible devices using `ls /sys/class/backlight` or `ls /sys/class/leds`)\",\n          \"default\": \"intel_backlight\"\n        },\n        \"subsystem\": {\n          \"type\": \"string\",\n          \"description\": \"Kernel subsystem for brightness control\",\n          \"default\": \"backlight\",\n          \"enum\": [\"backlight\", \"leds\"]\n        },\n        \"min\": {\n          \"type\": \"integer\",\n          \"default\": 0,\n          \"description\": \"Lowest possible value for brightness\"\n        }\n      }\n    },\n    \"inhibitors\": {\n      \"type\": \"object\",\n      \"description\": \"Control Center Inhibitors Widget\",\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"text\": {\n          \"type\": \"string\",\n          \"description\": \"The title of the widget\",\n          \"default\": \"Inhibitors\"\n        },\n        \"clear-all-button\": {\n          \"type\": \"boolean\",\n          \"description\": \"Wether to display a \\\"Clear All\\\" button\",\n          \"default\": true\n        },\n        \"button-text\": {\n          \"type\": \"string\",\n          \"description\": \"\\\"Clear All\\\" button text\",\n          \"default\": \"Clear All\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "cfg/swaync/catppuccin-mocha/launch.sh",
    "content": "#!/usr/bin/env sh\n\n# Catppuccin-Mocha\n\nsassc $HOME/.config/swaync/style-catppuccin-mocha.scss $HOME/.config/swaync/style.css\n\nswaync-client -R\nswaync-client -rs\nswaync-client -t\n"
  },
  {
    "path": "cfg/swaync/catppuccin-mocha/style-catppuccin-mocha.scss",
    "content": "@import \"./catppuccin-mocha.scss\";\n\n.text-button:hover,\n.text-button.control-center-clear-all:hover {\n  color: $color-fg;\n  background-color: $button-bg-focus;\n  transition: linear 0.25s;\n}\n\n.notification-row {\n  outline: none;\n}\n\n.notification-row:focus,\n.notification-row:hover {\n  background: $button-bg-focus;\n}\n\n.notification-row .notification-background {\n  padding: $widget-margin $widget-margin;\n}\n\n.notification-row .notification-background .close-button {\n  /* The notification Close Button */\n  background: $grid-bg;\n  color: $text-color;\n  text-shadow: none;\n  padding: 0;\n  border-radius: 100%;\n  margin-top: $spacing;\n  margin-right: $spacing;\n  box-shadow: none;\n  border: none;\n  min-width: $font-size*1.5;\n  min-height: $font-size*1.5;\n}\n\n.notification-row .notification-background .close-button:hover {\n  box-shadow: none;\n  background: $close-button-bg;\n  transition: background 0.15s ease-in-out;\n  border: none;\n}\n\n.notification-row .notification-background .notification {\n  /* The actual notification */\n  border-radius: $radii;\n  border: $widget-border;\n  border-radius: $radii;\n  padding: 0;\n  transition: background 0.15s ease-in-out;\n  background: $widget-bg;\n}\n\n.notification-row .notification-background .notification.low {\n  /* Low Priority Notification */\n}\n\n.notification-row .notification-background .notification.normal {\n  /* Normal Priority Notification */\n}\n\n.notification-row .notification-background .notification.critical {\n  /* Critical Priority Notification */\n}\n\n.notification-row .notification-background .notification .notification-action,\n.notification-row .notification-background .notification .notification-default-action {\n  padding: 0px;\n  margin: 0;\n  box-shadow: none;\n  background: transparent;\n  border: none;\n  color: $text-color;\n  transition: background 0.15s ease-in-out;\n}\n\n.notification-row .notification-background .notification .notification-action:hover,\n.notification-row .notification-background .notification .notification-default-action:hover {\n  -gtk-icon-effect: none;\n  background: $button-bg;\n}\n\n.notification-row .notification-background .notification .notification-default-action {\n  /* The large action that also displays the notification summary and body */\n  border-radius: $radii;\n}\n\n.notification-row .notification-background .notification .notification-default-action:not(:only-child) {\n  /* When alternative actions are visible */\n  border-bottom-left-radius: 0px;\n  border-bottom-right-radius: 0px;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content {\n  background: transparent;\n  border-radius: $radii;\n  padding: $spacing;\n  padding-right: $spacing*3;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content .image {\n  /* Notification Primary Image */\n  -gtk-icon-effect: none;\n  border-radius: $radii;\n  /* Size in px */\n  margin: $spacing;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content .app-icon {\n  /* Notification app icon (only visible when the primary image is set) */\n  -gtk-icon-effect: none;\n  -gtk-icon-shadow: 0 1px 4px black;\n  margin: $spacing*2;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content .text-box .summary {\n  /* Notification summary/title */\n  font-size: 1.1em;\n  font-weight: bolder;\n  background: transparent;\n  color: $text-color;\n  text-shadow: none;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content .text-box .time {\n  /* Notification time-ago */\n  font-size: 1.1em;\n  font-weight: bolder;\n  background: transparent;\n  color: $text-color;\n  text-shadow: none;\n  margin-right: $spacing*10;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content .text-box .body {\n  /* Notification body */\n  font-size: 1.1em;\n  font-weight: normal;\n  background: transparent;\n  color: $text-color;\n  text-shadow: none;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content progressbar {\n  /* The optional notification progress bar */\n  margin-top: $spacing;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content .body-image {\n  /* The \"extra\" optional bottom notification image */\n  margin-top: $spacing;\n  background-color: $text-color;\n  border-radius: $radii;\n  -gtk-icon-effect: none;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply {\n  /* The inline reply section */\n  margin-top: $spacing;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply .inline-reply-entry {\n  background: $button-bg-darker;\n  color: $text-color;\n  caret-color: $text-color;\n  border: 1px solid $dark_1;\n  border-radius: $radii;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply .inline-reply-button {\n  margin-left: $spacing;\n  background: $grid-bg;\n  border: 1px solid $dark_1;\n  border-radius: $radii;\n  color: $text-color;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply .inline-reply-button:disabled {\n  background: initial;\n  color: $text-color-disabled;\n  border: 1px solid $dark_1;\n  border-color: transparent;\n}\n\n.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply .inline-reply-button:hover {\n  background: $button-bg;\n}\n\n.notification-row .notification-background .notification .notification-action {\n  /* The alternative actions below the default action */\n  border-top: 1px solid $dark_1;\n  border-radius: 0px;\n  border-right: 1px solid $dark_1;\n}\n\n.notification-row .notification-background .notification .notification-action:first-child {\n  /* add bottom border radius to eliminate clipping */\n  border-bottom-left-radius: $radii;\n}\n\n.notification-row .notification-background .notification .notification-action:last-child {\n  border-bottom-right-radius: $radii;\n  border-right: none;\n}\n\n.notification-group {\n  /* Styling only for Grouped Notifications */\n}\n\n.notification-group.low {\n  /* Low Priority Group */\n}\n\n.notification-group.normal {\n  /* Low Priority Group */\n}\n\n.notification-group.critical {\n  /* Low Priority Group */\n}\n\n.notification-group .notification-group-buttons,\n.notification-group .notification-group-headers {\n  margin: 0 16px;\n  color: $text-color;\n}\n\n.notification-group .notification-group-headers {\n  /* Notification Group Headers */\n}\n\n.notification-group .notification-group-headers .notification-group-icon {\n  color: $text-color;\n}\n\n.notification-group .notification-group-headers .notification-group-header {\n  color: $text-color;\n}\n\n.notification-group .notification-group-buttons {\n  /* Notification Group Buttons */\n}\n\n.notification-group.collapsed .notification-row .notification {\n  background-color: $button-bg;\n}\n\n.notification-group.collapsed .notification-row:not(:last-child) {\n  /* Top notification in stack */\n  /* Set lower stacked notifications opacity to 0 */\n}\n\n.notification-group.collapsed .notification-row:not(:last-child) .notification-action,\n.notification-group.collapsed .notification-row:not(:last-child) .notification-default-action {\n  opacity: 0;\n}\n\n.notification-group.collapsed:hover .notification-row:not(:only-child) .notification {\n  background-color: $button-bg;\n}\n\n.control-center {\n  /* The Control Center which contains the old notifications + widgets */\n  background: $widget-bg;\n  color: $text-color;\n  margin: $widget-margin;\n  border: $widget-border;\n  border-radius: $widget-radii;\n}\n\n.control-center .control-center-list-placeholder {\n  /* The placeholder when there are no notifications */\n  opacity: 0.5;\n}\n\n.control-center .control-center-list {\n  /* List of notifications */\n  background: transparent;\n}\n\n.control-center .control-center-list .notification {\n  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.7), 0 2px 6px 2px rgba(0, 0, 0, 0.3);\n}\n\n.control-center .control-center-list .notification .notification-default-action,\n.control-center .control-center-list .notification .notification-action {\n  transition: opacity 400ms ease-in-out, background 0.15s ease-in-out;\n}\n\n.control-center .control-center-list .notification .notification-default-action:hover,\n.control-center .control-center-list .notification .notification-action:hover {\n  background-color: $button-bg;\n}\n\n.blank-window {\n  /* Window behind control center and on all other monitors */\n  background: transparent;\n}\n\n.floating-notifications {\n  background: transparent;\n}\n\n.floating-notifications .notification {\n  box-shadow: none;\n}\n\n/*** Widgets ***/\n/* Title widget */\n.widget-title {\n  color: $text-color;\n  margin: $widget-margin;\n  font-size: 1.5rem;\n}\n\n.widget-title>button {\n  font-size: initial;\n  color: $text-color;\n  text-shadow: none;\n  background: $button-bg;\n  border: 1px solid $dark_1;\n  box-shadow: none;\n  border-radius: $radii;\n}\n\n.widget-title>button:hover {\n  background: $button-bg;\n}\n\n/* DND widget */\n.widget-dnd {\n  color: $text-color;\n  margin: $widget-margin;\n  font-size: 1.1rem;\n}\n\n.widget-dnd>switch {\n  font-size: initial;\n  border-radius: $radii;\n  background: $grid-bg;\n  border: 1px solid $dark_1;\n  box-shadow: none;\n}\n\n.widget-dnd>switch:checked {\n  background: $bg-selected;\n  color: white;\n}\n\n.widget-dnd>switch slider {\n  background: $button-bg;\n  border-radius: $radii;\n}\n\n/* Label widget */\n.widget-label {\n  margin: $widget-margin;\n  margin-left: $widget-margin*2;\n}\n\n.widget-label>label {\n  font-weight: bold;\n  font-size: 1.5em;\n}\n\n/* Mpris widget */\n$mpris-album-art-overlay: rgba(0, 0, 0, 0.55);\n$mpris-button-hover: rgba(0, 0, 0, 0.50);\n\n.widget-mpris {\n  /* The parent to all players */\n}\n\n.widget-mpris .widget-mpris-player {\n  padding: $widget-padding;\n  margin: $widget-margin $widget-margin;\n  background-color: $mpris-album-art-overlay;\n  border-radius: $widget-radii;\n  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.75);\n}\n\n.widget-mpris .widget-mpris-player button:hover {\n  /* The media player buttons (play, pause, next, etc...) */\n  background: $button-bg;\n}\n\n.widget-mpris .widget-mpris-player .widget-mpris-album-art {\n  border-radius: $radii;\n  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.75);\n}\n\n.widget-mpris .widget-mpris-player .widget-mpris-title {\n  font-weight: bold;\n  font-size: 1.25rem;\n}\n\n.widget-mpris .widget-mpris-player .widget-mpris-subtitle {\n  font-size: 1.1rem;\n}\n\n.widget-mpris .widget-mpris-player>box>button {\n  /* Change player control buttons */\n}\n\n.widget-mpris .widget-mpris-player>box>button:hover {\n  background-color: $mpris-button-hover;\n}\n\n.widget-mpris>box>button {\n  /* Change player side buttons */\n}\n\n.widget-mpris>box>button:disabled {\n  /* Change player side buttons insensitive */\n}\n\n/* Buttons widget */\n.widget-buttons-grid {\n  padding: $widget-padding;\n  margin: $widget-margin;\n  border-radius: $widget-radii;\n  background-color: $grid-bg;\n}\n\n.widget-buttons-grid>flowbox>flowboxchild>button {\n  background: $button-bg;\n  border-radius: $radii;\n}\n\n.widget-buttons-grid>flowbox>flowboxchild>button.toggle:checked {\n  /* style given to the active toggle button */\n}\n\n/* Menubar widget */\n.widget-menubar>box>.menu-button-bar>button {\n  border: none;\n  background: transparent;\n}\n\n/* .AnyName { Name defined in config after #\n  background-color: $noti-bg;\n  padding: 8px;\n  margin: 8px;\n  border-radius: 12px;\n}\n\n.AnyName>button {\n  background: transparent;\n  border: none;\n}\n\n.AnyName>button:hover {\n  background-color: $noti-bg-hover;\n} */\n.topbar-buttons>button {\n  /* Name defined in config after # */\n  border: none;\n  background: transparent;\n}\n\n/* Volume widget */\n.widget-volume,\n.widget-backlight {\n  background-color: $grid-bg;\n  padding: $widget-padding;\n  padding-left: $widget-padding*2;\n  margin: $widget-margin;\n  margin-left: $widget-margin;\n  margin-right: $widget-margin;\n  border-radius: $widget-radii;\n}\n\n.widget-volume {\n  margin-top: 0;\n  margin-bottom: 0;\n  border-bottom-left-radius: 0;\n  border-bottom-right-radius: 0;\n}\n\n.widget-backlight {\n  margin-top: 0;\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n}\n\n.widget-volume>box>button {\n  background: transparent;\n  border: none;\n}\n\n.per-app-volume {\n  padding: 4px 8px 8px 8px;\n  margin: 0px 8px 8px 8px;\n  border-radius: $radii;\n}\n\n/* Inhibitors widget */\n.widget-inhibitors {\n  margin: $widget-margin;\n  font-size: 1.5rem;\n}\n\n.widget-inhibitors>button {\n  font-size: initial;\n  color: $text-color;\n  text-shadow: none;\n  background: $grid-bg;\n  border: 1px solid $dark_1;\n  box-shadow: none;\n  border-radius: $radii;\n}\n\n.widget-inhibitors>button:hover {\n  background: $button-bg;\n}\n"
  },
  {
    "path": "cfg/themes/adwaita.scss",
    "content": "// When color definition differs for dark and light variant\n// it gets @if ed depending on $variant\n\n$variant: 'dark';\n\n$font-size: 13pt;\n\n$blue: #3584e4;\n$green: #33d17a;\n$yellow: #f6d32d;\n$orange: #ff7800;\n$red: #e01b24;\n$purple: #9141ac;\n$brown: #986a44;\n$dark_1: #77767b;\n$dark_3 :#3d3846;\n\n$radii: 10px;\n$widget-radii: $radii*2.5;\n$spacing: 3px;\n$border: solid 2px;\n$widget-margin: $spacing*4;\n$widget-padding: $spacing*3; \n\n$bar-bg: #171717;\n$widget-bg: #171717;\n$grid-bg: lighten(#171717, 7%);\n$button-bg: lighten(#171717, 15%);\n$button-bg-darker: #171717;\n$button-bg-focus: #9A9A9A;\n$close-button-bg:#666666; \n$widget-border: $border $dark_1;\n$color-fg: #171717;\n\n$text-color-disabled: #000000;\n\n$bg-selected: $blue;\n\n\n$base_color: if($variant == 'light', #ffffff, lighten(desaturate(#241f31, 100%), 2%));\n$text_color: if($variant == 'light', black, white);\n$bg_color: if($variant == 'light', #f6f5f4, darken(desaturate(#3d3846, 100%), 4%));\n$fg_color: if($variant == 'light', #2e3436, #eeeeec);\n\n$selected_fg_color: #ffffff;\n$selected_bg_color: if($variant == 'light', #3584e4, darken(#3584e4, 20%));\n$selected_borders_color: if($variant== 'light', darken($selected_bg_color, 15%), darken($selected_bg_color, 30%));\n$borders_color: if($variant == 'light', darken($bg_color, 18%), darken($bg_color, 10%));\n$alt_borders_color: if($variant == 'light', darken($bg_color, 24%), darken($bg_color, 18%));\n$borders_edge: if($variant == 'light', transparentize(white, 0.2), transparentize($fg_color, 0.93));\n$link_color: if($variant == 'light', darken($selected_bg_color, 10%), lighten($selected_bg_color, 20%));\n$link_visited_color: if($variant == 'light', darken($selected_bg_color, 20%), lighten($selected_bg_color, 10%));\n$top_hilight: $borders_edge;\n$dark_fill: mix($borders_color, $bg_color, 50%);\n$headerbar_color: if($variant == 'light', lighten($bg_color, 5%), darken($bg_color, 3%));\n$menu_color: if($variant == 'light', $base_color, mix($bg_color, $base_color, 20%));\n$popover_bg_color: $bg_color;\n$popover_hover_color: lighten($bg_color, 5%);\n\n$scrollbar_bg_color: if($variant == 'light', mix($bg_color, $fg_color, 80%), mix($base_color, $bg_color, 50%));\n$scrollbar_slider_color: mix($fg_color, $bg_color, 60%);\n$scrollbar_slider_hover_color: mix($fg_color, $bg_color, 80%);\n$scrollbar_slider_active_color: if($variant=='light', darken($selected_bg_color, 10%), lighten($selected_bg_color, 10%));\n\n$warning_color: #f57900;\n$error_color: #cc0000;\n$success_color: if($variant == 'light', #33d17a, darken(#33d17a, 10%));\n$destructive_color: if($variant == 'light', #e01b24, darken(#e01b24, 10%));\n\n$osd_fg_color: #eeeeec;\n$osd_text_color: white;\n$osd_bg_color: if($variant == 'light', transparentize(darken(desaturate(#3d3846, 100%), 4%),0.1), transparentize(darken(desaturate(#3d3846, 100%), 10%),0.1));\n$osd_insensitive_bg_color: transparentize(mix($osd_fg_color, opacify($osd_bg_color, 1), 10%), 0.5);\n$osd_insensitive_fg_color: mix($osd_fg_color, opacify($osd_bg_color, 1), 50%);\n$osd_borders_color: transparentize(black, 0.3);\n\n$sidebar_bg_color: mix($bg_color, $base_color, 50%);\n$base_hover_color: transparentize($fg_color, 0.95);\n\n$tooltip_borders_color: transparentize(white, 0.9);\n$shadow_color: transparentize(black, 0.9);\n\n$drop_target_color: #4e9a06;\n\n//insensitive state derived colors\n$insensitive_fg_color: mix($fg_color, $bg_color, 50%);\n$insensitive_bg_color: mix($bg_color, $base_color, 60%);\n$insensitive_borders_color: $borders_color;\n\n//colors for the backdrop state, derived from the main colors.\n$backdrop_base_color: if($variant == 'light', darken($base_color, 1%), lighten($base_color, 1%));\n$backdrop_text_color: mix($text_color, $backdrop_base_color, 80%);\n$backdrop_bg_color: $bg_color;\n$backdrop_fg_color: mix($fg_color, $backdrop_bg_color, 50%);\n$backdrop_insensitive_color: if($variant == 'light', darken($backdrop_bg_color, 15%), lighten($backdrop_bg_color, 15%));\n$backdrop_selected_fg_color: if($variant == 'light', $backdrop_base_color, $backdrop_text_color);\n$backdrop_borders_color: mix($borders_color, $bg_color, 80%);\n$backdrop_dark_fill: mix($backdrop_borders_color, $backdrop_bg_color, 35%);\n$backdrop_sidebar_bg_color: mix($backdrop_bg_color, $backdrop_base_color, 50%);\n\n$backdrop_scrollbar_bg_color: darken($backdrop_bg_color, 3%);\n$backdrop_scrollbar_slider_color: mix($backdrop_fg_color, $backdrop_bg_color, 40%);\n\n$backdrop_menu_color: if($variant == 'light', $backdrop_base_color, mix($backdrop_bg_color, $backdrop_base_color, 20%));\n\n//special cased widget colors\n$suggested_bg_color: $selected_bg_color;\n$suggested_border_color: $selected_borders_color;\n$progress_bg_color: $selected_bg_color;\n$progress_border_color: $selected_borders_color;\n$checkradio_bg_color: if($variant == 'light', $selected_bg_color, lighten($selected_bg_color,10%));\n$checkradio_fg_color: $selected_fg_color;\n$checkradio_borders_color: if($variant == 'light', darken($checkradio_bg_color,20%), darken($checkradio_bg_color,40%));\n"
  },
  {
    "path": "cfg/themes/catppuccin-mocha.scss",
    "content": "$variant: \"dark\";\n\n$font-size: 13pt;\n\n$orange: #ff7800;\n$purple: #9141ac;\n$brown: #986a44;\n$dark_1: #77767b;\n$dark_3: #3d3846;\n$blue: #89b4fa;\n$lavender: #b4befe;\n$sapphire: #74c7ec;\n$sky: #89dceb;\n$teal: #94e2d5;\n$green: #a6e3a1;\n$yellow: #f9e2af;\n$peach: #fab387;\n$maroon: #eba0ac;\n$red: #f38ba8;\n$mauve: #cba6f7;\n$pink: #f5c2e7;\n$flamingo: #f2cdcd;\n$rosewater: #f5e0dc;\n\n$base: #1e1e2e;\n$mantle: #181825;\n$crust: #11111b;\n\n$text: #cdd6f4;\n$subtext0: #a6adc8;\n$subtext1: #bac2de;\n\n$surface0: #313244;\n$surface1: #45475a;\n$surface2: #585b70;\n\n$overlay0: #6c7086;\n$overlay1: #7f849c;\n$overlay2: #9399b2;\n\n$radii: 10px;\n$widget-radii: $radii*2.5;\n$spacing: 3px;\n$border: solid 2px;\n$widget-margin: $spacing*4;\n$widget-padding: $spacing*3;\n\n$bar-bg: $crust;\n$widget-bg: $crust;\n$grid-bg: lighten($crust, 7%);\n$button-bg: lighten($crust, 15%);\n$button-bg-darker: $crust;\n$button-bg-focus: $overlay2;\n$close-button-bg: $overlay2;\n$widget-border: $border $blue;\n$color-fg: $crust;\n\n$text-color-disabled: #000000;\n\n$bg-selected: $blue;\n\n$selected-bg-color: $overlay2;\n\n\n$base_color: if($variant =='light', #ffffff, lighten(desaturate(#241f31, 100%), 2%));\n$text_color: if($variant =='light', black, white);\n$bg_color: if($variant =='light', #f6f5f4, darken(desaturate(#3d3846, 100%), 4%));\n$fg_color: if($variant =='light', #2e3436, #eeeeec);\n"
  },
  {
    "path": "cfg/themeswitcher/config.jsonc",
    "content": "{\n  \"title\": \"ThemeSwitcher\",\n  \"name\": \"Rocco Rakete\",\n  \"menus\": [\n    {\n      \"name\": \"Waybar Themes\",\n      \"options\": [\n        \"Catppuccin-Mocha - docked bar - color buttons\",\n        \"Catppuccin-Mocha - docked bar - flat butons\",\n        \"Catppuccin-Mocha - docked bar\",\n        \"Adwaita-dark - floating bar\"\n      ],\n      \"commands\": [\n        [\n          \"sh -c \\\"rm -rf ~/.config/waybar/*\\\"\",\n          \"sh -c \\\"cp -r ~/.dots/cfg/waybar/scripts/ ~/.config/waybar/\\\"\",\n          \"sh -c \\\"cp ~/.dots/cfg/waybar/catppuccin-mocha-docked-color-buttons/* ~/.config/waybar/\\\"\",\n          \"sh -c \\\"cp ~/.dots/cfg/themes/catppuccin-mocha.scss ~/.config/waybar/catppuccin-mocha.scss\\\"\"\n        ],\n        [\n          \"sh -c \\\"rm -rf ~/.config/waybar/*\\\"\",\n          \"sh -c \\\"cp -r ~/.dots/cfg/waybar/scripts/ ~/.config/waybar/\\\"\",\n          \"sh -c \\\"cp ~/.dots/cfg/waybar/catppuccin-mocha-docked-flat-buttons/* ~/.config/waybar/\\\"\",\n          \"sh -c \\\"cp ~/.dots/cfg/themes/catppuccin-mocha.scss ~/.config/waybar/catppuccin-mocha.scss\\\"\"\n        ],\n        [\n          \"sh -c \\\"rm -rf ~/.config/waybar/*\\\"\",\n          \"sh -c \\\"cp -r ~/.dots/cfg/waybar/scripts/ ~/.config/waybar/\\\"\",\n          \"sh -c \\\"cp ~/.dots/cfg/waybar/catppuccin-mocha-docked/* ~/.config/waybar/\\\"\",\n          \"sh -c \\\"cp ~/.dots/cfg/themes/catppuccin-mocha.scss ~/.config/waybar/catppuccin-mocha.scss\\\"\"\n        ],\n        [\n          \"sh -c \\\"rm -rf ~/.config/waybar/*\\\"\",\n          \"sh -c \\\"cp -r ~/.dots/cfg/waybar/scripts/ ~/.config/waybar/\\\"\",\n          \"sh -c \\\"cp ~/.dots/cfg/waybar/adwaita-dark/* ~/.config/waybar/\\\"\",\n          \"sh -c \\\"cp ~/.dots/cfg/themes/adwaita.scss ~/.config/waybar/adwaita.scss\\\"\"\n        ]\n      ]\n    },\n    {\n      \"name\": \"Anyrun Themes\",\n      \"options\": [\n        \"Catppuccin-Mocha\",\n        \"Adwaita-dark\"\n      ],\n      \"commands\": [\n        [\n          \"sh -c \\\"rm -rf ~/.config/anyrun/*\\\"\",\n          \"sh -c \\\"cp -r ~/.dots/cfg/anyrun/plugins/ ~/.config/anyrun/\\\"\",\n          \"sh -c \\\"cp ~/.dots/cfg/anyrun/catppuccin-mocha/* ~/.config/anyrun/\\\"\",\n          \"sh -c \\\"cp ~/.dots/cfg/themes/catppuccin-mocha.scss ~/.config/anyrun/catppuccin-mocha.scss\\\"\"\n        ],\n        [\n          \"sh -c \\\"rm -rf ~/.config/anyrun/*\\\"\",\n          \"sh -c \\\"cp -r ~/.dots/cfg/anyrun/plugins/ ~/.config/anyrun/\\\"\",\n          \"sh -c \\\"cp ~/.dots/cfg/anyrun/adwaita-dark/* ~/.config/anyrun/\\\"\",\n          \"sh -c \\\"cp ~/.dots/cfg/themes/adwaita.scss ~/.config/anyrun/adwaita.scss\\\"\"\n        ]\n      ]\n    },\n    {\n      \"name\": \"Walker Themes\",\n      \"options\": [\n        \"Catppuccin-Mocha\"\n      ],\n      \"commands\": [\n        [\n          \"sh -c \\\"rm -rf ~/.config/walker/*\\\"\",\n          \"sh -c \\\"cp -r ~/.dots/cfg/walker/plugins/ ~/.config/walker/\\\"\",\n          \"sh -c \\\"cp ~/.dots/cfg/walker/catppuccin-mocha/* ~/.config/walker/\\\"\",\n          \"sh -c \\\"cp ~/.dots/cfg/themes/catppuccin-mocha.scss ~/.config/walker/catppuccin-mocha.scss\\\"\"\n        ]\n      ]\n    },\n    {\n      \"name\": \"SwayNC Themes\",\n      \"options\": [\n        \"Catppuccin-Mocha\",\n        \"Adwaita-dark\"\n      ],\n      \"commands\": [\n        [\n          \"sh -c \\\"rm -rf ~/.config/swaync/*\\\"\",\n          \"sh -c \\\"cp ~/.dots/cfg/swaync/catppuccin-mocha/* ~/.config/swaync/\\\"\",\n          \"sh -c \\\"cp ~/.dots/cfg/themes/catppuccin-mocha.scss ~/.config/swaync/catppuccin-mocha.scss\\\"\"\n        ],\n        [\n          \"sh -c \\\"rm -rf ~/.config/swaync/*\\\"\",\n          \"sh -c \\\"cp ~/.dots/cfg/swaync/adwaita-dark/* ~/.config/swaync/\\\"\",\n          \"sh -c \\\"cp ~/.dots/cfg/themes/adwaita.scss ~/.config/swaync/adwaita.scss\\\"\"\n        ]\n      ]\n    },\n    {\n      \"name\": \"Hyprland Themes\",\n      \"options\": [\n        \"Catppuccin-Mocha\",\n        \"Adwaita-dark\"\n      ],\n      \"commands\": [\n        [\n          \"sh -c \\\"cp ~/.dots/cfg/hypr/catppuccin-mocha/* ~/.config/hypr/\\\"\"\n        ],\n        [\n          \"sh -c \\\"cp ~/.dots/cfg/hypr/adwaita-dark/* ~/.config/hypr/\\\"\"\n        ]\n      ]\n    }\n  ]\n}\n"
  },
  {
    "path": "cfg/themeswitcher/styles.css",
    "content": ".menu-label {\n  font-size: 1.2em;\n  font-weight: bolder;\n  padding-left: 20px;\n  padding-right: 20px;\n}\n\n.menu-dropdown {\n  padding: 10px;\n  padding-left: 20px;\n  padding-right: 20px;\n}\n\n.title-label {\n  padding: 10px;\n  font-size: 2em;\n  font-weight: bolder;\n  background-color: #11111B;\n}\n\n.menu-bar {\n  padding-top: 10px;\n  margin: 0;\n  background-color: #11111B;\n}\n"
  },
  {
    "path": "cfg/walker/catppuccin-mocha/config.json",
    "content": "{\n\t\"activation_mode\": {\n\t\t\"disabled\": false,\n\t\t\"use_alt\": false\n\t},\n\t\"align\": {\n\t\t\"anchors\": {\n\t\t\t\"bottom\": false,\n\t\t\t\"left\": false,\n\t\t\t\"right\": false,\n\t\t\t\"top\": false\n\t\t},\n\t\t\"horizontal\": \"center\",\n\t\t\"ignore_exlusive\": true,\n\t\t\"margins\": {\n\t\t\t\"bottom\": 0,\n\t\t\t\"end\": 0,\n\t\t\t\"start\": 0,\n\t\t\t\"top\": 0\n\t\t},\n\t\t\"vertical\": \"center\",\n\t\t\"width\": 500\n\t},\n\t\"clipboard\": {\n\t\t\"image_height\": 300,\n\t\t\"max_entries\": 10\n\t},\n\t\"enable_typeahead\": false,\n\t\"fullscreen\": false,\n\t\"icons\": {\n\t\t\"hide\": false,\n\t\t\"image_height\": 200,\n\t\t\"size\": 32\n\t},\n\t\"ignore_mouse\": false,\n\t\"keep_open\": false,\n\t\"list\": {\n\t\t\"always_show\": true,\n\t\t\"height\": 400,\n\t\t\"hide_sub\": false,\n\t\t\"margin_top\": 10\n\t},\n\t\"modules\": [{\n\t\t\"name\": \"runner\",\n\t\t\"prefix\": \"\"\n\t}, {\n\t\t\"name\": \"applications\",\n\t\t\"prefix\": \"\"\n\t}, {\n\t\t\"name\": \"ssh\",\n\t\t\"prefix\": \"\",\n\t\t\"switcher_exclusive\": true\n\t}, {\n\t\t\"name\": \"finder\",\n\t\t\"prefix\": \"\",\n\t\t\"switcher_exclusive\": true\n\t}, {\n\t\t\"name\": \"commands\",\n\t\t\"prefix\": \"\",\n\t\t\"switcher_exclusive\": true\n\t}, {\n\t\t\"name\": \"websearch\",\n\t\t\"prefix\": \"?\"\n\t}, {\n\t\t\"name\": \"switcher\",\n\t\t\"prefix\": \"/\"\n\t}],\n\t\"orientation\": \"vertical\",\n\t\"placeholder\": \"Search...\",\n\t\"runner\": {\n\t\t\"excludes\": [\n\t\t\t\"rm\"\n\t\t]\n\t},\n\t\"scrollbar_policy\": \"automatic\",\n\t\"search\": {\n\t\t\"delay\": 0,\n\t\t\"hide_icons\": false,\n\t\t\"hide_spinner\": true,\n\t\t\"margin_spinner\": 10\n\t},\n\t\"show_initial_entries\": true,\n\t\"ssh_host_file\": \"\"\n}\n"
  },
  {
    "path": "cfg/walker/catppuccin-mocha/launch.sh",
    "content": "#!/usr/bin/env sh\n\n# Catppuccin-Mocha\n\nsassc $HOME/.config/walker/style-catppuccin-mocha.scss $HOME/.config/walker/style.css\n\nwalker\n"
  },
  {
    "path": "cfg/walker/catppuccin-mocha/style-catppuccin-mocha.scss",
    "content": "@import \"./catppuccin-mocha.scss\";\n\n* {\n  font-weight: bolder;\n}\n\n#window {\n  border-radius: $widget-radii;\n  border: $widget-border;\n}\n\n#box {\n  padding: $widget-padding*1.5;\n}\n\n#searchwrapper {}\n\n#search,\n#typeahead {\n  outline: none;\n  outline-width: 0px;\n  box-shadow: none;\n  border-bottom: none;\n  border: none;\n  padding-left: $widget-padding;\n  padding-right: $widget-padding;\n  padding-top: 0px;\n  padding-bottom: 0px;\n  border-radius: $radii/3;\n}\n\n#typeahead {\n  background: none;\n  opacity: 0.5;\n}\n\n#search placeholder {\n  opacity: 0.5;\n}\n\n#list {}\n\nrow:selected {\n  border-radius: $radii;\n  background-color: transparentize($color: $text, $amount: 0.75);\n  color: black;\n}\n\n.item {\n  padding: $spacing;\n  border-radius: 2px;\n}\n\n.icon {\n  padding-right: $spacing;\n}\n\n.textwrapper {}\n\n.label {}\n\n.sub {\n  opacity: 0.5;\n}\n\n.activationlabel {\n  opacity: 0.25;\n}\n\n.activation .activationlabel {\n  opacity: 1;\n  color: $green;\n}\n\n.activation .textwrapper,\n.activation .icon,\n.activation .search {\n  opacity: 0.5;\n}\n\n#search {\n  border-radius: $radii;\n}\n"
  },
  {
    "path": "cfg/waybar/adwaita-dark/adwaita-colored-buttons.scss",
    "content": "@import \"./adwaita.scss\";\n\n#cpu,\n#memory,\n#temperature,\n#backlight {\n  background-color: transparentize($color: $blue, $amount: 0.3);\n  color: $color-fg;\n}\n\n#battery {\n  background-color: transparentize($color: $red, $amount: 0.3);\n  color: $color-fg;\n}\n\n#tray {\n  background-color: transparentize($color: $yellow, $amount: 0.3);\n}\n\n#network,\n#pulseaudio,\n#bluetooth,\n#custom-notification {\n  background-color: transparentize($color: $purple, $amount: 0.3);\n  color: $color-fg;\n}\n\n#custom-power {\n  background-color: transparentize($color: $green, $amount: 0.3);\n}\n"
  },
  {
    "path": "cfg/waybar/adwaita-dark/config.jsonc",
    "content": "{\n  \"spacing\": 0,\n  \"margin-left\": 10,\n  \"margin-right\": 10,\n  \"margin-top\": 10,\n  //\"margin-left\": 0,\n  //\"margin-right\": 0,\n  //\"margin-top\": 0,\n  \"layer\": \"top\",\n  \"reload_style_on_change\": true,\n  \"modules-left\": [\n    \"image\",\n    \"hyprland/workspaces\"\n  ],\n  \"modules-center\": [\n    \"clock\"\n  ],\n  \"modules-right\": [\n    \"cpu\",\n    \"memory\",\n    \"temperature\",\n    \"backlight\",\n    \"battery\",\n    \"tray\",\n    \"network\",\n    \"bluetooth\",\n    \"pulseaudio\",\n    \"custom/notification\",\n    \"custom/power\"\n  ],\n  \"image\": {\n    \"path\": \"/home/martin/Dokumente/Backgrounds/nixos.png\",\n    \"size\": 20,\n    \"interval\": 86400, // once every day\n    \"on-click\": \"mpc toggle\"\n  },\n  \"hyprland/workspaces\": {\n    \"format\": \"{icon}\",\n    \"tooltip\": false,\n    \"all-outputs\": false,\n    \"current-only\": true,\n    \"sort-by-number\": true,\n    \"persistent-workspaces\": {\n      \"1\": \"\",\n      \"2\": \"\",\n      \"3\": \"\",\n      \"4\": \"\",\n      \"5\": \"\",\n      \"6\": \"\",\n      \"7\": \"\",\n      \"8\": \"\",\n      \"9\": \"\",\n      \"10\": \"\"\n    },\n    \"format-icons\": {\n      \"1\": \"\",\n      \"2\": \"\",\n      \"3\": \"\",\n      \"4\": \"\",\n      \"5\": \"\",\n      \"6\": \"\",\n      \"7\": \"\",\n      \"8\": \"\",\n      \"9\": \"\",\n      \"10\": \"\",\n      \"active\": \"\",\n      \"default\": \"\"\n    }\n  },\n  \"clock\": {\n    \"format\": \"{:%H:%M}\",\n    \"tooltip-format\": \"<big>{:%Y %B}</big>\\n<tt><small>{calendar}</small></tt>\",\n    \"format-alt\": \"{:%d.%m.%y - %H:%M}\"\n  },\n  \"cpu\": {\n    \"format\": \"{icon}\",\n    \"format-icons\": [\n      \"󰝦\",\n      \"󰪞\",\n      \"󰪟\",\n      \"󰪠\",\n      \"󰪡\",\n      \"󰪢\",\n      \"󰪣\",\n      \"󰪤\",\n      \"󰪥\"\n    ],\n    \"tooltip\": false,\n    \"interval\": 1\n  },\n  \"memory\": {\n    \"tooltip\": false,\n    \"format\": \"󰆼{used:.1f} GiB\"\n  },\n  \"temperature\": {\n    \"tooltip\": false,\n    \"thermal-zone\": 6,\n    \"critical-threshold\": 90,\n    \"format\": \"{temperatureC}°C\",\n    \"interval\": 1\n  },\n  \"backlight\": {\n    \"tooltip\": false,\n    \"format\": \"{icon}{percent}%\",\n    \"format-icons\": [\n      \"\",\n      \"\",\n      \"\",\n      \"\",\n      \"\",\n      \"\",\n      \"\",\n      \"\",\n      \"\"\n    ]\n  },\n  \"battery\": {\n    \"states\": {\n      \"warning\": 30,\n      \"critical\": 15\n    },\n    \"format\": \"{icon}\",\n    \"format-full\": \"<span foreground=\\\"#2A995C\\\">󱐥</span>\",\n    \"format-charging\": \"<span foreground=\\\"#2A995C\\\">󱐋</span>{capacity}%\",\n    \"format-plugged\": \"󱐋{capacity}%\",\n    \"format-alt\": \"{icon} {capacity}%\",\n    \"format-icons\": [\n      \" \",\n      \" \",\n      \" \",\n      \" \",\n      \" \"\n    ],\n    \"interval\": 1\n  },\n  \"tray\": {\n    \"spacing\": 6\n  },\n  \"network\": {\n    \"format-wifi\": \"\",\n    \"format-ethernet\": \"󰈀\",\n    \"tooltip-format\": \"{ifname} ({ipaddr}) via {gwaddr} at\\n{essid}\",\n    \"format-linked\": \"{ifname} (No IP) \",\n    \"format-disconnected\": \"󰖪\",\n    \"on-click\": \"swaync-client -t -sw\"\n  },\n  \"bluetooth\": {\n    \"format\": \"\",\n    \"format-disabled\": \"󰂲\",\n    \"format-connected\": \"󰂱\",\n    \"tooltip-format\": \"{controller_alias}\\t{controller_address}\",\n    \"tooltip-format-connected\": \"{controller_alias}\\t{controller_address}\\n\\n{device_enumerate}\",\n    \"tooltip-format-enumerate-connected\": \"{device_alias}\\t{device_address}\",\n    \"on-click\": \"swaync-client -t -sw\"\n  },\n  \"pulseaudio\": {\n    // \"scroll-step\": 1, // %, can be a float\n    \"format\": \"{icon} {format_source}\",\n    \"format-bluetooth\": \"{icon} {format_source}\",\n    \"format-bluetooth-muted\": \" {icon} {format_source}\",\n    \"format-muted\": \"󰸈 {format_source}\",\n    \"format-source\": \"\",\n    \"format-source-muted\": \"\",\n    \"format-icons\": {\n      \"headphone\": \"\",\n      \"hands-free\": \"\",\n      \"headset\": \"\",\n      \"phone\": \"\",\n      \"portable\": \"\",\n      \"car\": \"\",\n      \"default\": [\n        \"\",\n        \"\",\n        \"\"\n      ]\n    },\n    \"on-click\": \"swaync-client -t -sw\",\n    \"on-click-right\": \"pavucontrol\"\n  },\n  \"custom/notification\": {\n    \"tooltip\": false,\n    \"format\": \"{icon}\",\n    \"format-icons\": {\n      \"notification\": \"󰂟\",\n      \"none\": \"\",\n      \"dnd-notification\": \"󰺁\",\n      \"dnd-none\": \"\",\n      \"inhibited-notification\": \"󰂟\",\n      \"inhibited-none\": \"\",\n      \"dnd-inhibited-notification\": \"󰺁\",\n      \"dnd-inhibited-none\": \"\"\n    },\n    \"return-type\": \"json\",\n    \"exec-if\": \"which swaync-client\",\n    \"exec\": \"swaync-client -swb\",\n    \"on-click\": \"swaync-client -t -sw\",\n    \"on-click-right\": \"swaync-client -d -sw\",\n    \"escape\": true\n  },\n  \"custom/power\": {\n    \"format\": \"\",\n    \"on-click\": \"wlogout -b 5 -c 0 -r 0 -T 0 -B 0\",\n    \"interval\": 86400, // once every day\n    \"tooltip\": true\n  }\n}\n"
  },
  {
    "path": "cfg/waybar/adwaita-dark/launch.sh",
    "content": "#!/usr/bin/env sh\n\n# Adwaita-Dark\n\nis_swww_daemon_running() {\n    if pgrep -x \"swww-daemon\" > /dev/null\n    then\n        return 0\n    else\n\texec swww-daemon &\n        return 1\n    fi\n}\n\n# wait for the swww-daemon\nwhile ! is_swww_daemon_running; do\n    echo \"wait for swww-daemon\"\n    sleep 1\ndone\n\nswww img ~/.config/backgrounds/minimal_landscape.jpg \n\npkill waybar\n\nsassc $HOME/.config/waybar/style-adwaita.scss $HOME/.config/waybar/style.css\n\nwaybar\n"
  },
  {
    "path": "cfg/waybar/adwaita-dark/style-adwaita.scss",
    "content": "@import \"./adwaita.scss\";\n@import \"./adwaita-colored-buttons.scss\";\n\n* {\n  padding: 0;\n  margin: 0;\n  font-weight: bolder;\n}\n\nwindow#waybar {\n  font-size: $font-size;\n  background: $bar-bg;\n  border-radius: $radii;\n  box-shadow:\n    inset -2px -2px 5px 1px (transparentize($color: #000000, $amount: 0.6)),\n    2px 2px 5px 1px transparentize($color: #000000, $amount: 0.6) inset;\n}\n\n#cpu,\n#memory,\n#temperature,\n#backlight,\n#network,\n#bluetooth,\n#pulseaudio,\n#custom-notification {\n  padding-left: $spacing;\n  padding-right: $spacing;\n  margin-top: $spacing;\n  margin-bottom: $spacing;\n}\n\n#cpu,\n#network {\n  padding-left: $spacing*2;\n  border-top-left-radius: $radii/2;\n  border-bottom-left-radius: $radii/2;\n}\n\n#backlight,\n#custom-notification {\n  margin-right: $spacing*2;\n  padding-right: $spacing*2;\n  border-top-right-radius: $radii/2;\n  border-bottom-right-radius: $radii/2;\n}\n\n#cpu {\n  font-size: 1.1em;\n  font-weight: bolder;\n  color: $orange;\n  transition: 400ms;\n  animation: ws_normal 20s ease-out 10;\n}\n\n#bluetooth.connected {\n  font-size: 1.15em;\n  color: darken($color: $blue, $amount: 10);\n}\n\n#pulseaudio {\n  padding-left: 0;\n}\n\n#image,\n#workspaces,\n#clock,\n#battery,\n#tray,\n#custom-power {\n  padding-left: $spacing;\n  padding-right: $spacing;\n  margin-top: $spacing;\n  margin-bottom: $spacing;\n  margin-right: $spacing*2;\n  border-radius: $radii/2;\n}\n\n#workspaces button {\n  font-size: 0;\n  min-width: $font-size*0.85;\n  min-height: $font-size*0.85;\n  margin: $spacing*1.5;\n  border-radius: $spacing*10;\n  background-color: $fg_color;\n  transition: 100ms;\n  animation: ws_normal 20s ease-out 10;\n}\n\n#workspaces button.empty {\n  background-color: $dark_1;\n}\n\n#workspaces button.active {\n  min-width: $font-size*2;\n  background-color: $selected_bg_color;\n  transition: 100ms;\n}\n\n#battery.full {\n  font-size: 1.15em;\n}\n\n#custom-power {\n  color: $red;\n  margin-right: $spacing;\n  border-top-right-radius: $radii;\n  border-bottom-right-radius: $radii;\n}\n\n.modules-left {\n  margin-left: $spacing;\n}\n"
  },
  {
    "path": "cfg/waybar/catppuccin-mocha-docked/config.jsonc",
    "content": "{\n\t\"spacing\": 0,\n\t\"margin-left\": 0,\n\t\"margin-right\": 0,\n\t\"margin-top\": 0,\n\t\"layer\": \"top\",\n\t\"reload_style_on_change\": true,\n\t\"modules-left\": [\n\t\t\"image\",\n\t\t\"hyprland/workspaces\"\n\t],\n\t\"modules-center\": [\n\t\t\"clock\",\n\t\t\"custom/weather\"\n\t],\n\t\"modules-right\": [\n\t\t\"network#speed\",\n\t\t\"memory\",\n\t\t\"temperature\",\n\t\t\"cpu\",\n\t\t\"backlight\",\n\t\t\"battery\",\n\t\t\"tray\",\n\t\t\"network\",\n\t\t\"bluetooth\",\n\t\t\"pulseaudio\",\n\t\t\"custom/notification\",\n\t\t\"custom/power\"\n\t],\n\t\"image\": {\n\t\t\"path\": \"/home/martin/Dokumente/Backgrounds/nixos.png\",\n\t\t\"size\": 23,\n\t\t\"interval\": 86400, // once every day\n\t\t\"on-click\": \"mpc toggle\"\n\t},\n\t\"hyprland/workspaces\": {\n\t\t\"format\": \"{icon}\",\n\t\t\"tooltip\": false,\n\t\t\"all-outputs\": false,\n\t\t\"current-only\": true,\n\t\t\"sort-by-number\": true,\n\t\t\"persistent-workspaces\": {\n\t\t\t\"1\": \"\",\n\t\t\t\"2\": \"\",\n\t\t\t\"3\": \"\",\n\t\t\t\"4\": \"\",\n\t\t\t\"5\": \"\",\n\t\t\t\"6\": \"\",\n\t\t\t\"7\": \"\",\n\t\t\t\"8\": \"\",\n\t\t\t\"9\": \"\",\n\t\t\t\"10\": \"\"\n\t\t},\n\t\t\"format-icons\": {\n\t\t\t\"1\": \"\",\n\t\t\t\"2\": \"\",\n\t\t\t\"3\": \"\",\n\t\t\t\"4\": \"\",\n\t\t\t\"5\": \"\",\n\t\t\t\"6\": \"\",\n\t\t\t\"7\": \"\",\n\t\t\t\"8\": \"\",\n\t\t\t\"9\": \"\",\n\t\t\t\"10\": \"\",\n\t\t\t\"active\": \"\",\n\t\t\t\"default\": \"\"\n\t\t}\n\t},\n\t\"clock\": {\n\t\t\"format\": \"{:%a. <span rise=\\\"1.5pt\\\">|</span> %H:%M <span rise=\\\"1.5pt\\\">|</span>}\",\n\t\t\"tooltip-format\": \"<big>{:%Y %B}</big>\\n<tt><small>{calendar}</small></tt>\",\n\t\t\"format-alt\": \"{:%d.%m.%y - %H:%M}\"\n\t},\n\t\"custom/weather\": {\n\t\t\"exec\": \"${HOME}/.config/waybar/scripts/get_weather.sh\",\n\t\t\"return-type\": \"json\",\n\t\t\"format\": \"{}\",\n\t\t\"tooltip\": true,\n\t\t\"interval\": 900\n\t},\n\t\"cpu\": {\n\t\t\"format\": \"{icon}\",\n\t\t\"format-icons\": [\n\t\t\t\"󰝦\",\n\t\t\t\"󰪞\",\n\t\t\t\"󰪟\",\n\t\t\t\"󰪠\",\n\t\t\t\"󰪡\",\n\t\t\t\"󰪢\",\n\t\t\t\"󰪣\",\n\t\t\t\"󰪤\",\n\t\t\t\"󰪥\"\n\t\t],\n\t\t\"tooltip\": false,\n\t\t\"interval\": 1\n\t},\n\t\"memory\": {\n\t\t\"tooltip\": false,\n\t\t\"format\": \"󰆼{used:.1f} GiB\"\n\t},\n\t\"temperature\": {\n\t\t\"tooltip\": false,\n\t\t\"thermal-zone\": 6,\n\t\t\"critical-threshold\": 90,\n\t\t\"format\": \"{temperatureC}°C\",\n\t\t\"interval\": 1\n\t},\n\t\"backlight\": {\n\t\t\"tooltip\": false,\n\t\t\"format\": \"{icon}{percent}%\",\n\t\t\"format-icons\": [\n\t\t\t\"\",\n\t\t\t\"\",\n\t\t\t\"\",\n\t\t\t\"\",\n\t\t\t\"\",\n\t\t\t\"\",\n\t\t\t\"\",\n\t\t\t\"\",\n\t\t\t\"\"\n\t\t]\n\t},\n\t\"battery\": {\n\t\t\"states\": {\n\t\t\t\"warning\": 30,\n\t\t\t\"critical\": 15,\n\t\t\t\"full-at\": 98\n\t\t},\n\t\t\"format\": \"{icon}\",\n\t\t\"format-full\": \"<span foreground=\\\"#2A995C\\\">󱐥</span>\",\n\t\t\"format-charging\": \"<span foreground=\\\"#2A995C\\\">󱐋</span>{capacity}%\",\n\t\t\"format-plugged\": \"<span foreground=\\\"#2A995C\\\">󱐋</span>{capacity}%\",\n\t\t\"format-alt\": \"{icon} {capacity}%\",\n\t\t\"format-icons\": [\n\t\t\t\"<span foreground=\\\"#f38ba8\\\"></span> \",\n\t\t\t\"<span foreground=\\\"#eba0ac\\\"></span> \",\n\t\t\t\"<span foreground=\\\"#fab387\\\"></span> \",\n\t\t\t\"<span foreground=\\\"#f9e2af\\\"></span> \",\n\t\t\t\"<span foreground=\\\"#a6e3a1\\\"></span> \"\n\t\t],\n\t\t\"interval\": 1\n\t},\n\t\"tray\": {\n\t\t\"spacing\": 6\n\t},\n\t\"network\": {\n\t\t\"format-wifi\": \"\",\n\t\t\"format-ethernet\": \"󰈀\",\n\t\t\"tooltip-format\": \"{ifname} ({ipaddr}) via {gwaddr} at\\n{essid}\",\n\t\t\"format-linked\": \"{ifname} (No IP) \",\n\t\t\"format-disconnected\": \"󰖪\",\n\t\t\"on-click\": \"swaync-client -t -sw\"\n\t},\n\t\"network#speed\": {\n\t\t\"format\": \"<span line_height=\\\"0.75\\\" size=\\\"9pt\\\"> {bandwidthUpBytes}\\n {bandwidthDownBytes}</span>\",\n\t\t\"interval\": 1\n\t},\n\t\"bluetooth\": {\n\t\t\"format\": \"\",\n\t\t\"format-disabled\": \"󰂲\",\n\t\t\"format-connected\": \"󰂱\",\n\t\t\"tooltip-format\": \"{controller_alias}\\t{controller_address}\",\n\t\t\"tooltip-format-connected\": \"{controller_alias}\\t{controller_address}\\n\\n{device_enumerate}\",\n\t\t\"tooltip-format-enumerate-connected\": \"{device_alias}\\t{device_address}\",\n\t\t\"on-click\": \"swaync-client -t -sw\"\n\t},\n\t\"pulseaudio\": {\n\t\t// \"scroll-step\": 1, // %, can be a float\n\t\t\"format\": \"{icon} {format_source}\",\n\t\t\"format-bluetooth\": \"{icon} {format_source}\",\n\t\t\"format-bluetooth-muted\": \" {icon} {format_source}\",\n\t\t\"format-muted\": \"󰸈 {format_source}\",\n\t\t\"format-source\": \"\",\n\t\t\"format-source-muted\": \"\",\n\t\t\"format-icons\": {\n\t\t\t\"headphone\": \"\",\n\t\t\t\"hands-free\": \"\",\n\t\t\t\"headset\": \"\",\n\t\t\t\"phone\": \"\",\n\t\t\t\"portable\": \"\",\n\t\t\t\"car\": \"\",\n\t\t\t\"default\": [\n\t\t\t\t\"\",\n\t\t\t\t\"\",\n\t\t\t\t\" \"\n\t\t\t]\n\t\t},\n\t\t\"on-click\": \"swaync-client -t -sw\",\n\t\t\"on-click-right\": \"pavucontrol\"\n\t},\n\t\"custom/notification\": {\n\t\t\"tooltip\": false,\n\t\t\"format\": \"{icon}\",\n\t\t\"format-icons\": {\n\t\t\t\"notification\": \"󰂟\",\n\t\t\t\"none\": \"\",\n\t\t\t\"dnd-notification\": \"󰺁\",\n\t\t\t\"dnd-none\": \"\",\n\t\t\t\"inhibited-notification\": \"󰂟\",\n\t\t\t\"inhibited-none\": \"\",\n\t\t\t\"dnd-inhibited-notification\": \"󰺁\",\n\t\t\t\"dnd-inhibited-none\": \"\"\n\t\t},\n\t\t\"return-type\": \"json\",\n\t\t\"exec-if\": \"which swaync-client\",\n\t\t\"exec\": \"swaync-client -swb\",\n\t\t\"on-click\": \"swaync-client -t -sw\",\n\t\t\"on-click-right\": \"swaync-client -d -sw\",\n\t\t\"escape\": true\n\t},\n\t\"custom/power\": {\n\t\t\"format\": \"\",\n\t\t\"on-click\": \"wlogout -b 5 -c 0 -r 0 -T 0 -B 0\",\n\t\t\"interval\": 86400, // once every day\n\t\t\"tooltip\": true\n\t}\n}\n"
  },
  {
    "path": "cfg/waybar/catppuccin-mocha-docked/launch.sh",
    "content": "#!/usr/bin/env sh\n\n# Catppuccin-Mocha\n\nis_swww_daemon_running() {\n    if pgrep -x \"swww-daemon\" > /dev/null\n    then\n        return 0\n    else\n\texec swww-daemon &\n        return 1\n    fi\n}\n\n# wait for the swww-daemon\nwhile ! is_swww_daemon_running; do\n    echo \"wait for swww-daemon\"\n    sleep 1\ndone\n\nswww img ~/.config/backgrounds/mocha-mountains.png \n\npkill waybar\n\nsassc $HOME/.config/waybar/style-catppuccin-mocha.scss $HOME/.config/waybar/style.css\n\nwaybar\n"
  },
  {
    "path": "cfg/waybar/catppuccin-mocha-docked/style-catppuccin-mocha.scss",
    "content": "@import \"./catppuccin-mocha.scss\";\n\n* {\n  padding: 0;\n  margin: 0;\n  font-weight: bolder;\n}\n\nwindow#waybar {\n  font-size: $font-size;\n  /*border-radius: $radii;\n   */\n  background: transparentize($color: $bar-bg, $amount: 0.2);\n}\n\n#clock,\n#custom-weather,\n#cpu,\n#memory,\n#temperature,\n#backlight,\n#network,\n#network.speed,\n#bluetooth,\n#pulseaudio,\n#custom-notification {\n  padding-left: $spacing;\n  padding-right: $spacing;\n  margin-top: $spacing * 1.5;\n  margin-bottom: $spacing * 1.5;\n}\n\n#clock,\n#network {\n  padding-left: $spacing * 2;\n  border-top-left-radius: $radii/2;\n  border-bottom-left-radius: $radii/2;\n}\n\n#custom-weather,\n#backlight,\n#custom-notification {\n  margin-right: $spacing * 2;\n  padding-right: $spacing * 2;\n  border-top-right-radius: $radii/2;\n  border-bottom-right-radius: $radii/2;\n}\n\n#cpu {\n  font-size: 1.1em;\n  font-weight: bolder;\n  color: $peach;\n  transition: 400ms;\n  animation: ws_normal 20s ease-out 10;\n}\n\n#bluetooth.connected {\n  font-size: 1.15em;\n  color: darken($color: $blue, $amount: 10);\n}\n\n#pulseaudio {\n  padding-left: 0;\n}\n\n#image,\n#workspaces,\n#battery,\n#tray,\n#custom-power {\n  padding-left: $spacing * 1.5;\n  padding-right: $spacing * 1.5;\n  margin-top: $spacing * 1.5;\n  margin-bottom: $spacing * 1.5;\n  margin-right: $spacing * 2;\n  border-radius: $radii/2;\n}\n\n#workspaces {\n  padding-left: 0;\n}\n\n#workspaces button {\n  font-size: 0;\n  min-width: $font-size * 1;\n  min-height: $font-size * 1;\n  margin: $spacing * 1.5;\n  margin-top: $spacing * 1.5;\n  margin-bottom: $spacing * 1.5;\n  border-radius: $spacing * 10;\n  background-color: $fg_color;\n  transition: 100ms;\n  animation: ws_normal 20s ease-out 10;\n}\n\n#workspaces button.empty {\n  background-color: $dark_1;\n}\n\n#workspaces button.active {\n  min-width: $font-size * 2.2;\n  background-color: darken($color: $blue, $amount: 5);\n  transition: 100ms;\n}\n\n#battery.full {\n  font-size: 1.15em;\n}\n\n#custom-power {\n  color: darken($color: $red, $amount: 10);\n  margin-right: $spacing * 1.5;\n}\n\n.modules-left {\n  margin-left: $spacing;\n}\n"
  },
  {
    "path": "cfg/waybar/catppuccin-mocha-docked-color-buttons/catppuccin-mocha-colored-buttons.scss",
    "content": "@import \"./catppuccin-mocha.scss\";\n\n#cpu,\n#memory,\n#temperature,\n#backlight {\n  background-color: darken($color: $blue, $amount: 5);\n  color: $color-fg;\n}\n\n#battery {\n  background-color: darken($color: $teal, $amount: 5);\n  color: $color-fg;\n}\n\n#tray {\n  background-color: darken($color: $lavender, $amount: 0);\n}\n\n#network,\n#pulseaudio,\n#bluetooth,\n#custom-notification {\n  background-color: darken($color: $mauve, $amount: 15);\n  color: $color-fg;\n}\n\n#custom-power {\n  background-color: darken($color: $green, $amount: 40);\n}\n"
  },
  {
    "path": "cfg/waybar/catppuccin-mocha-docked-color-buttons/config.jsonc",
    "content": "{\n  \"spacing\": 0,\n  //\"margin-left\": 10,\n  //\"margin-right\": 10,\n  //\"margin-top\": 10,\n  \"margin-left\": 0,\n  \"margin-right\": 0,\n  \"margin-top\": 0,\n  \"layer\": \"top\",\n  \"reload_style_on_change\": true,\n  \"modules-left\": [\n    \"image\",\n    \"hyprland/workspaces\"\n  ],\n  \"modules-center\": [\n    \"clock\"\n  ],\n  \"modules-right\": [\n    \"cpu\",\n    \"memory\",\n    \"temperature\",\n    \"backlight\",\n    \"battery\",\n    \"tray\",\n    \"network\",\n    \"bluetooth\",\n    \"pulseaudio\",\n    \"custom/notification\",\n    \"custom/power\"\n  ],\n  \"image\": {\n    \"path\": \"/home/martin/Dokumente/Backgrounds/nixos.png\",\n    \"size\": 20,\n    \"interval\": 86400, // once every day\n    \"on-click\": \"mpc toggle\"\n  },\n  \"hyprland/workspaces\": {\n    \"format\": \"{icon}\",\n    \"tooltip\": false,\n    \"all-outputs\": false,\n    \"current-only\": true,\n    \"sort-by-number\": true,\n    \"persistent-workspaces\": {\n      \"1\": \"\",\n      \"2\": \"\",\n      \"3\": \"\",\n      \"4\": \"\",\n      \"5\": \"\",\n      \"6\": \"\",\n      \"7\": \"\",\n      \"8\": \"\",\n      \"9\": \"\",\n      \"10\": \"\"\n    },\n    \"format-icons\": {\n      \"1\": \"\",\n      \"2\": \"\",\n      \"3\": \"\",\n      \"4\": \"\",\n      \"5\": \"\",\n      \"6\": \"\",\n      \"7\": \"\",\n      \"8\": \"\",\n      \"9\": \"\",\n      \"10\": \"\",\n      \"active\": \"\",\n      \"default\": \"\"\n    }\n  },\n  \"clock\": {\n    \"format\": \"{:%H:%M}\",\n    \"tooltip-format\": \"<big>{:%Y %B}</big>\\n<tt><small>{calendar}</small></tt>\",\n    \"format-alt\": \"{:%d.%m.%y - %H:%M}\"\n  },\n  \"cpu\": {\n    \"format\": \"{icon}\",\n    \"format-icons\": [\n      \"󰝦\",\n      \"󰪞\",\n      \"󰪟\",\n      \"󰪠\",\n      \"󰪡\",\n      \"󰪢\",\n      \"󰪣\",\n      \"󰪤\",\n      \"󰪥\"\n    ],\n    \"tooltip\": false,\n    \"interval\": 1\n  },\n  \"memory\": {\n    \"tooltip\": false,\n    \"format\": \"󰆼{used:.1f} GiB\"\n  },\n  \"temperature\": {\n    \"tooltip\": false,\n    \"thermal-zone\": 6,\n    \"critical-threshold\": 90,\n    \"format\": \"{temperatureC}°C\",\n    \"interval\": 1\n  },\n  \"backlight\": {\n    \"tooltip\": false,\n    \"format\": \"{icon}{percent}%\",\n    \"format-icons\": [\n      \"\",\n      \"\",\n      \"\",\n      \"\",\n      \"\",\n      \"\",\n      \"\",\n      \"\",\n      \"\"\n    ]\n  },\n  \"battery\": {\n    \"states\": {\n      \"warning\": 30,\n      \"critical\": 15\n    },\n    \"format\": \"{icon}\",\n    \"format-full\": \"<span foreground=\\\"#2A995C\\\">󱐥</span>\",\n    \"format-charging\": \"<span foreground=\\\"#2A995C\\\">󱐋</span>{capacity}%\",\n    \"format-plugged\": \"󱐋{capacity}%\",\n    \"format-alt\": \"{icon} {capacity}%\",\n    \"format-icons\": [\n      \" \",\n      \" \",\n      \" \",\n      \" \",\n      \" \"\n    ],\n    \"interval\": 1\n  },\n  \"tray\": {\n    \"spacing\": 6\n  },\n  \"network\": {\n    \"format-wifi\": \"\",\n    \"format-ethernet\": \"󰈀\",\n    \"tooltip-format\": \"{ifname} ({ipaddr}) via {gwaddr} at\\n{essid}\",\n    \"format-linked\": \"{ifname} (No IP) \",\n    \"format-disconnected\": \"󰖪\",\n    \"on-click\": \"swaync-client -t -sw\"\n  },\n  \"bluetooth\": {\n    \"format\": \"\",\n    \"format-disabled\": \"󰂲\",\n    \"format-connected\": \"󰂱\",\n    \"tooltip-format\": \"{controller_alias}\\t{controller_address}\",\n    \"tooltip-format-connected\": \"{controller_alias}\\t{controller_address}\\n\\n{device_enumerate}\",\n    \"tooltip-format-enumerate-connected\": \"{device_alias}\\t{device_address}\",\n    \"on-click\": \"swaync-client -t -sw\"\n  },\n  \"pulseaudio\": {\n    // \"scroll-step\": 1, // %, can be a float\n    \"format\": \"{icon} {format_source}\",\n    \"format-bluetooth\": \"{icon} {format_source}\",\n    \"format-bluetooth-muted\": \" {icon} {format_source}\",\n    \"format-muted\": \"󰸈 {format_source}\",\n    \"format-source\": \"\",\n    \"format-source-muted\": \"\",\n    \"format-icons\": {\n      \"headphone\": \"\",\n      \"hands-free\": \"\",\n      \"headset\": \"\",\n      \"phone\": \"\",\n      \"portable\": \"\",\n      \"car\": \"\",\n      \"default\": [\n        \"\",\n        \"\",\n        \"\"\n      ]\n    },\n    \"on-click\": \"swaync-client -t -sw\",\n    \"on-click-right\": \"pavucontrol\"\n  },\n  \"custom/notification\": {\n    \"tooltip\": false,\n    \"format\": \"{icon}\",\n    \"format-icons\": {\n      \"notification\": \"󰂟\",\n      \"none\": \"\",\n      \"dnd-notification\": \"󰺁\",\n      \"dnd-none\": \"\",\n      \"inhibited-notification\": \"󰂟\",\n      \"inhibited-none\": \"\",\n      \"dnd-inhibited-notification\": \"󰺁\",\n      \"dnd-inhibited-none\": \"\"\n    },\n    \"return-type\": \"json\",\n    \"exec-if\": \"which swaync-client\",\n    \"exec\": \"swaync-client -swb\",\n    \"on-click\": \"swaync-client -t -sw\",\n    \"on-click-right\": \"swaync-client -d -sw\",\n    \"escape\": true\n  },\n  \"custom/power\": {\n    \"format\": \"\",\n    \"on-click\": \"wlogout -b 5 -c 0 -r 0 -T 0 -B 0\",\n    \"interval\": 86400, // once every day\n    \"tooltip\": true\n  }\n}\n"
  },
  {
    "path": "cfg/waybar/catppuccin-mocha-docked-color-buttons/launch.sh",
    "content": "#!/usr/bin/env sh\n\n# Catppuccin-Mocha\n\nis_swww_daemon_running() {\n    if pgrep -x \"swww-daemon\" > /dev/null\n    then\n        return 0\n    else\n\texec swww-daemon &\n        return 1\n    fi\n}\n\n# wait for the swww-daemon\nwhile ! is_swww_daemon_running; do\n    echo \"wait for swww-daemon\"\n    sleep 1\ndone\n\nswww img ~/.config/backgrounds/mocha-mountains.png \n\npkill waybar\n\nsassc $HOME/.config/waybar/style-catppuccin-mocha.scss $HOME/.config/waybar/style.css\n\nwaybar\n"
  },
  {
    "path": "cfg/waybar/catppuccin-mocha-docked-color-buttons/style-catppuccin-mocha.scss",
    "content": "@import \"./catppuccin-mocha.scss\";\n@import \"./catppuccin-mocha-colored-buttons.scss\";\n\n* {\n  padding: 0;\n  margin: 0;\n  font-weight: bolder;\n}\n\nwindow#waybar {\n  font-size: $font-size;\n  /*border-radius: $radii;\n  */\n  background: transparentize($color: $bar-bg, $amount: 0.2);\n\n}\n\n#cpu,\n#memory,\n#temperature,\n#backlight,\n#network,\n#bluetooth,\n#pulseaudio,\n#custom-notification {\n  padding-left: $spacing;\n  padding-right: $spacing;\n  margin-top: $spacing*1.5;\n  margin-bottom: $spacing*1.5;\n}\n\n#cpu,\n#network {\n  padding-left: $spacing*2;\n  border-top-left-radius: $radii/2;\n  border-bottom-left-radius: $radii/2;\n}\n\n#backlight,\n#custom-notification {\n  margin-right: $spacing*2;\n  padding-right: $spacing*2;\n  border-top-right-radius: $radii/2;\n  border-bottom-right-radius: $radii/2;\n}\n\n#cpu {\n  font-size: 1.1em;\n  font-weight: bolder;\n  color: $peach;\n  transition: 400ms;\n  animation: ws_normal 20s ease-out 10;\n}\n\n#bluetooth.connected {\n  font-size: 1.15em;\n  color: darken($color: $blue, $amount: 10);\n}\n\n#pulseaudio {\n  padding-left: 0;\n}\n\n#image,\n#workspaces,\n#clock,\n#battery,\n#tray,\n#custom-power {\n  padding-left: $spacing;\n  padding-right: $spacing;\n  margin-top: $spacing*1.5;\n  margin-bottom: $spacing*1.5;\n  margin-right: $spacing*2.0;\n  border-radius: $radii/2;\n}\n\n#workspaces button {\n  font-size: 0;\n  min-width: $font-size*0.85;\n  min-height: $font-size*0.85;\n  margin: $spacing*1.5;\n  margin-top: $spacing*1.5;\n  margin-bottom: $spacing*1.5;\n  border-radius: $spacing*10;\n  background-color: $fg_color;\n  transition: 100ms;\n  animation: ws_normal 20s ease-out 10;\n}\n\n#workspaces button.empty {\n  background-color: $dark_1;\n}\n\n#workspaces button.active {\n  min-width: $font-size*2;\n  background-color: darken($color: $blue, $amount: 5);\n  transition: 100ms;\n}\n\n#battery.full {\n  font-size: 1.15em;\n}\n\n#custom-power {\n  color: darken($color: $red, $amount: 10);\n  margin-right: $spacing*1.5;\n  /*border-top-right-radius: $radii;\n  border-bottom-right-radius: $radii;\n*/\n}\n\n.modules-left {\n  margin-left: $spacing;\n}\n"
  },
  {
    "path": "cfg/waybar/catppuccin-mocha-docked-flat-buttons/catppuccin-mocha-flat-buttons.scss",
    "content": "@import \"./catppuccin-mocha.scss\";\n\n#cpu,\n#memory,\n#temperature,\n#backlight,\n#battery,\n#tray,\n#network,\n#pulseaudio,\n#bluetooth,\n#custom-notification,\n#custom-power,\n#clock,\n#custom-weather {\n  background-color: transparentize($color: $text, $amount: 0.75);\n  color: $color-fg;\n}\n"
  },
  {
    "path": "cfg/waybar/catppuccin-mocha-docked-flat-buttons/config.jsonc",
    "content": "{\n\t\"spacing\": 0,\n\t\"margin-left\": 0,\n\t\"margin-right\": 0,\n\t\"margin-top\": 0,\n\t\"layer\": \"bottom\",\n\t\"reload_style_on_change\": true,\n\t\"modules-left\": [\n\t\t\"image\",\n\t\t\"hyprland/workspaces\"\n\t],\n\t\"modules-center\": [\n\t\t\"clock\"\n\t\t//\"custom/weather\"\n\t],\n\t\"modules-right\": [\n\t\t\"network#speed\",\n\t\t\"memory\",\n\t\t\"temperature\",\n\t\t\"cpu\",\n\t\t\"backlight\",\n\t\t\"battery\",\n\t\t\"tray\",\n\t\t\"network\",\n\t\t\"bluetooth\",\n\t\t\"pulseaudio\",\n\t\t\"custom/notification\",\n\t\t\"custom/power\"\n\t],\n\t\"image\": {\n\t\t\"path\": \"/home/martin/Dokumente/Backgrounds/nixos.png\",\n\t\t\"size\": 23,\n\t\t\"interval\": 86400, // once every day\n\t\t\"on-click\": \"mpc toggle\"\n\t},\n\t\"hyprland/workspaces\": {\n\t\t\"format\": \"{icon}\",\n\t\t\"tooltip\": false,\n\t\t\"all-outputs\": false,\n\t\t\"current-only\": true,\n\t\t\"sort-by-number\": true,\n\t\t\"persistent-workspaces\": {\n\t\t\t\"1\": \"\",\n\t\t\t\"2\": \"\",\n\t\t\t\"3\": \"\",\n\t\t\t\"4\": \"\",\n\t\t\t\"5\": \"\",\n\t\t\t\"6\": \"\",\n\t\t\t\"7\": \"\",\n\t\t\t\"8\": \"\",\n\t\t\t\"9\": \"\",\n\t\t\t\"10\": \"\"\n\t\t},\n\t\t\"format-icons\": {\n\t\t\t\"1\": \"\",\n\t\t\t\"2\": \"\",\n\t\t\t\"3\": \"\",\n\t\t\t\"4\": \"\",\n\t\t\t\"5\": \"\",\n\t\t\t\"6\": \"\",\n\t\t\t\"7\": \"\",\n\t\t\t\"8\": \"\",\n\t\t\t\"9\": \"\",\n\t\t\t\"10\": \"\",\n\t\t\t\"active\": \"\",\n\t\t\t\"default\": \"\"\n\t\t}\n\t},\n\t\"clock\": {\n\t\t\"format\": \"{:%a. <span rise=\\\"1.5pt\\\">|</span> %H:%M<span rise=\\\"1.5pt\\\"></span>}\",\n\t\t\"tooltip-format\": \"<big>{:%Y %B}</big>\\n<tt><small>{calendar}</small></tt>\",\n\t\t\"format-alt\": \"{:%a. %d.%m.%y <span rise=\\\"1.5pt\\\">|</span> %H:%M <span rise=\\\"1.5pt\\\">|</span>}\"\n\t},\n\t\"custom/weather\": {\n\t\t\"exec\": \"${HOME}/.config/waybar/scripts/get_weather.sh\",\n\t\t\"return-type\": \"json\",\n\t\t\"format\": \"{}\",\n\t\t\"tooltip\": true,\n\t\t\"interval\": 900\n\t},\n\t\"cpu\": {\n\t\t\"format\": \"{icon}\",\n\t\t\"format-icons\": [\n\t\t\t\"󰝦\",\n\t\t\t\"󰪞\",\n\t\t\t\"󰪟\",\n\t\t\t\"󰪠\",\n\t\t\t\"󰪡\",\n\t\t\t\"󰪢\",\n\t\t\t\"󰪣\",\n\t\t\t\"󰪤\",\n\t\t\t\"󰪥\"\n\t\t],\n\t\t\"tooltip\": false,\n\t\t\"interval\": 1\n\t},\n\t\"memory\": {\n\t\t\"tooltip\": false,\n\t\t\"format\": \"  {used:.1f} GiB\"\n\t},\n\t\"temperature\": {\n\t\t\"tooltip\": false,\n\t\t\"thermal-zone\": 6,\n\t\t\"critical-threshold\": 90,\n\t\t\"format\": \"{temperatureC}°C\",\n\t\t\"interval\": 1\n\t},\n\t\"backlight\": {\n\t\t\"tooltip\": false,\n\t\t\"format\": \"{icon}{percent}%\",\n\t\t\"format-icons\": [\n\t\t\t\"\",\n\t\t\t\"\",\n\t\t\t\"\",\n\t\t\t\"\",\n\t\t\t\"\",\n\t\t\t\"\",\n\t\t\t\"\",\n\t\t\t\"\",\n\t\t\t\"\"\n\t\t]\n\t},\n\t\"battery\": {\n\t\t\"states\": {\n\t\t\t\"warning\": 30,\n\t\t\t\"critical\": 15,\n\t\t\t\"full-at\": 98\n\t\t},\n\t\t\"format\": \"{icon}\",\n\t\t\"format-full\": \"<span foreground=\\\"#2A995C\\\">󱐥</span>\",\n\t\t\"format-charging\": \"<span foreground=\\\"#2A995C\\\">󱐋</span>{capacity}%\",\n\t\t\"format-plugged\": \"<span foreground=\\\"#2A995C\\\">󱐋</span>{capacity}%\",\n\t\t\"format-alt\": \"{icon} {capacity}%\",\n\t\t\"format-icons\": [\n\t\t\t\"<span foreground=\\\"#f38ba8\\\">󰂎</span>\",\n\t\t\t\"<span foreground=\\\"#f38ba8\\\">󰁺</span>\",\n\t\t\t\"<span foreground=\\\"#fab387\\\">󰁻</span>\",\n\t\t\t\"<span foreground=\\\"#fab387\\\">󰁼</span>\",\n\t\t\t\"<span foreground=\\\"#f9e2af\\\">󰁽</span>\",\n\t\t\t\"<span foreground=\\\"#f9e2af\\\">󰁾</span>\",\n\t\t\t\"<span foreground=\\\"#f9e2af\\\">󰁿</span>\",\n\t\t\t\"<span foreground=\\\"#a6e3a1\\\">󰂀</span>\",\n\t\t\t\"<span foreground=\\\"#a6e3a1\\\">󰂁</span>\",\n\t\t\t\"<span foreground=\\\"#a6e3a1\\\">󰂂</span>\",\n\t\t\t\"<span foreground=\\\"#a6e3a1\\\">󰁹</span>\"\n\t\t],\n\t\t\"interval\": 1\n\t},\n\t\"tray\": {\n\t\t\"spacing\": 6\n\t},\n\t\"network\": {\n\t\t\"format-wifi\": \"\",\n\t\t\"format-ethernet\": \"󰈀\",\n\t\t\"tooltip-format\": \"{ifname} ({ipaddr}) via {gwaddr} at\\n{essid}\",\n\t\t\"format-linked\": \"{ifname} (No IP) \",\n\t\t\"format-disconnected\": \"󰖪\",\n\t\t\"on-click\": \"swaync-client -t -sw\"\n\t},\n\t\"network#speed\": {\n\t\t\"format\": \"<span line_height=\\\"0.75\\\" size=\\\"9pt\\\"> {bandwidthUpBytes}\\n {bandwidthDownBytes}</span>\",\n\t\t\"interval\": 1\n\t},\n\t\"bluetooth\": {\n\t\t\"format\": \"\",\n\t\t\"format-disabled\": \"󰂲\",\n\t\t\"format-connected\": \"󰂱\",\n\t\t\"tooltip-format\": \"{controller_alias}\\t{controller_address}\",\n\t\t\"tooltip-format-connected\": \"{controller_alias}\\t{controller_address}\\n\\n{device_enumerate}\",\n\t\t\"tooltip-format-enumerate-connected\": \"{device_alias}\\t{device_address}\",\n\t\t\"on-click\": \"swaync-client -t -sw\"\n\t},\n\t\"pulseaudio\": {\n\t\t\"format\": \"{icon} {format_source}\",\n\t\t\"format-bluetooth\": \"{icon} {format_source}\",\n\t\t\"format-bluetooth-muted\": \" {icon} {format_source}\",\n\t\t\"format-muted\": \"󰸈 {format_source}\",\n\t\t\"format-source\": \"\",\n\t\t\"format-source-muted\": \"\",\n\t\t\"format-icons\": {\n\t\t\t\"headphone\": \"\",\n\t\t\t\"hands-free\": \"\",\n\t\t\t\"headset\": \"\",\n\t\t\t\"phone\": \"\",\n\t\t\t\"portable\": \"\",\n\t\t\t\"car\": \"\",\n\t\t\t\"default\": [\n\t\t\t\t\"\",\n\t\t\t\t\"\",\n\t\t\t\t\" \"\n\t\t\t]\n\t\t},\n\t\t\"on-click\": \"swaync-client -t -sw\",\n\t\t\"on-click-right\": \"pavucontrol\"\n\t},\n\t\"custom/notification\": {\n\t\t\"tooltip\": false,\n\t\t\"format\": \"{icon}\",\n\t\t\"format-icons\": {\n\t\t\t\"notification\": \"󰂟\",\n\t\t\t\"none\": \"\",\n\t\t\t\"dnd-notification\": \"󰺁\",\n\t\t\t\"dnd-none\": \"\",\n\t\t\t\"inhibited-notification\": \"󰂟\",\n\t\t\t\"inhibited-none\": \"\",\n\t\t\t\"dnd-inhibited-notification\": \"󰺁\",\n\t\t\t\"dnd-inhibited-none\": \"\"\n\t\t},\n\t\t\"return-type\": \"json\",\n\t\t\"exec-if\": \"which swaync-client\",\n\t\t\"exec\": \"swaync-client -swb\",\n\t\t\"on-click\": \"swaync-client -t -sw\",\n\t\t\"on-click-right\": \"swaync-client -d -sw\",\n\t\t\"escape\": true\n\t},\n\t\"custom/power\": {\n\t\t\"format\": \"\",\n\t\t\"on-click\": \"wlogout -b 5 -c 0 -r 0 -T 0 -B 0\",\n\t\t\"interval\": 86400, // once every day\n\t\t\"tooltip\": true\n\t}\n}\n"
  },
  {
    "path": "cfg/waybar/catppuccin-mocha-docked-flat-buttons/launch.sh",
    "content": "#!/usr/bin/env sh\n\n# Catppuccin-Mocha\n\nis_swww_daemon_running() {\n    if pgrep -x \"swww-daemon\" > /dev/null\n    then\n        return 0\n    else\n\texec swww-daemon &\n        return 1\n    fi\n}\n\n# wait for the swww-daemon\nwhile ! is_swww_daemon_running; do\n    echo \"wait for swww-daemon\"\n    sleep 1\ndone\n\nswww img ~/.config/backgrounds/mocha-mountains.png \n\npkill waybar\n\nsassc $HOME/.config/waybar/style-catppuccin-mocha.scss $HOME/.config/waybar/style.css\n\nwaybar\n"
  },
  {
    "path": "cfg/waybar/catppuccin-mocha-docked-flat-buttons/style-catppuccin-mocha.scss",
    "content": "@import \"./catppuccin-mocha.scss\";\n@import \"./catppuccin-mocha-flat-buttons.scss\";\n\n* {\n\tpadding: 0;\n\tmargin: 0;\n\tfont-weight: bolder;\n}\n\nwindow#waybar {\n\tfont-size: $font-size;\n\t/*border-radius: $radii;\n   */\n\tbackground: transparentize($color: $bar-bg, $amount: 0.2);\n\n}\n\n#clock,\n#custom-weather,\n#cpu,\n#memory,\n#temperature,\n#backlight,\n#network,\n#network.speed,\n#bluetooth,\n#pulseaudio,\n#custom-notification {\n\tpadding-left: $spacing;\n\tpadding-right: $spacing;\n\tmargin-top: $spacing*1.5;\n\tmargin-bottom: $spacing*1.5;\n}\n\n#clock,\n#network {\n\tpadding-left: $spacing*2;\n\tborder-top-left-radius: $radii/2;\n\tborder-bottom-left-radius: $radii/2;\n}\n\n#clock,\n#backlight,\n#custom-notification {\n\tmargin-right: $spacing*2;\n\tpadding-right: $spacing*2;\n\tborder-top-right-radius: $radii/2;\n\tborder-bottom-right-radius: $radii/2;\n}\n\n#cpu {\n\tfont-size: 1.1em;\n\tfont-weight: bolder;\n\tcolor: $peach;\n\ttransition: 400ms;\n\tanimation: ws_normal 20s ease-out 10;\n}\n\n#bluetooth.connected {\n\tfont-size: 1.15em;\n\tcolor: darken($color: $blue, $amount: 10);\n}\n\n#pulseaudio {\n\tpadding-left: 0;\n}\n\n#image,\n#workspaces,\n#battery,\n#tray,\n#custom-power {\n\tpadding-left: $spacing*1.5;\n\tpadding-right: $spacing*1.5;\n\tmargin-top: $spacing*1.5;\n\tmargin-bottom: $spacing*1.5;\n\tmargin-right: $spacing*2.0;\n\tborder-radius: $radii/2;\n}\n\n#workspaces {\n\tpadding-left: 0;\n}\n\n#workspaces button {\n\tfont-size: 0;\n\tmin-width: $font-size*0.95;\n\tmin-height: $font-size*0.95;\n\tmargin: $spacing*1.5;\n\tmargin-top: $spacing*1.5;\n\tmargin-bottom: $spacing*1.5;\n\tborder-radius: $spacing*10;\n\tbackground-color: $fg_color;\n\ttransition: 100ms;\n\tanimation: ws_normal 20s ease-out 10;\n}\n\n#workspaces button.empty {\n\tbackground-color: $dark_1;\n}\n\n#workspaces button.active {\n\tmin-width: $font-size*2;\n\tbackground-color: darken($color: $blue, $amount: 5);\n\ttransition: 100ms;\n}\n\n#battery.full {\n\tfont-size: 1.15em;\n}\n\n#custom-power {\n\tcolor: darken($color: $red, $amount: 10);\n\tmargin-right: $spacing*1.5;\n}\n\n.modules-left {\n\tmargin-left: $spacing;\n}\n"
  },
  {
    "path": "cfg/waybar/scripts/get_weather.sh",
    "content": "#!/usr/bin/env bash\nfor i in {1..5}; do\n\ttext=$(curl -s \"de.wttr.in/Chemnitz?nonce=$RANDOM\\&format=1\")\n\n\tif [[ $? == 0 ]]; then\n\t\ttext=$(echo \"$text\" | sed -E \"s|[+ ]||g\")\n\t\ttooltip=$(curl -s \"de.wttr.in/~50.8322608,12.9252977?nonce=$RANDOM\\&format=4\")\n\t\tif [[ $? == 0 ]]; then\n\t\t\ttooltip=$(echo \"$tooltip\" | sed -E \"s/\\s+/ /g\")\n\t\t\techo \"{\\\"text\\\":\\\"$text\\\", \\\"tooltip\\\":\\\"$tooltip\\\"}\"\n\t\t\texit\n\t\tfi\n\tfi\n\tsleep 2\ndone\necho \"{\\\"text\\\":\\\"error\\\", \\\"tooltip\\\":\\\"error\\\"}\"\n"
  },
  {
    "path": "installers/install",
    "content": "#!/bin/bash\n\n# Check if the system is an Arch Linux-based distribution\nif [ -f /etc/os-release ]; then\n  source /etc/os-release\n  if [ \"$ID\" != \"arch\" ]; then\n    echo \"This script is intended for Arch Linux or Arch-based distributions only.\"\n    read -p \"Do you want to run this script anyway? (y/n): \" run_script\n    if [ \"$run_script\" != \"y\" ]; then\n      exit 1\n    fi\n  fi\nelse\n  echo \"Unable to determine the distribution. Proceeding with the script...\"\nfi\n\ngit_dir=~/git\n\nif [ -d \"$git_dir\" ]; then\n  echo \"$git_dir exists.\"\n  cd \"$git_dir\"\nelse\n  echo \"$git_dir does not exist.\"\n  echo \"Creating $git_dir...\"\n  mkdir -p \"$git_dir\"\n  cd \"$git_dir\"\n  echo \"$git_dir was created.\"\nfi\n\n# Check if Yay is installed\nif [ -n \"$(command -v yay)\" ]; then\n  echo \"Yay (AUR Helper) is already installed.\"\nelse\n  # Prompt the user to install Yay\n  read -p \"Yay (AUR Helper) is required. Do you want to install Yay? (y/n): \" install_yay\n  if [ \"$install_yay\" == \"y\" ]; then\n    sudo pacman -S --needed git base-devel\n    git clone https://aur.archlinux.org/yay.git\n    cd yay\n    makepkg -si\n  else\n    echo \"Yay is required for this script. Exiting.\"\n    exit 1\n  fi\nfi\n\nif [ -d \"$git_dir\" ]; then\n  echo \"$git_dir exists.\"\n  cd \"$git_dir\"\nelse\n  echo \"$git_dir does not exist.\"\n  echo \"Creating $git_dir...\"\n  mkdir -p \"$git_dir\"\n  cd \"$git_dir\"\n  echo \"$git_dir was created.\"\nfi\n\n# needed packages\nneeded_pacman_packages=(\n  \"wget\" \"hyprland\" \"nano\" \"lshw\" \"bluez\" \"bluez-utils\" \"brightnessctl\" \"file-roller\" \"grim\" \"imagemagick\"\n  \"gvfs\" \"inotify-tools\" \"libinput\" \"lm_sensors\" \"pavucontrol\" \"python-pam\" \"slurp\" \"swayidle\" \"playerctl\"\n  \"wl-clipboard\" \"tracker3\" \"tracker3-miners\" \"qt5-base\" \"qt6-base\" \"gnome-bluetooth\" \"gnome-control-center\"\n  \"kitty\" \"sassc\"\n)\n\nneeded_aur_packages=(\n  \"aylurs-gtk-shell-git\" \"grimblast-git\" \"gtklock\" \"gtklock-userinfo-module\" \n  \"hyprpicker\" \"ttf-ubuntu-nerd\" \"ttf-ubuntu-mono-nerd\"\n  \"sway-audio-idle-inhibit-git\" \"swww-git\" \"pywal-16-colors\" \"xdg-desktop-portal-hyprland\"\n  \"wf-recorder\" \"wl-clip-persist-git\" \"wayshot-bin\"\n)\n\n# optional packages\noptional_pacman_packages=(\n  \"discord\" \"btop\" \"firefox\" \"flatpak\" \"fprintd\" \"fwupd\" \"cifs-utils\" \"gdm\" \"gimp\" \"gnome-calculator\" \n  \"gnome-disk-utility\" \"gnome-keyring\" \"gnome-software\" \"gnome-sound-recorder\" \"gnome-tweaks\"\n  \"intel-gpu-tools\" \"gvfs-smb\" \"libgnome-keyring\" \"mpv\" \"neofetch\" \"network-manager-applet\"\n  \"nextcloud-client\" \"obs-studio\" \"smbclient\" \"seahorse\" \"polkit-gnome\" \"nautilus\" \"thunar\" \"tlp\"\n  \"obsidian\" \"neovim\" \"neovide\" \"fzf\" \"wireguard-tools\"\n)\n\noptional_aur_packages=(\n  \"spotify\" \"gdm-settings\" \"wev\" \"tlpui\" \"git-credential-manager-core\" \"overskride \"\n)\n\n# print packages\necho \"Available packages:\"\necho \"1) Install only needed packages (both offical Arch and AUR)\"\necho \"2) Install needed and optional packages (both offical Arch and AUR)\"\n\nread -p \"Enter the number of your choice: \" choice\n\nif [ \"$choice\" == \"1\" ]; then\n  # Installation of needed packages (Pacman)\n  for package in \"${needed_pacman_packages[@]}\"; do\n    sudo pacman -S --needed --noconfirm \"$package\"\n  done\n\n  # Installation of needd packages (AUR)\n  for package in \"${needed_aur_packages[@]}\"; do\n    yay -S --noconfirm \"$package\"\n  done\nelif [ \"$choice\" == \"2\" ]; then\n  # Installation of needed packages (Pacman)\n  for package in \"${needed_pacman_packages[@]}\"; do\n    sudo pacman -S --needed --noconfirm \"$package\"\n  done\n\n  # Installation of needed packages (AUR)\n  for package in \"${needed_aur_packages[@]}\"; do\n    yay -S --noconfirm \"$package\"\n  done\n\n  # Installation of optional packages (Pacman)\n  for package in \"${optional_pacman_packages[@]}\"; do\n    sudo pacman -S --noconfirm \"$package\"\n  done\n\n  # Installation of packages (AUR)\n  for package in \"${optional_aur_packages[@]}\"; do\n    yay -S --noconfirm \"$package\"\n  done\nelse\n  echo \"Invalid choice. No packages were installed.\"\nfi\n\ngit clone https://github.com/RoccoRakete/hyprland-dots.git\ngit clone https://github.com/RoccoRakete/hyprland-gtk-themes.git\ngit clone https://github.com/RoccoRakete/hyprland-icons.git\n\n# Check if the directories exist\nif [ -d ~/.config ]; then\n  echo \"~/.config directory exists.\"\n  echo \"Do you want to create a backup of the existing ~/.config directory and copy the new config? (y/n): \"\n  read create_config_backup\n  if [ \"$create_config_backup\" == \"y\" ]; then\n    mv ~/.config ~/.config_bak\n    echo \"~/.config_bak was created!\"\n    mkdir -p ~/.config\n    mkdir -p ~/.dots\n    echo \"~/.config was created!\"\n    cp -r ./hyprland-dots/* ~/.dots\n    ln -s ~/.dots/* ~/.config\n  fi\nelse\n  echo \"~/.config directory does not exist.\"\n  echo \"Do you want to create it and copy the new config? (y/n): \"\n  read create_config\n  if [ \"$create_config\" == \"y\" ]; then\n    mkdir -p ~/.config\n    mkdir -p ~/.dots\n    echo \"~/.config was created!\"\n    cp -r ./hyprland-dots/* ~/.dots\n    ln -s ~/.dots/* ~/.config\n  fi\nfi\n\nif [ -d ~/.icons ]; then\n  echo \"~/.icons directory exists.\"\n  echo \"Do you want to create a backup of the existing ~/.icons directory and copy the new icons? (y/n): \"\n  read create_icons_backup\n  if [ \"$create_icons_backup\" == \"y\" ]; then\n    mv ~/.icons ~/.icons_bak\n    echo \"~/.icons_bak was created!\"\n    mkdir -p ~/.icons\n    echo \"~/.icons was created!\"\n    cp -r ./hyprland-icons/* ~/.icons\n  fi\nelse\n  echo \"~/.icons directory does not exist.\"\n  echo \"Do you want to create it and copy the new icons? (y/n): \"\n  read create_icons\n  if [ \"$create_icons\" == \"y\" ]; then\n    mkdir -p ~/.icons\n    echo \"~/.icons was created!\"\n    cp -r ./hyprland-icons/* ~/.icons\n  fi\nfi\n\nif [ -d ~/.themes ]; then\n  echo \"~/.themes directory exists.\"\n  echo \"Do you want to create a backup of the existing ~/.themes directory and copy the new themes? (y/n): \"\n  read create_themes_backup\n  if [ \"$create_themes_backup\" == \"y\" ]; then\n    mv ~/.themes ~/.themes_bak\n    echo \"~/.themes_bak was created!\"\n    mkdir -p ~/.themes\n    echo \"~/.themes was created!\"\n    cp -r ./hyprland-gtk-themes/* ~/.themes\n  fi\nelse\n  echo \"~/.themes directory does not exist.\"\n  echo \"Do you want to create it and copy the new themes? (y/n): \"\n  read create_themes\n  if [ \"$create_themes\" == \"y\" ]; then\n    mkdir -p ~/.themes\n    echo \"~/.themes was created!\"\n    cp -r ./hyprland-gtk-themes/* ~/.themes\n  fi\nfi\n\n# install git version of Hyprland\nread -p \"Do you want to install the Git-Version of Hyprland? (Y/n): \" choice\n\nif [[ $choice == \"n\" || $choice == \"N\" ]]; then\n  echo \"hyprland-git was not installed!\"\nelse\n  echo \"installing 'hyprland-git' ...\"\n  yay -S hyprland-git --noconfirm\n  if [ $? -eq 0 ]; then\n    echo \"hyprland-git was installed!\"\n  else\n    echo \"Installation was aborted! Make sure you have 'yay' installed! \"\n  fi\nfi\n\n# install libadwaita-without-adwaita-git\nread -p \"Install libadwaita-without-adwaita? This is needed to run GTK4/Adwaita applications with a GTK3 theme... (Y/n): \" choice\n\nif [[ $choice == \"n\" || $choice == \"N\" ]]; then\n  echo \"libadwaita-without-adwaita-git was not installed!\"\nelse\n  echo \"installing 'libadwaita-without-adwaita-git' ...\"\n  yay -S libadwaita-without-adwaita-git --noconfirm\n  if [ $? -eq 0 ]; then\n    echo \"libadwaita-without-adwaita-git was installed!\"\n  else\n    echo \"Installation was aborted! Make sure you have 'yay' installed! \"\n  fi\nfi\n\n# install nvChad\nread -p \"Install nvChad? (Y/n): \" choice\n\nif [[ $choice == \"n\" || $choice == \"N\" ]]; then\n  echo \"nvChad was not installed!\"\nelse\n  echo \"installing 'nvChad' ...\"\n  git clone https://github.com/NvChad/NvChad ~/.config/nvim --depth 1\n  if [ $? -eq 0 ]; then\n    echo \"nvChad was installed ... to set it up start 'neovim'\"\n  else\n    echo \"Installation was aborted!\"\n  fi\nfi\n\n# Download and install Hermit Nerd Font\nwget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/Hermit.zip\nunzip Hermit.zip -d Hermit\nsudo cp -r ./Hermit /usr/share/fonts\n\n# Edit monitors example config\nexample_conf_file=\"$HOME/.dots/hypr/presets/monitors.exampleconf\"\nconf_file=\"$HOME/.dots/hypr/monitors.conf\"\n\n# Check if file exists\nif [ -e \"$example_conf_file\" ]; then\n    read -p \"Do you want so edit the monitors config now? Hyprland wouldn't work correctly otherwise! (y/n): \" choice\n\n    if [ \"$choice\" == \"y\" ] || [ \"$choice\" == \"Y\" ]; then\n        nano \"$example_conf_file\"\n        if [ -e \"$example_conf_file\" ]; then\n            cp \"$example_conf_file\" \"$conf_file\"\n            echo \"The file has been edited and copied to $conf_file successfully.\"\n        else\n            echo \"The file doesn't exist!?\"\n        fi\n    else\n        echo \"The file hasn't be edited!\"\n    fi\nelse\n    echo \"The exampleconfig doesn't exist!\"\nfi\n\nsudo systemctl enable --now tlp.service\n\n# Prompt the user to restart the computer\nread -p \"Installation has now completed. Do you want to reboot now? (y/n): \" restart_pc\nif [ \"$restart_pc\" == \"y\" ]; then\n  reboot\nfi\n"
  },
  {
    "path": "installers/thinkfan",
    "content": "#!/bin/bash\n\n# Hardware detect\nhardware_info=$(sudo lshw 2>/dev/null)\n\nif [[ $hardware_info == *\"Lenovo\"* ]]; then\n  echo \"Lenovo-Laptop detected.\"\n  \n  echo \"Do you want to install thinkfan? (y/n): \"\n  read install_thinkfan\n  if [ \"$install_thinkfan\" == \"y\" ]; then\n    yay -S thinkfan\n    echo \"Thinkfan has been installed.\"\n    \n    if [ -e /etc/thinkfan.yaml ]; then\n      echo \"Do you want to rename the existing thinkfan.yaml to thinkfan.bak? (y/n): \"\n      read rename_config\n      if [ \"$rename_config\" == \"y\" ]; then\n        sudo mv /etc/thinkfan.yaml /etc/thinkfan.bak\n        echo \"Existing thinkfan.yaml has been renamed to thinkfan.bak.\"\n      fi\n    fi\n\n    echo \"Do you want to copy the new thinkfan configuration? (y/n): \"\n    read copy_config\n    if [ \"$copy_config\" == \"y\" ]; then\n      sudo cp ~/.dots/scriptsnstuff/thinkfan.yaml /etc/thinkfan.yaml\n      echo \"New thinkfan configuration has been copied.\"\n    fi\n  else\n    echo \"Thinkfan config has not been copied.\"\n  fi\nelse\n  echo \"No Lenovo-Laptop detected...\"\nfi\n\nif [ -n \"$(command -v thinkfan)\" ]; then\n  echo \"Thinkfan is installed.\"\n  read -p \"Do you want to enable and start Thinkfan now? (y/n): \" enable_thinkfan\n  if [ \"$enable_thinkfan\" == \"y\" ]; then\n    sudo systemctl enable thinkfan\n    sudo systemctl start thinkfan\n    echo \"Thinkfan has been enabled and started.\"\n  fi\nfi"
  },
  {
    "path": "installers/zsh",
    "content": "#!/bin/bash\n\necho \"Do you want to install ZSH and related extensions and configure Oh My Zsh? (y/n): \"\nread install_zsh\n\nif [ \"$install_zsh\" == \"y\" ]; then\n  sudo pacman --noconfirm -S zsh\n  yay -S --noconfirm -S zsh-theme-powerlevel10k-git\n  sudo sh -c \"$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)\"\n  sudo git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions\n  sudo git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting\n  sudo git clone https://github.com/zdharma-continuum/fast-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fast-syntax-highlighting\n  sudo git clone --depth 1 -- https://github.com/marlonrichert/zsh-autocomplete.git $ZSH_CUSTOM/plugins/zsh-autocomplete\n  cp ./hyprland-dots/.zshrc ~/.zshrc\n  echo \"ZSH and related extensions have been installed and configured.\"\nelse\n  echo \"ZSH and related extensions have not been installed.\"\nfi"
  },
  {
    "path": "nixos/configs/home-configs/kitty.nix",
    "content": "{ ... }:\n\n{\n  programs.kitty = {\n    enable = true;\n    theme = \"Catppuccin-Mocha\";\n    settings = {\n      font_family = \"Hurmit Nerd Font\";\n      font_size = \"14.0\";\n      #background = \"#1E1E1E\";\n      background_opacity = \"0.9\";\n      #foreground = \"#DEDDDA\";\n      #tab_bar_background = \"#1E1E1E\";\n      scrollback_lines = 10000;\n      show_hyperlink_targets = \"yes\";\n      focus_follows_mouse = \"no\";\n      enable_audio_bell = false;\n      tab_bar_min_tabs = 1;\n      tab_bar_edge = \"bottom\";\n      tab_bar_style = \"powerline\";\n      tab_powerline_style = \"slanted\";\n      tab_title_template = \"{title}{' :{}:'.format(num_windows) if num_windows > 1 else ''}\";\n      url_style = \"none\";\n      underline_hyperlinks = \"never\";\n    };\n    extraConfig =\n      \"modify_font underline_position 3\" + \"\\n\" +\n      \"modify_font underline_thickness 300%\" + \"\\n\" +\n      \"modify_font strikethrough_position 2px\";\n  };\n}\n"
  },
  {
    "path": "nixos/configs/home-configs/styling.nix",
    "content": "{ pkgs, ... }:\n\n{\n  imports = [\n    ../../pkgs\n  ];\n\n  home = {\n\n    # Cursor\n    pointerCursor = {\n      gtk.enable = true;\n      package = pkgs.bibata-cursors;\n      name = \"Bibata-Modern-Classic\";\n      size = 24;\n    };\n  };\n\n  gtk = {\n    enable = true;\n\n    # GTK-Icons\n    # Yaru\n    #iconTheme.package = pkgs.yaru-theme;\n    #iconTheme.name = \"Yaru\";\n\n    # MoreWaita\n    iconTheme.package = pkgs.morewaita-icon-theme;\n    iconTheme.name = \"MoreWaita\";\n\n    # GTK-Colors\n    # Catppuccin\n    theme.name = \"Catppuccin-Mocha-Standard-Blue-Dark\";\n    theme.package = pkgs.catppuccin-gtk.override {\n      accents = [ \"blue\" ];\n      size = \"standard\";\n      variant = \"mocha\";\n    };\n\n    # Kanagawa\n    #theme.name = \"Kanagawa-B\";\n    #theme.package = pkgs.kanagawa-gtk-theme.override { };\n\n    # Fonts\n    font = {\n      name = \"Ubuntu Nerd Font\";\n      size = 13;\n    };\n  };\n\n  # QT\n  qt = {\n    enable = true;\n    platformTheme = \"gtk\";\n    style.name = \"Catppuccin-Mocha-Standard-Blue-Dark\";\n  };\n}\n"
  },
  {
    "path": "nixos/configs/home-configs/waybar.nix",
    "content": "{ inputs, pkgs, ... }:\n\n{\n  programs = {\n    waybar = {\n      enable = true;\n      package = inputs.waybar.packages.${pkgs.system}.waybar;\n    };\n  };\n}\n"
  },
  {
    "path": "nixos/configs/home-configs/zsh.nix",
    "content": "{ pkgs, lib, config, ... }:\n\n{\n  programs.zsh = {\n    enable = true;\n    initExtraFirst =\n      #\"wal -R\" + \"\\n\" +\n      \"clear\";\n\n    initExtra =\n      \"source ~/.p10k.zsh\" + \"\\n\" +\n      \"neofetch\" + \"\\n\" +\n      \"export TERM=xterm\" + \"\\n\" +\n      \"export EDITOR=nvim\" + \"\\n\" +\n      \"bindkey '^[[A' menu-complete\"\n    ;\n\n    shellAliases = {\n      #ll = \"ls -lah\";\n      ll = \"eza -loah --icons=always --no-permissions --git\";\n      v = \"nvim\";\n\n      editd = \"nvim ~/.dots\";\n\n      pushd = \"cd ~/.dots && git add -A && git commit && git push --repo https://github.com/RoccoRakete/hyprland-dots.git && cd ~\";\n      addd = \"cd ~/.dots && git add -A && cd ~\";\n\n      update = \"sudo nixos-rebuild switch\";\n      flake-update = \"nix flake update ~/.dots/nixos\";\n      fwup = \"sudo fwupdmgr refresh --force && sudo fwupdmgr get-updates && sudo fwupdmgr update\";\n\n      upgrade-desktop = \"sudo nixos-rebuild switch --upgrade --flake ~/.dots/nixos#OptiPlex3060\";\n      home-upgrade-desktop = \"home-manager switch --flake ~/.dots/nixos#OptiPlex3060\";\n      news-desktop = \"home-manager news --flake ~/.dots/nixos#OptiPlex3060\";\n\n      upgrade-laptop = \"nh os switch -H ThinkPad\";\n      home-upgrade-laptop = \"nh home switch -c ThinkPad\";\n      news-laptop = \"home-manager news --flake ~/.dots/nixos#ThinkPad\";\n    };\n\n    enableCompletion = false;\n    syntaxHighlighting.enable = true;\n    autosuggestion.enable = true;\n\n    historySubstringSearch = {\n      enable = true;\n      searchUpKey = [ \"\\\\eOA\" ];\n      searchDownKey = [ \"\\\\eOB\" ];\n    };\n    history.size = 10000;\n    history.path = \"${config.xdg.dataHome}/zsh/history\";\n\n    zplug = {\n      enable = true;\n      plugins = [\n        { name = \"zsh-users/zsh-autosuggestions\"; }\n        { name = \"marlonrichert/zsh-autocomplete\"; }\n        { name = \"romkatv/powerlevel10k\"; tags = [ as:theme depth:1 ]; }\n      ];\n    };\n\n    oh-my-zsh = {\n      enable = false;\n      plugins = [\n        \"git\"\n        \"colored-man-pages\"\n      ];\n    };\n  };\n}\n"
  },
  {
    "path": "nixos/configs/nixos-configs/bluetooth.nix",
    "content": "{ ... }:\n\n{\n  hardware = {\n    bluetooth.enable = true;\n    bluetooth.powerOnBoot = true;\n    bluetooth = {\n      settings = {\n        General = {\n          ControllerMode = \"dual\";\n          FastConnectable = \"true\";\n          Experimental = \"true\";\n        };\n        Policy = {\n          AutoEnable = \"true\";\n        };\n      };\n    };\n  };\n}\n"
  },
  {
    "path": "nixos/configs/nixos-configs/nixvim/autopairs.nix",
    "content": "{ ... }:\n\n{\n  programs.nixvim.plugins.nvim-autopairs = {\n    enable = true;\n    settings = {\n      checkTs = true;\n    };\n  };\n}\n"
  },
  {
    "path": "nixos/configs/nixos-configs/nixvim/bufferline.nix",
    "content": "{ ... }:\n\n{\n  programs.nixvim.plugins.bufferline = {\n    enable = true;\n    mode = \"buffers\";\n    diagnostics = \"nvim_lsp\";\n    indicator.style = null;\n\n    #separatorStyle = \"slant\";\n    closeIcon = \"󰅚\";\n    bufferCloseIcon = \"󰅙\";\n    modifiedIcon = \"󰀨\";\n\n    offsets = [\n      {\n        filetype = \"neo-tree\";\n        text = \"File Explorer\";\n        text_align = \"center\";\n        separator = false;\n      }\n    ];\n\n    highlights =\n      {\n        indicatorSelected.fg = \"#89b4fa\";\n        #tabSeparatorSelected.fg = \"#89b4fa\";\n      };\n\n    highlights = rec {\n    #  # Tab bar fill\n      #fill.bg = \"#ffffff\";\n    #  fill.fg = \"#5a5b64\";\n\n    #  # Tab fill\n    #  background.fg = \"#5a5b64\";\n    #  background.bg = \"#000000\";\n    #  background.sp = fill.bg;\n\n    # Tab separator\n    #  separator = background // { fg = fill.bg; };\n    #  separatorVisible = background // { fg = fill.bg; };\n\n    #  # Path name\n    #  duplicate = background // { fg = \"#5a5b64\"; };\n\n    #  # buffer = { fg = \"#5a5b64\"; } // background;\n    #  #modified = background // { fg = \"#f38ba8\"; };\n    #  closeButton = background;\n\n    # duplicate.bg = \"#21222a\";\n    #pick.bg = \"#89b4fa\";\n    #  hint.bg = \"#000000\";\n    #error.bg = \"#f38ba8\";\n    #warning.bg = \"#eba0ac\";\n    #info.bg = \"#f9e2af\";\n    # hint.bg = \"#21222a\";\n    #  hintDiagnostic.bg = \"#89b4fa\";\n    #  infoDiagnostic.bg = \"#f9e2af\";\n    #  errorDiagnostic.bg = \"#f38ba8\";\n    #  warningDiagnostic.bg = \"#eba0ac\";\n    # numbers.bg = \"#21222a\";\n\n    # icon = background;\n    #  bufferSelected.fg = \"#ecedfa\";\n    #  separatorSelected.fg = separator.fg;\n    # separatorSelected.fg = \"#000000\";\n    #  closeButtonSelected.fg = \"#ecedfa\";\n\n    # nameVisible.fg = \"#ecedfa\";\n    #  modifiedSelected.fg = \"#f38ba8\";\n    #  modified.bg = \"#000000\";\n\n    #  bufferVisible.fg = \"#5a5b64\";\n    #  infoVisible.fg = \"#eba0ac\";\n    };\n    diagnosticsIndicator = ''\n      function(count, level)\n        local icon = level:match(\"error\") and \" \" or \"\"\n        return \" \" .. icon .. count\n      end\n    '';\n    #extraOptions = {\n    #  highlights = {\n    #    tab_separator_selected = {\n    #      underline = \"#89b4fa\";\n    #    };\n    #  };\n    #};\n  };\n}\n\n"
  },
  {
    "path": "nixos/configs/nixos-configs/nixvim/conform.nix",
    "content": "{ ... }:\n\n{\n  programs.nixvim.plugins.conform-nvim = {\n    enable = true;\n    formattersByFt = {\n      \"*\" = [ \"codespell\" ];\n      \"_\" = [ \"trim_whitespace\" ];\n      #go = [ \"goimports\" \"golines\" \"gofmt\" \"gofumpt\" ];\n      javascript =  [ \"prettierd\" ];\n      typescript =  [ \"prettierd\" ];\n      yaml =  [ \"prettierd\" ];\n      json = [ \"jq\" ];\n      lua = [ \"stylua\" ];\n      scss = [ \"prettierd\" ];\n      css = [ \"prettierd\" ];\n      python = [ \"isort\" \"black\" ];\n      rust = [ \"rustfmt\" ];\n      sh = [ \"shfmt\" ];\n      #terraform = [ \"terraform_fmt\" ];\n    };\n  };\n}\n"
  },
  {
    "path": "nixos/configs/nixos-configs/nixvim/dashboard.nix",
    "content": "{ ... }:\n\n{\n  programs.nixvim.plugins.dashboard = {\n    enable = true;\n    header = [\n      \"███╗   ██╗ ███████╗ ██████╗  ██╗   ██╗ ██╗ ███╗   ███╗\"\n      \"████╗  ██║ ██╔════╝██╔═══██╗ ██║   ██║ ██║ ████╗ ████║\"\n      \"██╔██╗ ██║ █████╗  ██║   ██║ ██║   ██║ ██║ ██╔████╔██║\"\n      \"██║╚██╗██║ ██╔══╝  ██║   ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║\"\n      \"██║ ╚████║ ███████╗╚██████╔╝  ╚████╔╝  ██║ ██║ ╚═╝ ██║\"\n      \"╚═╝  ╚═══╝ ╚══════╝ ╚═════╝    ╚═══╝   ╚═╝ ╚═╝     ╚═╝\"\n    ];\n  };\n}\n\n"
  },
  {
    "path": "nixos/configs/nixos-configs/nixvim/efmls.nix",
    "content": "{ ... }:\n\n{\n  programs.nixvim.plugins.efmls-configs = {\n    enable = false;\n    setup.nix.formatter = \"nixfmt\";\n    setup.scss.formatter = \"prettier\";\n  };\n}\n"
  },
  {
    "path": "nixos/configs/nixos-configs/nixvim/keymaps.nix",
    "content": "{ ... }:\n\n{\n  programs = {\n    nixvim = {\n      keymaps = [\n        {\n          key = \"<leader>lf\";\n          action = \"<cmd>lua require('conform').format({ lsp_fallback = true, async = false, timeout_ms = 500 })<CR>\";\n\n          options = {\n            silent = true;\n          };\n        }\n        {\n          key = \".\";\n          action = \":\";\n        }\n\n        {\n          key = \"<leader>bb\";\n          action = \"<CMD>Telescope file_browser<NL>\";\n        }\n\n        {\n          key = \"<leader>t\";\n          action = \"<CMD>Neotree<NL>\";\n        }\n\n        {\n          key = \"<leader>w\";\n          action = \"<CMD>WhichKey<NL>\";\n        }\n\n        {\n          key = \"<Tab>\";\n          action = \"<CMD>:bnext<NL>\";\n        }\n\n        {\n          key = \"<leader>c\";\n          action = \"<CMD>:bp | bd #<NL>\";\n        }\n        {\n          key = \"<leader>c\";\n          action = \"<CMD>:bp | bd #<NL>\";\n        }\n      ];\n    };\n  };\n}\n"
  },
  {
    "path": "nixos/configs/nixos-configs/nixvim/lsp-format.nix",
    "content": "{ ... }:\n\n{\n  programs.nixvim.plugins.lsp-format = {\n    enable = false; \n    lspServersToEnable = [\n      \"nixd\"\n      \"efm\"\n    ];\n  };\n}\n"
  },
  {
    "path": "nixos/configs/nixos-configs/nixvim/lsp-servers.nix",
    "content": "{ ... }:\n\n{\n  programs = {\n    nixvim = {\n      plugins = {\n        lsp.servers.nixd.enable = true;\n        lsp.servers.cssls.enable = true;\n        lsp.servers.java-language-server.enable = true;\n        lsp.servers.jsonls.enable = true;\n        lsp.servers.lua-ls.enable = true;\n        #lsp.servers.pylsp.enable = true;\n        lsp.servers.rust-analyzer.enable = true;\n        lsp.servers.rust-analyzer.installCargo = true;\n        lsp.servers.rust-analyzer.installRustc = true;\n        lsp.servers.tsserver.enable = false;\n        lsp.servers.yamlls.enable = true;\n        lsp.servers.efm.enable = true;\n      };\n    };\n  };\n}\n"
  },
  {
    "path": "nixos/configs/nixos-configs/nixvim/lsp.nix",
    "content": "{ ... }:\n\n{\n  programs.nixvim.plugins.lsp = {\n    enable = true;\n    #keymaps.lspBuf = {\n    #  \"<leader>fm\" = \"format\";\n    #};\n  };\n}\n"
  },
  {
    "path": "nixos/configs/nixos-configs/nixvim/neo-tree.nix",
    "content": "{ ... }:\n\n{\n  programs.nixvim.plugins.neo-tree = {\n    enable = true;\n    autoCleanAfterSessionRestore = true;\n    closeIfLastWindow = true;\n\n    window = {\n      position = \"left\";\n    };\n\n    filesystem = {\n      followCurrentFile.enabled = true;\n      filteredItems = {\n        hideHidden = false;\n        hideDotfiles = false;\n        forceVisibleInEmptyFolder = true;\n        hideGitignored = false;\n      };\n    };\n\n    window.mappings = {\n      \"<bs>\" = \"navigate_up\";\n      \".\" = \"set_root\";\n      \"f\" = \"fuzzy_finder\";\n      \"/\" = \"filter_on_submit\";\n      \"h\" = \"show_help\";\n    };\n\n    eventHandlers =\n      {\n        neo_tree_buffer_enter = ''\n            function()\n          vim.cmd 'highlight! Cursor blend=100'\n          end\n        '';\n        neo_tree_buffer_leave = ''\n            function()\n          vim.cmd 'highlight! Cursor guibg=#5f87af blend=0'\n          end\n        '';\n      };\n  };\n}\n"
  },
  {
    "path": "nixos/configs/nixos-configs/nixvim/nvim-cmp.nix",
    "content": "{ ... }:\n\n{\n  programs.nixvim.plugins = {\n    cmp = {\n      enable = true;\n      extraOptions.sources =\n        [\n          { name = \"nvim_lsp\"; }\n          { name = \"path\"; }\n          { name = \"buffer\"; }\n          { name = \"luasnip\"; }\n          { name = \"cmdline\"; }\n        ];\n\n        settings.mapping = {\n          \"<CR>\" = \"cmp.mapping.confirm({ select = true })\";\n          \"<C-Space>\" = \"cmp.mapping.complete()\";\n          \"<C-d>\" = \"cmp.mapping.scroll_docs(-4)\";\n          \"<C-e>\" = \"cmp.mapping.close()\";\n          \"<C-f>\" = \"cmp.mapping.scroll_docs(4)\";\n          \"<S-Tab>\" = \"cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})\";\n          \"<Tab>\" = \"cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})\";\n        };\n        settings.snippet.expand = ''\n        function(args)\n        require('luasnip').lsp_expand(args.body)\n        end\n        '';\n      };\n      cmp-cmdline.enable = true;\n    };\n  }\n\n\n"
  },
  {
    "path": "nixos/configs/nixos-configs/nixvim/nvim.nix",
    "content": "{ pkgs, ... }:\n\n{\n  imports = [\n    ./keymaps.nix\n    ./nvim-cmp.nix\n    ./lsp.nix\n    ./bufferline.nix\n    ./telescope.nix\n    ./neo-tree.nix\n    ./prettier.nix\n    ./lsp-servers.nix\n    ./treesitter.nix\n    ./autopairs.nix\n    ./whichkey.nix\n    ./dashboard.nix\n    ./efmls.nix\n    ./lsp-format.nix\n    ./conform.nix\n  ];\n  programs = {\n    nixvim = {\n      enable = true;\n      globals.mapleader = \" \";\n      clipboard.providers.wl-copy.enable = true;\n\n      options = {\n        number = true;\n        relativenumber = false;\n        shiftwidth = 2;\n      };\n      plugins = {\n        nix.enable = true;\n\n        lsp-lines.enable = true;\n        lspkind.enable = true;\n\n        neogit.enable = true;\n        cmp-zsh.enable = true;\n        noice.enable = true;\n        nvim-colorizer.enable = true;\n        luasnip.enable = true;\n        rust-tools.enable = true;\n\n        notify = {\n          enable = true;\n          #backgroundColour = \"#000000\";\n          timeout = 2000;\n          fps = 120;\n          stages = \"fade\";\n        };\n\n        airline = {\n          enable = true;\n          #powerline = true;\n          settings = {\n            theme = \"catppuccin\";\n          };\n        };\n      };\n\n      #autoCmd = [\n      #  {\n      #    event = [ \"BufWrite\" ];\n      #    pattern = [ \"\" ];\n      #    command = \"lua require('conform').format({ lsp_fallback = true, async = false, timeout_ms = 500 })<CR>\";\n      #  }\n      #];\n\n      extraPlugins = with pkgs.vimPlugins; [\n        telescope-ui-select-nvim\n        #vim-autoformat\n        vim-jsbeautify\n\n      ];\n\n      extraConfigLua =\n        ''if vim.g.neovide then'' + \"\\n\" +\n        ''vim.o.guifont = \"Hurmit Nerd Font:h14\"'' + \"\\n\" +\n\n        ''vim.keymap.set('n', '<C-S-s>', ':w<CR>') -- Save'' + \"\\n\" +\n        ''vim.keymap.set('v', '<C-S-c>', '\"+y') -- Copy'' + \"\\n\" +\n        ''vim.keymap.set('n', '<C-S-v>', '\"+P') -- Paste normal mode'' + \"\\n\" +\n        ''vim.keymap.set('v', '<C-S-v>', '\"+P') -- Paste visual mode'' + \"\\n\" +\n        ''vim.keymap.set('c', '<C-S-v>', '<C-R>+') -- Paste command mode'' + \"\\n\" +\n        ''vim.keymap.set('i', '<C-S-v>', '<ESC>l\"+Pli') -- Paste insert mode'' + \"\\n\" +\n        \"end\";\n\n\n      #colorschemes.kanagawa = {\n      #  enable = true;\n      #  terminalColors = true;\n      #};\n\n      #colorschemes.ayu = {\n      #  enable = true;\n      #  mirage = true;\n      #};\n\n      colorschemes.catppuccin = {\n        enable = true;\n        settings = {\n          flavour = \"mocha\";\n          transparentBackground = false;\n        };\n      };\n\n    };\n  };\n}\n"
  },
  {
    "path": "nixos/configs/nixos-configs/nixvim/prettier.nix",
    "content": "{ ... }:\n\n{\n  programs.nixvim.plugins.none-ls.sources.formatting.prettier = {\n    enable = true;\n    disableTsServerFormatter = true;\n  };\n}\n\n"
  },
  {
    "path": "nixos/configs/nixos-configs/nixvim/telescope.nix",
    "content": "{ ... }:\n\n{\n  programs.nixvim.plugins.telescope = {\n    enable = true;\n\n    enabledExtensions = [ \"ui-select\" ];\n    extensions.ui-select.enable = true;\n    extensions.frecency.enable = false;\n    extensions.fzf-native.enable = true;\n\n    extensions.file-browser = {\n      enable = true;\n      settings.hidden = true;\n      settings.depth = 9999999999;\n      settings.auto_depth = true;\n    };\n    keymaps = {\n      \"<leader>ff\" = \"find_files\";\n      \"<leader>fs\" = \"grep_string\";\n      \"<leader>fg\" = \"live_grep\";\n    };\n    settings = {\n      pickers = {\n        find_files = {\n          hidden = true;\n        };\n      };\n    };\n  };\n}\n"
  },
  {
    "path": "nixos/configs/nixos-configs/nixvim/treesitter.nix",
    "content": "{ ... }:\n\n{\n  programs.nixvim.plugins = {\n    cmp-treesitter.enable = true;\n    treesitter.enable = true;\n    treesitter-refactor = {\n      enable = true;\n      highlightCurrentScope.enable = true;\n      highlightCurrentScope.disable = [\n        \"nix\"\n      ];\n      highlightDefinitions.enable = true;\n      navigation.enable = true;\n      smartRename.enable = true;\n    };\n  };\n}\n"
  },
  {
    "path": "nixos/configs/nixos-configs/nixvim/whichkey.nix",
    "content": "{ ... }:\n\n{\n  programs.nixvim.plugins.which-key = {\n    enable = true;\n    icons = {\n      separator = \"\";\n      group = \"\";\n    };\n    keyLabels = {\n     \"<leader>\" = \"SPC\"; \n    };\n    registrations = {\n      \"<leader>c\" = \"󰅙 Close Buffer\";\n      \"<leader>t\" = \"󰙅 FileExplorer\";\n      \"<leader>f\" = \" Telescope\";\n      \"<leader>w\" = \" WhichKey?!\";\n      \"<leader>ff\" = \" Find Files\";\n      \"<leader>l\" = \" LSP\";\n      \"<leader>lf\" = \"󰉡 Format Buffer\";\n    };\n  };\n}\n"
  },
  {
    "path": "nixos/configs/nixos-configs/programs.nix",
    "content": "{ pkgs, inputs, ... }:\n\n{\n  programs = {\n    hyprland = {\n      enable = true;\n      package = inputs.hyprland.packages.${pkgs.system}.hyprland;\n    };\n\n    thunar = {\n      plugins = with pkgs.xfce; [\n        thunar-archive-plugin\n        thunar-volman\n      ];\n      enable = true;\n    };\n\n    virt-manager = {\n      enable = true;\n    };\n\n    dconf.enable = true;\n    zsh.enable = true;\n    direnv.enable = true;\n    nano.enable = false;\n    ssh.askPassword = \"${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass\";\n  };\n}\n\n\n\n\n"
  },
  {
    "path": "nixos/configs/nixos-configs/services.nix",
    "content": "{ pkgs, ... }:\n\n{\n  imports = [\n  ];\n\n  services = {\n    blueman.enable = true;\n    fwupd.enable = true;\n    tumbler.enable = true;\n    gvfs.enable = true;\n    gnome.core-utilities.enable = true;\n    gnome.core-shell.enable = true;\n    upower.enable = true;\n    xserver.desktopManager.xfce.enable = true;\n    power-profiles-daemon.enable = false;\n    xserver.displayManager.gdm.enable = true;\n    gnome.gnome-keyring.enable = true;\n    gnome.tracker.enable = true;\n    gnome.tracker-miners.enable = true;\n    xserver = {\n      enable = true;\n      xkb.layout = \"de\";\n      xkb.variant = \"\";\n      excludePackages = [ pkgs.xterm ];\n    };\n    pipewire = {\n      enable = true;\n      alsa.enable = true;\n      alsa.support32Bit = true;\n      pulse.enable = true;\n    };\n    printing.enable = true;\n    acpid.enable = true;\n    flatpak.enable = true;\n    openssh = {\n      enable = true;\n      settings = {\n        PasswordAuthentication = false;\n      };\n    };\n    udev.extraRules = ''\n      # DFU (Internal bootloader for STM32 and AT32 MCUs)\n      ACTION==\"add\", SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0483\", ATTRS{idProduct}==\"df11\", MODE=\"0664\", GROUP=\"plugdev\"\n      ACTION==\"add\", SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"2e3c\", ATTRS{idProduct}==\"df11\", MODE=\"0664\", GROUP=\"plugdev\"\n    '';\n  };\n}\n"
  },
  {
    "path": "nixos/configs/nixos-configs/tlp.nix",
    "content": "{ ... }:\n\n{\n  services = {\n    tlp.enable = true;\n    tlp.settings = {\n      PLATFORM_PROFILE_ON_BAT = \"low-power\";\n      CPU_ENERGY_PERF_POLICY_ON_BAT = \"power\";\n      CPU_BOOST_ON_BAT = 1;\n      CPU_SCALING_GOVERNOR_ON_BAT = \"powersave\";\n      MEM_SLEEP_ON_BAT = \"deep\";\n\n      PLATFORM_PROFILE_ON_AC = \"performance\";\n      CPU_ENERGY_PERF_POLICY_ON_AC = \"balance_performance\";\n      CPU_BOOST_ON_AC = 1;\n      CPU_SCALING_GOVERNOR_ON_AC = \"performance\";\n\n      WOL_DISABLE = \"Y\";\n    };\n  };\n}\n"
  },
  {
    "path": "nixos/flake.nix",
    "content": "{\n  description = \"Martin's Nix-Flakes Config\";\n\n  inputs = {\n    nixpkgs.url = \"nixpkgs/nixos-unstable\";\n\n    home-manager = {\n      url = \"github:nix-community/home-manager/master\";\n      inputs.nixpkgs.follows = \"nixpkgs\";\n    };\n\n    nix-software-center = {\n      url = \"github:snowfallorg/nix-software-center\";\n      inputs.nixpkgs.follows = \"nixpkgs\";\n    };\n    nixos-conf-editor = {\n      url = \"github:snowfallorg/nixos-conf-editor\";\n      inputs.nixpkgs.follows = \"nixpkgs\";\n    };\n    nixvim = {\n      url = \"github:nix-community/nixvim\";\n      inputs.nixpkgs.follows = \"nixpkgs\";\n    };\n    eza = {\n      url = \"github:eza-community/eza\";\n      inputs.nixpkgs.follows = \"nixpkgs\";\n    };\n    nh = {\n      url = \"github:viperML/nh\";\n      inputs.nixpkgs.follows = \"nixpkgs\";\n    };\n\n    ags = {\n      url = \"github:Aylur/ags\";\n      inputs.nixpkgs.follows = \"nixpkgs\";\n    };\n    waybar = {\n      url = \"github:alexays/waybar\";\n      inputs.nixpkgs.follows = \"nixpkgs\";\n    };\n    anyrun = {\n      url = \"github:Kirottu/anyrun\";\n      inputs.nixpkgs.follows = \"nixpkgs\";\n    };\n    walker = {\n      url = \"github:abenz1267/walker\";\n      inputs.nixpkgs.follows = \"nixpkgs\";\n    };\n\n    hyprland = {\n      url = \"git+https://github.com/hyprwm/Hyprland?submodules=1\";\n    };\n    hyprlock = {\n      url = \"github:hyprwm/Hyprlock\";\n    };\n    hypridle = {\n      url = \"github:hyprwm/Hypridle\";\n    };\n    hyprland-plugins = {\n      url = \"github:hyprwm/hyprland-plugins\";\n      inputs.hyprland.follows = \"hyprland\";\n    };\n  };\n\n  outputs = { nixpkgs, home-manager, nixvim, ... }@inputs:\n  let\n    vars = import ./variables.nix;\n    system = \"x86_64-linux\";\n    lib = nixpkgs.lib;\n    pkgs = nixpkgs.legacyPackages.${system};\n  in\n  {\n      # system configurations\n      # desktop\n      nixosConfigurations = {\n        ${vars.desktop} = lib.nixosSystem {\n          inherit system;\n          specialArgs = { inherit inputs; };\n          modules = [\n            ./hosts/desktop/configuration-desktop.nix\n            inputs.nixvim.nixosModules.nixvim\n          ];\n        };\n\n        # laptop\n        ${vars.laptop} = lib.nixosSystem {\n          inherit system;\n          specialArgs = { inherit inputs; };\n          modules = [\n            ./hosts/laptop/configuration-laptop.nix\n            inputs.nixvim.nixosModules.nixvim\n          ];\n        };\n      };\n\n      # home configurations\n      # desktop\n      homeConfigurations = {\n        ${vars.desktop} = home-manager.lib.homeManagerConfiguration {\n          extraSpecialArgs = { inherit inputs; };\n          inherit pkgs;\n          modules = [\n            ./hosts/desktop/home-desktop.nix\n          ];\n        };\n      };\n\n      # laptop\n      homeConfigurations = {\n        ${vars.laptop} = home-manager.lib.homeManagerConfiguration {\n          extraSpecialArgs = { inherit inputs; };\n          inherit pkgs;\n          modules = [\n            ./hosts/laptop/home-laptop.nix\n          ];\n        };\n      };\n    };\n  }\n"
  },
  {
    "path": "nixos/global-dotfiles/gtklock/config.ini",
    "content": "[main]\nmodules=/home/martin/.dots/gtklock/userinfo-module.so\n\n[userinfo]\nimage-size=128\nunder-clock=true\n\n"
  },
  {
    "path": "nixos/global-dotfiles/gtklock/style.css",
    "content": "* {\n}\n\nwindow {\n    background-image: url(\"../backgrounds/last/image_blurred.png\");\n    background-size: cover;\n    background-repeat: no-repeat;\n    background-position: center;\n}\n\nbox#window-box {\n    padding-bottom: 5em;\n}\n\nlabel#clock-label {\n    font-size: 5em;\n    padding-bottom: 3em;\n    color: @theme_fg_color;\n}\nlabel#input-label {\n    font-size: 0px;\n}\n\nentry#input-field {\n    color: @theme_fg_color;\n    background-color: @theme_bg_color;\n}\n\nbutton {\n    color: @theme_fg_color;\n    background-color: @theme_bg_color;\n}\n\nimage#user-image {\n\n}\n"
  },
  {
    "path": "nixos/global-dotfiles/swaylock/config",
    "content": "#  ____                     _            _     \n# / ___|_      ____ _ _   _| | ___   ___| | __ \n# \\___ \\ \\ /\\ / / _` | | | | |/ _ \\ / __| |/ / \n#  ___) \\ V  V / (_| | |_| | | (_) | (__|   <  \n# |____/ \\_/\\_/ \\__,_|\\__, |_|\\___/ \\___|_|\\_\\ \n#                     |___/                    \n#  \n# ----------------------------------------------------- \n\nignore-empty-password\nfont=\"Ubuntu Nerd Font\"\n\nclock\ntimestr=%R\ndatestr=%a, %d. %B\n\n# Add an image as a background \nimage=/tmp/hypr/latest_screenshot/latest_blur.png\n\n# Fade in time\nfade-in=0\n\n# Show/Hide indicator circle\nindicator\n\n# smaller indicator\nindicator-radius=150\n\n# bigger indicator\n# indicator-radius=300\n\nindicator-thickness=5\nindicator-caps-lock\n\n# Define all colors\n\nkey-hl-color=00000066\nseparator-color=00000000\n\ninside-color=00000033\ninside-clear-color=ffffff00\ninside-caps-lock-color=ffffff00\ninside-ver-color=ffffff00\ninside-wrong-color=ffffff00\n\nring-color=ffffff00\nring-clear-color=ffffff\nring-caps-lock-color=CC241D\nring-ver-color=ffffff\nring-wrong-color=ffffff\n\nline-color=00000000\nline-clear-color=ffffffFF\nline-caps-lock-color=ffffffFF\nline-ver-color=ffffffFF\nline-wrong-color=ffffffFF\n\ntext-color=ffffff\ntext-clear-color=ffffff\ntext-ver-color=ffffff\ntext-wrong-color=ffffff\n\nbs-hl-color=ffffff\ncaps-lock-key-hl-color=ffffffFF\ncaps-lock-bs-hl-color=ffffffFF\ntext-caps-lock-color=ffffff\n"
  },
  {
    "path": "nixos/hosts/desktop/configuration-desktop.nix",
    "content": "{ lib, ... }:\n\nlet\n  vars = import ../../variables.nix;\nin\n\n{\n  imports =\n    [\n      ./hardware-configuration-desktop.nix\n      ../../configs/global-configs/services.nix\n      ../../configs/global-configs/programs.nix\n      ../../configs/global-configs/bluetooth.nix\n      ../../configs/global-configs/tlp.nix\n      ../../nixos.nix\n      ../../packages.nix\n    ];\n\n  # Networking\n  networking = {\n    hostName = vars.desktop;\n    useDHCP = lib.mkDefault true;\n    networkmanager.enable = true;\n  };\n  #networking.interfaces.enp1s0.useDHCP = true;\n  #networking.interfaces.br0.useDHCP = false;\n  #networking.bridges = {\n  #  \"br0\" = {\n  #    interfaces = [ \"enp1s0\" ];\n  #  };\n  #};\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/hardware-configuration-desktop.nix",
    "content": "# Do not modify this file!  It was generated by ‘nixos-generate-config’\n# and may be overwritten by future invocations.  Please make changes\n# to /etc/nixos/configuration.nix instead.\n{ config, lib, modulesPath, ... }:\n\n{\n  imports =\n    [ (modulesPath + \"/installer/scan/not-detected.nix\")\n    ];\n\n  boot.initrd.availableKernelModules = [ \"xhci_pci\" \"ahci\" \"nvme\" \"usbhid\" \"uas\" \"sd_mod\" ];\n  boot.initrd.kernelModules = [ ];\n  boot.kernelModules = [ \"kvm-intel\" ];\n  boot.extraModulePackages = [ ];\n\n  fileSystems.\"/\" =\n    { device = \"/dev/disk/by-uuid/2be747cf-511f-4204-b1ad-73719edac311\";\n      fsType = \"ext4\";\n    };\n\n  fileSystems.\"/boot\" =\n    { device = \"/dev/disk/by-uuid/4376-E3AB\";\n      fsType = \"vfat\";\n    };\n\n  swapDevices =\n    [ { device = \"/dev/disk/by-uuid/2e974971-b9ed-460b-9e62-696b59bdfb37\"; }\n    ];\n\n  # Enables DHCP on each ethernet and wireless interface. In case of scripted networking\n  # (the default) this is the recommended approach. When using systemd-networkd it's\n  # still possible to use this option, but it's recommended to use it in conjunction\n  # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.\n  networking.useDHCP = lib.mkDefault true;\n  # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;\n\n  nixpkgs.hostPlatform = lib.mkDefault \"x86_64-linux\";\n  powerManagement.cpuFreqGovernor = lib.mkDefault \"powersave\";\n  hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-desktop.nix",
    "content": "{ pkgs, ... }:\n\nlet\n  vars = import ../../variables.nix;\nin\n\n{\n  imports = [\n    ../../configs/home-configs/styling.nix\n    ../../configs/home-configs/zsh.nix\n    ./link-dotfiles-desktop.nix\n    ./home-programs-desktop.nix\n  ];\n\n  home.username = vars.user1;\n  home.homeDirectory = vars.homeDirectoryUser1;\n\n  services.gpg-agent = {\n    enable = true;\n    defaultCacheTtl = 1800;\n    enableSshSupport = true;\n  };\n\n  dconf.settings = {\n    \"org/virt-manager/virt-manager/connections\" = {\n      autoconnect = [ \"qemu:///system\" ];\n      uris = [ \"qemu:///system\" ];\n    };\n  };\n\n  xdg.desktopEntries.\"org.gnome.Settings\" = {\n    name = \"Settings\";\n    comment = \"Gnome Control Center\";\n    icon = \"org.gnome.Settings\";\n    exec = \"env XDG_CURRENT_DESKTOP=gnome ${pkgs.gnome.gnome-control-center}/bin/gnome-control-center\";\n    categories = [ \"X-Preferences\" ];\n    terminal = false;\n  };\n\n  home.file = { };\n  home.sessionVariables = { };\n\n  home.sessionPath = [\n    \"$HOME/.local/bin\"\n  ];\n\n  home.stateVersion = \"23.11\";\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/.eslintrc.yml",
    "content": "env:\n  es2021: true\nextends: eslint:recommended\noverrides: []\nparserOptions:\n  ecmaVersion: latest\n  sourceType: 'module'\nrules:\n  arrow-parens:\n    - error\n    - as-needed\n  comma-dangle:\n    - error\n    - always-multiline\n  comma-spacing:\n    - error\n    - before: false\n      after: true\n  comma-style:\n    - error\n    - last\n  curly:\n    - error\n    - multi-or-nest\n    - consistent\n  dot-location:\n    - error\n    - property\n  eol-last: error\n  indent:\n    - error\n    - 4\n    - SwitchCase: 1\n  keyword-spacing:\n    - error\n    - before: true\n  lines-between-class-members:\n    - error\n    - always\n    - exceptAfterSingleLine: true\n  padded-blocks:\n    - error\n    - never\n    - allowSingleLineBlocks: false\n  prefer-const: error\n  quotes:\n    - error\n    - single\n    - avoidEscape: true\n  semi:\n    - error\n    - always\n  nonblock-statement-body-position:\n    - error\n    - below\n  no-trailing-spaces:\n    - error\n  array-bracket-spacing:\n    - error\n    - never\n  key-spacing:\n    - error\n    - beforeColon: false\n      afterColon: true\n  object-curly-spacing: \n    - error\n    - always\n  no-useless-escape:\n    - off\nglobals:\n  pkg: readonly\n  ags: readonly\n  ARGV: readonly\n  imports: readonly\n  print: readonly\n  console: readonly\n  logError: readonly\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/.gitignore",
    "content": "node_modules\ntypes\npackage-lock.json\nweather_key\nsetup.sh\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/.stylelintrc.yml",
    "content": "extends: stylelint-config-standard-scss\nignoreFiles:\n  - \"**/*.js\"\n  - \"**/*.ts\"\nrules:\n  selector-type-no-unknown: null\n  declaration-empty-line-before: null\n  no-descending-specificity: null\n  selector-pseudo-class-no-unknown: null\n  color-function-notation: legacy\n  alpha-value-notation: number\n  scss/operator-no-unspaced: null\n  scss/no-global-function-names: null\n  scss/dollar-variable-empty-line-before: null\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/config.js",
    "content": "import { readFile } from 'resource:///com/github/Aylur/ags/utils.js';\nimport App from 'resource:///com/github/Aylur/ags/app.js';\nconst pkgjson = JSON.parse(readFile(App.configDir + '/package.json'));\n\nconst v = {\n    ags: `v${pkg.version}`,\n    expected: `v${pkgjson.version}`,\n};\n\nfunction mismatch() {\n    print(`my config expects ${v.expected}, but your ags is ${v.ags}`);\n    App.connect('config-parsed', app => app.Quit());\n    return {};\n}\n\nexport default v.ags === v.expected\n    ? (await import('./js/main.js')).default\n    : mismatch();\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/about/about.js",
    "content": "import App from 'resource:///com/github/Aylur/ags/app.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport PopupWindow from '../misc/PopupWindow.js';\nimport icons from '../icons.js';\n\nconst pkg = JSON.parse(Utils.readFile(App.configDir + '/package.json'));\nconst show = JSON.parse(Utils.readFile(Utils.CACHE_DIR + '/show_about') || 'true');\nconst dontShow = () => Utils.writeFile('false', Utils.CACHE_DIR + '/show_about');\nconst avatar = App.configDir + '/assets/od_fsociety.png';\n\n/**\n * @param {Object} o\n * @param {string} o.label\n * @param {string} o.link\n */\nconst LinkButton = ({ label, link }) => Widget.Button({\n    on_clicked: () => Utils.execAsync(['xdg-open', link]),\n    child: Widget.Box({\n        children: [\n            Widget.Label({ label, hexpand: true, xalign: 0 }),\n            Widget.Icon(icons.ui.link),\n        ],\n    }),\n});\n\nexport default () => PopupWindow({\n    name: 'about',\n    transition: 'slide_down',\n    child: Widget.Box({\n        vertical: true,\n        class_name: 'window-content',\n        children: [\n            Widget.Box({\n                class_name: 'avatar',\n                hpack: 'center',\n                css: `background-image: url('${avatar}');`,\n            }),\n            Widget.Box({\n                vertical: true,\n                class_name: 'labels vertical',\n                children: [\n                    Widget.Label({\n                        class_name: 'title',\n                        label: pkg.description,\n                    }),\n                    Widget.Label({\n                        class_name: 'author',\n                        label: pkg.author,\n                    }),\n                    Widget.Label({\n                        class_name: 'version',\n                        hpack: 'center',\n                        label: pkg.version,\n                    }),\n                ],\n            }),\n            Widget.Box({\n                class_name: 'buttons',\n                vertical: true,\n                vexpand: true,\n                vpack: 'end',\n                children: [\n                    LinkButton({\n                        label: 'Support me on Ko-fi',\n                        link: pkg.kofi,\n                    }),\n                    LinkButton({\n                        label: 'Report an Issue',\n                        link: pkg.bugs.url,\n                    }),\n                ],\n            }),\n            Widget.Button({\n                class_name: 'dont-show',\n                on_clicked: () => {\n                    dontShow();\n                    App.toggleWindow('about');\n                },\n                child: Widget.Box({\n                    children: [\n                        Widget.Label(\"Don't show again\"),\n                        Widget.Box({ hexpand: true }),\n                        Widget.Icon(icons.ui.close),\n                    ],\n                }),\n            }),\n        ],\n    }),\n});\n\nexport function showAbout(force = false) {\n    if (show || force)\n        App.toggleWindow('about');\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/applauncher/AppItem.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport App from 'resource:///com/github/Aylur/ags/app.js';\nimport options from '../options.js';\nimport { lookUpIcon } from 'resource:///com/github/Aylur/ags/utils.js';\n\n/** @param {import('resource:///com/github/Aylur/ags/service/applications.js').Application} app */\nexport default app => {\n    const title = Widget.Label({\n        class_name: 'title',\n        label: app.name,\n        xalign: 0,\n        vpack: 'center',\n        truncate: 'end',\n    });\n\n    const description = Widget.Label({\n        class_name: 'description',\n        label: app.description || '',\n        wrap: true,\n        xalign: 0,\n        justification: 'left',\n        vpack: 'center',\n    });\n\n    const icon = Widget.Icon({\n        icon: lookUpIcon(app.icon_name || '') ? app.icon_name || '' : '',\n        binds: [['size', options.applauncher.icon_size]],\n    });\n\n    const textBox = Widget.Box({\n        vertical: true,\n        vpack: 'center',\n        children: app.description ? [title, description] : [title],\n    });\n\n    return Widget.Button({\n        class_name: 'app-item',\n        setup: self => self.app = app,\n        on_clicked: () => {\n            App.closeWindow('applauncher');\n            app.launch();\n        },\n        child: Widget.Box({\n            children: [icon, textBox],\n        }),\n    });\n};\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/applauncher/Applauncher.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport App from 'resource:///com/github/Aylur/ags/app.js';\nimport Applications from 'resource:///com/github/Aylur/ags/service/applications.js';\nimport PopupWindow from '../misc/PopupWindow.js';\nimport AppItem from './AppItem.js';\nimport icons from '../icons.js';\nimport { launchApp } from '../utils.js';\n\nconst WINDOW_NAME = 'applauncher';\n\nconst Applauncher = () => {\n    const children = () => [\n        ...Applications.query('').flatMap(app => {\n            const item = AppItem(app);\n            return [\n                Widget.Separator({\n                    hexpand: true,\n                    binds: [['visible', item, 'visible']],\n                }),\n                item,\n            ];\n        }),\n        Widget.Separator({ hexpand: true }),\n    ];\n\n    const list = Widget.Box({\n        vertical: true,\n        children: children(),\n    });\n\n    const entry = Widget.Entry({\n        hexpand: true,\n        primary_icon_name: icons.apps.search,\n\n        // set some text so on-change works the first time\n        text: '-',\n        on_accept: ({ text }) => {\n            const list = Applications.query(text || '');\n            if (list[0]) {\n                App.toggleWindow(WINDOW_NAME);\n                launchApp(list[0]);\n            }\n        },\n        on_change: ({ text }) => list.children.map(item => {\n            if (item.app)\n                item.visible = item.app.match(text);\n        }),\n    });\n\n    return Widget.Box({\n        vertical: true,\n        children: [\n            entry,\n            Widget.Scrollable({\n                hscroll: 'never',\n                child: list,\n            }),\n        ],\n        connections: [[App, (_, name, visible) => {\n            if (name !== WINDOW_NAME)\n                return;\n\n            entry.text = '';\n            if (visible)\n                entry.grab_focus();\n            else\n                list.children = children();\n        }]],\n    });\n};\n\nexport default () => PopupWindow({\n    name: WINDOW_NAME,\n    transition: 'slide_down',\n    child: Applauncher(),\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/bar/PanelButton.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport App from 'resource:///com/github/Aylur/ags/app.js';\n\n/**\n * @typedef {Object} PanelButtonProps\n * @property {any} content\n * @property {string=} window\n */\n\n/**\n * @param {import('types/widgets/button').ButtonProps & PanelButtonProps} o\n */\nexport default ({\n    class_name,\n    content,\n    window = '',\n    connections = [],\n    ...rest\n}) => {\n    let open = false;\n\n    const connection = [App, (self, win, visible) => {\n        if (win !== window)\n            return;\n\n        if (open && !visible) {\n            open = false;\n            self.toggleClassName('active', false);\n        }\n\n        if (visible) {\n            open = true;\n            self.toggleClassName('active');\n        }\n    }];\n\n    return Widget.Button({\n        class_name: `panel-button ${class_name}`,\n        child: Widget.Box({ children: [content] }),\n        connections: connections.concat([connection]),\n        ...rest,\n    });\n};\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/bar/TopBar.js",
    "content": "import SystemTray from 'resource:///com/github/Aylur/ags/service/systemtray.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Variable from 'resource:///com/github/Aylur/ags/variable.js';\nimport Battery from 'resource:///com/github/Aylur/ags/service/battery.js';\nimport OverviewButton from './buttons/OverviewButton.js';\nimport Workspaces from './buttons/Workspaces.js';\nimport DateButton from './buttons/DateButton.js';\nimport SysTray from './buttons/SysTray.js';\nimport ColorPicker from './buttons/ColorPicker.js';\nimport SystemIndicators from './buttons/SystemIndicators.js';\nimport PowerMenu from './buttons/PowerMenu.js';\nimport ScreenRecord from './buttons/ScreenRecord.js';\nimport BatteryBar from './buttons/BatteryBar.js';\nimport SubMenu from './buttons/SubMenu.js';\nimport Recorder from '../services/screenrecord.js';\nimport options from '../options.js';\nimport * as vars from '../variables.js';\n\nconst submenuItems = Variable(1);\nSystemTray.connect('changed', () => {\n    submenuItems.setValue(SystemTray.items.length + 1);\n});\n\n/**\n * @template T\n * @param {T=} service\n * @param {(self: T) => boolean=} condition\n */\nconst SeparatorDot = (service, condition) => {\n    const visibility = self => {\n        if (!options.bar.separators.value)\n            return self.visible = false;\n\n        self.visible = condition && service\n            ? condition(service)\n            : options.bar.separators.value;\n    };\n\n    const conn = service ? [[service, visibility]] : [];\n    return Widget.Separator({\n        connections: [['draw', visibility], ...conn],\n        binds: [['visible', options.bar.separators]],\n        vpack: 'center',\n    });\n};\n\nconst Start = () => Widget.Box({\n    class_name: 'start',\n    children: [\n        OverviewButton(),\n        SeparatorDot(),\n        Workspaces(),\n        Widget.Box({ hexpand: true }),\n    ],\n});\n\nconst Center = () => Widget.Box({\n    class_name: 'center',\n    children: [\n        DateButton(),\n    ],\n});\n\nconst SysProgress = (type, title, unit) => Widget.Box({\n    class_name: `circular-progress-box ${type}`,\n    hexpand: false,\n    binds: [['tooltipText', vars[type], 'value', v =>\n        `${title}: ${Math.floor(v * 100)}${unit}`]],\n    child: Widget.CircularProgress({\n        hexpand: true,\n        inverted: false,\n        class_name: `circular-progress ${type}`,\n        binds: [['value', vars[type]]],\n        start_at: 0.75,\n    }),\n});\n\nconst End = () => Widget.Box({\n    class_name: 'end',\n    children: [\n        Widget.Box({ hexpand: true }),\n\n        SubMenu({\n            items: submenuItems,\n            children: [\n                SysTray(),\n                ColorPicker(),\n            ],\n        }),\n\n        Widget.Box({\n            class_name: 'system-info horizontal',\n            children: [\n                SysProgress('cpu', 'Cpu', '%'),\n                SysProgress('ram', 'Ram', '%'),\n                SysProgress('temp', 'Temperature', '°'),\n            ],\n        }),\n\n        SeparatorDot(),\n        ScreenRecord(),\n        SeparatorDot(Recorder, r => r.recording),\n        BatteryBar(Battery, b => b.available),\n        SeparatorDot(Battery, b => b.available),\n        SystemIndicators(),\n        SeparatorDot(),\n        PowerMenu(),\n    ],\n});\n\n/** @param {number} monitor */\nexport default monitor => Widget.Window({\n    name: `bar${monitor}`,\n    class_name: 'transparent',\n    exclusivity: 'exclusive',\n    monitor,\n    binds: [['anchor', options.bar.position, 'value', pos => ([\n        pos, 'left', 'right',\n    ])]],\n    child: Widget.CenterBox({\n        class_name: 'panel',\n        start_widget: Start(),\n        center_widget: Center(),\n        end_widget: End(),\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/bar/buttons/BatteryBar.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Battery from 'resource:///com/github/Aylur/ags/service/battery.js';\nimport icons from '../../icons.js';\nimport FontIcon from '../../misc/FontIcon.js';\nimport options from '../../options.js';\nimport PanelButton from '../PanelButton.js';\n\nconst Indicator = () => Widget.Stack({\n    items: [\n        ['true', FontIcon(icons.battery.charging)],\n    ],\n    binds: [['visible', options.battery.bar.show_icon]],\n    connections: [[Battery, stack => {\n        stack.shown = `${Battery.charging || Battery.charged}`;\n    }]],\n});\n\nconst PercentLabel = () => Widget.Revealer({\n    transition: 'slide_right',\n    binds: [['reveal-child', options.battery.show_percentage]],\n    child: Widget.Label({\n        binds: [['label', Battery, 'percent', p => `${p}%`]],\n    }),\n});\n\nconst LevelBar = () => Widget.LevelBar({\n    connections: [[options.battery.bar.full, self => {\n        const full = options.battery.bar.full.value;\n        self.vpack = full ? 'fill' : 'center';\n        self.hpack = full ? 'fill' : 'center';\n    }]],\n    binds: [['value', Battery, 'percent', p => p / 100]],\n});\n\nconst WholeButton = () => Widget.Overlay({\n    class_name: 'whole-button',\n    child: LevelBar(),\n    pass_through: true,\n    overlays: [Widget.Box({\n        hpack: 'center',\n        children: [\n            FontIcon({\n                icon: icons.battery.charging,\n                binds: [['visible', Battery, 'charging']],\n            }),\n            Widget.Box({\n                hpack: 'center',\n                vpack: 'center',\n                child: PercentLabel(),\n            }),\n        ],\n    })],\n});\n\nexport default () => PanelButton({\n    class_name: 'battery-bar',\n    on_clicked: () => {\n        const v = options.battery.show_percentage.value;\n        options.battery.show_percentage.value = !v;\n    },\n    content: Widget.Box({\n        connections: [\n            [Battery, w => {\n                w.toggleClassName('charging', Battery.charging || Battery.charged);\n                w.toggleClassName('medium', Battery.percent < options.battery.medium.value);\n                w.toggleClassName('low', Battery.percent < options.battery.low.value);\n                w.toggleClassName('half', Battery.percent < 48);\n            }],\n        ],\n        binds: [\n            ['visible', Battery, 'available'],\n            ['children', options.battery.bar.full, 'value', full => full\n                ? [WholeButton()] : [\n                    Indicator(),\n                    PercentLabel(),\n                    LevelBar(),\n                ]],\n        ],\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/bar/buttons/ColorPicker.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Colors from '../../services/colorpicker.js';\nimport PanelButton from '../PanelButton.js';\nimport Gdk from 'gi://Gdk';\n\nexport default () => PanelButton({\n    class_name: 'color-picker',\n    content: Widget.Icon('color-select-symbolic'),\n    binds: [['tooltip-text', Colors, 'colors', v => `${v.length} colors`]],\n    on_clicked: () => Colors.pick(),\n\n    on_secondary_click: btn => {\n        if (Colors.colors.length === 0)\n            return;\n\n        Widget.Menu({\n            class_name: 'colorpicker',\n            children: Colors.colors.map(color => Widget.MenuItem({\n                child: Widget.Label(color),\n                css: `background-color: ${color}`,\n                on_activate: () => Colors.wlCopy(color),\n            })),\n        }).popup_at_widget(btn, Gdk.Gravity.SOUTH, Gdk.Gravity.NORTH, null);\n    },\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/bar/buttons/DateButton.js",
    "content": "import App from 'resource:///com/github/Aylur/ags/app.js';\nimport Clock from '../../misc/Clock.js';\nimport PanelButton from '../PanelButton.js';\n\nexport default ({ format = '%d.%m.%y - %H:%M' } = {}) => PanelButton({\n    class_name: 'dashboard panel-button',\n    on_clicked: () => App.toggleWindow('dashboard'),\n    window: 'dashboard',\n    content: Clock({ format }),\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/bar/buttons/FocusedClient.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport PanelButton from '../PanelButton.js';\nimport options from '../../options.js';\nimport { substitute } from '../../utils.js';\n\nexport const ClientLabel = () => Widget.Label({\n    binds: [['label', Hyprland.active.client, 'class', c => {\n        const { titles } = options.substitutions;\n        return substitute(titles, c);\n    }]],\n});\n\nexport const ClientIcon = () => Widget.Icon({\n    connections: [[Hyprland.active.client, self => {\n        const { icons } = options.substitutions;\n        const { client } = Hyprland.active;\n\n        const classIcon = substitute(icons, client.class) + '-symbolic';\n        const titleIcon = substitute(icons, client.class) + '-symbolic';\n\n        const hasTitleIcon = Utils.lookUpIcon(titleIcon);\n        const hasClassIcon = Utils.lookUpIcon(classIcon);\n\n        if (hasClassIcon)\n            self.icon = classIcon;\n\n        if (hasTitleIcon)\n            self.icon = titleIcon;\n\n        self.visible = !!(hasTitleIcon || hasClassIcon);\n    }]],\n});\n\nexport default () => PanelButton({\n    class_name: 'focused-client',\n    content: Widget.Box({\n        children: [\n            ClientIcon(),\n            ClientLabel(),\n        ],\n        binds: [['tooltip-text', Hyprland.active, 'client', c => c.title]],\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/bar/buttons/MediaIndicator.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Mpris from 'resource:///com/github/Aylur/ags/service/mpris.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport HoverRevealer from '../../misc/HoverRevealer.js';\nimport * as mpris from '../../misc/mpris.js';\nimport options from '../../options.js';\n\nexport const getPlayer = (name = options.mpris.preferred.value) =>\n    Mpris.getPlayer(name) || Mpris.players[0] || null;\n\n/**\n * @param {Object} o\n * @param {import('types/service/mpris').MprisPlayer} o.player\n * @param {import('../../misc/HoverRevealer').HoverRevealProps['direction']=} o.direction\n */\nconst Indicator = ({ player, direction = 'right' }) => HoverRevealer({\n    class_name: `media panel-button ${player.name}`,\n    direction,\n    on_primary_click: () => player.playPause(),\n    on_scroll_up: () => player.next(),\n    on_scroll_down: () => player.previous(),\n    on_secondary_click: () => player.playPause(),\n    indicator: mpris.PlayerIcon(player),\n    child: Widget.Label({\n        vexpand: true,\n        truncate: 'end',\n        max_width_chars: 40,\n        connections: [[player, label => {\n            label.label = `${player.track_artists.join(', ')} - ${player.track_title}`;\n        }]],\n    }),\n    connections: [[player, revealer => {\n        if (revealer._current === player.track_title)\n            return;\n\n        revealer._current = player.track_title;\n        revealer.reveal_child = true;\n        Utils.timeout(3000, () => {\n            revealer.reveal_child = false;\n        });\n    }]],\n});\n\n/**\n * @param {Object} o\n * @param {import('../../misc/HoverRevealer').HoverRevealProps['direction']=} o.direction\n */\nexport default ({ direction = 'right' } = {}) => {\n    let current = null;\n\n    const update = box => {\n        const player = getPlayer();\n        box.visible = !!player;\n\n        if (!player) {\n            current = null;\n            return;\n        }\n\n        if (current === player)\n            return;\n\n        current = player;\n        box.children = [Indicator({ player, direction })];\n    };\n\n    return Widget.Box({\n        connections: [\n            [options.mpris.preferred, update],\n            [Mpris, update, 'notify::players'],\n        ],\n    });\n};\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/bar/buttons/NotificationIndicator.js",
    "content": "import App from 'resource:///com/github/Aylur/ags/app.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Notifications from 'resource:///com/github/Aylur/ags/service/notifications.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport icons from '../../icons.js';\nimport HoverRevealer from '../../misc/HoverRevealer.js';\n\n/**\n * @param {Object} o\n * @param {import('../../misc/HoverRevealer').HoverRevealProps['direction']=} o.direction\n */\nexport default ({ direction = 'left' } = {}) => HoverRevealer({\n    class_name: 'notifications panel-button',\n    eventboxConnections: [\n        ['button-press-event', () => App.openWindow('dashboard')],\n        [Notifications, box => box.visible =\n            Notifications.notifications.length > 0 || Notifications.dnd],\n    ],\n    connections: [[Notifications, revealer => {\n        const title = Notifications.notifications[0]?.summary;\n        if (revealer._title === title)\n            return;\n\n        revealer._title = title;\n        revealer.reveal_child = true;\n        Utils.timeout(3000, () => {\n            revealer.reveal_child = false;\n        });\n    }]],\n    direction,\n    indicator: Widget.Icon({\n        binds: [['icon', Notifications, 'dnd', dnd => dnd\n            ? icons.notifications.silent\n            : icons.notifications.noisy,\n        ]],\n    }),\n    child: Widget.Label({\n        truncate: 'end',\n        max_width_chars: 40,\n        binds: [['label', Notifications, 'notifications', n => n.reverse()[0]?.summary || '']],\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/bar/buttons/OverviewButton.js",
    "content": "import App from 'resource:///com/github/Aylur/ags/app.js';\nimport PanelButton from '../PanelButton.js';\nimport FontIcon from '../../misc/FontIcon.js';\nimport { distroIcon } from '../../variables.js';\nimport options from '../../options.js';\n\nexport default () => PanelButton({\n    class_name: 'overview',\n    window: 'overview',\n    on_clicked: () => App.toggleWindow('overview'),\n    content: FontIcon({\n        binds: [['icon', options.bar.icon, 'value', v => {\n            return v === 'distro-icon' ? distroIcon : v;\n        }]],\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/bar/buttons/PowerMenu.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport App from 'resource:///com/github/Aylur/ags/app.js';\nimport icons from '../../icons.js';\nimport PanelButton from '../PanelButton.js';\n\nexport default () => PanelButton({\n    class_name: 'powermenu',\n    content: Widget.Icon(icons.powermenu.shutdown),\n    on_clicked: () => App.openWindow('powermenu'),\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/bar/buttons/ScreenRecord.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport PanelButton from '../PanelButton.js';\nimport Recorder from '../../services/screenrecord.js';\nimport icons from '../../icons.js';\n\nexport default () => PanelButton({\n    class_name: 'recorder',\n    on_clicked: () => Recorder.stop(),\n    binds: [['visible', Recorder, 'recording']],\n    content: Widget.Box({\n        children: [\n            Widget.Icon(icons.recorder.recording),\n            Widget.Label({\n                binds: [['label', Recorder, 'timer', time => {\n                    const sec = time % 60;\n                    const min = Math.floor(time / 60);\n                    return `${min}:${sec < 10 ? '0' + sec : sec}`;\n                }]],\n            }),\n        ],\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/bar/buttons/SubMenu.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport Variable from 'resource:///com/github/Aylur/ags/variable.js';\nimport icons from '../../icons.js';\nimport options from '../../options.js';\n\n/**\n * @param {import('types/widgets/revealer').default} revealer\n * @param {'left' | 'right' | 'up' | 'down'} direction\n * @param {import('types/variable').Variable} items\n */\nconst Arrow = (revealer, direction, items) => {\n    let deg = 0;\n\n    const icon = Widget.Icon({\n        icon: icons.ui.arrow[direction],\n    });\n\n    const animate = () => {\n        const t = options.transition.value / 20;\n        const step = revealer.reveal_child ? 10 : -10;\n        for (let i = 0; i < 18; ++i) {\n            Utils.timeout(t * i, () => {\n                deg += step;\n                icon.setCss(`-gtk-icon-transform: rotate(${deg}deg);`);\n            });\n        }\n    };\n\n    return Widget.Button({\n        class_name: 'panel-button sub-menu',\n        connections: [[items, btn => {\n            btn.tooltip_text = `${items.value} Items`;\n        }]],\n        on_clicked: () => {\n            animate();\n            revealer.reveal_child = !revealer.reveal_child;\n        },\n        child: icon,\n    });\n};\n\n/**\n * @param {Object} o\n * @param {import('types/widgets/box').default['children']} o.children\n * @param {'left' | 'right' | 'up' | 'down'=} o.direction\n * @param {import('types/variable').Variable} o.items\n */\nexport default ({ children, direction = 'left', items = Variable(0) }) => {\n    const posStart = direction === 'up' || direction === 'left';\n    const posEnd = direction === 'down' || direction === 'right';\n    const revealer = Widget.Revealer({\n        transition: `slide_${direction}`,\n        child: Widget.Box({\n            children,\n        }),\n    });\n\n    return Widget.Box({\n        vertical: direction === 'up' || direction === 'down',\n        children: [\n            posStart && revealer,\n            Arrow(revealer, direction, items),\n            posEnd && revealer,\n        ],\n    });\n};\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/bar/buttons/SysTray.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport SystemTray from 'resource:///com/github/Aylur/ags/service/systemtray.js';\nimport PanelButton from '../PanelButton.js';\nimport Gdk from 'gi://Gdk';\n\n/** @param {import('types/service/systemtray').TrayItem} item */\nconst SysTrayItem = item => PanelButton({\n    class_name: 'tray-item',\n    content: Widget.Icon({ binds: [['icon', item, 'icon']] }),\n    binds: [['tooltipMarkup', item, 'tooltip-markup']],\n    setup: self => {\n        const id = item.menu?.connect('popped-up', menu => {\n            self.toggleClassName('active');\n            menu.connect('notify::visible', menu => {\n                self.toggleClassName('active', menu.visible);\n            });\n            menu.disconnect(id);\n        });\n\n        if (id)\n            self.connect('destroy', () => item.menu?.disconnect(id));\n    },\n\n    // @ts-expect-error popup_at_widget missing from types?\n    on_primary_click: btn => item.menu?.popup_at_widget(\n        btn, Gdk.Gravity.SOUTH, Gdk.Gravity.NORTH, null),\n\n    // @ts-expect-error popup_at_widget missing from types?\n    on_secondary_click: btn => item.menu?.popup_at_widget(\n        btn, Gdk.Gravity.SOUTH, Gdk.Gravity.NORTH, null),\n});\n\nexport default () => Widget.Box({\n    binds: [['children', SystemTray, 'items', i => i.map(SysTrayItem)]],\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/bar/buttons/System.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport PanelButton from '../PanelButton.js';\nimport * as variables from '../../variables.js';\nimport icons from '../../icons.js';\n\n/** @param {'cpu' | 'ram'} type */\nconst System = type => {\n    const icon = Widget.Icon({\n        class_name: 'icon',\n        icon: icons.system[type],\n    });\n\n    const progress = Widget.Box({\n        class_name: 'progress',\n        child: Widget.CircularProgress({\n            binds: [['value', variables[type]]],\n        }),\n    });\n\n    const revealer = Widget.Revealer({\n        transition: 'slide_right',\n        child: Widget.Label({\n            binds: [['label', variables[type], 'value', v => {\n                return ` ${type}: ${Math.round(v * 100)}%`;\n            }]],\n        }),\n    });\n\n    return PanelButton({\n        class_name: `system ${type}`,\n        on_clicked: () => revealer.reveal_child = !revealer.reveal_child,\n        content: Widget.EventBox({\n            on_hover: () => revealer.reveal_child = true,\n            on_hover_lost: () => revealer.reveal_child = false,\n            child: Widget.Box({\n                children: [\n                    icon,\n                    Widget.Box({\n                        class_name: 'revealer',\n                        child: revealer,\n                    }),\n                    progress,\n                ],\n            }),\n        }),\n    });\n};\n\nexport const CPU = () => System('cpu');\nexport const RAM = () => System('ram');\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/bar/buttons/SystemIndicators.js",
    "content": "import App from 'resource:///com/github/Aylur/ags/app.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Notifications from 'resource:///com/github/Aylur/ags/service/notifications.js';\nimport Bluetooth from 'resource:///com/github/Aylur/ags/service/bluetooth.js';\nimport Audio from 'resource:///com/github/Aylur/ags/service/audio.js';\nimport Network from 'resource:///com/github/Aylur/ags/service/network.js';\nimport HoverRevealer from '../../misc/HoverRevealer.js';\nimport PanelButton from '../PanelButton.js';\nimport Asusctl from '../../services/asusctl.js';\nimport Indicator from '../../services/onScreenIndicator.js';\nimport icons from '../../icons.js';\nimport FontIcon from '../../misc/FontIcon.js';\n\nconst ProfileIndicator = () => Widget.Icon()\n    .bind('visible', Asusctl, 'profile', p => p !== 'Balanced')\n    .bind('icon', Asusctl, 'profile', i => icons.asusctl.profile[i]);\n\nconst ModeIndicator = () => FontIcon()\n    .bind('visible', Asusctl, 'mode', m => m !== 'Hybrid')\n    .bind('icon', Asusctl, 'mode', i => icons.asusctl.mode[i]);\n\nconst MicrophoneIndicator = () => Widget.Icon().hook(Audio, icon => {\n    if (!Audio.microphone)\n        return;\n\n    const { muted, low, medium, high } = icons.audio.mic;\n    if (Audio.microphone.is_muted)\n        return icon.icon = muted;\n\n    /** @type {Array<[number, string]>} */\n    const cons = [[67, high], [34, medium], [1, low], [0, muted]];\n    icon.icon = cons.find(([n]) => n <= Audio.microphone.volume * 100)?.[1] || '';\n\n    icon.visible = Audio.recorders.length > 0 || Audio.microphone.is_muted;\n}, 'speaker-changed');\n\nconst DNDIndicator = () => Widget.Icon({\n    visible: Notifications.bind('dnd'),\n    icon: icons.notifications.silent,\n});\n\nconst BluetoothDevicesIndicator = () => Widget.Box().hook(Bluetooth, box => {\n    box.children = Bluetooth.connectedDevices\n        .map(({ iconName, name }) => HoverRevealer({\n            indicator: Widget.Icon(iconName + '-symbolic'),\n            child: Widget.Label(name),\n        }));\n\n    box.visible = Bluetooth.connectedDevices.length > 0;\n}, 'notify::connected-devices');\n\nconst BluetoothIndicator = () => Widget.Icon({\n    class_name: 'bluetooth',\n    icon: icons.bluetooth.enabled,\n    visible: Bluetooth.bind('enabled'),\n});\n\nconst NetworkIndicator = () => Widget.Icon().hook(Network, self => {\n    const icon = Network[Network.primary || 'wifi']?.iconName;\n    self.icon = icon || '';\n    self.visible = !!icon;\n});\n\nconst AudioIndicator = () => Widget.Icon().hook(Audio, self => {\n    if (!Audio.speaker)\n        return;\n\n    const { muted, low, medium, high, overamplified } = icons.audio.volume;\n    if (Audio.speaker.is_muted)\n        return self.icon = muted;\n\n\n    /** @type {Array<[number, string]>} */\n    const cons = [[101, overamplified], [67, high], [34, medium], [1, low], [0, muted]];\n    self.icon = cons.find(([n]) => n <= Audio.speaker.volume * 100)?.[1] || '';\n}, 'speaker-changed');\n\nexport default () => PanelButton({\n    class_name: 'quicksettings panel-button',\n    on_clicked: () => App.toggleWindow('quicksettings'),\n    setup: self => self\n        .hook(App, (_, win, visible) => {\n            self.toggleClassName('active', win === 'quicksettings' && visible);\n        }),\n    on_scroll_up: () => {\n        Audio.speaker.volume += 0.02;\n        Indicator.speaker();\n    },\n    on_scroll_down: () => {\n        Audio.speaker.volume -= 0.02;\n        Indicator.speaker();\n    },\n    content: Widget.Box({\n        children: [\n            Asusctl?.available && ProfileIndicator(),\n            Asusctl?.available && ModeIndicator(),\n            DNDIndicator(),\n            BluetoothDevicesIndicator(),\n            BluetoothIndicator(),\n            NetworkIndicator(),\n            AudioIndicator(),\n            MicrophoneIndicator(),\n        ],\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/bar/buttons/Taskbar.js",
    "content": "import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';\nimport Applications from 'resource:///com/github/Aylur/ags/service/applications.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport PanelButton from '../PanelButton.js';\nimport { launchApp } from '../../utils.js';\nimport icons from '../../icons.js';\n\nconst focus = ({ address }) => Hyprland.sendMessage(`dispatch focuswindow address:${address}`);\n\n/** @param {import('types/widgets/box').default} box */\nconst setChildren = box => box.children = Hyprland.clients.map(client => {\n    if (Hyprland.active.workspace.id !== client.workspace.id)\n        return;\n\n    for (const app of Applications.list) {\n        if (client.class && app.match(client.class)) {\n            return PanelButton({\n                content: Widget.Icon(app.icon_name || icons.fallback.executable),\n                tooltip_text: app.name,\n                on_primary_click: () => focus(client),\n                on_middle_click: () => launchApp(app),\n            });\n        }\n    }\n});\n\nexport default () => Widget.Box({\n    connections: [\n        [Hyprland, setChildren, 'notify::clients'],\n        [Hyprland, setChildren, 'notify::active'],\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/bar/buttons/Workspaces.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport options from '../../options.js';\nimport { range } from '../../utils.js';\n\n/** @param {any} arg */\nconst dispatch = arg => Utils.execAsync(`hyprctl dispatch workspace ${arg}`);\n\nconst Workspaces = () => {\n    const ws = options.workspaces.value;\n    return Widget.Box({\n        children: range(ws || 20).map(i => Widget.Button({\n            setup: btn => btn.id = i,\n            on_clicked: () => dispatch(i),\n            child: Widget.Label({\n                label: `${i}`,\n                class_name: 'indicator',\n                vpack: 'center',\n            }),\n            connections: [[Hyprland, btn => {\n                btn.toggleClassName('active', Hyprland.active.workspace.id === i);\n                btn.toggleClassName('occupied', Hyprland.getWorkspace(i)?.windows > 0);\n            }]],\n        })),\n        connections: ws ? [] : [[Hyprland.active.workspace, box => box.children.map(btn => {\n            btn.visible = Hyprland.workspaces.some(ws => ws.id === btn.id);\n        })]],\n    });\n};\n\nexport default () => Widget.EventBox({\n    class_name: 'workspaces panel-button',\n    child: Widget.Box({\n        // its nested like this to keep it consistent with other PanelButton widgets\n        child: Widget.EventBox({\n            on_scroll_up: () => dispatch('m+1'),\n            on_scroll_down: () => dispatch('m-1'),\n            class_name: 'eventbox',\n            binds: [['child', options.workspaces, 'value', Workspaces]],\n        }),\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/dashboard/Dashboard.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport DateColumn from './DateColumn.js';\nimport NotificationColumn from './NotificationColumn.js';\nimport PopupWindow from '../misc/PopupWindow.js';\nimport options from '../options.js';\n\nexport default () => PopupWindow({\n    name: 'dashboard',\n    connections: [[options.bar.position, self => {\n        self.anchor = [options.bar.position.value];\n        self.transition = 'crossfade';\n\n    }]],\n    child: Widget.Box({\n        children: [\n            NotificationColumn(),\n            Widget.Separator({ orientation: 1 }),\n            DateColumn(),\n        ],\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/dashboard/DateColumn.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Clock from '../misc/Clock.js';\nimport * as vars from '../variables.js';\n\n\nexport default () => Widget.Box({\n    vertical: true,\n    class_name: 'datemenu vertical',\n    children: [\n        Widget.Box({\n            class_name: 'clock-box',\n            vertical: true,\n            children: [\n                Clock({ format: '%H:%M' }),\n                Widget.Label({\n                    class_name: 'uptime',\n                    binds: [['label', vars.uptime, 'value', t => `uptime: ${t}`]],\n                }),\n            ],\n        }),\n        Widget.Box({\n            class_name: 'calendar',\n            children: [\n                Widget.Calendar({\n                    hexpand: true,\n                    hpack: 'center',\n                }),\n            ],\n        }),\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/dashboard/NotificationColumn.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Notifications from 'resource:///com/github/Aylur/ags/service/notifications.js';\nimport icons from '../icons.js';\nimport Notification from '../misc/Notification.js';\nimport { timeout } from 'resource:///com/github/Aylur/ags/utils.js';\n\nconst ClearButton = () => Widget.Button({\n    on_clicked: () => {\n        const list = Array.from(Notifications.notifications);\n        for (let i = 0; i < list.length; i++)\n            timeout(50 * i, () => list[i]?.close());\n    },\n    binds: [['sensitive', Notifications, 'notifications', n => n.length > 0]],\n    child: Widget.Box({\n        children: [\n            Widget.Label('Clear '),\n            Widget.Icon({\n                binds: [['icon', Notifications, 'notifications', n =>\n                    n.length > 0 ? icons.trash.full : icons.trash.empty]],\n            }),\n        ],\n    }),\n});\n\nconst Header = () => Widget.Box({\n    class_name: 'header',\n    children: [\n        Widget.Label({ label: 'Notifications', hexpand: true, xalign: 0 }),\n        ClearButton(),\n    ],\n});\n\nconst NotificationList = () => Widget.Box({\n    vertical: true,\n    vexpand: true,\n    connections: [[Notifications, box => {\n        box.children = Notifications.notifications\n            .reverse().map(Notification);\n\n        box.visible = Notifications.notifications.length > 0;\n    }]],\n});\n\nconst Placeholder = () => Widget.Box({\n    class_name: 'placeholder',\n    vertical: true,\n    vpack: 'center',\n    hpack: 'center',\n    vexpand: true,\n    hexpand: true,\n    children: [\n        Widget.Icon(icons.notifications.silent),\n        Widget.Label('Your inbox is empty'),\n    ],\n    binds: [['visible', Notifications, 'notifications', n => n.length === 0]],\n});\n\nexport default () => Widget.Box({\n    class_name: 'notifications',\n    vertical: true,\n    children: [\n        Header(),\n        Widget.Scrollable({\n            vexpand: true,\n            class_name: 'notification-scrollable',\n            child: Widget.Box({\n                class_name: 'notification-list',\n                vertical: true,\n                children: [\n                    NotificationList(),\n                    Placeholder(),\n                ],\n            }),\n        }),\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/desktop/Desktop.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Clock from '../misc/Clock.js';\nimport DesktopMenu from './DesktopMenu.js';\nimport options from '../options.js';\n\nconst DesktopClock = () => Widget.Box({\n    class_name: 'clock-box-shadow',\n    child: Widget.CenterBox({\n        class_name: 'clock-box',\n        children: [\n            Clock({\n                class_name: 'clock',\n                hpack: 'center',\n                format: '%H',\n            }),\n            Widget.Box({\n                class_name: 'separator-box',\n                vertical: true,\n                hexpand: true,\n                hpack: 'center',\n                children: [\n                    Widget.Separator({ vpack: 'center', vexpand: true }),\n                    Widget.Separator({ vpack: 'center', vexpand: true }),\n                ],\n            }),\n            Clock({\n                class_name: 'clock',\n                hpack: 'center',\n                format: '%M',\n            }),\n        ],\n    }),\n});\n\nconst Desktop = () => Widget.EventBox({\n    on_secondary_click: (_, event) => DesktopMenu().popup_at_pointer(event),\n    child: Widget.Box({\n        vertical: true,\n        vexpand: true,\n        hexpand: true,\n        binds: [['visible', options.desktop.clock.enable]],\n        connections: [[options.desktop.clock.position, box => {\n            const [hpack = 'center', vpack = 'center', offset = 64] =\n                options.desktop.clock.position.value.split(' ') || [];\n\n            // @ts-expect-error\n            box.hpack = hpack; box.vpack = vpack;\n            box.setCss(`margin: ${Number(offset)}px;`);\n        }]],\n        children: [\n            DesktopClock(),\n            Clock({ format: '%B %e. %A', class_name: 'date' }),\n        ],\n    }),\n});\n\n/** @param {number} monitor */\nexport default monitor => Widget.Window({\n    monitor,\n    name: `desktop${monitor}`,\n    layer: 'background',\n    class_name: 'desktop',\n    anchor: ['top', 'bottom', 'left', 'right'],\n    child: Desktop(),\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/desktop/DesktopMenu.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport App from 'resource:///com/github/Aylur/ags/app.js';\nimport PowerMenu from '../services/powermenu.js';\nimport icons from '../icons.js';\nimport Gtk from 'gi://Gtk';\nimport { openSettings } from '../settings/theme.js';\n\n/**\n * @param {string} label\n * @param {string} icon\n * @param {import('types/widgets/menu').MenuItemProps['on_activate']} on_activate\n */\nconst Item = (label, icon, on_activate) => Widget.MenuItem({\n    on_activate,\n    child: Widget.Box({\n        children: [\n            Widget.Icon(icon),\n            Widget.Label({\n                label,\n                hexpand: true,\n                xalign: 0,\n            }),\n        ],\n    }),\n});\n\nexport default () => Widget.Menu({\n    class_name: 'desktop-menu',\n    children: [\n        Widget.MenuItem({\n            child: Widget.Box({\n                children: [\n                    Widget.Icon(icons.powermenu.shutdown),\n                    Widget.Label({\n                        label: 'System',\n                        hexpand: true,\n                        xalign: 0,\n                    }),\n                ],\n            }),\n            submenu: Widget.Menu({\n                children: [\n                    Item('Shutdown', icons.powermenu.shutdown, () => PowerMenu.action('shutdown')),\n                    Item('Log Out', icons.powermenu.logout, () => PowerMenu.action('logout')),\n                    Item('Reboot', icons.powermenu.reboot, () => PowerMenu.action('reboot')),\n                    Item('Sleep', icons.powermenu.sleep, () => PowerMenu.action('reboot')),\n                ],\n            }),\n        }),\n        Item('Applications', icons.apps.apps, () => App.openWindow('applauncher')),\n        new Gtk.SeparatorMenuItem,\n        Item('Settings', icons.ui.settings, openSettings),\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/dock/Dock.js",
    "content": "import App from 'resource:///com/github/Aylur/ags/app.js';\nimport Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';\nimport Applications from 'resource:///com/github/Aylur/ags/service/applications.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport icons from '../icons.js';\nimport options from '../options.js';\nimport { launchApp, range } from '../utils.js';\n\nconst focus = ({ address }) => Hyprland.sendMessage(`dispatch focuswindow address:${address}`);\n\n/** @param {import('types/widgets/button').ButtonProps & { icon: string, pinned?: boolean }} o */\nconst AppButton = ({ icon, pinned = false, ...rest }) => {\n    const indicators = Widget.Box({\n        vpack: 'end',\n        hpack: 'center',\n        children: range(5, 0).map(() => Widget.Box({\n            class_name: 'indicator',\n            visible: false,\n        })),\n    });\n\n    const button = Widget.Button({\n        ...rest,\n        child: Widget.Box({\n            class_name: 'box',\n            child: Widget.Overlay({\n                child: Widget.Icon({\n                    icon,\n                    binds: [['size', options.desktop.dock.icon_size]],\n                }),\n                pass_through: true,\n                overlays: pinned ? [indicators] : [],\n            }),\n        }),\n    });\n\n    return Object.assign(button, { indicators });\n};\n\nconst Taskbar = () => Widget.Box({\n    binds: [['children', Hyprland, 'clients', c => c.map(client => {\n        for (const appName of options.desktop.dock.pinned_apps.value) {\n            if (client.class.toLowerCase().includes(appName.toLowerCase()))\n                return null;\n        }\n        for (const app of Applications.list) {\n            if (client.title && app.match(client.title) ||\n                client.class && app.match(client.class)) {\n                return AppButton({\n                    icon: app.icon_name || '',\n                    tooltip_text: app.name,\n                    on_primary_click: () => focus(client),\n                    on_middle_click: () => launchApp(app),\n                });\n            }\n        }\n    })]],\n});\n\nconst PinnedApps = () => Widget.Box({\n    class_name: 'pins',\n    homogeneous: true,\n    binds: [['children', options.desktop.dock.pinned_apps, 'value', v => v\n        .map(term => ({ app: Applications.query(term)?.[0], term }))\n        .filter(({ app }) => app)\n        .map(({ app, term = true }) => AppButton({\n            pinned: true,\n            icon: app.icon_name || '',\n            on_primary_click: () => {\n                for (const client of Hyprland.clients) {\n                    if (client.class.toLowerCase().includes(term))\n                        return focus(client);\n                }\n\n                launchApp(app);\n            },\n            on_middle_click: () => launchApp(app),\n            tooltip_text: app.name,\n            connections: [[Hyprland, button => {\n                const running = Hyprland.clients\n                    .filter(client => client.class.toLowerCase().includes(term));\n\n                const focused = running.find(client =>\n                    client.address === Hyprland.active.client.address);\n\n                const index = running.findIndex(c => c === focused);\n\n                for (let i = 0; i < 5; ++i) {\n                    const indicator = button.indicators.children[i];\n                    indicator.visible = i < running.length;\n                    indicator.toggleClassName('focused', i === index);\n                }\n\n                button.set_tooltip_text(running.length === 1 ? running[0].title : app.name);\n            }]],\n        })),\n    ]],\n});\n\nexport default () => {\n    const pinnedapps = PinnedApps();\n    const taskbar = Taskbar();\n    const applauncher = AppButton({\n        class_name: 'launcher nonrunning',\n        icon: icons.apps.apps,\n        tooltip_text: 'Applications',\n        on_clicked: () => App.toggleWindow('applauncher'),\n    });\n    const separator = Widget.Separator({\n        vpack: 'center',\n        hpack: 'center',\n        orientation: 1,\n        connections: [[Hyprland, box => box.visible = taskbar.children.length > 0]],\n    });\n    return Widget.Box({\n        class_name: 'dock',\n        children: [applauncher, pinnedapps, separator, taskbar],\n    });\n};\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/dock/FloatingDock.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';\nimport Dock from './Dock.js';\nimport options from '../options.js';\n\n/** @param {number} monitor */\nexport default monitor => {\n    const revealer = Widget.Revealer({\n        transition: 'slide_up',\n        child: Dock(),\n        setup: self => {\n            const update = () => {\n                const ws = Hyprland.getWorkspace(Hyprland.active.workspace.id);\n                if (Hyprland.getMonitor(monitor)?.name === ws?.monitor)\n                    self.reveal_child = ws?.windows === 0;\n            };\n            self\n                .hook(Hyprland, update, 'client-added')\n                .hook(Hyprland, update, 'client-removed')\n                .hook(Hyprland.active.workspace, update);\n        },\n    });\n\n    return Widget.Window({\n        monitor,\n        name: `dock${monitor}`,\n        class_name: 'floating-dock',\n        anchor: ['bottom'],\n        child: Widget.Box({\n            children: [\n                revealer,\n                Widget.Box({\n                    class_name: 'padding',\n                    css: 'padding: 2px;',\n                }),\n            ],\n        }),\n        connections: [\n            ['enter-notify-event', () => {\n                revealer.reveal_child = true;\n            }],\n            ['leave-notify-event', () => {\n                revealer.reveal_child = false;\n            }],\n        ],\n        binds: [['visible', options.bar.position, 'value', v => v !== 'bottom']],\n    });\n};\n\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/icons.js",
    "content": "export default {\n    lock: 'system-lock-screen-symbolic',\n    fallback: {\n        executable: 'application-x-executable-symbolic',\n    },\n    audio: {\n        mic: {\n            muted: 'microphone-disabled-symbolic',\n            low: 'microphone-sensitivity-low-symbolic',\n            medium: 'microphone-sensitivity-medium-symbolic',\n            high: 'microphone-sensitivity-high-symbolic',\n        },\n        volume: {\n            muted: 'audio-volume-muted-symbolic',\n            low: 'audio-volume-low-symbolic',\n            medium: 'audio-volume-medium-symbolic',\n            high: 'audio-volume-high-symbolic',\n            overamplified: 'audio-volume-overamplified-symbolic',\n        },\n        type: {\n            headset: 'audio-headphones-symbolic',\n            speaker: 'audio-speakers-symbolic',\n            card: 'audio-card-symbolic',\n        },\n        mixer: '',\n    },\n    asusctl: {\n        profile: {\n            Balanced: 'power-profile-balanced-symbolic',\n            Quiet: 'power-profile-power-saver-symbolic',\n            Performance: 'power-profile-performance-symbolic',\n        },\n        mode: {\n            Integrated: '',\n            Hybrid: '󰢮',\n        },\n    },\n    apps: {\n        apps: 'view-app-grid-symbolic',\n        search: 'folder-saved-search-symbolic',\n    },\n    battery: {\n        charging: '󱐋',\n        warning: 'battery-empty-symbolic',\n    },\n    bluetooth: {\n        enabled: 'bluetooth-active-symbolic',\n        disabled: 'bluetooth-disabled-symbolic',\n    },\n    brightness: {\n        indicator: 'display-brightness-symbolic',\n        keyboard: 'keyboard-brightness-symbolic',\n        screen: 'display-brightness-symbolic',\n    },\n    powermenu: {\n        sleep: 'weather-clear-night-symbolic',\n        reboot: 'system-reboot-symbolic',\n        logout: 'system-log-out-symbolic',\n        shutdown: 'system-shutdown-symbolic',\n    },\n    recorder: {\n        recording: 'media-record-symbolic',\n    },\n    notifications: {\n        noisy: 'preferences-system-notifications-symbolic',\n        silent: 'notifications-disabled-symbolic',\n    },\n    trash: {\n        full: 'user-trash-full-symbolic',\n        empty: 'user-trash-symbolic',\n    },\n    mpris: {\n        fallback: 'audio-x-generic-symbolic',\n        shuffle: {\n            enabled: '󰒟',\n            disabled: '󰒟',\n        },\n        loop: {\n            none: '󰓦',\n            track: '󰓦',\n            playlist: '󰑐',\n        },\n        playing: '󰏦',\n        paused: '󰐍',\n        stopped: '󰐍',\n        prev: '󰒮',\n        next: '󰒭',\n    },\n    ui: {\n        close: 'window-close-symbolic',\n        info: 'info-symbolic',\n        menu: 'open-menu-symbolic',\n        link: 'web-browser-symbolic',\n        settings: 'emblem-system-symbolic',\n        tick: 'object-select-symbolic',\n        arrow: {\n            right: 'pan-end-symbolic',\n            left: 'pan-start-symbolic',\n            down: 'pan-down-symbolic',\n            up: 'pan-up-symbolic',\n        },\n    },\n    system: {\n        cpu: 'org.gnome.SystemMonitor-symbolic',\n        ram: 'drive-harddisk-solidstate-symbolic',\n        temp: 'temperature-symbolic',\n    },\n    dialog: {\n        Search: '',\n        Applauncher: '󰵆',\n        Bar: '',\n        Border: '󰃇',\n        Color: '󰏘',\n        Desktop: '',\n        Font: '',\n        General: '󰒓',\n        Miscellaneous: '󰠱',\n        Theme: '󰃟',\n        Notifications: '󰂚 ',\n    },\n};\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/lockscreen/Lockscreen.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Avatar from '../misc/Avatar.js';\nimport Lockscreen from '../services/lockscreen.js';\nimport Layer from 'gi://GtkLayerShell';\n\nconst PasswordEntry = () => Widget.Box({\n    children: [\n        Widget.Entry({\n            connections: [[Lockscreen, entry => entry.text = '', 'lock']],\n            visibility: false,\n            placeholder_text: 'Password',\n            on_accept: ({ text }) => Lockscreen.auth(text || ''),\n            hpack: 'center',\n            hexpand: true,\n        }),\n        Widget.Spinner({\n            active: true,\n            vpack: 'center',\n            connections: [[Lockscreen, (w, auth) => w.visible = auth, 'authenticating']],\n        }),\n    ],\n});\n\n/** @param {number} monitor */\nexport default monitor => {\n    const win = Widget.Window({\n        name: `lockscreen${monitor}`,\n        class_name: 'lockscreen',\n        monitor,\n        layer: 'overlay',\n        visible: false,\n        connections: [[Lockscreen, (w, lock) => w.visible = lock, 'lock']],\n        child: Widget.Box({\n            css: 'min-width: 3000px; min-height: 2000px;',\n            class_name: 'shader',\n            child: Widget.Box({\n                class_name: 'content',\n                vertical: true,\n                hexpand: true,\n                vexpand: true,\n                hpack: 'center',\n                vpack: 'center',\n                children: [\n                    Avatar({\n                        hpack: 'center',\n                        vpack: 'center',\n                    }),\n                    PasswordEntry(),\n                ],\n            }),\n        }),\n    });\n\n    Layer.set_keyboard_mode(win, Layer.KeyboardMode.EXCLUSIVE);\n    return win;\n};\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/lockscreen/auth.py",
    "content": "#! /usr/bin/env python\n\nimport pam\nimport sys\nimport getpass\n\nprint(pam.authenticate(getpass.getuser(), sys.argv[1]));\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/main.js",
    "content": "import Applauncher from './applauncher/Applauncher.js';\nimport Dashboard from './dashboard/Dashboard.js';\nimport Desktop from './desktop/Desktop.js';\nimport FloatingDock from './dock/FloatingDock.js';\nimport Lockscreen from './lockscreen/Lockscreen.js';\nimport Notifications from './notifications/Notifications.js';\nimport OSD from './osd/OSD.js';\nimport Overview from './overview/Overview.js';\nimport PowerMenu from './powermenu/PowerMenu.js';\nimport QuickSettings from './quicksettings/QuickSettings.js';\nimport ScreenCorners from './screencorner/ScreenCorners.js';\nimport TopBar from './bar/TopBar.js';\nimport Verification from './powermenu/Verification.js';\nimport About from './about/about.js';\nimport { init } from './settings/setup.js';\nimport { forMonitors } from './utils.js';\nimport { initWallpaper } from './settings/wallpaper.js';\nimport options from './options.js';\n\ninitWallpaper();\n\nconst windows = () => [\n    forMonitors(FloatingDock),\n    forMonitors(Lockscreen),\n    forMonitors(Notifications),\n    forMonitors(OSD),\n    forMonitors(ScreenCorners),\n    forMonitors(TopBar),\n    Applauncher(),\n    Dashboard(),\n    Overview(),\n    PowerMenu(),\n    QuickSettings(),\n    Verification(),\n    About(),\n];\n\nexport default {\n    onConfigParsed: init,\n    windows: windows().flat(1),\n    maxStreamVolume: 1.05,\n    cacheNotificationActions: false,\n    closeWindowDelay: {\n        'quicksettings': options.transition.value,\n        'dashboard': options.transition.value,\n    },\n};\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/misc/Avatar.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport options from '../options.js';\n\n/** @param {import('types/widgets/box').BoxProps=} props */\nexport default props => Widget.Box({\n    ...props,\n    class_name: 'avatar',\n    connections: [\n        [options.desktop.avatar, box => box.setCss(`\n            background-image: url('${options.desktop.avatar.value}');\n            background-size: cover;\n        `)],\n        ['draw', box => {\n            const h = box.get_allocated_height();\n            box.set_size_request(Math.ceil(h * 1.1), -1);\n        }],\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/misc/BatteryIcon.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Battery from 'resource:///com/github/Aylur/ags/service/battery.js';\n\nexport default () => Widget.Icon({\n    class_name: 'battery',\n    binds: [['icon', Battery, 'icon-name']],\n    connections: [[Battery, icon => {\n        icon.toggleClassName('charging', Battery.charging);\n        icon.toggleClassName('charged', Battery.charged);\n        icon.toggleClassName('low', Battery.percent < 30);\n    }]],\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/misc/Clock.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport GLib from 'gi://GLib';\n\n/**\n * @param {import('types/widgets/label').Props & {\n *   format?: string,\n *   interval?: number,\n * }} o\n */\nexport default ({\n    format = '%H:%M:%S %B %e. %A',\n    interval = 1000,\n    ...rest\n} = {}) => Widget.Label({\n    class_name: 'clock',\n    ...rest,\n    connections: [[interval, label =>\n        label.label = GLib.DateTime.new_now_local().format(format) || 'wrong format',\n    ]],\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/misc/FontIcon.js",
    "content": "import Gtk from 'gi://Gtk';\nimport { createCtor } from 'resource:///com/github/Aylur/ags/widget.js';\nimport AgsLabel from 'resource:///com/github/Aylur/ags/widgets/label.js';\nimport GObject from 'gi://GObject';\n\nexport default createCtor(class FontIcon extends AgsLabel {\n    static { GObject.registerClass(this); }\n\n    /** @param {string | import('types/widgets/label').Props & { icon?: string }} params */\n    constructor(params = '') {\n        // @ts-expect-error\n        const { icon = '', ...rest } = params;\n\n        super(typeof params === 'string' ? {} : rest);\n        this.toggleClassName('font-icon');\n\n        if (typeof params === 'object')\n            this.icon = icon;\n\n        if (typeof params === 'string')\n            this.icon = params;\n    }\n\n    get icon() { return this.label; }\n    set icon(icon) { this.label = icon; }\n\n    get size() {\n        return this.get_style_context()\n            .get_property('font-size', Gtk.StateFlags.NORMAL);\n    }\n\n    /** @returns {[number, number]} */\n    vfunc_get_preferred_height() {\n        return [this.size, this.size];\n    }\n\n    /** @returns {[number, number]} */\n    vfunc_get_preferred_width() {\n        return [this.size, this.size];\n    }\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/misc/HoverRevealer.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\n\n/**\n * @typedef {import('types/widgets/eventbox').EventBoxProps & {\n *    indicator?: import('types/widgets/box').BoxProps['child']\n *    direction?: 'left' | 'right' | 'down' | 'up'\n *    duration?: number\n *    eventboxConnections?: import('types/widgets/box').BoxProps['connections']\n *    connections?: import('types/widgets/revealer').RevealerProps['connections']\n * }} HoverRevealProps\n */\n\n/**\n * @param {HoverRevealProps} props\n */\nexport default ({\n    indicator,\n    child,\n    direction = 'left',\n    duration = 300,\n    connections = [],\n    eventboxConnections = [],\n    binds = [],\n    ...rest\n}) => {\n    let open = false;\n    const vertical = direction === 'down' || direction === 'up';\n    const posStart = direction === 'down' || direction === 'right';\n    const posEnd = direction === 'up' || direction === 'left';\n\n    const revealer = Widget.Revealer({\n        transition: `slide_${direction}`,\n        connections,\n        binds,\n        transition_duration: duration,\n        child,\n    });\n\n    const eventbox = Widget.EventBox({\n        ...rest,\n        connections: eventboxConnections,\n        on_hover: () => {\n            if (open)\n                return;\n\n            revealer.reveal_child = true;\n            Utils.timeout(duration, () => open = true);\n        },\n        on_hover_lost: () => {\n            if (!open)\n                return;\n\n            revealer.reveal_child = false;\n            open = false;\n        },\n        child: Widget.Box({\n            vertical,\n            children: [\n                posStart && indicator,\n                revealer,\n                posEnd && indicator,\n            ],\n        }),\n    });\n\n    return Widget.Box({\n        children: [eventbox],\n    });\n};\n\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/misc/IconBrowser.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport RegularWindow from './RegularWindow.js';\nimport Gtk from 'gi://Gtk';\n\nexport default () => {\n    const selected = Widget.Label({\n        css: 'font-size: 1.2em;',\n    });\n\n    const flowbox = Widget.FlowBox({\n        min_children_per_line: 10,\n        setup: self => {\n            self.connect('child-activated', (_, child) => {\n                selected.label = child.get_child().iconName;\n            });\n\n            Gtk.IconTheme.get_default().list_icons(null).sort().map(icon => {\n                !icon.endsWith('.symbolic') && self.insert(Widget.Icon({\n                    icon,\n                    size: 38,\n                }), -1);\n            });\n\n            self.show_all();\n        },\n    });\n\n    const entry = Widget.Entry({\n        on_change: ({ text }) => flowbox.get_children().forEach(child => {\n            child.visible = child.get_child().iconName.includes(text);\n        }),\n    });\n\n    return RegularWindow({\n        name: 'icons',\n        visible: true,\n        child: Widget.Box({\n            css: 'padding: 30px;',\n            spacing: 20,\n            vertical: true,\n            children: [\n                entry,\n                Widget.Scrollable({\n                    hscroll: 'never',\n                    vscroll: 'always',\n                    hexpand: true,\n                    vexpand: true,\n                    css:\n                        'min-width: 500px;' +\n                        'min-height: 500px;',\n                    child: flowbox,\n                }),\n                selected,\n            ],\n        }),\n    });\n};\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/misc/Notification.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport GLib from 'gi://GLib';\n\n/** @param {import('types/service/notifications').Notification} n */\nconst NotificationIcon = ({ app_entry, app_icon, image }) => {\n    if (image) {\n        return Widget.Box({\n            vpack: 'start',\n            hexpand: false,\n            class_name: 'icon img',\n            css: `\n                background-image: url(\"${image}\");\n                background-size: cover;\n                background-repeat: no-repeat;\n                background-position: center;\n                min-width: 78px;\n                min-height: 78px;\n            `,\n        });\n    }\n\n    let icon = 'dialog-information-symbolic';\n    if (Utils.lookUpIcon(app_icon))\n        icon = app_icon;\n\n    if (Utils.lookUpIcon(app_entry || ''))\n        icon = app_entry || '';\n\n    return Widget.Box({\n        vpack: 'start',\n        hexpand: false,\n        class_name: 'icon',\n        css: `\n            min-width: 78px;\n            min-height: 78px;\n        `,\n        child: Widget.Icon({\n            icon, size: 58,\n            hpack: 'center', hexpand: true,\n            vpack: 'center', vexpand: true,\n        }),\n    });\n};\n\n/** @param {import('types/service/notifications').Notification} notification */\nexport default notification => {\n    const content = Widget.Box({\n        class_name: 'content',\n        children: [\n            NotificationIcon(notification),\n            Widget.Box({\n                hexpand: true,\n                vertical: true,\n                children: [\n                    Widget.Box({\n                        children: [\n                            Widget.Label({\n                                class_name: 'title',\n                                xalign: 0,\n                                justification: 'left',\n                                hexpand: true,\n                                max_width_chars: 24,\n                                truncate: 'end',\n                                wrap: true,\n                                label: notification.summary,\n                                use_markup: true,\n                            }),\n                            Widget.Label({\n                                class_name: 'time',\n                                vpack: 'start',\n                                label: GLib.DateTime.new_from_unix_local(notification.time).format('%H:%M'),\n                            }),\n                            Widget.Button({\n                                class_name: 'close-button',\n                                vpack: 'start',\n                                child: Widget.Icon('window-close-symbolic'),\n                                on_clicked: () => notification.close(),\n                            }),\n                        ],\n                    }),\n                    Widget.Label({\n                        class_name: 'description',\n                        hexpand: true,\n                        use_markup: true,\n                        xalign: 0,\n                        justification: 'left',\n                        label: notification.body,\n                        wrap: true,\n                    }),\n                ],\n            }),\n        ],\n    });\n\n    const actionsbox = Widget.Revealer({\n        transition: 'slide_down',\n        child: Widget.EventBox({\n            child: Widget.Box({\n                class_name: 'actions horizontal',\n                children: notification.actions.map(action => Widget.Button({\n                    class_name: 'action-button',\n                    on_clicked: () => notification.invoke(action.id),\n                    hexpand: true,\n                    child: Widget.Label(action.label),\n                })),\n            }),\n        }),\n    });\n\n    return Widget.EventBox({\n        class_name: `notification ${notification.urgency}`,\n        vexpand: false,\n        on_primary_click: () => notification.dismiss(),\n        on_hover() {\n            actionsbox.reveal_child = true;\n        },\n        on_hover_lost() {\n            actionsbox.reveal_child = true;\n            notification.dismiss();\n        },\n        child: Widget.Box({\n            vertical: true,\n            children: [\n                content,\n                notification.actions.length > 0 && actionsbox,\n            ],\n        }),\n    });\n};\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/misc/PopupWindow.js",
    "content": "import AgsWindow from 'resource:///com/github/Aylur/ags/widgets/window.js';\nimport App from 'resource:///com/github/Aylur/ags/app.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport options from '../options.js';\nimport GObject from 'gi://GObject';\n\nclass PopupWindow extends AgsWindow {\n    static { GObject.registerClass(this); }\n\n    /** @param {import('types/widgets/window').WindowProps & {\n     *      name: string\n     *      child: import('types/widgets/box').default\n     *      transition?: import('types/widgets/revealer').RevealerProps['transition']\n     *  }} o\n     */\n    constructor({ name, child, transition = 'none', visible = false, ...rest }) {\n        super({\n            ...rest,\n            name,\n            popup: true,\n            focusable: true,\n            class_names: ['popup-window', name],\n        });\n\n        child.toggleClassName('window-content');\n        this.revealer = Widget.Revealer({\n            transition,\n            child,\n            transitionDuration: options.transition.value,\n            connections: [[App, (_, wname, visible) => {\n                if (wname === name)\n                    this.revealer.reveal_child = visible;\n            }]],\n        });\n\n        this.child = Widget.Box({\n            css: 'padding: 1px;',\n            child: this.revealer,\n        });\n\n        this.show_all();\n        this.visible = visible;\n    }\n\n    set transition(dir) { this.revealer.transition = dir; }\n    get transition() { return this.revealer.transition; }\n}\n\n\n\n/** @param {import('types/widgets/window').WindowProps & {\n *      name: string\n *      child: import('types/widgets/box').default\n *      transition?: import('types/widgets/revealer').RevealerProps['transition']\n *  }} config\n */\nexport default config => new PopupWindow(config);\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/misc/Progress.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\n\nexport default ({\n    height = 18,\n    width = 180,\n    vertical = false,\n    child,\n    ...props\n}) => {\n    const fill = Widget.Box({\n        class_name: 'fill',\n        hexpand: vertical,\n        vexpand: !vertical,\n        hpack: vertical ? 'fill' : 'start',\n        vpack: vertical ? 'end' : 'fill',\n        children: [child],\n    });\n\n    let fill_size = 0;\n\n    return Widget.Box({\n        ...props,\n        class_name: 'progress',\n        css: `\n            min-width: ${width}px;\n            min-height: ${height}px;\n        `,\n        children: [fill],\n        setup: progress => progress.setValue = value => {\n            if (value < 0)\n                return;\n\n            const axis = vertical ? 'height' : 'width';\n            const axisv = vertical ? height : width;\n            const min = vertical ? width : height;\n            const preferred = (axisv - min) * value + min;\n\n            if (!fill_size) {\n                fill_size = preferred;\n                fill.setCss(`min-${axis}: ${preferred}px;`);\n                return;\n            }\n\n            const frames = 10;\n            const goal = preferred - fill_size;\n            const step = goal / frames;\n\n            for (let i = 0; i < frames; ++i) {\n                Utils.timeout(5 * i, () => {\n                    fill_size += step;\n                    fill.setCss(`min-${axis}: ${fill_size}px`);\n                });\n            }\n        },\n    });\n};\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/misc/RegularWindow.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Gtk from 'gi://Gtk';\nimport AgsWidget from 'resource:///com/github/Aylur/ags/widgets/widget.js';\n\nclass RegularWindow extends AgsWidget(Gtk.Window, 'RegularWindow') {\n    static { AgsWidget.register(this); }\n    /**\n     * @param {import('types/widgets/widget').BaseProps<\n     *      RegularWindow, Gtk.Window.ConstructorProperties\n     * >} params */\n    constructor(params) {\n        // @ts-expect-error\n        super(params);\n    }\n}\n\nexport default Widget.createCtor(RegularWindow);\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/misc/mpris.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport icons from '../icons.js';\nimport { blurImg } from '../utils.js';\n\n/**\n * @param {import('types/service/mpris').MprisPlayer} player\n * @param {import('types/widgets/box').BoxProps=} props\n */\nexport const CoverArt = (player, props) => Widget.Box({\n    ...props,\n    class_name: 'cover',\n    binds: [['css', player, 'cover-path',\n        path => `background-image: url(\"${path}\")`]],\n});\n\n/**\n * @param {import('types/service/mpris').MprisPlayer} player\n * @param {import('types/widgets/box').BoxProps=} props\n */\nexport const BlurredCoverArt = (player, props) => Widget.Box({\n    ...props,\n    class_name: 'blurred-cover',\n    connections: [[player, box => blurImg(player.cover_path).then(img => {\n        img && box.setCss(`background-image: url(\"${img}\")`);\n    }), 'notify::cover-path']],\n});\n\n/**\n * @param {import('types/service/mpris').MprisPlayer} player\n * @param {import('types/widgets/label').Props=} props\n */\nexport const TitleLabel = (player, props) => Widget.Label({\n    ...props,\n    class_name: 'title',\n    binds: [['label', player, 'track-title']],\n});\n\n/**\n * @param {import('types/service/mpris').MprisPlayer} player\n * @param {import('types/widgets/label').Props=} props\n */\nexport const ArtistLabel = (player, props) => Widget.Label({\n    ...props,\n    class_name: 'artist',\n    binds: [['label', player, 'track-artists', a => a.join(', ') || '']],\n});\n\n/**\n * @param {import('types/service/mpris').MprisPlayer} player\n * @param {import('types/widgets/icon').Props & { symbolic?: boolean }=} props\n */\nexport const PlayerIcon = (player, { symbolic = true, ...props } = {}) => Widget.Icon({\n    ...props,\n    class_name: 'player-icon',\n    tooltip_text: player.identity || '',\n    connections: [[player, icon => {\n        const name = `${player.entry}${symbolic ? '-symbolic' : ''}`;\n        Utils.lookUpIcon(name)\n            ? icon.icon = name\n            : icon.icon = icons.mpris.fallback;\n    }]],\n});\n\n/**\n * @param {import('types/service/mpris').MprisPlayer} player\n * @param {import('types/widgets/slider').SliderProps=} props\n */\nexport const PositionSlider = (player, props) => Widget.Slider({\n    ...props,\n    class_name: 'position-slider',\n    draw_value: false,\n    on_change: ({ value }) => {\n        player.position = player.length * value;\n    },\n    properties: [['update', slider => {\n        if (slider.dragging)\n            return;\n\n        slider.visible = player.length > 0;\n        if (player.length > 0)\n            slider.value = player.position / player.length;\n    }]],\n    connections: [\n        [player, s => s._update(s)],\n        [player, s => s._update(s), 'position'],\n        [1000, s => s._update(s)],\n    ],\n});\n\n/** @param {number} length */\nfunction lengthStr(length) {\n    const min = Math.floor(length / 60);\n    const sec = Math.floor(length % 60);\n    const sec0 = sec < 10 ? '0' : '';\n    return `${min}:${sec0}${sec}`;\n}\n\n/** @param {import('types/service/mpris').MprisPlayer} player */\nexport const PositionLabel = player => Widget.Label({\n    properties: [['update', (label, time) => {\n        player.length > 0\n            ? label.label = lengthStr(time || player.position)\n            : label.visible = !!player;\n    }]],\n    connections: [\n        [player, (l, time) => l._update(l, time), 'position'],\n        [1000, l => l._update(l)],\n    ],\n});\n\n/** @param {import('types/service/mpris').MprisPlayer} player */\nexport const LengthLabel = player => Widget.Label({\n    connections: [[player, label => {\n        player.length > 0\n            ? label.label = lengthStr(player.length)\n            : label.visible = !!player;\n    }]],\n});\n\n/** @param {import('types/service/mpris').MprisPlayer} player */\nexport const Slash = player => Widget.Label({\n    label: '/',\n    connections: [[player, label => {\n        label.visible = player.length > 0;\n    }]],\n});\n\n/**\n * @param {Object} o\n * @param {import('types/service/mpris').MprisPlayer} o.player\n * @param {import('types/widgets/stack').StackProps['items']} o.items\n * @param {'shuffle' | 'loop' | 'playPause' | 'previous' | 'next'} o.onClick\n * @param {string} o.prop\n * @param {string} o.canProp\n * @param {any} o.cantValue\n */\nconst PlayerButton = ({ player, items, onClick, prop, canProp, cantValue }) => Widget.Button({\n    child: Widget.Stack({\n        items,\n        binds: [['shown', player, prop, p => `${p}`]],\n    }),\n    on_clicked: player[onClick].bind(player),\n    binds: [['visible', player, canProp, c => c !== cantValue]],\n});\n\n/** @param {import('types/service/mpris').MprisPlayer} player */\nexport const ShuffleButton = player => PlayerButton({\n    player,\n    items: [\n        ['true', Widget.Label({\n            class_name: 'shuffle enabled',\n            label: icons.mpris.shuffle.enabled,\n        })],\n        ['false', Widget.Label({\n            class_name: 'shuffle disabled',\n            label: icons.mpris.shuffle.disabled,\n        })],\n    ],\n    onClick: 'shuffle',\n    prop: 'shuffle-status',\n    canProp: 'shuffle-status',\n    cantValue: null,\n});\n\n/** @param {import('types/service/mpris').MprisPlayer} player */\nexport const LoopButton = player => PlayerButton({\n    player,\n    items: [\n        ['None', Widget.Label({\n            class_name: 'loop none',\n            label: icons.mpris.loop.none,\n        })],\n        ['Track', Widget.Label({\n            class_name: 'loop track',\n            label: icons.mpris.loop.track,\n        })],\n        ['Playlist', Widget.Label({\n            class_name: 'loop playlist',\n            label: icons.mpris.loop.playlist,\n        })],\n    ],\n    onClick: 'loop',\n    prop: 'loop-status',\n    canProp: 'loop-status',\n    cantValue: null,\n});\n\n/** @param {import('types/service/mpris').MprisPlayer} player */\nexport const PlayPauseButton = player => PlayerButton({\n    player,\n    items: [\n        ['Playing', Widget.Label({\n            class_name: 'playing',\n            label: icons.mpris.playing,\n        })],\n        ['Paused', Widget.Label({\n            class_name: 'paused',\n            label: icons.mpris.paused,\n        })],\n        ['Stopped', Widget.Label({\n            class_name: 'stopped',\n            label: icons.mpris.stopped,\n        })],\n    ],\n    onClick: 'playPause',\n    prop: 'play-back-status',\n    canProp: 'can-play',\n    cantValue: false,\n});\n\n/** @param {import('types/service/mpris').MprisPlayer} player */\nexport const PreviousButton = player => PlayerButton({\n    player,\n    items: [\n        ['true', Widget.Label({\n            class_name: 'previous',\n            label: icons.mpris.prev,\n        })],\n    ],\n    onClick: 'previous',\n    prop: 'can-go-prev',\n    canProp: 'can-go-prev',\n    cantValue: false,\n});\n\n/** @param {import('types/service/mpris').MprisPlayer} player */\nexport const NextButton = player => PlayerButton({\n    player,\n    items: [\n        ['true', Widget.Label({\n            class_name: 'next',\n            label: icons.mpris.next,\n        })],\n    ],\n    onClick: 'next',\n    prop: 'can-go-next',\n    canProp: 'can-go-next',\n    cantValue: false,\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/notifications/Notifications.js",
    "content": "import Notifications from 'resource:///com/github/Aylur/ags/service/notifications.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport Notification from '../misc/Notification.js';\nimport options from '../options.js';\n\n/** @param {import('types/widgets/revealer').default} parent */\nconst Popups = parent => {\n    const map = new Map();\n\n    const onDismissed = (_, id, force = false) => {\n        if (!id || !map.has(id))\n            return;\n\n        if (map.get(id).isHovered() && !force)\n            return;\n\n        if (map.size - 1 === 0)\n            parent.reveal_child = false;\n\n        Utils.timeout(200, () => {\n            map.get(id)?.destroy();\n            map.delete(id);\n        });\n    };\n\n    /** @param {import('types/widgets/box').default} box */\n    const onNotified = (box, id) => {\n        if (!id || Notifications.dnd)\n            return;\n\n        const n = Notifications.getNotification(id);\n        if (!n)\n            return;\n\n        if (options.notifications.black_list.value.includes(n.app_name || ''))\n            return;\n\n        map.delete(id);\n        map.set(id, Notification(n));\n        box.children = Array.from(map.values()).reverse();\n        Utils.timeout(10, () => {\n            parent.reveal_child = true;\n        });\n    };\n\n    return Widget.Box({\n        vertical: true,\n        connections: [\n            [Notifications, onNotified, 'notified'],\n            [Notifications, onDismissed, 'dismissed'],\n            [Notifications, (box, id) => onDismissed(box, id, true), 'closed'],\n        ],\n    });\n};\n\n/** @param {import('types/widgets/revealer').RevealerProps['transition']} transition */\nconst PopupList = (transition = 'slide_down') => Widget.Box({\n    css: 'padding: 1px',\n    children: [\n        Widget.Revealer({\n            transition,\n            setup: self => self.child = Popups(self),\n        }),\n    ],\n});\n\n/** @param {number} monitor */\nexport default monitor => Widget.Window({\n    monitor,\n    name: `notifications${monitor}`,\n    class_name: 'notifications',\n    binds: [['anchor', options.notifications.position]],\n    child: PopupList(),\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/options.js",
    "content": "/**\n * An object holding Options that are Variables with cached values.\n *\n * to update an option at runtime simply run\n * ags -r \"options.path.to.option.setValue('value')\"\n *\n * resetting:\n * ags -r \"options.reset()\"\n */\n\nimport { Option, resetOptions, getValues, apply, getOptions } from './settings/option.js';\nimport { USER } from 'resource:///com/github/Aylur/ags/utils.js';\nimport themes from './themes.js';\nimport { Theme, WP, HOME } from './settings/theme.js';\n\n\nexport default {\n    reset: resetOptions,\n    values: getValues,\n    apply: apply,\n    list: getOptions,\n\n    spacing: Option(2),\n    padding: Option(8),\n    radii: Option(5),\n\n    popover_padding_multiplier: Option(1.4, {\n        'category': 'General',\n        'note': 'popover-padding: padding × this',\n        'type': 'float',\n        'unit': '',\n    }),\n\n    misc: {\n        pywal: {\n            theme: Option('base16-default', {\n                'scss': 'exclude',\n\n            })\n        },\n        gtk: {\n            theme: Option('adw-gtk3-dark', {\n                'scss': 'exclude',\n\n            })\n        },\n        gtkIcons: {\n            theme: Option('Adwaita', {\n                'scss': 'exclude',\n\n            })\n        },\n    },\n\n    color: {\n        red: Option('#c01c28', { 'scss': 'red' }),\n        green: Option('#2ec27e', { 'scss': 'green' }),\n        yellow: Option('#f5c211', { 'scss': 'yellow' }),\n        blue: Option('#3584e4', { 'scss': 'blue' }),\n        magenta: Option('#813d9c', { 'scss': 'magenta' }),\n        teal: Option('#99c1f1', { 'scss': 'teal' }),\n        orange: Option('#e66100', { 'scss': 'orange' }),\n    },\n\n    theme: {\n        name: Option(themes[0].name, {\n            'category': 'exclude',\n            'note': 'Name to show as active in quicktoggles',\n        }),\n\n        icon: Option(themes[0].icon, {\n            'category': 'exclude',\n            'note': 'Icon to show as active in quicktoggles',\n        }),\n\n        scheme: Option('dark', {\n            'enums': ['dark', 'light'],\n            'type': 'enum',\n            'note': \"Color scheme to set on Gtk apps: 'ligth' or 'dark'\",\n            'title': 'Color Scheme',\n            'scss': 'color-scheme',\n        }),\n        bg: Option('#1E1E1E', {\n            'title': 'Background Color',\n            'scss': 'bg-color',\n        }),\n        fg: Option('#deddda', {\n            'title': 'Foreground Color',\n            'scss': 'fg-color',\n        }),\n\n        accent: {\n            accent: Option('$blue', {\n                'category': 'Theme',\n                'title': 'Accent Color',\n                'scss': 'accent',\n            }),\n            fg: Option('#141414', {\n                'category': 'Theme',\n                'title': 'Accent Foreground Color',\n                'scss': 'accent-fg',\n            }),\n            gradient: Option('to right, $accent, lighten($accent, 6%)', {\n                'category': 'Theme',\n                'title': 'Accent Linear Gradient',\n                'scss': 'accent-gradient',\n            }),\n        },\n\n        widget: {\n            bg: Option('$fg-color', {\n                'category': 'Theme',\n                'title': 'Widget Background Color',\n                'scss': '_widget-bg',\n            }),\n            opacity: Option(94, {\n                'category': 'Theme',\n                'title': 'Widget Background Opacity',\n                'unit': '',\n                'scss': 'widget-opacity',\n            }),\n        },\n    },\n\n    border: {\n        color: Option('$fg-color', {\n            'category': 'Border',\n            'title': 'Border Color',\n            'scss': '_border-color',\n        }),\n        opacity: Option(97, {\n            'category': 'Border',\n            'title': 'Border Opacity',\n            'unit': '',\n        }),\n        width: Option(0, {\n            'category': 'Border',\n            'title': 'Border Width',\n        }),\n        barcolor: Option('#ffffff', {\n            'category': 'Border',\n            'title': 'Bar Border color',\n            'scss': 'bar-border-color',\n        }),\n    },\n\n    hypr: {\n        inactive_border: Option('rgba(333333ff)', {\n            'category': 'Border',\n            'title': 'Border on Inactive Windows',\n            'scss': 'exclude',\n        }),\n        wm_gaps: Option(3, {\n            'category': 'General',\n            'scss': 'wm-gaps',\n            'note': 'wm-gaps',\n            'type': 'float',\n            'unit': '',\n        }),\n    },\n\n    // TODO: use this on revealers\n    transition: Option(100, {\n        'category': 'exclude',\n        'note': 'Transition time on aminations in ms, e.g on hover',\n        'unit': 'ms',\n    }),\n\n    font: {\n        font: Option('Ubuntu Nerd Font', {\n            'type': 'font',\n            'title': 'Font',\n            'scss': 'font',\n        }),\n        mono: Option('Mononoki Nerd Font', {\n            'title': 'Monospaced Font',\n            'scss': 'mono-font',\n        }),\n        size: Option(13, {\n            'scss': 'font-size',\n            'unit': 'pt',\n        }),\n    },\n\n    applauncher: {\n        width: Option(500),\n        height: Option(500),\n        icon_size: Option(42),\n    },\n\n    bar: {\n        position: Option('top', {\n            'enums': ['top', 'bottom'],\n            'type': 'enum',\n        }),\n        style: Option('floating', {\n            'enums': ['floating', 'normal', 'separated'],\n            'type': 'enum',\n        }),\n        flat_buttons: Option(true, { 'scss': 'bar-flat-buttons' }),\n        separators: Option(true),\n        icon: Option('distro-icon', {\n            'note': '\"distro-icon\" or a single font',\n        }),\n    },\n\n    battery: {\n        show_percentage: Option(true, {\n            'persist': true,\n            'noReload': false,\n            'category': 'exclude',\n        }),\n        bar: {\n            show_icon: Option(false, { 'category': 'Bar' }),\n            width: Option(70, { 'category': 'Bar' }),\n            height: Option(14, { 'category': 'Bar' }),\n            full: Option(false, { 'category': 'Bar' }),\n        },\n        low: Option(30, { 'category': 'Bar' }),\n        medium: Option(50, { 'category': 'Bar' }),\n    },\n\n    desktop: {\n        wallpaper: {\n            fg: Option('#fff', { 'scss': 'wallpaper-fg' }),\n            img: Option(themes[0].options['desktop.wallpaper.img'], {\n                'scssFormat': v => `\"${v}\"`,\n                'type': 'img',\n            }),\n        },\n        avatar: Option(`${HOME}/face.png`, {\n            'scssFormat': v => `\"${v}\"`,\n            'type': 'img',\n            'note': 'displayed in quicksettings and locksreen',\n        }),\n        screen_corners: Option(true, { 'scss': 'screen-corners' }),\n        clock: {\n            enable: Option(true),\n            position: Option('center center', {\n                'note': 'halign valign',\n            }),\n        },\n        drop_shadow: Option(false, { 'scss': 'drop-shadow' }),\n        shadow: Option('rgba(0, 0, 0, .6)', { 'scss': 'shadow' }),\n        dock: {\n            icon_size: Option(42),\n            pinned_apps: Option([\n                \"brave\",\n                \"Visual Studio Code\",\n                \"kitty\",\n                \"org.gnome.Nautilus\",\n                \"obsidian\",\n                \"discord\",\n                \"spotify\",\n                \"superslicer\",\n                \"org.gnome.Software\"\n            ], { 'scss': 'exclude' }),\n        },\n    },\n\n    notifications: {\n        black_list: Option(['Spotify'], { 'note': 'app-name | entry' }),\n        position: Option(['top'], { 'note': 'anchor' }),\n        width: Option(450),\n    },\n\n    dashboard: {\n        sys_info_size: Option(70, {\n            'category': 'Desktop',\n            'scss': 'sys-info-size',\n        }),\n    },\n\n    mpris: {\n        black_list: Option(['Caprine'], {\n            'category': 'Bar',\n            'title': 'List of blacklisted mpris players',\n            'note': 'filters for bus-name, name, identity, entry',\n        }),\n        preferred: Option('spotify', {\n            'category': 'Bar',\n            'title': 'Preferred player',\n        }),\n    },\n\n    workspaces: Option(10, {\n        'category': 'Bar',\n        'title': 'No. workspaces on bar and overview',\n        'note': 'Set it to 0 to make it dynamic',\n    }),\n\n    temperature: '/sys/class/thermal/thermal_zone6/temp',\n    systemFetchInterval: 1000,\n    brightnessctlKBD: 'asus::kbd_backlight',\n    substitutions: {\n        icons: [\n            ['transmission-gtk', 'transmission'],\n            ['blueberry.py', 'bluetooth'],\n            ['Caprine', 'facebook-messenger'],\n            ['', 'preferences-desktop-display'],\n        ],\n        titles: [\n            ['com.github.Aylur.ags', 'AGS'],\n            ['transmission-gtk', 'Transmission'],\n            ['com.obsproject.Studio', 'OBS'],\n            ['com.usebottles.bottles', 'Bottles'],\n            ['com.github.wwmm.easyeffects', 'Easy Effects'],\n            ['org.gnome.TextEditor', 'Text Editor'],\n            ['org.gnome.design.IconLibrary', 'Icon Library'],\n            ['blueberry.py', 'Blueberry'],\n            ['org.wezfurlong.wezterm', 'Wezterm'],\n            ['com.raggesilver.BlackBox', 'BlackBox'],\n            ['firefox', 'Firefox'],\n            ['org.gnome.Nautilus', 'Files'],\n            ['libreoffice-writer', 'Writer'],\n            ['', 'Desktop'],\n        ],\n    },\n};\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/osd/OSD.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport FontIcon from '../misc/FontIcon.js';\nimport Progress from '../misc/Progress.js';\nimport Indicator from '../services/onScreenIndicator.js';\n\nexport const OnScreenIndicator = ({ height = 200, width = 32 } = {}) => Widget.Box({\n    class_name: 'indicator',\n    css: 'padding: 1px;',\n    child: Widget.Revealer({\n        transition: 'slide_left',\n        connections: [[Indicator, (revealer, value) => {\n            revealer.reveal_child = value > -1;\n        }]],\n        child: Progress({\n            width,\n            height,\n            vertical: true,\n            connections: [[Indicator, (progress, value) => progress.setValue(value)]],\n            child: Widget.Stack({\n                vpack: 'start',\n                hpack: 'center',\n                hexpand: false,\n                items: [\n                    ['true', Widget.Icon({\n                        hpack: 'center',\n                        size: width,\n                        connections: [[Indicator, (icon, _v, name) => icon.icon = name || '']],\n                    })],\n                    ['false', FontIcon({\n                        hpack: 'center',\n                        hexpand: true,\n                        css: `font-size: ${width}px;`,\n                        connections: [[Indicator, (icon, _v, name) => icon.icon = name || '']],\n                    })],\n                ],\n                connections: [[Indicator, (stack, _v, name) => {\n                    stack.shown = `${!!Utils.lookUpIcon(name)}`;\n                }]],\n            }),\n        }),\n    }),\n});\n\n/** @param {number} monitor */\nexport default monitor => Widget.Window({\n    name: `indicator${monitor}`,\n    monitor,\n    class_name: 'indicator',\n    layer: 'overlay',\n    anchor: ['right'],\n    child: OnScreenIndicator(),\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/overview/Client.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport App from 'resource:///com/github/Aylur/ags/app.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport { createSurfaceFromWidget, substitute } from '../utils.js';\nimport Gdk from 'gi://Gdk';\nimport Gtk from 'gi://Gtk';\nimport options from '../options.js';\n\nconst SCALE = 0.08;\nconst TARGET = [Gtk.TargetEntry.new('text/plain', Gtk.TargetFlags.SAME_APP, 0)];\n\n/** @param {string} args */\nconst dispatch = args => Utils.execAsync(`hyprctl dispatch ${args}`);\n\n/** @param {string} str */\nconst icon = str => substitute(options.substitutions.icons, str);\n\nexport default ({ address, size: [w, h], class: c, title }) => Widget.Button({\n    class_name: 'client',\n    tooltip_text: `${title}`,\n    child: Widget.Icon({\n        css: `\n            min-width: ${w * SCALE}px;\n            min-height: ${h * SCALE}px;\n        `,\n        icon: icon(c),\n    }),\n    on_secondary_click: () => dispatch(`closewindow address:${address}`),\n    on_clicked: () => dispatch(`focuswindow address:${address}`)\n        .then(() => App.closeWindow('overview')),\n\n    setup: btn => {\n        btn.drag_source_set(Gdk.ModifierType.BUTTON1_MASK, TARGET, Gdk.DragAction.COPY);\n        btn.connect('drag-data-get', (_w, _c, data) => data.set_text(address, address.length));\n        btn.connect('drag-begin', (_, context) => {\n            Gtk.drag_set_icon_surface(context, createSurfaceFromWidget(btn));\n            btn.toggleClassName('hidden', true);\n        });\n        btn.connect('drag-end', () => btn.toggleClassName('hidden', false));\n    },\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/overview/Overview.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport App from 'resource:///com/github/Aylur/ags/app.js';\nimport Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport PopupWindow from '../misc/PopupWindow.js';\nimport Workspace from './Workspace.js';\nimport options from '../options.js';\nimport { range } from '../utils.js';\n\nconst ws = options.workspaces;\n\n/** @param {import('types/widgets/box').default} box */\nconst update = box => {\n    if (App.windows.has('overview') && !App.getWindow('overview')?.visible)\n        return;\n\n    Utils.execAsync('hyprctl -j clients')\n        .then(clients => {\n            const json = JSON.parse(clients);\n            box.children.forEach(ch => ch.update(json));\n        })\n        .catch(console.error);\n};\n\n/** @param {import('types/widgets/box').default} box */\nconst children = box => {\n    if (ws.value === 0) {\n        box.children = Hyprland.workspaces\n            .sort((ws1, ws2) => ws1.id > ws2.id)\n            .map(({ id }) => Workspace(id));\n    }\n};\n\nexport default () => PopupWindow({\n    name: 'overview',\n    child: Widget.Box({\n        setup: update,\n        connections: [\n            [ws, box => {\n                box.children = range(ws.value).map(Workspace);\n                update(box);\n                children(box);\n            }],\n            [Hyprland, update],\n            [Hyprland, children, 'notify::workspaces'],\n        ],\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/overview/Workspace.js",
    "content": "import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport Gdk from 'gi://Gdk';\nimport Gtk from 'gi://Gtk';\nimport Client from './Client.js';\n\nconst SCALE = 0.08;\nconst TARGET = [Gtk.TargetEntry.new('text/plain', Gtk.TargetFlags.SAME_APP, 0)];\n\n/** @param {string} args */\nconst dispatch = args => Utils.execAsync(`hyprctl dispatch ${args}`);\n\n/** @param {number} index */\nexport default index => {\n    const fixed = Gtk.Fixed.new();\n\n    const widget = Widget.Box({\n        class_name: 'workspace',\n        vpack: 'center',\n        css: `\n            min-width: ${1920 * SCALE}px;\n            min-height: ${1080 * SCALE}px;\n        `,\n        connections: [[Hyprland, box => {\n            box.toggleClassName('active', Hyprland.active.workspace.id === index);\n        }]],\n        child: Widget.EventBox({\n            hexpand: true,\n            vexpand: true,\n            on_primary_click: () => dispatch(`workspace ${index}`),\n            setup: eventbox => {\n                eventbox.drag_dest_set(Gtk.DestDefaults.ALL, TARGET, Gdk.DragAction.COPY);\n                eventbox.connect('drag-data-received', (_w, _c, _x, _y, data) => {\n                    dispatch(`movetoworkspacesilent ${index},address:${data.get_text()}`);\n                });\n            },\n            child: fixed,\n        }),\n    });\n\n    widget.update = clients => {\n        fixed.get_children().forEach(ch => ch.destroy());\n        clients\n            .filter(({ workspace: { id } }) => id === index)\n            .forEach(c => {\n                c.at[0] -= Hyprland.getMonitor(c.monitor)?.x || 0;\n                c.at[1] -= Hyprland.getMonitor(c.monitor)?.y || 0;\n                c.mapped && fixed.put(Client(c), c.at[0] * SCALE, c.at[1] * SCALE);\n            });\n\n        fixed.show_all();\n    };\n\n    return widget;\n};\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/powermenu/PowerMenu.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport icons from '../icons.js';\nimport PowerMenu from '../services/powermenu.js';\nimport ShadedPopup from './ShadedPopup.js';\n\n/**\n * @param {'sleep' | 'reboot' | 'logout' | 'shutdown'} action\n * @param {string} label\n */\nconst SysButton = (action, label) => Widget.Button({\n    on_clicked: () => PowerMenu.action(action),\n    child: Widget.Box({\n        vertical: true,\n        children: [\n            Widget.Icon(icons.powermenu[action]),\n            Widget.Label(label),\n        ],\n    }),\n});\n\nexport default () => ShadedPopup({\n    name: 'powermenu',\n    expand: true,\n    child: Widget.Box({\n        children: [\n            SysButton('sleep', 'Sleep'),\n            SysButton('reboot', 'Reboot'),\n            SysButton('logout', 'Log Out'),\n            SysButton('shutdown', 'Shutdown'),\n        ],\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/powermenu/ShadedPopup.js",
    "content": "import App from 'resource:///com/github/Aylur/ags/app.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\n\n/** @param {string} windowName */\nconst Padding = windowName => Widget.EventBox({\n    class_name: 'padding',\n    hexpand: true,\n    vexpand: true,\n    connections: [['button-press-event', () => App.toggleWindow(windowName)]],\n});\n\n/**\n * @param {import('types/widgets/window').WindowProps & {\n *      name: string\n *      child: import('types/widgets/box').default\n *  }} o\n */\nexport default ({ name, child, ...rest }) => Widget.Window({\n    ...rest,\n    class_names: ['popup-window', name],\n    name,\n    visible: false,\n    popup: true,\n    focusable: true,\n    setup() {\n        child.toggleClassName('window-content');\n    },\n    child: Widget.CenterBox({\n        class_name: 'shader',\n        css: 'min-width: 5000px; min-height: 3000px;',\n        children: [\n            Padding(name),\n            Widget.CenterBox({\n                vertical: true,\n                children: [\n                    Padding(name),\n                    child,\n                    Padding(name),\n                ],\n            }),\n            Padding(name),\n        ],\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/powermenu/Verification.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport App from 'resource:///com/github/Aylur/ags/app.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport PowerMenu from '../services/powermenu.js';\nimport ShadedPopup from './ShadedPopup.js';\n\nexport default () => ShadedPopup({\n    name: 'verification',\n    expand: true,\n    child: Widget.Box({\n        vertical: true,\n        children: [\n            Widget.Box({\n                class_name: 'text-box',\n                vertical: true,\n                children: [\n                    Widget.Label({\n                        class_name: 'title',\n                        binds: [['label', PowerMenu, 'title']],\n                    }),\n                    Widget.Label({\n                        class_name: 'desc',\n                        label: 'Are you sure?',\n                    }),\n                ],\n            }),\n            Widget.Box({\n                class_name: 'buttons horizontal',\n                vexpand: true,\n                vpack: 'end',\n                homogeneous: true,\n                children: [\n                    Widget.Button({\n                        child: Widget.Label('No'),\n                        on_clicked: () => App.toggleWindow('verification'),\n                    }),\n                    Widget.Button({\n                        child: Widget.Label('Yes'),\n                        on_clicked: () => Utils.exec(PowerMenu.cmd),\n                    }),\n                ],\n            }),\n        ],\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/quicksettings/QuickSettings.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Header from './widgets/Header.js';\nimport PopupWindow from '../misc/PopupWindow.js';\nimport { Volume, Microhone, SinkSelector, AppMixer } from './widgets/Volume.js';\nimport { NetworkToggle, WifiSelection } from './widgets/Network.js';\nimport { BluetoothToggle, BluetoothDevices } from './widgets/Bluetooth.js';\nimport { ThemeToggle, ThemeSelector } from './widgets/Theme.js';\nimport Media from './widgets/Media.js';\nimport Brightness from './widgets/Brightness.js';\nimport DND from './widgets/DND.js';\nimport MicMute from './widgets/MicMute.js';\nimport options from '../options.js';\n\nconst Row = (toggles = [], menus = []) => Widget.Box({\n    vertical: true,\n    children: [\n        Widget.Box({\n            class_name: 'row horizontal',\n            children: toggles,\n        }),\n        ...menus,\n    ],\n});\n\nconst Homogeneous = toggles => Widget.Box({\n    homogeneous: true,\n    children: toggles,\n});\n\nexport default () => PopupWindow({\n    name: 'quicksettings',\n    connections: [[options.bar.position, self => {\n        self.anchor = ['right', options.bar.position.value];\n        self.transition = 'crossfade';\n        \n    }]],\n    child: Widget.Box({\n        vertical: true,\n        children: [\n            Header(),\n            Widget.Box({\n                class_name: 'sliders-box vertical',\n                vertical: true,\n                children: [\n                    Row(\n                        [Volume()],\n                        [SinkSelector(), AppMixer()],\n                    ),\n                    Microhone(),\n                    Brightness(),\n                ],\n            }),\n            Row(\n                [Homogeneous([NetworkToggle(), BluetoothToggle()]), DND()],\n                [WifiSelection(), BluetoothDevices()],\n            ),\n            Row(\n                [Homogeneous([ThemeToggle()]), MicMute()],\n                [ThemeSelector()],\n            ),\n            Media(),\n        ],\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/quicksettings/ToggleButton.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport App from 'resource:///com/github/Aylur/ags/app.js';\nimport Variable from 'resource:///com/github/Aylur/ags/variable.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport icons from '../icons.js';\n\n/** name of the currently opened menu  */\nexport const opened = Variable('');\nApp.connect('window-toggled', (_, name, visible) => {\n    if (name === 'quicksettings' && !visible)\n        Utils.timeout(500, () => opened.value = '');\n});\n\n/**\n * @param {string} name - menu name\n * @param {(() => void) | false=} activate\n */\nexport const Arrow = (name, activate) => {\n    let deg = 0;\n    let iconOpened = false;\n    return Widget.Button({\n        child: Widget.Icon({\n            icon: icons.ui.arrow.right,\n            connections: [[opened, icon => {\n                if (opened.value === name && !iconOpened || opened.value !== name && iconOpened) {\n                    const step = opened.value === name ? 10 : -10;\n                    iconOpened = !iconOpened;\n                    for (let i = 0; i < 9; ++i) {\n                        Utils.timeout(15 * i, () => {\n                            deg += step;\n                            icon.setCss(`-gtk-icon-transform: rotate(${deg}deg);`);\n                        });\n                    }\n                }\n            }]],\n        }),\n        on_clicked: () => {\n            opened.value = opened.value === name ? '' : name;\n            if (typeof activate === 'function')\n                activate();\n        },\n    });\n};\n\n/**\n * @param {Object} o\n * @param {string} o.name - menu name\n * @param {import('gi://Gtk').Gtk.Widget} o.icon\n * @param {import('gi://Gtk').Gtk.Widget} o.label\n * @param {() => void} o.activate\n * @param {() => void} o.deactivate\n * @param {boolean=} o.activateOnArrow\n * @param {[import('gi://GObject').GObject.Object, () => boolean]} o.connection\n */\nexport const ArrowToggleButton = ({\n    name,\n    icon,\n    label,\n    activate,\n    deactivate,\n    activateOnArrow = true,\n    connection: [service, condition],\n}) => Widget.Box({\n    class_name: 'toggle-button',\n    connections: [[service, box => {\n        box.toggleClassName('active', condition());\n    }]],\n    children: [\n        Widget.Button({\n            child: Widget.Box({\n                hexpand: true,\n                class_name: 'label-box horizontal',\n                children: [icon, label],\n            }),\n            on_clicked: () => {\n                if (condition()) {\n                    deactivate();\n                    if (opened.value === name)\n                        opened.value = '';\n                } else {\n                    activate();\n                }\n            },\n        }),\n        Arrow(name, activateOnArrow && activate),\n    ],\n});\n\n/**\n * @param {Object} o\n * @param {string} o.name - menu name\n * @param {import('gi://Gtk').Gtk.Widget} o.icon\n * @param {import('gi://Gtk').Gtk.Widget} o.title\n * @param {import('gi://Gtk').Gtk.Widget[]} o.content\n */\nexport const Menu = ({ name, icon, title, content }) => Widget.Revealer({\n    transition: 'slide_down',\n    binds: [['reveal-child', opened, 'value', v => v === name]],\n    child: Widget.Box({\n        class_names: ['menu', name],\n        vertical: true,\n        children: [\n            Widget.Box({\n                class_name: 'title horizontal',\n                children: [icon, title],\n            }),\n            Widget.Separator(),\n            ...content,\n        ],\n    }),\n});\n\n/**\n * @param {Object} o\n * @param {import('gi://Gtk').Gtk.Widget} o.icon\n * @param {() => void} o.toggle\n * @param {[import('gi://GObject').GObject.Object, () => boolean]} o.connection\n */\nexport const SimpleToggleButton = ({\n    icon,\n    toggle,\n    connection: [service, condition],\n}) => Widget.Button({\n    class_name: 'simple-toggle',\n    connections: [[service, box => {\n        box.toggleClassName('active', condition());\n    }]],\n    child: icon,\n    on_clicked: toggle,\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/quicksettings/widgets/AsusProfile.js",
    "content": "import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport icons from '../../icons.js';\nimport Asusctl from '../../services/asusctl.js';\nimport { ArrowToggleButton, Menu } from '../ToggleButton.js';\n\nexport const ProfileToggle = () => ArrowToggleButton({\n    name: 'asusctl-profile',\n    icon: Widget.Icon({\n        binds: [['icon', Asusctl, 'profile', p => icons.asusctl.profile[p]]],\n    }),\n    label: Widget.Label({\n        binds: [['label', Asusctl, 'profile']],\n    }),\n    connection: [Asusctl, () => Asusctl.profile !== 'Balanced'],\n    activate: () => Asusctl.setProfile('Quiet'),\n    deactivate: () => Asusctl.setProfile('Balanced'),\n    activateOnArrow: false,\n});\n\nexport const ProfileSelector = () => Menu({\n    name: 'asusctl-profile',\n    icon: Widget.Icon({\n        binds: [['icon', Asusctl, 'profile', p => icons.asusctl.profile[p]]],\n    }),\n    title: Widget.Label('Profile Selector'),\n    content: [\n        Widget.Box({\n            vertical: true,\n            hexpand: true,\n            children: [\n                Widget.Box({\n                    vertical: true,\n                    children: Asusctl.profiles.map(prof => Widget.Button({\n                        on_clicked: () => Asusctl.setProfile(prof),\n                        child: Widget.Box({\n                            children: [\n                                Widget.Icon(icons.asusctl.profile[prof]),\n                                Widget.Label(prof),\n                            ],\n                        }),\n                    })),\n                }),\n            ],\n        }),\n        Widget.Separator(),\n        Widget.Button({\n            on_clicked: () => Utils.execAsync('rog-control-center'),\n            child: Widget.Box({\n                children: [\n                    Widget.Icon(icons.ui.settings),\n                    Widget.Label('Rog Control Center'),\n                ],\n            }),\n        }),\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/quicksettings/widgets/Bluetooth.js",
    "content": "import Bluetooth from 'resource:///com/github/Aylur/ags/service/bluetooth.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport icons from '../../icons.js';\nimport { Menu, ArrowToggleButton } from '../ToggleButton.js';\n\nexport const BluetoothToggle = () => ArrowToggleButton({\n    name: 'bluetooth',\n    icon: Widget.Icon({\n        connections: [[Bluetooth, icon => {\n            icon.icon = Bluetooth.enabled\n                ? icons.bluetooth.enabled\n                : icons.bluetooth.disabled;\n        }]],\n    }),\n    label: Widget.Label({\n        truncate: 'end',\n        connections: [[Bluetooth, label => {\n            if (!Bluetooth.enabled)\n                return label.label = 'Disabled';\n\n            if (Bluetooth.connectedDevices.length === 0)\n                return label.label = 'Not Connected';\n\n            if (Bluetooth.connectedDevices.length === 1)\n                return label.label = Bluetooth.connectedDevices[0].alias;\n\n            label.label = `${Bluetooth.connectedDevices.length} Connected`;\n        }]],\n    }),\n    connection: [Bluetooth, () => Bluetooth.enabled],\n    deactivate: () => Bluetooth.enabled = false,\n    activate: () => Bluetooth.enabled = true,\n});\n\nconst DeviceItem = device => Widget.Box({\n    children: [\n        Widget.Icon(device.icon_name + '-symbolic'),\n        Widget.Label(device.name),\n        Widget.Label({\n            label: `${device.battery_percentage}%`,\n            binds: [['visible', device, 'battery-percentage', p => p > 0]],\n        }),\n        Widget.Box({ hexpand: true }),\n        Widget.Spinner({\n            binds: [\n                ['active', device, 'connecting'],\n                ['visible', device, 'connecting'],\n            ],\n        }),\n        Widget.Switch({\n            active: device.connected,\n            binds: [['visible', device, 'connecting', c => !c]],\n            connections: [['notify::active', ({ active }) => {\n                device.setConnection(active);\n            }]],\n        }),\n    ],\n});\n\nexport const BluetoothDevices = () => Menu({\n    name: 'bluetooth',\n    icon: Widget.Icon(icons.bluetooth.disabled),\n    title: Widget.Label('Bluetooth'),\n    content: [\n        Widget.Box({\n            hexpand: true,\n            vertical: true,\n            binds: [['children', Bluetooth, 'devices', ds => ds\n                .filter(d => d.name)\n                .map(DeviceItem)]],\n        }),\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/quicksettings/widgets/Brightness.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport icons from '../../icons.js';\nimport Brightness from '../../services/brightness.js';\n\nconst BrightnessSlider = () => Widget.Slider({\n    draw_value: false,\n    hexpand: true,\n    binds: [['value', Brightness, 'screen']],\n    on_change: ({ value }) => Brightness.screen = value,\n});\n\nexport default () => Widget.Box({\n    children: [\n        Widget.Button({\n            child: Widget.Icon(icons.brightness.indicator),\n            binds: [['tooltip-text', Brightness, 'screen', v =>\n                `Screen Brightness: ${Math.floor(v * 100)}%`]],\n        }),\n        BrightnessSlider(),\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/quicksettings/widgets/DND.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Notifications from 'resource:///com/github/Aylur/ags/service/notifications.js';\nimport icons from '../../icons.js';\nimport { SimpleToggleButton } from '../ToggleButton.js';\n\nexport default () => SimpleToggleButton({\n    icon: Widget.Icon({\n        connections: [[Notifications, icon => {\n            icon.icon = Notifications.dnd\n                ? icons.notifications.silent\n                : icons.notifications.noisy;\n        }, 'notify::dnd']],\n    }),\n    toggle: () => Notifications.dnd = !Notifications.dnd,\n    connection: [Notifications, () => Notifications.dnd],\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/quicksettings/widgets/Header.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Battery from 'resource:///com/github/Aylur/ags/service/battery.js';\nimport PowerMenu from '../../services/powermenu.js';\nimport Lockscreen from '../../services/lockscreen.js';\nimport Avatar from '../../misc/Avatar.js';\nimport icons from '../../icons.js';\nimport { openSettings } from '../../settings/theme.js';\nimport { uptime } from '../../variables.js';\n\nexport default () => Widget.Box({\n    class_name: 'header horizontal',\n    children: [\n        Avatar(),\n        Widget.Box({\n            hpack: 'end',\n            vpack: 'center',\n            hexpand: true,\n            children: [\n                Widget.Box({\n                    class_name: 'battery horizontal',\n                    children: [\n                        Widget.Icon({ binds: [['icon', Battery, 'icon-name']] }),\n                        Widget.Label({ binds: [['label', Battery, 'percent', p => `${p}%`]] }),\n                    ],\n                }),\n                Widget.Label({\n                    class_name: 'uptime',\n                    binds: [['label', uptime, 'value', v => `up: ${v}`]],\n                }),\n                Widget.Button({\n                    on_clicked: openSettings,\n                    child: Widget.Icon(icons.ui.settings),\n                }),\n                Widget.Button({\n                    on_clicked: () => Lockscreen.lockscreen(),\n                    child: Widget.Icon(icons.lock),\n                }),\n                Widget.Button({\n                    on_clicked: () => PowerMenu.action('shutdown'),\n                    child: Widget.Icon(icons.powermenu.shutdown),\n                }),\n            ],\n        }),\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/quicksettings/widgets/Media.js",
    "content": "import Mpris from 'resource:///com/github/Aylur/ags/service/mpris.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport * as mpris from '../../misc/mpris.js';\nimport options from '../../options.js';\n\n/** @param {import('types/service/mpris').MprisPlayer} player */\nconst Footer = player => Widget.CenterBox({\n    class_name: 'footer-box',\n    children: [\n        Widget.Box({\n            class_name: 'position',\n            children: [\n                mpris.PositionLabel(player),\n                mpris.Slash(player),\n                mpris.LengthLabel(player),\n            ],\n        }),\n        Widget.Box({\n            class_name: 'controls',\n            children: [\n                mpris.ShuffleButton(player),\n                mpris.PreviousButton(player),\n                mpris.PlayPauseButton(player),\n                mpris.NextButton(player),\n                mpris.LoopButton(player),\n            ],\n        }),\n        mpris.PlayerIcon(player, {\n            symbolic: false,\n            hexpand: true,\n            hpack: 'end',\n        }),\n    ],\n});\n\n/** @param {import('types/service/mpris').MprisPlayer} player */\nconst TextBox = player => Widget.Box({\n    children: [\n        mpris.CoverArt(player, {\n            hpack: 'end',\n            hexpand: false,\n        }),\n        Widget.Box({\n            hexpand: true,\n            vertical: true,\n            class_name: 'labels',\n            children: [\n                mpris.TitleLabel(player, {\n                    xalign: 0,\n                    justification: 'left',\n                    wrap: true,\n                }),\n                mpris.ArtistLabel(player, {\n                    xalign: 0,\n                    justification: 'left',\n                    wrap: true,\n                }),\n            ],\n        }),\n    ],\n});\n\n/** @param {import('types/service/mpris').MprisPlayer} player */\nconst PlayerBox = player => Widget.Box({\n    class_name: `player ${player.name}`,\n    child: mpris.BlurredCoverArt(player, {\n        hexpand: true,\n        child: Widget.Box({\n            hexpand: true,\n            vertical: true,\n            children: [\n                TextBox(player),\n                mpris.PositionSlider(player),\n                Footer(player),\n            ],\n        }),\n    }),\n});\n\nexport default () => Widget.Box({\n    vertical: true,\n    class_name: 'media vertical',\n    connections: [['draw', self => {\n        self.visible = Mpris.players.length > 0;\n    }]],\n    binds: [\n        ['children', Mpris, 'players', ps =>\n            ps.filter(p => !options.mpris.black_list.value\n                .includes(p.identity)).map(PlayerBox)],\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/quicksettings/widgets/MicMute.js",
    "content": "import Audio from 'resource:///com/github/Aylur/ags/service/audio.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport icons from '../../icons.js';\nimport { SimpleToggleButton } from '../ToggleButton.js';\n\nexport default () => SimpleToggleButton({\n    icon: Widget.Icon({\n        connections: [[Audio, icon => {\n            icon.icon = Audio.microphone?.is_muted\n                ? icons.audio.mic.muted\n                : icons.audio.mic.high;\n        }, 'microphone-changed']],\n    }),\n    toggle: () => Audio.microphone.is_muted = !Audio.microphone.is_muted,\n    connection: [Audio, () => Audio.microphone?.is_muted],\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/quicksettings/widgets/Network.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Network from 'resource:///com/github/Aylur/ags/service/network.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport icons from '../../icons.js';\nimport { Menu, ArrowToggleButton } from '../ToggleButton.js';\nimport Applications from 'resource:///com/github/Aylur/ags/service/applications.js';\n\nexport const NetworkToggle = () => ArrowToggleButton({\n    name: 'network',\n    icon: Widget.Icon({\n        connections: [[Network, icon => {\n            icon.icon = Network.wifi.icon_name || '';\n        }]],\n    }),\n    label: Widget.Label({\n        truncate: 'end',\n        connections: [[Network, label => {\n            label.label = Network.wifi.ssid || 'Not Connected';\n        }]],\n    }),\n    connection: [Network, () => Network.wifi.enabled],\n    deactivate: () => Network.wifi.enabled = false,\n    activate: () => {\n        Network.wifi.enabled = true;\n        Network.wifi.scan();\n    },\n});\n\nexport const WifiSelection = () => Menu({\n    name: 'network',\n    icon: Widget.Icon({\n        connections: [[Network, icon => {\n            icon.icon = Network.wifi.icon_name;\n        }]],\n    }),\n    title: Widget.Label('Wifi Selection'),\n    content: [\n        Widget.Box({\n            vertical: true,\n            connections: [[Network, box => box.children =\n                Network.wifi?.access_points.map(ap => Widget.Button({\n                    on_clicked: () => Utils.execAsync(`nmcli device wifi connect ${ap.bssid}`),\n                    child: Widget.Box({\n                        children: [\n                            Widget.Icon(ap.iconName),\n                            Widget.Label(ap.ssid || ''),\n                            ap.active && Widget.Icon({\n                                icon: icons.ui.tick,\n                                hexpand: true,\n                                hpack: 'end',\n                            }),\n                        ],\n                    }),\n                })),\n            ]],\n        }),\n        Widget.Separator(),\n        Widget.Button({\n            on_clicked: () => Applications.query('gnome-control-center')?.[0].launch(),\n            child: Widget.Box({\n                children: [\n                    Widget.Icon(icons.ui.settings),\n                    Widget.Label('Network'),\n                ],\n            }),\n        }),\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/quicksettings/widgets/Theme.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport { ArrowToggleButton, Menu, opened } from '../ToggleButton.js';\nimport themes from '../../themes.js';\nimport icons from '../../icons.js';\nimport options from '../../options.js';\nimport { setTheme, openSettings } from '../../settings/theme.js';\n\nexport const ThemeToggle = () => ArrowToggleButton({\n    name: 'theme',\n    icon: Widget.Label({ binds: [['label', options.theme.icon]] }),\n    label: Widget.Label({ binds: [['label', options.theme.name]] }),\n    connection: [opened, () => opened.value === 'theme'],\n    activate: () => opened.setValue('theme'),\n    activateOnArrow: false,\n    deactivate: () => { },\n});\n\nexport const ThemeSelector = () => Menu({\n    name: 'theme',\n    icon: Widget.Label({\n        binds: [['label', options.theme.icon]],\n    }),\n    title: Widget.Label('Theme Selector'),\n    content: [\n        ...themes.map(({ name, icon }) => Widget.Button({\n            on_clicked: () => setTheme(name),\n            child: Widget.Box({\n                children: [\n                    Widget.Label(icon),\n                    Widget.Label(name),\n                    Widget.Icon({\n                        icon: icons.ui.tick,\n                        hexpand: true,\n                        hpack: 'end',\n                        binds: [['visible', options.theme.name, 'value', v => v === name]],\n                    }),\n                ],\n            }),\n        })),\n        Widget.Separator(),\n        Widget.Button({\n            on_clicked: openSettings,\n            child: Widget.Box({\n                children: [\n                    Widget.Icon(icons.ui.settings),\n                    Widget.Label('Theme Settings'),\n                ],\n            }),\n        }),\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/quicksettings/widgets/Volume.js",
    "content": "import Audio from 'resource:///com/github/Aylur/ags/service/audio.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport icons from '../../icons.js';\nimport FontIcon from '../../misc/FontIcon.js';\nimport { getAudioTypeIcon } from '../../utils.js';\nimport { Arrow } from '../ToggleButton.js';\nimport { Menu } from '../ToggleButton.js';\n\n/** @param {'speaker' | 'microphone'=} type */\nconst VolumeIndicator = (type = 'speaker') => Widget.Button({\n    on_clicked: () => Audio[type].is_muted = !Audio[type].is_muted,\n    child: Widget.Icon({\n        connections: [[Audio, icon => {\n            if (!Audio[type])\n                return;\n\n            icon.icon = type === 'speaker'\n                ? getAudioTypeIcon(Audio[type].icon_name || '')\n                : icons.audio.mic.high;\n\n            icon.tooltip_text = `Volume ${Math.floor(Audio[type].volume * 100)}%`;\n        }, `${type}-changed`]],\n    }),\n});\n\n/** @param {'speaker' | 'microphone'=} type */\nconst VolumeSlider = (type = 'speaker') => Widget.Slider({\n    hexpand: true,\n    draw_value: false,\n    on_change: ({ value }) => Audio[type].volume = value,\n    connections: [[Audio, slider => {\n        slider.value = Audio[type]?.volume;\n    }, `${type}-changed`]],\n});\n\nexport const Volume = () => Widget.Box({\n    children: [\n        VolumeIndicator('speaker'),\n        VolumeSlider('speaker'),\n        Widget.Box({\n            vpack: 'center',\n            child: Arrow('sink-selector'),\n        }),\n        Widget.Box({\n            vpack: 'center',\n            child: Arrow('app-mixer'),\n            connections: [[Audio, box => {\n                box.visible = Audio.apps.length > 0;\n            }]],\n        }),\n    ],\n});\n\nexport const Microhone = () => Widget.Box({\n    class_name: 'slider horizontal',\n    binds: [['visible', Audio, 'recorders', r => r.length > 0]],\n    children: [\n        VolumeIndicator('microphone'),\n        VolumeSlider('microphone'),\n    ],\n});\n\n/** @param {import('types/service/audio').Stream} stream */\nconst MixerItem = stream => Widget.Box({\n    hexpand: true,\n    class_name: 'mixer-item horizontal',\n    children: [\n        Widget.Icon({\n            binds: [['tooltipText', stream, 'name']],\n            connections: [[stream, icon => {\n                icon.icon = Utils.lookUpIcon(stream.name || '')\n                    ? (stream.name || '')\n                    : icons.mpris.fallback;\n            }]],\n        }),\n        Widget.Box({\n            vertical: true,\n            children: [\n                Widget.Label({\n                    xalign: 0,\n                    truncate: 'end',\n                    binds: [['label', stream, 'description']],\n                }),\n                Widget.Slider({\n                    hexpand: true,\n                    draw_value: false,\n                    binds: [['value', stream, 'volume']],\n                    on_change: ({ value }) => stream.volume = value,\n                }),\n            ],\n        }),\n        Widget.Label({\n            xalign: 1,\n            connections: [[stream, l => {\n                l.label = `${Math.floor(stream.volume * 100)}%`;\n            }]],\n        }),\n    ],\n});\n\n/** @param {import('types/service/audio').Stream} stream */\nconst SinkItem = stream => Widget.Button({\n    hexpand: true,\n    on_clicked: () => Audio.speaker = stream,\n    child: Widget.Box({\n        children: [\n            Widget.Icon({\n                icon: getAudioTypeIcon(stream.icon_name || ''),\n                tooltip_text: stream.icon_name,\n            }),\n            Widget.Label((stream.description || '').split(' ').slice(0, 4).join(' ')),\n            Widget.Icon({\n                icon: icons.ui.tick,\n                hexpand: true,\n                hpack: 'end',\n                binds: [['visible', Audio, 'speaker', s => s === stream]],\n            }),\n        ],\n    }),\n});\n\nconst SettingsButton = () => Widget.Button({\n    on_clicked: () => Utils.execAsync('pavucontrol'),\n    hexpand: true,\n    child: Widget.Box({\n        children: [\n            Widget.Icon(icons.ui.settings),\n            Widget.Label('Settings'),\n        ],\n    }),\n});\n\nexport const AppMixer = () => Menu({\n    name: 'app-mixer',\n    icon: FontIcon(icons.audio.mixer),\n    title: Widget.Label('App Mixer'),\n    content: [\n        Widget.Box({\n            vertical: true,\n            binds: [['children', Audio, 'apps', a => a.map(MixerItem)]],\n        }),\n        Widget.Separator(),\n        SettingsButton(),\n    ],\n});\n\nexport const SinkSelector = () => Menu({\n    name: 'sink-selector',\n    icon: Widget.Icon(icons.audio.type.headset),\n    title: Widget.Label('Sink Selector'),\n    content: [\n        Widget.Box({\n            vertical: true,\n            binds: [['children', Audio, 'speakers', s => s.map(SinkItem)]],\n        }),\n        Widget.Separator(),\n        SettingsButton(),\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/screencorner/ScreenCorners.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Gtk from 'gi://Gtk';\nimport options from '../options.js';\n\n/** @param {'topleft' | 'topright' | 'bottomleft' | 'bottomright'} place  */\nconst Corner = place => Widget.DrawingArea({\n    class_name: 'corner',\n    hexpand: true,\n    vexpand: true,\n    hpack: place.includes('left') ? 'start' : 'end',\n    vpack: place.includes('top') ? 'start' : 'end',\n    connections: [[options.radii, self => {\n        const r = options.radii.value * 2;\n        self.set_size_request(r, r);\n    }]],\n    setup: self => self.connect('draw', (self, cr) => {\n        const context = self.get_style_context();\n        const c = context.get_property('background-color', Gtk.StateFlags.NORMAL);\n        const r = context.get_property('border-radius', Gtk.StateFlags.NORMAL);\n\n        switch (place) {\n            case 'topleft':\n                cr.arc(r, r, r, Math.PI, 3 * Math.PI / 2);\n                cr.lineTo(0, 0);\n                break;\n\n            case 'topright':\n                cr.arc(0, r, r, 3 * Math.PI / 2, 2 * Math.PI);\n                cr.lineTo(r, 0);\n                break;\n\n            case 'bottomleft':\n                cr.arc(r, 0, r, Math.PI / 2, Math.PI);\n                cr.lineTo(0, r);\n                break;\n\n            case 'bottomright':\n                cr.arc(0, 0, r, 0, Math.PI / 2);\n                cr.lineTo(r, r);\n                break;\n        }\n\n        cr.closePath();\n        cr.setSourceRGBA(c.red, c.green, c.blue, c.alpha);\n        cr.fill();\n    }),\n});\n\n/** @type {Array<'topleft' | 'topright' | 'bottomleft' | 'bottomright'>} */\nconst places = ['topleft', 'topright', 'bottomleft', 'bottomright'];\n\n/** @param {number} monitor  */\nexport default monitor => places.map(place => Widget.Window({\n    name: `corner${monitor}${place}`,\n    monitor,\n    class_name: 'corner',\n    anchor: [place.includes('top') ? 'top' : 'bottom', place.includes('right') ? 'right' : 'left'],\n    binds: [['visible', options.desktop.screen_corners]],\n    child: Corner(place),\n}));\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/services/asusctl.js",
    "content": "import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport Service from 'resource:///com/github/Aylur/ags/service.js';\n\nclass Asusctl extends Service {\n    static {\n        Service.register(this, {}, {\n            'profile': ['string', 'r'],\n            'mode': ['string', 'r'],\n        });\n    }\n\n    profiles = Object.freeze(['Performance', 'Balanced', 'Quiet']);\n    #profile = 'Balanced';\n    #mode = 'Hyprid';\n\n    nextProfile() {\n        Utils.execAsync('asusctl profile -n')\n            .then(() => {\n                this.#profile = Utils.exec('asusctl profile -p').split(' ')[3];\n                this.changed('profile');\n            })\n            .catch(console.error);\n    }\n\n    /** @param {'Performance' | 'Balanced' | 'Quiet'} prof */\n    setProfile(prof) {\n        Utils.execAsync(`asusctl profile --profile-set ${prof}`)\n            .then(() => {\n                this.#profile = prof;\n                this.changed('profile');\n            })\n            .catch(console.error);\n    }\n\n    nextMode() {\n        Utils.execAsync(`supergfxctl -m ${this.#mode === 'Hybrid' ? 'Integrated' : 'Hybrid'}`)\n            .then(() => {\n                this.#mode = Utils.exec('supergfxctl -g');\n                this.changed('profile');\n            })\n            .catch(console.error);\n    }\n\n    constructor() {\n        super();\n\n        if (Utils.exec('which asusctl')) {\n            this.available = true;\n            this.#profile = Utils.exec('asusctl profile -p').split(' ')[3];\n            Utils.execAsync('supergfxctl -g').then(mode => this.#mode = mode);\n        }\n        else {\n            this.available = false;\n        }\n    }\n\n    get profile() { return this.#profile; }\n    get mode() { return this.#mode; }\n}\n\nexport default new Asusctl();\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/services/brightness.js",
    "content": "import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport Service from 'resource:///com/github/Aylur/ags/service.js';\nimport options from '../options.js';\nimport { dependencies } from '../utils.js';\n\nconst KBD = options.brightnessctlKBD;\n\nclass Brightness extends Service {\n    static {\n        Service.register(this, {}, {\n            'screen': ['float', 'rw'],\n            'kbd': ['int', 'rw'],\n        });\n    }\n\n    #kbd = 0;\n    #kbdMax = 3;\n    #screen = 0;\n\n    get kbd() { return this.#kbd; }\n    get screen() { return this.#screen; }\n\n    set kbd(value) {\n        if (!dependencies(['brightnessctl']))\n            return;\n\n        if (value < 0 || value > this.#kbdMax)\n            return;\n\n        Utils.execAsync(`brightnessctl -d ${KBD} s ${value} -q`)\n            .then(() => {\n                this.#kbd = value;\n                this.changed('kbd');\n            })\n            .catch(console.error);\n    }\n\n    set screen(percent) {\n        if (!dependencies(['brightnessctl']))\n            return;\n\n        if (percent < 0)\n            percent = 0;\n\n        if (percent > 1)\n            percent = 1;\n\n        Utils.execAsync(`brightnessctl s ${percent * 100}% -q`)\n            .then(() => {\n                this.#screen = percent;\n                this.changed('screen');\n            })\n            .catch(console.error);\n    }\n\n    constructor() {\n        super();\n\n        if (dependencies(['brightnessctl'])) {\n            this.#kbd = Number(Utils.exec(`brightnessctl -d ${KBD} g`));\n            this.#kbdMax = Number(Utils.exec(`brightnessctl -d ${KBD} m`));\n            this.#screen = Number(Utils.exec('brightnessctl g')) / Number(Utils.exec('brightnessctl m'));\n        }\n    }\n}\n\n\nexport default new Brightness();\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/services/colorpicker.js",
    "content": "import Notifications from 'resource:///com/github/Aylur/ags/service/notifications.js';\nimport { Variable } from 'resource:///com/github/Aylur/ags/variable.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport Service from 'resource:///com/github/Aylur/ags/service.js';\nimport { dependencies } from '../utils.js';\n\nconst COLORS_CACHE = Utils.CACHE_DIR + '/colorpicker.json';\n\nclass Colors extends Service {\n    static {\n        Service.register(this, {}, {\n            'colors': ['jsobject'],\n        });\n    }\n\n    /** @type {Variable<string[]>} */\n    #colors = new Variable([]);\n    get colors() { return this.#colors.value; }\n\n    #notifID = 0;\n\n    constructor() {\n        super();\n\n        this.#colors.connect('changed', () => this.changed('colors'));\n\n        Utils.readFileAsync(COLORS_CACHE)\n            .then(out => this.#colors.setValue(JSON.parse(out || '[]')))\n            .catch(() => print('no colorpicker cache found'));\n    }\n\n    /** @param {string} color */\n    wlCopy(color) {\n        Utils.execAsync(['wl-copy', color])\n            .catch(err => console.error(err));\n    }\n\n    async pick() {\n        if (!dependencies(['hyprpicker']))\n            return;\n\n        const color = await Utils.execAsync('hyprpicker');\n        if (!color)\n            return;\n\n        this.wlCopy(color);\n        const list = this.#colors.value;\n        if (!list.includes(color)) {\n            list.push(color);\n            if (list.length > 10)\n                list.shift();\n\n            this.#colors.value = list;\n            Utils.writeFile(JSON.stringify(list, null, 2), COLORS_CACHE)\n                .catch(err => console.error(err));\n        }\n\n        this.#notifID = Notifications.Notify(\n            'Color Picker',\n            this.#notifID,\n            'color-select-symbolic',\n            color, '', [], {},\n        );\n    }\n}\n\nexport default new Colors;\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/services/lockscreen.js",
    "content": "import Service from 'resource:///com/github/Aylur/ags/service.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport App from 'resource:///com/github/Aylur/ags/app.js';\nconst authpy = App.configDir + '/js/lockscreen/auth.py';\n\nclass Lockscreen extends Service {\n    static {\n        Service.register(this, {\n            'lock': ['boolean'],\n            'authenticating': ['boolean'],\n        });\n    }\n\n    lockscreen() { this.emit('lock', true); }\n\n    /** @param {string} password */\n    auth(password) {\n        this.emit('authenticating', true);\n        Utils.execAsync([authpy, password])\n            .then(out => {\n                this.emit('lock', out !== 'True');\n                this.emit('authenticating', false);\n            })\n            .catch(err => console.error(err));\n    }\n}\n\nexport default new Lockscreen();\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/services/onScreenIndicator.js",
    "content": "import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport Service from 'resource:///com/github/Aylur/ags/service.js';\nimport Audio from 'resource:///com/github/Aylur/ags/service/audio.js';\nimport icons from '../icons.js';\nimport { getAudioTypeIcon } from '../utils.js';\nimport Brightness from './brightness.js';\n\nclass Indicator extends Service {\n    static {\n        Service.register(this, {\n            'popup': ['double', 'string'],\n        });\n    }\n\n    #delay = 1500;\n    #count = 0;\n\n    /**\n     * @param {number} value - 0 < v < 1\n     * @param {string} icon\n     */\n    popup(value, icon) {\n        this.emit('popup', value, icon);\n        this.#count++;\n        Utils.timeout(this.#delay, () => {\n            this.#count--;\n\n            if (this.#count === 0)\n                this.emit('popup', -1, icon);\n        });\n    }\n\n    speaker() {\n        this.popup(\n            Audio.speaker?.volume || 0,\n            getAudioTypeIcon(Audio.speaker?.icon_name || ''),\n        );\n    }\n\n    display() {\n        // brightness is async, so lets wait a bit\n        Utils.timeout(10, () => this.popup(\n            Brightness.screen,\n            icons.brightness.screen));\n    }\n\n    kbd() {\n        // brightness is async, so lets wait a bit\n        Utils.timeout(10, () => this.popup(\n            (Brightness.kbd * 33 + 1) / 100,\n            icons.brightness.keyboard));\n    }\n\n    connect(event = 'popup', callback) {\n        return super.connect(event, callback);\n    }\n}\n\nexport default new Indicator();\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/services/powermenu.js",
    "content": "import App from 'resource:///com/github/Aylur/ags/app.js';\nimport Service from 'resource:///com/github/Aylur/ags/service.js';\n\nclass PowerMenu extends Service {\n    static {\n        Service.register(this, {}, {\n            'title': ['string'],\n            'cmd': ['string'],\n        });\n    }\n\n    #title = '';\n    #cmd = '';\n\n    get title() { return this.#title; }\n    get cmd() { return this.#cmd; }\n\n    /** @param {'sleep' | 'reboot' | 'logout' | 'shutdown'} action */\n    action(action) {\n        [this.#cmd, this.#title] = {\n            'sleep': ['systemctl suspend', 'Sleep'],\n            'reboot': ['systemctl reboot', 'Reboot'],\n            'logout': ['pkill Hyprland', 'Log Out'],\n            'shutdown': ['shutdown now', 'Shutdown'],\n        }[action];\n\n        this.notify('cmd');\n        this.notify('title');\n        this.emit('changed');\n        App.closeWindow('powermenu');\n        App.openWindow('verification');\n    }\n}\n\nexport default new PowerMenu();\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/services/screenrecord.js",
    "content": "import Service from 'resource:///com/github/Aylur/ags/service.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport App from 'resource:///com/github/Aylur/ags/app.js';\nimport GLib from 'gi://GLib';\nimport { dependencies } from '../utils.js';\n\nconst now = () => GLib.DateTime.new_now_local().format('%Y-%m-%d_%H-%M-%S');\n\nclass Recorder extends Service {\n    static {\n        Service.register(this, {}, {\n            'timer': ['int'],\n            'recording': ['boolean'],\n        });\n    }\n\n    #path = GLib.get_home_dir() + '/Videos/Screencasting';\n    #file = '';\n    #interval = 0;\n\n    recording = false;\n    timer = 0;\n\n    async start() {\n        if (!dependencies(['slurp', 'wf-recorder']))\n            return;\n\n        if (this.recording)\n            return;\n\n        const area = await Utils.execAsync('slurp');\n        Utils.ensureDirectory(this.#path);\n        this.#file = `${this.#path}/${now()}.mp4`;\n        Utils.execAsync(['wf-recorder', '-g', area, '-f', this.#file]);\n        this.recording = true;\n        this.changed('recording');\n\n        this.timer = 0;\n        this.#interval = Utils.interval(1000, () => {\n            this.changed('timer');\n            this.timer++;\n        });\n    }\n\n    async stop() {\n        if (!dependencies(['notify-send']))\n            return;\n\n        if (!this.recording)\n            return;\n\n        Utils.execAsync('killall -INT wf-recorder');\n        this.recording = false;\n        this.changed('recording');\n        GLib.source_remove(this.#interval);\n\n        const res = await Utils.execAsync([\n            'notify-send',\n            '-A', 'files=Show in Files',\n            '-A', 'view=View',\n            '-i', 'video-x-generic-symbolic',\n            'Screenrecord',\n            this.#file,\n        ]);\n\n        if (res === 'files')\n            Utils.execAsync('xdg-open ' + this.#path);\n\n        if (res === 'view')\n            Utils.execAsync('xdg-open ' + this.#file);\n    }\n\n    async screenshot(full = false) {\n        if (!dependencies(['slurp', 'wayshot']))\n            return;\n\n        const path = GLib.get_home_dir() + '/Pictures/Screenshots';\n        const file = `${path}/${now()}.png`;\n        Utils.ensureDirectory(path);\n\n        await Utils.execAsync([\n            'wayshot',\n            '-f', file,\n        ].concat(full ? [] : [\n            '-s', await Utils.execAsync('slurp'),\n        ]));\n\n        Utils.execAsync(['bash', '-c', `wl-copy < ${file}`]);\n\n        const res = await Utils.execAsync([\n            'notify-send',\n            '-A', 'files=Show in Files',\n            '-A', 'view=View',\n            '-A', 'edit=Edit',\n            '-i', file,\n            'Screenshot',\n            file,\n        ]);\n        if (res === 'files')\n            Utils.execAsync('xdg-open ' + path);\n\n        if (res === 'view')\n            Utils.execAsync('xdg-open ' + file);\n\n        if (res === 'edit')\n            Utils.execAsync(['swappy', '-f', file]);\n\n        App.closeWindow('dashboard');\n    }\n}\n\nexport default new Recorder();\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/settings/SettingsDialog.js",
    "content": "import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport App from 'resource:///com/github/Aylur/ags/app.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport RegularWindow from '../misc/RegularWindow.js';\nimport Variable from 'resource:///com/github/Aylur/ags/variable.js';\nimport icons from '../icons.js';\nimport { getOptions, getValues } from './option.js';\nimport options from '../options.js';\n\nconst optionsList = getOptions();\nconst categories = Array.from(new Set(optionsList.map(opt => opt.category)))\n    .filter(category => category !== 'exclude');\n\nconst currentPage = Variable(categories[0]);\nconst search = Variable('');\nconst showSearch = Variable(false);\nshowSearch.connect('changed', ({ value }) => {\n    if (!value)\n        search.value = '';\n});\n\n/** @param {import('./option.js').Opt<string>} opt */\nconst EnumSetter = opt => {\n    const lbl = Widget.Label({ binds: [['label', opt]] });\n    const step = (dir = 1) => {\n        const i = opt.enums.findIndex(i => i === lbl.label);\n        opt.setValue(dir > 0\n            ? i + dir > opt.enums.length - 1\n                ? opt.enums[0] : opt.enums[i + dir]\n            : i + dir < 0\n                ? opt.enums[opt.enums.length - 1] : opt.enums[i + dir],\n            true);\n    };\n    const next = Widget.Button({\n        child: Widget.Icon(icons.ui.arrow.right),\n        on_clicked: () => step(+1),\n    });\n    const prev = Widget.Button({\n        child: Widget.Icon(icons.ui.arrow.left),\n        on_clicked: () => step(-1),\n    });\n    return Widget.Box({\n        class_name: 'enum-setter',\n        children: [prev, lbl, next],\n    });\n};\n\n/** @param {import('./option.js').Opt} opt */\nconst Setter = opt => {\n    switch (opt.type) {\n        case 'number': return Widget.SpinButton({\n            setup(self) {\n                self.set_range(0, 1000);\n                self.set_increments(1, 5);\n            },\n            connections: [\n                ['value-changed', self => opt.setValue(self.value, true)],\n                [opt, self => self.value = opt.value],\n            ],\n        });\n        case 'float':\n        case 'object': return Widget.Entry({\n            on_accept: self => opt.setValue(JSON.parse(self.text || ''), true),\n            connections: [[opt, self => self.text = JSON.stringify(opt.value)]],\n        });\n        case 'string': return Widget.Entry({\n            on_accept: self => opt.setValue(self.text, true),\n            connections: [[opt, self => self.text = opt.value]],\n        });\n        case 'enum': return EnumSetter(opt);\n        case 'boolean': return Widget.Switch({\n            connections: [\n                ['notify::active', self => opt.setValue(self.active, true)],\n                [opt, self => self.active = opt.value],\n            ],\n        });\n        case 'img': return Widget.FileChooserButton({\n            connections: [['selection-changed', self => {\n                opt.setValue(self.get_uri()?.replace('file://', ''), true);\n            }]],\n        });\n        case 'font': return Widget.FontButton({\n            show_size: false,\n            use_size: false,\n            connections: [\n                ['notify::font', ({ font }) => opt.setValue(font, true)],\n                [opt, self => self.font = opt.value],\n            ],\n        });\n        default: return Widget.Label({\n            label: 'no setter with type ' + opt.type,\n        });\n    }\n};\n\n/** @param {import('./option.js').Opt} opt */\nconst Row = opt => Widget.Box({\n    class_name: 'row',\n    setup: self => self.opt = opt,\n    children: [\n        Widget.Box({\n            vertical: true,\n            vpack: 'center',\n            children: [\n                opt.title && Widget.Label({\n                    xalign: 0,\n                    class_name: 'summary',\n                    label: opt.title,\n                }),\n                Widget.Label({\n                    xalign: 0,\n                    class_name: 'id',\n                    label: `id: \"${opt.id}\"`,\n                }),\n            ],\n        }),\n        Widget.Box({ hexpand: true }),\n        Widget.Box({\n            vpack: 'center',\n            vertical: true,\n            children: [\n                Widget.Box({\n                    hpack: 'end',\n                    child: Setter(opt),\n                }),\n                opt.note && Widget.Label({\n                    xalign: 1,\n                    class_name: 'note',\n                    label: opt.note,\n                }),\n            ],\n        }),\n    ],\n});\n\n/** @param {string} category */\nconst Page = category => Widget.Scrollable({\n    vexpand: true,\n    class_name: 'page',\n    child: Widget.Box({\n        class_name: 'page-content vertical',\n        vertical: true,\n        connections: [[search, self => {\n            for (const child of self.children) {\n                child.visible =\n                    child.opt.id.includes(search.value) ||\n                    child.opt.title.includes(search.value) ||\n                    child.opt.note.includes(search.value);\n            }\n        }]],\n        children: optionsList\n            .filter(opt => opt.category.includes(category))\n            .map(Row),\n    }),\n});\n\nconst sidebar = Widget.Revealer({\n    binds: [['reveal-child', search, 'value', v => !v]],\n    transition: 'slide_right',\n    child: Widget.Box({\n        hexpand: false,\n        vertical: true,\n        children: [\n            Widget.Box({\n                class_name: 'sidebar-header',\n                children: [\n                    Widget.Button({\n                        hexpand: true,\n                        label: icons.dialog.Search + ' Search',\n                        on_clicked: () => showSearch.value = !showSearch.value,\n                    }),\n                    Widget.Button({\n                        hpack: 'end',\n                        child: Widget.Icon(icons.ui.info),\n                        on_clicked: () => App.toggleWindow('about'),\n                    }),\n                ],\n            }),\n            Widget.Scrollable({\n                vexpand: true,\n                hscroll: 'never',\n                child: Widget.Box({\n                    class_name: 'sidebar-box vertical',\n                    vertical: true,\n                    children: [\n                        ...categories.map(name => Widget.Button({\n                            label: (icons.dialog[name] || '') + ' ' + name,\n                            xalign: 0,\n                            binds: [['class-name', currentPage, 'value',\n                                v => v === name ? 'active' : '']],\n                            on_clicked: () => currentPage.setValue(name),\n                        })),\n                    ],\n                }),\n            }),\n            Widget.Box({\n                class_name: 'sidebar-footer',\n                child: Widget.Button({\n                    class_name: 'copy',\n                    child: Widget.Label({\n                        label: ' Save',\n                        xalign: 0,\n                    }),\n                    hexpand: true,\n                    on_clicked: () => {\n                        Utils.execAsync([\n                            'wl-copy',\n                            getValues(),\n                        ]);\n                        Utils.execAsync([\n                            'notify-send',\n                            '-i', 'preferences-desktop-theme-symbolic',\n                            'Theme copied to clipboard',\n                            'To save it permanently, make a new theme in <span weight=\"bold\">themes.js</span>',\n                        ]);\n                    },\n                }),\n            }),\n        ],\n    }),\n});\n\nconst searchEntry = Widget.Revealer({\n    transition: 'slide_down',\n    binds: [\n        ['reveal-child', showSearch],\n        ['transition-duration', options.transition],\n    ],\n    child: Widget.Entry({\n        connections: [[showSearch, self => {\n            if (!showSearch.value)\n                self.text = '';\n\n            if (showSearch.value)\n                self.grab_focus();\n        }]],\n        hexpand: true,\n        class_name: 'search',\n        placeholder_text: 'Search Options',\n        secondary_icon_name: icons.apps.search,\n        on_change: ({ text }) => search.value = text || '',\n    }),\n});\n\nconst categoriesStack = Widget.Stack({\n    transition: 'slide_left_right',\n    items: categories.map(name => [name, Page(name)]),\n    binds: [\n        ['shown', currentPage],\n        ['visible', search, 'value', v => !v],\n    ],\n});\n\nconst searchPage = Widget.Box({\n    binds: [['visible', search, 'value', v => !!v]],\n    child: Page(''),\n});\n\nexport default RegularWindow({\n    name: 'settings-dialog',\n    title: 'Settings',\n    setup: win => win.set_default_size(800, 500),\n    connections: [\n        ['delete-event', win => {\n            win.hide();\n            return true;\n        }],\n        ['key-press-event', (self, event) => {\n            if (event.get_keyval()[1] === imports.gi.Gdk.KEY_Escape) {\n                self.text = '';\n                showSearch.setValue(false);\n                search.setValue('');\n            }\n        }],\n    ],\n    child: Widget.Box({\n        children: [\n            sidebar,\n            Widget.Box({\n                vertical: true,\n                children: [\n                    searchEntry,\n                    categoriesStack,\n                    searchPage,\n                ],\n            }),\n        ],\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/settings/globals.js",
    "content": "import Mpris from 'resource:///com/github/Aylur/ags/service/mpris.js';\n\nexport async function globals() {\n    try {\n        globalThis.options = (await import('../options.js')).default;\n        globalThis.iconBrowser = (await import('../misc/IconBrowser.js')).default;\n        globalThis.app = (await import('resource:///com/github/Aylur/ags/app.js')).default;\n        globalThis.audio = (await import('resource:///com/github/Aylur/ags/service/audio.js')).default;\n        globalThis.recorder = (await import('../services/screenrecord.js')).default;\n        globalThis.brightness = (await import('../services/brightness.js')).default;\n        globalThis.indicator = (await import('../services/onScreenIndicator.js')).default;\n\n        Mpris.players.forEach(player => {\n            player.connect('changed', player => {\n                globalThis.mpris = player || Mpris.players[0];\n            });\n        });\n\n        Mpris.connect('player-added', (mpris, bus) => {\n            mpris.getPlayer(bus)?.connect('changed', player => {\n                globalThis.mpris = player || Mpris.players[0];\n            });\n        });\n\n        Mpris.connect('player-closed', () => {\n            globalThis.mpris = Mpris.players[0];\n        });\n    } catch (error) {\n        logError(error);\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/settings/hyprland.js",
    "content": "import App from 'resource:///com/github/Aylur/ags/app.js';\nimport Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';\nimport options from '../options.js';\nimport { readFile, writeFile } from 'resource:///com/github/Aylur/ags/utils.js';\n\nconst noIgnorealpha = ['verification', 'powermenu', 'lockscreen'];\n\n/** @param {Array<string>} batch */\nfunction sendBatch(batch) {\n    const cmd = batch\n        .filter(x => !!x)\n        .map(x => `keyword ${x}`)\n        .join('; ');\n\n    Hyprland.sendMessage(`[[BATCH]]/${cmd}`);\n}\n\n/** @param {string} scss */\nfunction getColor(scss) {\n    if (scss.includes('#'))\n        return scss.replace('#', '');\n\n    if (scss.includes('$')) {\n        const opt = options.list().find(opt => opt.scss === scss.replace('$', ''));\n        return opt?.value.replace('#', '') || 'ff0000';\n    }\n}\n\nexport function hyprlandInit() {\n    if (readFile('/tmp/ags/hyprland-init'))\n        return;\n\n    sendBatch(Array.from(App.windows).flatMap(([name]) => [\n        `layerrule blur, ${name}`,\n        noIgnorealpha.some(skip => name.includes(skip))\n            ? '' : `layerrule ignorealpha 0.6, ${name}`,\n    ]));\n\n    writeFile('init', '/tmp/ags/hyprland-init');\n}\n\nexport async function setupHyprland() {\n    const wm_gaps = Math.floor(options.hypr.wm_gaps_multiplier.value * options.spacing.value);\n    const border_width = options.border.width.value;\n    const radii = options.radii.value;\n    const drop_shadow = options.desktop.drop_shadow.value;\n    const bar_style = options.bar.style.value;\n    const bar_pos = options.bar.position.value;\n    const inactive_border = options.hypr.inactive_border.value;\n    const accent = getColor(options.theme.accent.accent.value);\n\n    const batch = [];\n\n    JSON.parse(await Hyprland.sendMessage('j/monitors')).forEach(({ name }) => {\n        const v = bar_pos === 'top' ? `-${wm_gaps},0,0,0` : `0,-${wm_gaps},0,0`;\n        if (bar_style !== 'normal')\n            batch.push(`monitor ${name},addreserved,${v}`);\n        else\n            batch.push(`monitor ${name},addreserved,0,0,0,0`);\n    });\n\n    batch.push(\n        `general:border_size ${border_width}`,\n        `general:gaps_out ${wm_gaps}`,\n        `general:gaps_in ${Math.floor(wm_gaps / 2)}`,\n        `general:col.active_border rgba(${accent}ff)`,\n        `general:col.inactive_border ${inactive_border}`,\n        `decoration:rounding ${radii}`,\n        `decoration:drop_shadow ${drop_shadow ? 'yes' : 'no'}`,\n    );\n\n    sendBatch(batch);\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/settings/option.js",
    "content": "import { CACHE_DIR, readFile, writeFile } from 'resource:///com/github/Aylur/ags/utils.js';\nimport { exec } from 'resource:///com/github/Aylur/ags/utils.js';\nimport options from '../options.js';\nimport Service from 'resource:///com/github/Aylur/ags/service.js';\nimport { reloadScss } from './scss.js';\nimport { setupHyprland } from './hyprland.js';\nconst CACHE_FILE = CACHE_DIR + '/options.json';\n\n/** object that holds the overriedden values */\nlet cacheObj = JSON.parse(readFile(CACHE_FILE) || '{}');\n\n/**\n * @template T\n * @typedef {Object} OptionConfig\n * @property {string=} scss - name of scss variable set to \"exclude\" to not include it in the generated scss file\n * @property {string=} unit - scss unit on numbers, default is \"px\"\n * @property {string=} title\n * @property {string=} note\n * @property {string=} category\n * @property {boolean=} noReload - don't reload css & hyprland on change\n * @property {boolean=} persist - ignore reset call\n * @property {'object' | 'string' | 'img' | 'number' | 'float' | 'font' | 'enum' =} type\n * @property {Array<string> =} enums\n * @property {(value: T) => any=} format\n * @property {(value: T) => any=} scssFormat\n */\n\n/** @template T */\nexport class Opt extends Service {\n    static {\n        Service.register(this, {}, {\n            'value': ['jsobject'],\n        });\n    }\n\n    #value;\n    #scss = '';\n    unit = 'px';\n    noReload = false;\n    persist = false;\n    id = '';\n    title = '';\n    note = '';\n    type = '';\n    category = '';\n\n    /** @type {Array<string>} */\n    enums = [];\n\n    /** @type {(v: T) => any} */\n    format = v => v;\n\n    /** @type {(v: T) => any} */\n    scssFormat = v => v;\n\n\n    /**\n     * @param {T} value\n     * @param {OptionConfig<T> =} config\n     */\n    constructor(value, config) {\n        super();\n        this.#value = value;\n        this.defaultValue = value;\n        this.type = typeof value;\n\n        if (config)\n            Object.keys(config).forEach(c => this[c] = config[c]);\n\n        import('../options.js').then(this.#init.bind(this));\n    }\n\n    set scss(scss) { this.#scss = scss; }\n    get scss() {\n        return this.#scss || this.id\n            .split('.')\n            .join('-')\n            .split('_')\n            .join('-');\n    }\n\n    #init() {\n        getOptions(); // sets the ids as a side effect\n\n        if (cacheObj[this.id] !== undefined)\n            this.setValue(cacheObj[this.id]);\n\n        const words = this.id\n            .split('.')\n            .flatMap(w => w.split('_'))\n            .map(word => word.charAt(0).toUpperCase() + word.slice(1));\n\n        this.title ||= words.join(' ');\n        this.category ||= words.length === 1\n            ? 'General'\n            : words.at(0) || 'General';\n\n        this.connect('changed', () => {\n            cacheObj[this.id] = this.value;\n            writeFile(\n                JSON.stringify(cacheObj, null, 2),\n                CACHE_FILE,\n            );\n        });\n    }\n\n    get value() { return this.#value; }\n    set value(value) { this.setValue(value); }\n\n    /** @param {T} value  */\n    setValue(value, reload = false) {\n        if (typeof value !== typeof this.defaultValue) {\n            console.error(Error(`WrongType: Option \"${this.id}\" can't be set to ${value}, ` +\n                `expected \"${typeof this.defaultValue}\", but got \"${typeof value}\"`));\n\n            return;\n        }\n\n        if (this.value !== value) {\n            this.#value = this.format(value);\n            this.changed('value');\n\n            if (reload && !this.noReload) {\n                reloadScss();\n                setupHyprland();\n            }\n        }\n    }\n\n    reset(reload = false) {\n        if (!this.persist)\n            this.setValue(this.defaultValue, reload);\n    }\n}\n\n/**\n * @template T\n * @param {T} value\n * @param {OptionConfig<T> =} config\n * @returns {Opt<T>}\n */\nexport function Option(value, config) {\n    return new Opt(value, config);\n}\n\n/** @returns {Array<Opt<any>>} */\nexport function getOptions(object = options, path = '') {\n    return Object.keys(object).flatMap(key => {\n        /** @type Option<any> */\n        const obj = object[key];\n        const id = path ? path + '.' + key : key;\n\n        if (obj instanceof Opt) {\n            obj.id = id;\n            return obj;\n        }\n\n        if (typeof obj === 'object')\n            return getOptions(obj, id);\n\n        return [];\n    });\n}\n\nexport function resetOptions() {\n    exec(`rm -rf ${CACHE_FILE}`);\n    cacheObj = {};\n    getOptions().forEach(opt => opt.reset());\n}\n\nexport function getValues() {\n    const obj = {};\n    for (const opt of getOptions()) {\n        if (opt.category !== 'exclude')\n            obj[opt.id] = opt.value;\n    }\n\n    return JSON.stringify(obj, null, 2);\n}\n\n/** @param {string | object} config */\nexport function apply(config) {\n    const options = getOptions();\n    const settings = typeof config === 'string'\n        ? JSON.parse(config) : config;\n\n    for (const id of Object.keys(settings)) {\n        const opt = options.find(opt => opt.id === id);\n        if (!opt) {\n            print(`No option with id: \"${id}\"`);\n            continue;\n        }\n\n        opt.setValue(settings[id]);\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/settings/scss.js",
    "content": "import App from 'resource:///com/github/Aylur/ags/app.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport { getOptions } from './option.js';\nimport { dependencies } from '../utils.js';\n\nexport function scssWatcher() {\n    return Utils.subprocess(\n        [\n            'inotifywait',\n            '--recursive',\n            '--event', 'create,modify',\n            '-m', App.configDir + '/scss',\n        ],\n        reloadScss,\n        () => print('missing dependancy for css hotreload: inotify-tools'),\n    );\n}\n\n/**\n * generate an scss file that makes every option available as a variable\n * based on the passed scss parameter or the path in the object\n *\n * e.g\n * options.bar.style.value => $bar-style\n */\nexport async function reloadScss() {\n    if (!dependencies(['sassc']))\n        return;\n\n    const opts = getOptions();\n    const vars = opts.map(opt => {\n        if (opt.scss === 'exclude')\n            return '';\n\n        const unit = typeof opt.value === 'number' ? opt.unit : '';\n        const value = opt.scssFormat ? opt.scssFormat(opt.value) : opt.value;\n        return `$${opt.scss}: ${value}${unit};`;\n    });\n\n    const bar_style = opts.find(opt => opt.id === 'bar.style')?.value || '';\n    const additional = bar_style === 'normal' ? '//' : `\n        window#quicksettings .window-content {\n            margin-right: $wm-gaps;\n        }\n    `;\n\n    try {\n        const tmp = '/tmp/ags/scss';\n        Utils.ensureDirectory(tmp);\n        await Utils.writeFile(vars.join('\\n'), `${tmp}/options.scss`);\n        await Utils.writeFile(additional, `${tmp}/additional.scss`);\n        await Utils.execAsync(`sassc ${App.configDir}/scss/main.scss ${tmp}/style.css`);\n        App.resetCss();\n        App.applyCss(`${tmp}/style.css`);\n    } catch (error) {\n        if (error instanceof Error)\n            console.error(error.message);\n\n        if (typeof error === 'string')\n            console.error(error);\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/settings/setup.js",
    "content": "import App from 'resource:///com/github/Aylur/ags/app.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport Battery from 'resource:///com/github/Aylur/ags/service/battery.js';\nimport Notifications from 'resource:///com/github/Aylur/ags/service/notifications.js';\nimport options from '../options.js';\nimport icons from '../icons.js';\nimport { reloadScss, scssWatcher } from './scss.js';\nimport { initWallpaper, wallpaper } from './wallpaper.js';\nimport { hyprlandInit } from './hyprland.js';\nimport { globals } from './globals.js';\nimport Gtk from 'gi://Gtk';\nimport { exec, execAsync } from 'resource:///com/github/Aylur/ags/utils.js';\n\n\nexport function init() {\n    initWallpaper();\n    notificationBlacklist();\n    warnOnLowBattery();\n    globals();\n    tmux();\n    gsettigsColorScheme();\n    gtkFontSettings();\n    scssWatcher();\n\n    App.connect('config-parsed', () => {\n        reloadScss();\n        hyprlandInit();\n        wallpaper();\n        pywal();\n        gtkTheme();\n        gtkIcons();\n    });\n}\n\n\n\nfunction tmux() {\n    if (!Utils.exec('which tmux'))\n        return;\n\n    /** @param {string} scss */\n    function getColor(scss) {\n        if (scss.includes('#'))\n            return scss;\n\n        if (scss.includes('$')) {\n            const opt = options.list().find(opt => opt.scss === scss.replace('$', ''));\n            return opt?.value;\n        }\n    }\n\n    options.theme.accent.accent.connect('changed', ({ value }) => Utils\n        .execAsync(`tmux set @main_accent ${getColor(value)}`)\n        .catch(err => console.error(err.message)));\n}\n\nfunction gsettigsColorScheme() {\n    if (!Utils.exec('which gsettings'))\n        return;\n\n    options.theme.scheme.connect('changed', ({ value }) => {\n        const gsettings = 'gsettings set org.gnome.desktop.interface color-scheme';\n        Utils.execAsync(`${gsettings} \"prefer-${value}\"`)\n            .catch(err => console.error(err.message));\n    });\n}\n\nfunction gtkFontSettings() {\n    const settings = Gtk.Settings.get_default();\n    if (!settings) {\n        console.error(Error('Gtk.Settings unavailable'));\n        return;\n    }\n\n    const callback = () => {\n        const { size, font } = options.font;\n        settings.gtk_font_name = `${font.value} ${size.value}`;\n    };\n\n    options.font.font.connect('notify::value', callback);\n    options.font.size.connect('notify::value', callback);\n}\n\nfunction notificationBlacklist() {\n    Notifications.connect('notified', (_, id) => {\n        const n = Notifications.getNotification(id);\n        options.notifications.black_list.value.forEach(item => {\n            if (n?.app_name.includes(item) || n?.app_entry?.includes(item))\n                n.close();\n        });\n    });\n}\n\nfunction warnOnLowBattery() {\n    Battery.connect('notify::percent', () => {\n        const low = options.battery.low.value;\n        if (Battery.percent !== low ||\n            Battery.percent !== low / 2 ||\n            !Battery.charging)\n            return;\n\n        Utils.execAsync([\n            'notify-send',\n            `${Battery.percent}% Battery Percentage`,\n            '-i', icons.battery.warning,\n            '-u', 'critical',\n        ]);\n    });\n}\n\nexport function pywal() {\n    if (!exec('which wal'))\n        return print('missing dependancy: pywal');\n\n    execAsync([\n        'wal', '--theme', options.misc.pywal.theme.value,\n    ]).catch(err => console.error(err));\n}\n\nexport function gtkTheme() {\n    if (!exec('which gsettings'))\n        return print('missing dependancy: Gnome-Settings');\n\n    execAsync([\n        'gsettings', 'set', 'org.gnome.desktop.interface', 'gtk-theme', options.misc.gtk.theme.value,\n    ]).catch(err => console.error(err));\n}\n\n\nexport function gtkIcons() {\n    if (!exec('which gsettings'))\n        return print('missing dependancy: Gnome-Settings');\n\n    execAsync([\n        'gsettings', 'set', 'org.gnome.desktop.interface', 'icon-theme', options.misc.gtkIcons.theme.value,\n    ]).catch(err => console.error(err));\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/settings/theme.js",
    "content": "import options from '../options.js';\nimport themes from '../themes.js';\nimport { reloadScss } from './scss.js';\nimport { setupHyprland } from './hyprland.js';\nimport { wallpaper } from './wallpaper.js';\nimport { gtkIcons, gtkTheme, pywal } from './setup.js';\nimport GLib from 'gi://GLib';\n\n\n/** @param {string} name */\nexport function setTheme(name) {\n    options.reset();\n    const theme = themes.find(t => t.name === name);\n    if (!theme)\n        return print('No theme named ' + name);\n\n    options.apply(theme.options);\n    reloadScss();\n    setupHyprland();\n    wallpaper();\n    pywal();\n    gtkIcons();\n    gtkTheme();\n}\n\nexport const WP = GLib.get_home_dir() + '/.config/backgrounds/';\nexport const HOME = GLib.get_home_dir() + '/';\n\nexport const lightColors = {\n    'theme.scheme': 'light',\n    'color.red': '#e55f86',\n    'color.green': '#00D787',\n    'color.yellow': '#EBFF71',\n    'color.blue': '#51a4e7',\n    'color.magenta': '#9077e7',\n    'color.teal': '#51e6e6',\n    'color.orange': '#E79E64',\n    'theme.bg': '#fffffa',\n    'theme.fg': '#141414',\n};\n\nexport const Theme = ({ name, icon = ' ', ...options }) => ({\n    name,\n    icon,\n    options: {\n        'theme.name': name,\n        'theme.icon': icon,\n        ...options,\n    },\n});\n\nlet settingsDialog;\nexport async function openSettings() {\n    if (settingsDialog)\n        return settingsDialog.present();\n\n    try {\n        settingsDialog = (await import('./SettingsDialog.js')).default;\n        settingsDialog.present();\n    } catch (error) {\n        if (error instanceof Error)\n            console.error(error.message);\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/settings/wallpaper.js",
    "content": "import options from '../options.js';\nimport { exec, execAsync } from 'resource:///com/github/Aylur/ags/utils.js';\nimport { dependencies } from '../utils.js';\n\nexport function initWallpaper() {\n    if (dependencies(['swww'])) {\n        exec('swww init');\n\n        options.desktop.wallpaper.img.connect('changed', wallpaper);\n    }\n}\n\nexport function wallpaper() {\n    if (!dependencies(['swww']))\n        return;\n\n    execAsync([\n        'swww', 'img',\n        '--transition-type', 'grow',\n        '--transition-pos', exec('hyprctl cursorpos').replace(' ', ''),\n        options.desktop.wallpaper.img.value,\n    ]).catch(err => console.error(err));\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/themes.js",
    "content": "/**\n * A Theme is a set of options that will be applied\n * ontop of the default values. see options.js for possible options\n */\nimport { Theme, WP, HOME } from './settings/theme.js';\n\nexport default [\n\n  Theme({\n    name: 'Adwaita Dark',\n    icon: '󰊬 ',\n\n    \"workspaces\": 10,\n\n    \"misc.pywal.theme\": \"base16-default\",\n    \"misc.gtk.theme\": \"adw-gtk3-dark\",\n    \"misc.gtkIcons.theme\": \"Adwaita\",\n\n    \"desktop.wallpaper.img\": WP + \"topography_hyprland_bright.png\",\n    \"desktop.avatar\": HOME + \"face.png\",\n\n    \"spacing\": 2,\n    \"padding\": 8,\n    \"radii\": 5,\n    \"popover_padding_multiplier\": 1.4,\n\n    \"color.red\": \"#c01c28\",\n    \"color.green\": \"#2ec27e\",\n    \"color.yellow\": \"#f5c211\",\n    \"color.blue\": \"#3584e4\",\n    \"color.magenta\": \"#813d9c\",\n    \"color.teal\": \"#99c1f1\",\n    \"color.orange\": \"#e66100\",\n\n    \"theme.scheme\": \"dark\",\n    \"theme.bg\": \"#1E1E1E\",\n    \"theme.fg\": \"#deddda\",\n    \"theme.accent.accent\": \"$blue\",\n    \"theme.accent.fg\": \"$bg-color\",\n    \"theme.accent.gradient\": \"to right, $accent, lighten($accent, 14%)\",\n    \"theme.widget.bg\": \"$fg-color\",\n    \"theme.widget.opacity\": 94,\n\n    \"border.color\": \"$fg-color\",\n    \"border.opacity\": 100,\n    \"border.width\": 0,\n    \"border.barcolor\": \"$accent\",\n\n    \"hypr.inactive_border\": \"rgba(333333ff)\",\n    \"hypr.wm_gaps\": 3,\n\n    \"font.font\": \"Ubuntu Nerd Font\",\n    \"font.mono\": \"Mononoki Nerd Font\",\n    \"font.size\": 13,\n\n    \"applauncher.width\": 500,\n    \"applauncher.height\": 400,\n    \"applauncher.icon_size\": 42,\n\n    \"bar.position\": \"top\",\n    \"bar.style\": \"floating\",\n    \"bar.flat_buttons\": true,\n    \"bar.separators\": true,\n    \"bar.icon\": \"distro-icon\",\n\n    \"battery.bar.width\": 70,\n    \"battery.bar.height\": 14,\n    \"battery.low\": 15,\n    \"battery.medium\": 35,\n\n    \"desktop.wallpaper.fg\": \"#fff\",\n    \"desktop.drop_shadow\": false,\n    \"desktop.shadow\": \"rgba(0, 0, 0, .6)\",\n    \"desktop.dock.icon_size\": 42,\n    \"desktop.dock.pinned_apps\": [\n      \"brave\",\n      \"Visual Studio Code\",\n      \"kitty\",\n      \"org.gnome.Nautilus\",\n      \"obsidian\",\n      \"discord\",\n      \"spotify\",\n      \"superslicer\",\n      \"org.gnome.Software\",\n      \n    ],\n\n    \"notifications.black_list\": [\n      \"Spotify\"\n    ],\n    \"notifications.position\": [\n      \"top\"\n    ],\n    \"notifications.width\": 450,\n    \"dashboard.sys_info_size\": 70,\n    \"mpris.black_list\": [\n      \"firefox\"\n    ],\n    \"mpris.preferred\": \"spotify\",\n  }),\n\n  Theme({\n    name: 'Gruvbox Dark',\n    icon: ' ',\n\n    \"workspaces\": 10,\n\n    \"misc.pywal.theme\": \"base16-gruvbox-hard\",\n    \"misc.gtk.theme\": \"Gruvbox-Dark-B\",\n    \"misc.gtkIcons.theme\": \"gruvbox_icons\",\n\n    \"desktop.wallpaper.img\": WP + \"stairs.png\",\n    \"desktop.avatar\": HOME + \"face.png\",\n\n    \"spacing\": 2,\n    \"padding\": 8,\n    \"radii\": 5,\n    \"popover_padding_multiplier\": 1.4,\n\n    \"color.red\": \"#CC241D\",\n    \"color.green\": \"#476C43\",\n    \"color.yellow\": \"#D79921\",\n    \"color.blue\": \"#458588\",\n    \"color.magenta\": \"#B16286\",\n    \"color.teal\": \"#689D6A\",\n    \"color.orange\": \"#D65D0E\",\n\n    \"theme.scheme\": \"dark\",\n    \"theme.bg\": \"#1D2021\",\n    \"theme.fg\": \"#FBF1C7\",\n    \"theme.accent.accent\": \"$blue\",\n    \"theme.accent.fg\": \"$bg-color\",\n    \"theme.accent.gradient\": \"to right, $accent, lighten($accent, 14%)\",\n    \"theme.widget.bg\": \"$fg-color\",\n    \"theme.widget.opacity\": 94,\n\n    \"border.color\": \"$fg-color\",\n    \"border.opacity\": 100,\n    \"border.width\": 0,\n    \"border.barcolor\": \"$green\",\n\n    \"hypr.inactive_border\": \"rgba(333333ff)\",\n    \"hypr.wm_gaps\": 3,\n\n    \"font.font\": \"Ubuntu Nerd Font\",\n    \"font.mono\": \"Mononoki Nerd Font\",\n    \"font.size\": 13,\n\n    \"applauncher.width\": 500,\n    \"applauncher.height\": 400,\n    \"applauncher.icon_size\": 32,\n\n    \"bar.position\": \"top\",\n    \"bar.style\": \"floating\",\n    \"bar.flat_buttons\": true,\n    \"bar.separators\": true,\n    \"bar.icon\": \"distro-icon\",\n\n    \"battery.bar.width\": 70,\n    \"battery.bar.height\": 14,\n    \"battery.low\": 15,\n    \"battery.medium\": 35,\n\n    \"desktop.wallpaper.fg\": \"#fff\",\n    \"desktop.drop_shadow\": false,\n    \"desktop.shadow\": \"rgba(0, 0, 0, .6)\",\n\n    \"notifications.black_list\": [\n      \"Spotify\"\n    ],\n    \"notifications.position\": [\n      \"top\"\n    ],\n    \"notifications.width\": 450,\n    \"dashboard.sys_info_size\": 70,\n    \"mpris.black_list\": [\n      \"Caprine\"\n    ],\n    \"mpris.preferred\": \"spotify\",\n  }),\n\n Theme({\n    name: 'Catppuccin Mocha',\n    icon: '󰄛 ',\n\n    \"workspaces\": 10,\n\n    \"misc.pywal.theme\": \"base16-seti\",\n    \"misc.gtk.theme\": \"Catppuccin_Mocha\",\n    \"misc.gtkIcons.theme\": \"catppuccin_mocha\",\n\n    \"desktop.wallpaper.img\": WP + \"oled-mountains.jpg\",\n    \"desktop.avatar\": HOME + \"face.png\",\n\n    \"spacing\": 2,\n    \"padding\": 8,\n    \"radii\": 5,\n    \"popover_padding_multiplier\": 1.4,\n\n    \"color.red\": \"#F38BA8\",\n    \"color.green\": \"#A6E3A1\",\n    \"color.yellow\": \"#F9E2AF\",\n    \"color.blue\": \"#89B4FA\",\n    \"color.magenta\": \"#CBA6F7\",\n    \"color.teal\": \"#94E2D5\",\n    \"color.orange\": \"#FAB387\",\n\n    \"theme.scheme\": \"dark\",\n    \"theme.bg\": \"#181825\",\n    \"theme.fg\": \"#CDD6F4\",\n    \"theme.accent.accent\": \"$teal\",\n    \"theme.accent.fg\": \"$bg-color\",\n    \"theme.accent.gradient\": \"to right, $accent, lighten($accent, 14%)\",\n    \"theme.widget.bg\": \"$fg-color\",\n    \"theme.widget.opacity\": 94,\n\n    \"border.color\": \"$fg-color\",\n    \"border.opacity\": 100,\n    \"border.width\": 0,\n    \"border.barcolor\": \"$accent\",\n\n    \"hypr.inactive_border\": \"rgba(333333ff)\",\n    \"hypr.wm_gaps\": 3,\n\n    \"font.font\": \"Ubuntu Nerd Font\",\n    \"font.mono\": \"Mononoki Nerd Font\",\n    \"font.size\": 13,\n\n    \"applauncher.width\": 500,\n    \"applauncher.height\": 400,\n    \"applauncher.icon_size\": 32,\n\n    \"bar.position\": \"top\",\n    \"bar.style\": \"floating\",\n    \"bar.flat_buttons\": true,\n    \"bar.separators\": true,\n    \"bar.icon\": \"distro-icon\",\n\n    \"battery.bar.width\": 70,\n    \"battery.bar.height\": 14,\n    \"battery.low\": 15,\n    \"battery.medium\": 35,\n\n    \"desktop.wallpaper.fg\": \"#fff\",\n    \"desktop.drop_shadow\": false,\n    \"desktop.shadow\": \"rgba(0, 0, 0, .6)\",\n\n    \"notifications.black_list\": [\n      \"Spotify\"\n    ],\n    \"notifications.position\": [\n      \"top\"\n    ],\n    \"notifications.width\": 450,\n    \"dashboard.sys_info_size\": 70,\n    \"mpris.black_list\": [\n      \"Caprine\"\n    ],\n    \"mpris.preferred\": \"spotify\",\n  }),\n\nTheme({\n    name: 'Rosé Pine',\n    icon: '󰐅 ',\n\n    \"workspaces\": 10,\n\n    \"misc.pywal.theme\": \"base16-default\",\n    \"misc.gtk.theme\": \"rose-pine-gtk\",\n    \"misc.gtkIcons.theme\": \"rose-pine-icons\",\n\n    \"desktop.wallpaper.img\": WP + \"leafy-moon.png\",\n    \"desktop.avatar\": HOME + \"face.png\",\n\n    \"spacing\": 2,\n    \"padding\": 8,\n    \"radii\": 5,\n    \"popover_padding_multiplier\": 1.4,\n\n    \"color.red\": \"#eb6f92\",\n    \"color.green\": \"#9ccfd8\",\n    \"color.yellow\": \"#f6c177\",\n    \"color.blue\": \"#3e8fb0\",\n    \"color.magenta\": \"#c4a7e7\",\n    \"color.teal\": \"#31748f\",\n    \"color.orange\": \"#ebbcba\",\n\n    \"theme.scheme\": \"dark\",\n    \"theme.bg\": \"#191724\",\n    \"theme.fg\": \"#e0def4\",\n    \"theme.accent.accent\": \"$teal\",\n    \"theme.accent.fg\": \"$bg-color\",\n    \"theme.accent.gradient\": \"to right, $accent, lighten($accent, 14%)\",\n    \"theme.widget.bg\": \"$fg-color\",\n    \"theme.widget.opacity\": 94,\n\n    \"border.color\": \"$fg-color\",\n    \"border.opacity\": 100,\n    \"border.width\": 0,\n    \"border.barcolor\": \"$accent\",\n\n    \"hypr.inactive_border\": \"rgba(333333ff)\",\n    \"hypr.wm_gaps\": 3,\n\n    \"font.font\": \"Ubuntu Nerd Font\",\n    \"font.mono\": \"Mononoki Nerd Font\",\n    \"font.size\": 13,\n\n    \"applauncher.width\": 500,\n    \"applauncher.height\": 400,\n    \"applauncher.icon_size\": 32,\n\n    \"bar.position\": \"top\",\n    \"bar.style\": \"floating\",\n    \"bar.flat_buttons\": true,\n    \"bar.separators\": true,\n    \"bar.icon\": \"distro-icon\",\n\n    \"battery.bar.width\": 70,\n    \"battery.bar.height\": 14,\n    \"battery.low\": 15,\n    \"battery.medium\": 35,\n\n    \"desktop.wallpaper.fg\": \"#fff\",\n    \"desktop.drop_shadow\": false,\n    \"desktop.shadow\": \"rgba(0, 0, 0, .6)\",\n\n    \"notifications.black_list\": [\n      \"Spotify\"\n    ],\n    \"notifications.position\": [\n      \"top\"\n    ],\n    \"notifications.width\": 450,\n    \"dashboard.sys_info_size\": 70,\n    \"mpris.black_list\": [\n      \"Caprine\"\n    ],\n    \"mpris.preferred\": \"spotify\",\n  }),\n\n\n\n];\n\n\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/utils.js",
    "content": "import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport cairo from 'cairo';\nimport icons from './icons.js';\nimport Gdk from 'gi://Gdk';\nimport GLib from 'gi://GLib';\n\n/**\n  * @param {number} length\n  * @param {number=} start\n  * @returns {Array<number>}\n  */\nexport function range(length, start = 1) {\n    return Array.from({ length }, (_, i) => i + start);\n}\n\n/**\n  * @param {Array<[string, string] | string[]>} collection\n  * @param {string} item\n  * @returns {string}\n  */\nexport function substitute(collection, item) {\n    return collection.find(([from]) => from === item)?.[1] || item;\n}\n\n/**\n  * @param {(monitor: number) => any} widget\n  * @returns {Array<import('types/widgets/window').default>}\n  */\nexport function forMonitors(widget) {\n    const n = Gdk.Display.get_default()?.get_n_monitors() || 1;\n    return range(n, 0).map(widget).flat(1);\n}\n\n/**\n  * @param {import('gi://Gtk').Gtk.Widget} widget\n  * @returns {any} - missing cairo type\n  */\nexport function createSurfaceFromWidget(widget) {\n    const alloc = widget.get_allocation();\n    const surface = new cairo.ImageSurface(\n        cairo.Format.ARGB32,\n        alloc.width,\n        alloc.height,\n    );\n    const cr = new cairo.Context(surface);\n    cr.setSourceRGBA(255, 255, 255, 0);\n    cr.rectangle(0, 0, alloc.width, alloc.height);\n    cr.fill();\n    widget.draw(cr);\n\n    return surface;\n}\n\n/** @param {string} icon */\nexport function getAudioTypeIcon(icon) {\n    const substitues = [\n        ['audio-headset-bluetooth', icons.audio.type.headset],\n        ['audio-card-analog-usb', icons.audio.type.speaker],\n        ['audio-card-analog-pci', icons.audio.type.card],\n    ];\n\n    return substitute(substitues, icon);\n}\n\n\n/** @param {import('types/service/applications').Application} app */\nexport function launchApp(app) {\n    Utils.execAsync(['hyprctl', 'dispatch', 'exec', `sh -c ${app.executable}`]);\n    app.frequency += 1;\n}\n\n/** @param {Array<string>} bins */\nexport function dependencies(bins) {\n    const deps = bins.map(bin => {\n        const has = Utils.exec(`which ${bin}`);\n        if (!has)\n            print(`missing dependency: ${bin}`);\n\n        return !!has;\n    });\n\n    return deps.every(has => has);\n}\n\n/** @param {string} img - path to an img file */\nexport function blurImg(img) {\n    const cache = Utils.CACHE_DIR + '/media';\n    return new Promise(resolve => {\n        if (!img)\n            resolve('');\n\n        const dir = cache + '/blurred';\n        const blurred = dir + img.substring(cache.length);\n\n        if (GLib.file_test(blurred, GLib.FileTest.EXISTS))\n            return resolve(blurred);\n\n        Utils.ensureDirectory(dir);\n        Utils.execAsync(['convert', img, '-blur', '0x22', blurred])\n            .then(() => resolve(blurred))\n            .catch(() => resolve(''));\n    });\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/js/variables.js",
    "content": "import Variable from 'resource:///com/github/Aylur/ags/variable.js';\nimport GLib from 'gi://GLib';\nimport options from './options.js';\n\nconst intval = options.systemFetchInterval;\n\nexport const uptime = Variable('', {\n    poll: [60_000, 'cat /proc/uptime', line => {\n        const uptime = Number.parseInt(line.split('.')[0]) / 60;\n        if (uptime > 18 * 60)\n            return 'Go Sleep';\n\n        const h = Math.floor(uptime / 60);\n        const s = Math.floor(uptime % 60);\n        return `${h}:${s < 10 ? '0' + s : s}`;\n    }],\n});\n\nexport const distro = GLib.get_os_info('ID');\n\nexport const distroIcon = (() => {\n    switch (distro) {\n        case 'fedora': return '';\n        case 'arch': return '';\n        case 'nixos': return '';\n        case 'debian': return '';\n        case 'opensuse-tumbleweed': return '';\n        case 'ubuntu': return '';\n        case 'endeavouros': return '';\n        default: return '';\n    }\n})();\n\n/** @type {function([string, string] | string[]): number} */\nconst divide = ([total, free]) => Number.parseInt(free) / Number.parseInt(total);\n\nexport const cpu = Variable(0, {\n    poll: [intval, 'top -b -n 1', out => divide(['100', out.split('\\n')\n        .find(line => line.includes('Cpu(s)'))\n        ?.split(/\\s+/)[1]\n        .replace(',', '.') || '0'])],\n});\n\nexport const ram = Variable(0, {\n    poll: [intval, 'free', out => divide(out.split('\\n')\n        .find(line => line.includes('Mem:'))\n        ?.split(/\\s+/)\n        .splice(1, 2) || ['1', '1'])],\n});\n\nexport const temp = Variable(0, {\n    poll: [intval, 'cat ' + options.temperature, n => {\n        return Number.parseInt(n) / 100_000;\n    }],\n});\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/package.json",
    "content": "{\n    \"name\": \"ags-dotfiles\",\n    \"version\": \"1.6.3\",\n    \"description\": \"An extensible GTK-Shell\",\n    \"main\": \"config.js\",\n    \"scripts\": {\n        \"lint\": \"eslint . --fix\",\n        \"stylelint\": \"stylelint ./scss --fix\"\n    },\n    \"repository\": {\n        \"type\": \"git\",\n        \"url\": \"git+https://github.com/RoccoRakete/hyprland-dots.git\"\n    },\n    \"author\": \"RoccoRakete\",\n    \"bugs\": {\n        \"url\": \"https://github.com/RoccoRakete/hyprland-dots/issues\"\n    },\n    \"homepage\": \"https://github.com/RoccoRakete/hyprland-dots/blob/main/README.md\",\n    \"kofi\": \"https://ko-fi.com/roccorakete\",\n    \"devDependencies\": {\n        \"@girs/dbusmenugtk3-0.4\": \"^0.4.0-3.2.0\",\n        \"@girs/gobject-2.0\": \"^2.76.1-3.2.3\",\n        \"@girs/gtk-3.0\": \"^3.24.39-3.2.2\",\n        \"@girs/gvc-1.0\": \"^1.0.0-3.1.0\",\n        \"@girs/nm-1.0\": \"^1.43.1-3.1.0\",\n        \"stylelint-config-standard-scss\": \"^10.0.0\",\n        \"@typescript-eslint/eslint-plugin\": \"^5.33.0\",\n        \"@typescript-eslint/parser\": \"^5.33.0\",\n        \"eslint\": \"^8.44.0\"\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/prepare_background.sh",
    "content": "#!/usr/bin/env sh\n\nconvert -scale 1920x1080 -blur 0x10 ~/.config/backgrounds/last/image.png ~/.config/backgrounds/last/image_blurred.png\n            "
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/common/a11y-button.scss",
    "content": "@import './button';\n\n@mixin accs-button($flat: false, $reactive: true){\n    @include button($flat: true, $reactive: false, $focusable: false);\n    color: $fg-color;\n\n    > * {\n        border-radius: $radii;\n        transition: $transition;\n\n        @if $flat{\n            background-color: transparent;\n            box-shadow: none;\n        } @else{\n            background-color: $widget-bg;\n            box-shadow: inset 0 0 0 $border-width $border-color;\n        }\n    }\n\n\n    @if $reactive{\n        &:focus > *, &.focused > * {\n            @include button-focus;\n        }\n\n        &:hover > * {\n            @include button-hover;\n        }\n\n        &:active, &.active, &.on, &:checked {\n            > * {\n                @include button-active;\n            }\n\n            &:hover > * {\n                box-shadow: inset 0 0 0 $border-width $border-color,\n                            inset 0 0 0 99px $hover;\n            }\n        }\n    }\n}\n\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/common/button-workspaces.scss",
    "content": "@mixin button-focus() {\n    box-shadow: inset 0 0 0 $border-width $accent;\n    background-color: $hover;\n    color: $hover-fg;\n}\n\n@mixin button-hover() {\n    box-shadow: inset 0 0 0 $border-width $border-color;\n    background-color: $bg-color;\n    color: $hover-fg;\n}\n\n@mixin button-active() {\n    box-shadow: inset 0 0 0 $border-width $border-color;\n    background-image: $active-gradient;\n    background-color: $accent;\n    color: $accent-fg;\n}\n\n@mixin button-disabled() {\n    box-shadow: none;\n    background-color: transparent;\n    color: transparentize($fg-color, 0.7);\n}\n\n@mixin button-workspaces($flat: false, $reactive: true, $radii: $radii, $focusable: true){\n    all: unset;\n    transition: $transition;\n    border-radius: $radii;\n    color: $fg-color;\n\n    @if $flat{\n        background-color: transparent;\n        background-image: none;\n        box-shadow: none;\n    } @else{\n        background-color: $widget-bg;\n        box-shadow: inset 0 0 0 $border-width $border-color;\n    }\n\n    @if $reactive{\n        @if $focusable {\n            &:focus{\n                @include button-focus;\n            }\n        }\n\n        &:hover{\n            @include button-hover;\n        }\n\n        &:active, &.on, &.active, &:checked {\n            @include button-active;\n\n            &:hover {\n                box-shadow: inset 0 0 0 $border-width $border-color,\n                            inset 0 0 0 99px $hover;\n            }\n        }\n    }\n\n    &:disabled {\n        @include button-disabled;\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/common/button.scss",
    "content": "@mixin button-focus() {\n    box-shadow: inset 0 0 0 $border-width $accent;\n    background-color: $hover;\n    color: $hover-fg;\n}\n\n@mixin button-hover() {\n    box-shadow: inset 0 0 0 $border-width $border-color;\n    background-color: $hover;\n    color: $hover-fg;\n}\n\n@mixin button-active() {\n    box-shadow: inset 0 0 0 $border-width $border-color;\n    background-image: $active-gradient;\n    background-color: $accent;\n    color: $accent-fg;\n}\n\n@mixin button-disabled() {\n    box-shadow: none;\n    background-color: transparent;\n    color: transparentize($fg-color, 0.7);\n}\n\n@mixin button($flat: false, $reactive: true, $radii: $radii, $focusable: true){\n    all: unset;\n    transition: $transition;\n    border-radius: $radii;\n    color: $fg-color;\n\n    @if $flat{\n        background-color: transparent;\n        background-image: none;\n        box-shadow: none;\n    } @else{\n        background-color: $widget-bg;\n        box-shadow: inset 0 0 0 $border-width $border-color;\n    }\n\n    @if $reactive{\n        @if $focusable {\n            &:focus{\n                @include button-focus;\n            }\n        }\n\n        &:hover{\n            @include button-hover;\n        }\n\n        &:active, &.on, &.active, &:checked {\n            @include button-active;\n\n            &:hover {\n                box-shadow: inset 0 0 0 $border-width $border-color,\n                            inset 0 0 0 99px $hover;\n            }\n        }\n    }\n\n    &:disabled {\n        @include button-disabled;\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/common/floating-widget.scss",
    "content": "@mixin floating-widget {\n    @if $drop-shadow {\n        box-shadow: 0 0 5px 0 $shadow;\n    }\n\n    margin: max($spacing, 8px);\n    border: $border-width solid $popover-border-color;\n    background-color: $bg-color;\n    color: $fg-color;\n    border-radius: $popover-radius;\n    padding: $popover-padding;\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/common/hidden.scss",
    "content": "@mixin hidden {\n    background-color: transparent;\n    background-image: none;\n    border-color: transparent;\n    box-shadow: none;\n    -gtk-icon-transform: scale(0);\n\n    * {\n        background-color: transparent;\n        background-image: none;\n        border-color: transparent;\n        box-shadow: none;\n        -gtk-icon-transform: scale(0);\n    }\n}\n\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/common/menu.scss",
    "content": "window.popup {\n    > * {\n        border: none;\n        box-shadow: none;\n    }\n\n    menu {\n        border-radius: $popover-radius;\n        background-color: $bg-color;\n        padding: $popover-padding;\n        border: $border-width solid $popover-border-color;\n\n        separator {\n            background-color: $border-color;\n        }\n\n        menuitem {\n            @include button;\n            padding: $spacing/2;\n            margin: $spacing/2 0;\n            &:first-child { margin-top: 0; }\n            &:last-child { margin-bottom: 0; }\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/common/scrollable.scss",
    "content": "@mixin scrollable {\n    scrollbar, scrollbar * {\n        all: unset;\n    }\n\n    scrollbar.vertical {\n        transition: $transition;\n        background-color: transparentize($bg-color, 0.7);\n\n        &:hover {\n            background-color: transparentize($bg-color, 0.3);\n\n            slider {\n                background-color: transparentize($fg-color, 0.3);\n                min-width: .6em;\n            }\n        }\n    }\n\n\n    scrollbar.vertical slider {\n        background-color: transparentize($fg-color, 0.5);\n        border-radius: $radii;\n        min-width: .4em;\n        min-height: 2em;\n        transition: $transition;\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/common/slider.scss",
    "content": "@import './unset';\n\n@mixin slider($width: 0.7em, $slider-width: .5em, $gradient: $active-gradient, $slider: true, $focusable: true, $radii: $radii){\n    @include unset($rec: true);\n\n    trough{\n        transition: $transition;\n        border-radius: $radii;\n        border: $border;\n        background-color: $widget-bg;\n        min-height: $width;\n        min-width:  $width;\n\n        highlight, progress{\n            border-radius: max($radii - $border-width, 0);\n            background-image: $gradient;\n            min-height: $width;\n            min-width:  $width;\n        }\n    }\n\n    slider {\n        box-shadow: none;\n        background-color: transparent;\n        border: $border-width solid transparent;\n        transition: $transition;\n        border-radius: $radii;\n        min-height: $width;\n        min-width:  $width;\n        margin: -$slider-width;\n    }\n\n    &:hover {\n        trough {\n            background-color: $hover;\n        }\n\n        slider {\n            @if $slider{\n                background-color: $fg-color;\n                border-color: $border-color;\n\n                @if $drop-shadow {\n                    box-shadow: 0 0 3px 0 $shadow;\n                }\n            }\n        }\n    }\n\n    &:disabled {\n        highlight, progress{\n            background-color: transparentize($fg-color, 0.4);\n            background-image: none;\n        }\n    }\n\n    @if $focusable {\n        trough:focus{\n            background-color: $hover;\n            box-shadow: inset 0 0 0 $border-width $accent;\n\n            slider {\n                @if $slider {\n                    background-color: $fg-color;\n                    box-shadow: inset 0 0 0 $border-width $accent;\n                }\n            }\n        }\n\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/common/spacing.scss",
    "content": "@mixin spacing($multiplier: 6, $spacing: $spacing, $rec: false) {\n    &.horizontal > * {\n        margin: 0 $spacing * $multiplier / 2;\n        &:first-child { margin-left: 0; }\n        &:last-child { margin-right: 0; }\n    }\n\n    &.vertical > * {\n        margin: $spacing * $multiplier / 2 0;\n        &:first-child { margin-top: 0; }\n        &:last-child { margin-bottom: 0; }\n    }\n\n    @if $rec {\n        box {\n            &.horizontal > * {\n                margin: 0 $spacing * $multiplier / 2;\n                &:first-child { margin-left: 0; }\n                &:last-child { margin-right: 0; }\n            }\n\n            &.vertical > * {\n                margin: $spacing * $multiplier / 2 0;\n                &:first-child { margin-top: 0; }\n                &:last-child { margin-bottom: 0; }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/common/switch.scss",
    "content": "@import './button';\n\n@mixin switch {\n    @include button;\n\n    slider {\n        background-color: $accent-fg;\n        border-radius: $radii;\n        min-width: 24px;\n        min-height: 24px;\n    }\n\n    image { color: transparent; }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/common/text-border.scss",
    "content": "@mixin text-border{\n    text-shadow:\n        -1 * $border-width -1 * $border-width 0 $border-color,\n        $border-width $border-width 0 $border-color,\n        -1 * $border-width $border-width 0 $border-color,\n        $border-width -1 * $border-width 0 $border-color;\n\n    -gtk-icon-shadow:\n        -1 * $border-width -1 * $border-width 0 $border-color,\n        $border-width $border-width 0 $border-color,\n        -1 * $border-width $border-width 0 $border-color,\n        $border-width -1 * $border-width 0 $border-color;\n}\n\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/common/tooltip.scss",
    "content": "tooltip {\n    * { all: unset; }\n\n    background-color: transparent;\n    border: none;\n\n    > * > *{\n        background-color: $bg-color;\n        border-radius: $radii;\n        border: $border-width solid $popover-border-color;\n        color: $fg-color;\n        padding: 8px;\n        margin: 4px;\n        box-shadow: 0 0 3px 0 $shadow;\n    }\n}\n\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/common/unset.scss",
    "content": "@mixin unset($rec: false){\n    all: unset;\n\n    @if $rec {\n        * { all: unset };\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/common/widget.scss",
    "content": "@mixin widget{\n    transition: $transition;\n    border-radius: $radii;\n    color: $fg-color;\n    background-color: $widget-bg;\n    border: $border;\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/main.scss",
    "content": "@import '/tmp/ags/scss/options';\n@import './variables';\n\n// common\n@import './common/unset';\n@import './common/widget';\n@import './common/button';\n@import './common/button-workspaces.scss';\n@import './common/a11y-button';\n@import './common/floating-widget';\n@import './common/slider';\n@import './common/scrollable';\n@import './common/switch';\n@import './common/hidden';\n@import './common/text-border';\n@import './common/tooltip';\n@import './common/menu';\n@import './common/spacing';\n\n// widgets\n@import './widgets/about';\n@import './widgets/applauncher';\n@import './widgets/bar';\n@import './widgets/desktop';\n@import './widgets/notifications';\n@import './widgets/overview';\n@import './widgets/osd';\n@import './widgets/dashboard';\n@import './widgets/dock';\n@import './widgets/powermenu';\n@import './widgets/lockscreen';\n@import './widgets/media';\n@import './widgets/quicksettings';\n@import './widgets/settings';\n\n// additional overrides\n@import '/tmp/ags/scss/additional';\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/variables.scss",
    "content": "// variables are defined in options.js\n// these ones are derived from those\n\n$hover: transparentize($_widget-bg, ($widget-opacity * 0.9) / 100);\n$widget-bg: transparentize($_widget-bg, $widget-opacity / 100);\n$active-gradient: linear-gradient($accent-gradient);\n\n$hover-fg: if($color-scheme == 'dark', lighten($fg-color, 10%), darken($fg-color, 8%));\n\n$border-color: transparentize($_border-color, $border-opacity / 100);\n$border: $border-width solid $border-color;\n\n$text-shadow: 2px 2px 2px $shadow;\n\n$popover-border-color: transparentize($_border-color, max(($border-opacity - 1) / 100, 0));\n$popover-padding: $padding * $popover-padding-multiplier;\n$popover-radius: if($radii == 0, 0, $radii + $popover-padding);\n\n$bar-border: $border-width solid $bar-border-color;\n\n\n$shader-fg: #fff;\n\n* { font-size: $font-size; }\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/widgets/about.scss",
    "content": "window#about {\n    @include unset;\n\n    .window-content {\n        @include floating-widget;\n        min-width: 300px;\n    }\n\n    .avatar {\n        min-width: 200px;\n        min-height: 200px;\n        background-size: cover;\n        border: $border;\n        margin: $spacing 0;\n    }\n\n    .labels {\n        .title {\n            font-size: 1.2em;\n        }\n\n        .author {\n            color: transparentize($fg-color, 0.2)\n        }\n\n        .version {\n            margin-top: $spacing;\n            margin-bottom: $spacing * 2;\n            border-radius: $radii;\n            background-color: $widget-bg;\n            color: $accent;\n            padding: $padding;\n        }\n    }\n\n    .buttons {\n        padding-bottom: $popover-padding;\n\n        button {\n            @include button;\n            padding: $padding;\n\n            &:first-child {\n                border-radius: $radii $radii 0 0;\n            }\n\n            &:last-child {\n                border-radius: 0 0 $radii $radii;\n            }\n        }\n    }\n\n    .dont-show {\n        @include button;\n        padding: $padding;\n\n        image {\n            font-size: 1.4em;\n            color: $red;\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/widgets/applauncher.scss",
    "content": "window#applauncher .window-content {\n    @include floating_widget;\n\n    entry {\n        @include button;\n        padding: $padding;\n        margin-bottom: $spacing;\n\n        label, image {\n            color: $fg-color;\n        }\n    }\n\n    separator {\n        min-height: 1px;\n        background-color: $hover;\n    }\n\n    scrolledwindow {\n        @include scrollable;\n        min-width: $applauncher-width;\n        min-height: $applauncher-height;\n    }\n\n    button.app-item {\n        @include button($flat: true, $reactive: false);\n        > box { @include spacing(0.5); }\n        transition: $transition;\n        padding: $padding;\n\n        label {\n            transition: $transition;\n\n            &.title {\n                color: $fg-color;\n            }\n\n            &.description {\n                color: transparentize($fg-color, 0.3);\n            }\n        }\n\n        image {\n            transition: $transition;\n        }\n\n        &:hover, &:focus {\n            .title {\n                color: $accent;\n            }\n\n            image {\n                -gtk-icon-shadow: 2px 2px $accent;\n            }\n        }\n\n        &:active {\n            background-color: transparentize($accent, 0.5);\n            border-radius: $radii;\n            box-shadow: inset 0 0 0 $border-width $border-color;\n\n            .title {\n                color: $fg-color;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/widgets/bar.scss",
    "content": "$bar-spacing: $spacing / 2;\n$button-radius: if($bar-style == \"floating\", max(0, $radii - $bar-spacing), $radii);\n\n@mixin panel-button($flat: $bar-flat-buttons, $reactive: true) {\n    @include unset;\n\n    @if $bar-style == \"separated\" {\n        transition: $transition;\n\n        > * {\n            @include floating-widget;\n            border-radius: $radii;\n            margin: $wm-gaps $bar-spacing;\n            transition: $transition;\n        }\n\n        &:hover > * {\n            color: $hover-fg;\n\n            @if $drop-shadow {\n                box-shadow:\n                    0 0 min(6px, $spacing/2) 0 $shadow,\n                    inset 0 0 0 99px $hover;\n            } @else {\n                box-shadow: inset 0 0 0 99px $hover;\n            }\n        }\n\n        &:active > *,\n        &.active > * {\n            label,\n            image {\n                color: $accent-fg;\n            }\n            background-image: $active-gradient;\n            background-color: $accent;\n        }\n    } @else {\n        @include accs-button($flat, $reactive);\n\n        > * {\n            border-radius: $button-radius;\n            margin: $bar-spacing;\n        }\n    }\n\n    label,\n    image {\n        font-weight: bold;\n    }\n\n    > * {\n        padding: $padding * 0.4 $padding * 0.8;\n    }\n}\n\n.panel {\n    .cpu {\n        padding-left: $spacing/2;\n        color: $accent;\n        font-size: $font_size/5;\n        border-radius: max($radii - $border_width, 0);\n        margin: $spacing;\n        min-height: $font_size * 1.25;\n        min-width: $font_size * 1.25;\n\n        @if $bar_style == \"separated\" {\n            border-top-right-radius: 0;\n            border-bottom-right-radius: 0;\n            margin-left: $spacing/4;\n            margin-right: 0;\n            padding: $spacing;\n            padding-left: $spacing * 3;\n            background-color: $bg-color;\n        }\n    }\n\n    .ram {\n        color: $yellow;\n        font-size: $font_size/5;\n        border-radius: max($radii - $border_width, 0);\n        margin: $spacing;\n        min-height: $font_size * 1.25;\n        min-width: $font_size * 1.25;\n\n        @if $bar_style == \"separated\" {\n            border-radius: 0;\n            margin-left: 0;\n            margin-right: 0;\n            padding: $spacing;\n            background-color: $bg-color;\n        }\n    }\n\n    .temp {\n        padding-right: $spacing * 2;\n        color: $magenta;\n        font-size: $font_size/5;\n        border-radius: max($radii - $border_width, 0);\n        margin: $spacing;\n        min-height: $font_size * 1.25;\n        min-width: $font_size * 1.25;\n\n        @if $bar_style == \"separated\" {\n            border-top-left-radius: 0;\n            border-bottom-left-radius: 0;\n            margin-right: $spacing/4;\n            margin-left: 0;\n            padding: $spacing;\n            padding-right: $spacing * 3;\n            background-color: $bg-color;\n        }\n    }\n\n    .circular-progress-box {\n        .circular-progress {\n            margin: $spacing/2.5;\n            background-color: $widget-bg;\n            font-size: 1em;\n\n            @if $bar_style == \"separated\" {\n                padding: $wm_gaps $wm_gaps + 5px $wm_gaps $wm_gaps + 5px;\n                border-radius: max($radii - $border_width, 0);\n                margin-left: $spacing/4;\n                margin-right: $spacing/4;\n            }\n        }\n    }\n\n    @if $bar-style == \"normal\" {\n        background-color: $bg-color;\n    }\n\n    @if not $screen-corners and $bar-style == \"normal\" {\n        @if $bar-position == \"bottom\" {\n            border-top: $border;\n        } @else {\n            border-bottom: $border;\n        }\n    }\n\n    @if $bar-style == \"floating\" {\n        @include floating-widget;\n        border-radius: $radii;\n        margin-top: $wm-gaps;\n        margin-left: $wm-gaps;\n        margin-right: $wm-gaps;\n        margin-bottom: 0;\n        padding: 0;\n    }\n\n    @if $bar-style == \"separated\" {\n        > .end > button:last-child > * {\n            margin-right: $wm-gaps;\n        }\n\n        > .start > button:first-child > * {\n            margin-left: $wm-gaps;\n        }\n        margin-bottom: 0;\n    }\n\n    .panel-button {\n        @include panel-button;\n    }\n\n    .battery_percentage {\n        padding-bottom: 2px;\n    }\n\n    .tray-item,\n    .color-picker {\n        @include panel-button($flat: true);\n    }\n\n    separator {\n        background-color: transparentize($fg-color, 0.86);\n        border-radius: $radii;\n        min-height: 5px;\n        min-width: 5px;\n    }\n\n    .overview {\n        label {\n            color: transparentize($accent, 0.2);\n        }\n        &:hover label {\n            color: $accent;\n        }\n        &:active label,\n        &.active label {\n            color: $accent-fg;\n        }\n    }\n\n    .powermenu,\n    .recorder {\n        image {\n            color: transparentize($red, 0.3);\n        }\n        &:hover image {\n            color: transparentize($red, 0.15);\n        }\n        &:active image {\n            color: $red;\n        }\n    }\n\n    .focused-client > box > box,\n    .quicksettings > box > box {\n        @include spacing($spacing: if($bar-spacing == 0, $padding / 2, $bar-spacing));\n    }\n\n    /* stylelint-disable-next-line selector-not-notation */\n    .quicksettings:not(.active):not(:active) {\n        .bluetooth {\n            color: $blue;\n        }\n\n        .battery {\n            &.low {\n                color: $red;\n            }\n            &.charged,\n            &.charging {\n                color: $green;\n            }\n        }\n    }\n\n    .media {\n        &.spotify image {\n            color: $green;\n        }\n        &.firefox image {\n            color: $orange;\n        }\n        &.mpv image {\n            color: $magenta;\n        }\n    }\n\n    .notifications {\n        image {\n            color: $yellow;\n        }\n    }\n\n    .battery-bar {\n        label {\n            margin-right: $bar-spacing * 3;\n        }\n        .font-icon {\n            font-size: 1.15em;\n        }\n\n        @if $battery-bar-full {\n            > box {\n                padding: 0;\n            }\n        }\n\n        image,\n        .font-icon {\n            margin-right: $bar-spacing * 0.5;\n        }\n\n        levelbar trough {\n            @include widget;\n            min-width: $battery-bar-width;\n            min-height: $battery-bar-height;\n\n            block.filled {\n                border-radius: max($radii - $border-width, 0);\n                background-image: $active-gradient;\n            }\n        }\n\n        @mixin color($color) {\n            image,\n            label {\n                color: $fg_color;\n            }\n\n            block.filled {\n                background-image: linear-gradient(to right, $color, lighten($color, 6%));\n            }\n        }\n\n        .medium {\n            @include color($yellow);\n        }\n        .low {\n            @include color($red);\n        }\n        .charging {\n            @include color($green);\n        }\n        &:active {\n            @include color($accent-fg);\n        }\n\n        .whole-button {\n            label {\n                color: $fg-color;\n                text-shadow: $text-shadow;\n            }\n\n            trough,\n            block.filled {\n                border-radius: $button-radius;\n            }\n\n            @if $bar-style == \"separated\" {\n                trough {\n                    border: none;\n                }\n            }\n        }\n    }\n\n    .workspaces {\n        .horizontal {\n            background-color: $bg-color;\n        }\n        > * {\n            padding: 0;\n        }\n        .eventbox {\n            transition: $transition;\n\n            @if $bar-style == \"separated\" {\n                border-radius: max($radii - $border-width, 0);\n            } @else {\n                @include button($flat: true);\n            }\n        }\n\n        button {\n            all: unset;\n            background-color: $bg-color;\n            border-radius: $radii;\n\n            .indicator {\n                font-size: 0;\n                min-width: $font_size * 0.9;\n                min-height: $font_size * 0.9;\n                border-radius: $font_size;\n                box-shadow: inset 0 0 0 $border-width $border-color;\n                margin: 0 $padding/2;\n                transition: $transition/2;\n                background-color: transparentize($fg-color, 0.8);\n            }\n\n            &:last-child .indicator {\n                margin-right: $padding;\n            }\n\n            &:first-child .indicator {\n                margin-left: $padding;\n            }\n\n            &.occupied .indicator {\n                background-color: transparentize($fg-color, 0.2);\n            }\n\n            &:hover .indicator {\n                box-shadow: inset 0 0 0 10px transparentize($fg-color, 0.8);\n            }\n\n            &.active .indicator,\n            &:active .indicator {\n                background-color: $accent;\n            }\n\n            &.active .indicator {\n                min-width: $font_size * 2.5;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/widgets/dashboard.scss",
    "content": "@mixin calendar {\n    @include widget;\n    padding: $padding*2 $padding*2 0;\n\n    calendar{\n        all: unset;\n\n        &.button{\n            @include button($flat: true);\n        }\n\n        &:selected{\n            box-shadow: inset 0 -8px 0 0 transparentize($accent, 0.5),\n            inset 0 0 0 1px $accent;\n            border-radius: $radii*0.6;\n        }\n\n        &.header{\n            background-color: transparent;\n            border: none;\n            color: transparentize($fg-color, 0.5);\n        }\n\n        &.highlight{\n            background-color: transparent;\n            color: transparentize($accent, 0.5);\n        }\n\n        &:indeterminate {\n            color: transparentize($fg-color, 0.9);\n        }\n        font-size: 1.1em;\n        padding: .2em;\n    }\n}\n\nwindow#dashboard .window-content {\n    @include floating-widget;\n\n    .notifications {\n        min-width: $notifications-width;\n\n        .header {\n            margin-bottom: $spacing;\n            margin-right: $spacing;\n\n            > label { margin-left: $radii / 2; }\n\n            button {\n                @include button;\n                padding: $padding/2 $padding;\n            }\n        }\n\n        .notification-scrollable {\n            @include scrollable;\n        }\n\n        .notification-list {\n            margin-right: $spacing;\n        }\n\n        .notification {\n            @include notification;\n\n            > box {\n                @include widget;\n                padding: $padding;\n                margin-bottom: $spacing;\n            }\n        }\n\n        .placeholder {\n            image {  font-size: 7em; }\n            label {  font-size: 1.2em; }\n        }\n    }\n\n    separator {\n        background-color: $popover-border-color;\n        min-width: 2px;\n        border-radius: $radii;\n        margin-right: $spacing;\n    }\n\n    .datemenu, .system-info {\n        @include spacing;\n    }\n\n    .clock-box {\n        padding: $padding;\n\n        .clock {\n            font-size: 5em;\n        }\n\n        .uptime {\n            color: transparentize($fg-color, 0.2);\n        }\n    }\n\n    .calendar {\n        @include calendar;\n    }\n\n    .circular-progress-box {\n        @include widget;\n        padding: $padding;\n\n        .circular-progress {\n            min-height: $sys-info-size;\n            min-width: $sys-info-size;\n            margin: $padding/2;\n            font-size: $padding;\n            background-color: $bg-color;\n            color: $accent;\n\n            image {\n                font-size: 1.8em;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/widgets/desktop.scss",
    "content": "window.corner .corner {\n    background-color: $bg-color;\n    border-radius: $radii * 2;\n    min-width: 2px;\n    min-height: 2px;\n}\n\nwindow.desktop {\n    @if $bar-style == 'normal' {\n        border-radius: if($screen-corners, $radii * 2, 0);\n        box-shadow: inset 0 0 $wm-gaps / 2 0 $shadow;\n    }\n\n    .clock-box-shadow {\n        border: 5px solid $wallpaper-fg;\n        border-radius: $radii;\n\n        .clock-box {\n            border-radius: max($radii - 5px, 0);\n            padding: 0 14px;\n\n            .clock {\n                color: $wallpaper-fg;\n                font-size: 140px;\n                font-family: $mono-font;\n            }\n\n            .separator-box {\n                padding: 24px 12px;\n\n                separator {\n                    border-radius: $radii;\n                    min-width: 16px;\n                    min-height: 16px;\n                    background-color: $wallpaper-fg;\n                }\n            }\n        }\n    }\n\n    .date {\n        color: $wallpaper-fg;\n        font-size: 48px;\n    }\n\n    @if $drop-shadow {\n        .clock-box-shadow, separator {\n            box-shadow: 2px 2px 2px 0 $shadow;\n        }\n\n        .clock-box {\n            box-shadow: inset 2px 2px 2px 0 $shadow;\n        }\n\n        label {\n            text-shadow: $text-shadow;\n        }\n    } @else {\n        .clock-box-shadow{\n            box-shadow: 0 0 0 $border-width $border-color,\n                        inset 0 0 0 $border-width $border-color;\n        }\n\n        separator {\n            border: $border;\n        }\n\n        label {\n            @include text-border;\n        }\n    }\n}\n\n.desktop-menu {\n    image {\n        margin-left: -14px;\n        margin-right: 6px;\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/widgets/dock.scss",
    "content": "@mixin dock($spacing: $spacing * 0.7) {\n    separator {\n        border-radius: $radii;\n        background-color: transparentize($fg-color, 0.8);\n        margin: 0 $spacing;\n        min-width: 2px;\n        min-height: 2em;\n    }\n\n    button {\n        @include accs-button($flat: true);\n\n        .box {\n            margin: $spacing / 2;\n        }\n\n        image {\n            margin: $padding;\n            margin-bottom: $padding * 1.5;\n\n            @if $color-scheme == 'light' {\n                -gtk-icon-shadow: $text-shadow;\n            }\n        }\n\n        .indicator {\n            min-width: 6px;\n            min-height: 6px;\n            background-color: $fg-color;\n            border-radius: $radii;\n            margin-bottom: $padding/4;\n\n            &.focused {\n                background-image: $active-gradient;\n            }\n        }\n    }\n}\n\nwindow.floating-dock .dock {\n    @include dock;\n    @include floating-widget;\n    border-radius: if($radii == 0, 0, $radii + $spacing / 2);\n    padding: $spacing / 2;\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/widgets/lockscreen.scss",
    "content": "window.lockscreen {\n    background-color: rgba(0, 0, 0, 0.25);\n\n    .avatar {\n        @include widget;\n        border-radius: $radii * 2;\n        min-height: 200px;\n        min-width: 200px;\n    }\n\n    .content {\n        @include floating-widget;\n        padding: $spacing * 4;\n    }\n\n    spinner {\n        margin-top: $spacing * 2;\n    }\n\n    entry {\n        @include button;\n        margin-top: $spacing * 2;\n        padding: $spacing;\n        min-height: 20px;\n    }\n} \n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/widgets/media.scss",
    "content": "@mixin player-color($color) {\n    button {\n        .shuffle.enabled {\n            color: $color;\n        }\n\n        .loop {\n            &.playlist, &.track {\n                color: $color;\n            }\n        }\n\n        &:active label {\n            color: $color;\n        }\n    }\n\n    .position-slider:hover trough {\n        background-color: transparentize($color, 0.5);\n    }\n\n    .player-icon {\n        color: $color;\n    }\n}\n\n@mixin media() {\n    @include widget;\n\n    label {\n        color: $shader-fg;\n        text-shadow: $text-shadow;\n    }\n\n    .blurred-cover, .cover {\n        background-size: cover;\n        background-position: center;\n        border-radius: $radii*0.8;\n        opacity: 0.8;\n    }\n\n    .cover {\n        min-height: 100px;\n        min-width: 100px;\n        box-shadow: 2px 2px 2px 0 $shadow;\n        margin: $padding;\n        opacity: 0.9;\n    }\n\n    .labels {\n        margin-top: $padding;\n\n        label {\n            font-size: 1.1em;\n            text-shadow: $text-shadow;\n\n            &.title {\n                font-weight: bold;\n            }\n        }\n    }\n\n    .position-slider {\n        @include slider($width: .4em, $slider: false, $gradient: linear-gradient($shader-fg, $shader-fg), $radii: 0);\n        margin-bottom: $padding/2;\n\n        trough {\n            border: none;\n            background-color: transparentize($shader-fg, 0.7);\n        }\n    }\n\n    .footer-box {\n        margin: -$padding/2 $padding $padding/2;\n\n        image {\n            -gtk-icon-shadow: $text-shadow;\n        }\n    }\n\n    .controls button {\n        @include unset;\n\n        label {\n            font-size: 2em;\n            color: transparentize($shader-fg, 0.2);\n            transition: $transition;\n\n            &.shuffle, &.loop {\n                font-size: 1.4em;\n\n            }\n        }\n\n        &:hover label {\n            color: transparentize($shader-fg, 0.1);\n        }\n\n        &:active label {\n            color: $shader-fg;\n        }\n    }\n\n    &.spotify { @include player-color($green); }\n    &.firefox { @include player-color($orange); }\n    &.mpv { @include player-color($magenta); }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/widgets/notifications.scss",
    "content": "@mixin notification() {\n    &.critical > box {\n        box-shadow: inset 0 0 .5em 0 $red;\n    }\n\n    &:hover button.close-button{\n        @include button-hover;\n        background-color: transparentize($red, .5);\n    }\n\n    .content {\n        .title {\n            margin-right: $spacing;\n            color: $fg-color;\n            font-size: 1.1em;\n        }\n\n        .time {\n            color: transparentize($fg-color, .2);\n        }\n\n        .description {\n            font-size: .9em;\n            color: transparentize($fg-color, .2);\n        }\n\n        .icon {\n            border-radius: $radii*0.8;\n            margin-right: $spacing;\n\n            &.img {\n                border: $border;\n            }\n        }\n    }\n\n    box.actions {\n        @include spacing(0.5);\n        margin-top: $spacing;\n\n        button {\n            @include button;\n            border-radius: $radii*0.8;\n            font-size: 1.2em;\n            padding: $padding * 0.7;\n        }\n    }\n\n    button.close-button {\n        @include button($flat: true);\n        margin-left: $spacing / 2;\n        border-radius: $radii*0.8;\n        min-width: 1.2em;\n        min-height: 1.2em;\n\n        &:hover {\n            background-color: transparentize($red, .2);\n        }\n\n        &:active {\n            background-image: linear-gradient($red, $red);\n        }\n    }\n}\n\nwindow.notifications {\n    @include unset;\n\n    .notification {\n        @include notification;\n\n        > box {\n            @include floating-widget;\n            border-radius: $radii;\n        }\n\n        .description {\n            min-width: 350px;\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/widgets/osd.scss",
    "content": "window.indicator .progress {\n    @include floating-widget;\n    padding: $padding / 2;\n    border-radius: if($radii == 0, 0, $radii + $padding / 2);\n\n    .fill {\n        border-radius: $radii;\n        background-color: $accent;\n        color: $accent-fg;\n\n        image {\n            -gtk-icon-transform: scale(0.7);\n        }\n\n        .font-icon {\n            font-size: 34px;\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/widgets/overview.scss",
    "content": "window#overview .window-content {\n    @include floating-widget;\n    @include spacing;\n\n    .workspace {\n        &.active > widget {\n            border-color: $accent\n        }\n\n        > widget {\n            @include widget;\n            border-radius: if($radii == 0, 0, $radii + $padding);\n\n            &:drop(active) {\n                border-color: $accent;\n            }\n        }\n    }\n\n    .client {\n        @include button;\n        border-radius: $radii;\n        margin: $padding;\n\n        &.hidden {\n            @include hidden;\n            transition: 0;\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/widgets/powermenu.scss",
    "content": "window#powermenu, window#verification {\n    .shader {\n        background-color: rgba(0, 0, 0, 0.05);\n    }\n}\n\nwindow#verification .window-content {\n    @include floating-widget;\n    min-width: 300px;\n    min-height: 100px;\n\n    .text-box {\n        .title {\n            font-size: 1.6em;\n        }\n\n        .desc {\n            color: transparentize($fg-color, 0.1);\n            font-size: 1.1em;\n        }\n    }\n\n    .buttons {\n        @include spacing;\n        margin-top: $padding;\n\n        button {\n            @include button;\n            font-size: 1.5em;\n            padding: $padding;\n        }\n    }\n}\n\nwindow#powermenu .window-content {\n    @include floating-widget;\n    @include spacing(2);\n    padding: $popover-padding + $spacing * 1.5;\n    border-radius: if($radii == 0, 0, $popover-radius + ($popover-padding + $spacing * 1.5));\n\n    button {\n        @include unset;\n\n        image {\n            @include button;\n            border-radius: $popover-radius;\n            min-width: 1.7em;\n            min-height: 1.7em;\n            font-size: 4em;\n        }\n\n        label, image {\n            color: transparentize($fg-color, 0.1);\n        }\n\n        &:hover {\n            image{ @include button-hover; }\n            label{ color: $fg-color; }\n        }\n        &:focus image { @include button-focus; }\n        &:active image { @include button-active; }\n\n        &:focus, &:active {\n            label{ color: $accent; }\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/widgets/quicksettings.scss",
    "content": "window#quicksettings .window-content {\n    @include floating-widget;\n    @include spacing;\n\n    .avatar {\n        @include widget;\n        opacity: 0.9;\n        border-radius: $popover-radius;\n    }\n\n    .header {\n        @include spacing($rec: true);\n\n        button, .uptime, .battery {\n            @include button;\n            padding: $padding;\n            font-weight: bold;\n            min-height: 20px;\n            min-width: 20px;\n            border-radius: $popover-radius;\n\n\n            image {\n                font-size: 1.2em;\n            }\n        }\n\n        .battery {\n            @include spacing($multiplier: 0.5);\n        }\n\n    }\n\n    .battery-progress {\n        label {\n            color: $accent-fg;\n            font-weight: bold;\n        }\n\n        &.charging label {\n            font-size: $padding*2;\n        }\n\n        &.half label { color: $fg-color; }\n\n        progressbar {\n            @include slider($width: $padding*3.6);\n        }\n\n        &.low progressbar {\n            @include slider($width: $padding*3.6, $gradient: linear-gradient(to right, $red, $red));\n        }\n    }\n\n    .sliders-box {\n        @include widget;\n        @include spacing($rec: true);\n        @include spacing(0);\n        padding: $padding;\n        border-radius: $popover-radius;\n\n        button {\n            @include button($flat: true);\n            padding: $padding / 2;\n        }\n\n        scale {\n            @include slider;\n            margin-left: $spacing * -0.5;\n        }\n\n        .menu {\n            margin: $spacing 0;\n            background-color: $bg-color;\n            border: $border-width solid $popover-border-color;\n            border-radius: $radii;\n        }\n    }\n\n    .mixer-item {\n        scale { @include slider($width: 7px); }\n        image { font-size: 1.2em; }\n    }\n\n    .row {\n        @include spacing($rec: true);\n        border-radius: $popover-radius;\n    }\n\n    .menu {\n        @include unset;\n        @include widget;\n        @include spacing($rec: true);\n        padding: $padding;\n        margin-top: $spacing;\n        border-radius: $popover-radius;\n\n        .title {\n            @include spacing(.5);\n        }\n\n        separator {\n            margin: 0 $radii / 2;\n        }\n\n        button {\n            @include button($flat: true);\n            padding: $padding / 2;\n        }\n\n        switch {\n            @include switch;\n        }\n    }\n\n    .toggle-button {\n        @include button;\n        font-weight: bold;\n        border-radius: $popover-radius;\n\n        .label-box {\n            @include spacing(.5);\n        }\n\n        button {\n            @include button($flat: true);\n            padding: $padding;\n            border-radius: $popover-radius;\n\n            &:first-child {\n                border-top-right-radius: 0;\n                border-bottom-right-radius: 0;\n            }\n\n            &:last-child {\n                border-top-left-radius: 0;\n                border-bottom-left-radius: 0;\n            }\n        }\n\n        &.active {\n            background-color: $accent;\n\n            label, image {\n                color: $accent-fg;\n            }\n        }\n    }\n\n    .simple-toggle {\n        @include button;\n        padding: $padding $padding * 1.1;\n        border-radius: $popover-radius;\n    }\n\n    .media {\n        @include spacing;\n\n        .player {\n            @include media;\n        }\n    }\n}"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/scss/widgets/settings.scss",
    "content": "window#settings-dialog {\n    background-color: $bg-color;\n\n    .page {\n        @include scrollable;\n    }\n\n    .page-content {\n        margin: $spacing;\n    }\n\n    .sidebar-box {\n        @include spacing($rec: true);\n        background-color: $widget-bg;\n        border-right: $border;\n        padding: $spacing / 2;\n\n        button {\n            @include button($flat: true);\n            padding: $padding / 2 $padding * 2;\n        }\n\n        scrolledwindow {\n            @include scrollable;\n        }\n\n    }\n\n    .sidebar-header  {\n        background-color: $widget-bg;\n        border-right: $border;\n        border-bottom: $border;\n        padding: $spacing / 2;\n\n        button {\n            @include button($flat: true);\n            padding: $padding / 2 $padding;\n        }\n\n        button:last-child {\n            margin-left: $spacing / 2;\n        }\n    }\n\n    .sidebar-footer {\n        background-color: $widget-bg;\n        border-right: $border;\n        border-top: $border;\n        padding: $spacing / 2;\n\n        button {\n            @include button($flat: true);\n            padding: $padding / 2 $padding;\n        }\n    }\n\n    entry.search {\n        @include button;\n        border-radius: 0;\n        padding: $padding;\n    }\n\n    .row {\n        @include widget;\n        border-radius: 0;\n        border-bottom-width: 0;\n        padding: $padding;\n        transition: border-radius 0;\n\n        &:last-child {\n            border-radius: 0 0 $radii $radii;\n            border-bottom-width: $border-width;\n        }\n\n        &:first-child {\n            border-radius: $radii $radii 0 0;\n        }\n\n        &:first-child:last-child {\n            border-radius: $radii;\n        }\n\n        .overlay-padding {\n            min-height: $font-size * 3;\n        }\n\n        &:hover {\n            background-color: $hover;\n        }\n\n        entry, button {\n            @include button;\n            padding: $padding;\n        }\n\n        switch {\n            @include switch;\n        }\n\n        spinbutton {\n            @include unset;\n\n            entry {\n                border-radius: $radii 0 0 $radii;\n            }\n\n            button {\n                border-radius: 0;\n            }\n\n            button:last-child {\n                border-radius: 0 $radii $radii 0;\n            }\n        }\n\n        .enum-setter {\n            label {\n                background-color: $widget-bg;\n                border-top: $border;\n                border-bottom: $border;\n                padding: 0 $padding;\n            }\n\n            button:first-child {\n                border-radius: $radii 0 0 $radii;\n            }\n\n            button:last-child {\n                border-radius: 0 $radii $radii 0;\n            }\n        }\n    }\n\n    .id, .note {\n        font-size: .8em;\n        color: transparentize($fg-color, $amount: 0.5);\n    }\n\n    .id {\n        font-family: $mono-font;\n    }\n\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/ags/tsconfig.json",
    "content": "{\n    \"compilerOptions\": {\n        \"target\": \"ES2022\",\n        \"module\": \"ES2022\",\n        \"lib\": [\n            \"ES2022\"\n        ],\n        \"allowJs\": true,\n        \"checkJs\": true,\n        \"strict\": true,\n        \"noImplicitAny\": false,\n        \"baseUrl\": \".\",\n        \"typeRoots\": [\n            \"./types/ags.d.ts\",\n            \"./node_modules/@girs\"\n        ],\n        \"skipLibCheck\": true,\n        \"forceConsistentCasingInFileNames\": true\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/hypr/Autostart.conf",
    "content": "#################################################################################\n#   _   _                  _                 _    ____             __ _         #      \n#  | | | |_   _ _ __  _ __| | __ _ _ __   __| |  / ___|___  _ __  / _(_) __ _   #\n#  | |_| | | | | '_ \\| '__| |/ _` | '_ \\ / _` | | |   / _ \\| '_ \\| |_| |/ _` |  #\n#  |  _  | |_| | |_) | |  | | (_| | | | | (_| | | |__| (_) | | | |  _| | (_| |  #\n#  |_| |_|\\__, | .__/|_|  |_|\\__,_|_| |_|\\__,_|  \\____\\___/|_| |_|_| |_|\\__, |  #\n#        |___/|_|                                                      |___/    # \n#                                                                               #\n#################################################################################\n\n\n\n# See https://wiki.hyprland.org/Configuring/Keywords/ for more\nexec      = ~/.config/hypr/scripts/launch_ags.sh\nexec-once = dbus-update-activation-environment --all\nexec-once = sway-audio-idle-inhibit\nexec-once = swayidle -w timeout 300 '~/.config/hypr/scripts/brightness off' resume '~/.config/hypr/scripts/brightness on'\nexec-once = swayidle -w timeout 600 'gtklock -d'\nexec-once = swayidle -w timeout 900 'systemctl suspend'\nexec-once = nextcloud --background  \n#exec-once = celeste --background \nexec = /nix/store/$(ls -la /nix/store | grep 'mate-polkit' | grep '4096' | awk '{print $9}' | sed -n '$p')/libexec/polkit-mate-authentication-agent-1 & \nexec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1\nexec-once = nm-applet \nexec-once = wl-paste -p --watch clipman store -P --histpath=\"~/.local/share/clipman-primary.json\"\nexec-once = wl-clip-persist --clipboard regular --read-timeout 50 --write-timeout 1000\nexec-once = hyprctl setcursor Bibata-Modern-Classic 24\n#exec-once = ~/.dots/hypr/lid_open.sh\nexec-once = /usr/bin/hyprland-monitor-attached ~/.dots/hypr/scripts/monitor_attached.sh ~/.dots/hypr/scripts/monitor_dettached.sh\n#exec-once = ~/.dots/hypr/check_lid.sh\n\n#exec-once = [workspace 10  silent] firefox\n#exec-once = [workspace 10  silent] code\n#exec-once = [workspace 10  silent] obsidian \n#exec-once = [workspace 10  silent] nautilus \n#exec-once = [workspace 10 silent] spotify \n#exec-once = [workspace 10  silent] discord\n#exec-once = [workspace 10  silent] wezterm \n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/hypr/Decoration.conf",
    "content": "#################################################################################\n#   _   _                  _                 _    ____             __ _         #\n#  | | | |_   _ _ __  _ __| | __ _ _ __   __| |  / ___|___  _ __  / _(_) __ _   #\n#  | |_| | | | | '_ \\| '__| |/ _` | '_ \\ / _` | | |   / _ \\| '_ \\| |_| |/ _` |  #\n#  |  _  | |_| | |_) | |  | | (_| | | | | (_| | | |__| (_) | | | |  _| | (_| |  #\n#  |_| |_|\\__, | .__/|_|  |_|\\__,_|_| |_|\\__,_|  \\____\\___/|_| |_|_| |_|\\__, |  #\n#        |___/|_|                                                      |___/    #\n#                                                                               #\n#################################################################################\n\n\n\n# See https://wiki.hyprland.org/Configuring/Variables/ for more\ngeneral {\n    gaps_in                 = 2\n    gaps_out                = 2\n    border_size             = 0\n    col.active_border       = rgba(476C43ff)\n    col.inactive_border     = rgba(EBDBB2ff)\n    layout                  = dwindle\n    resize_on_border        = true\n    extend_border_grab_area = 10\n    allow_tearing           = true\n}\n\n# See https://wiki.hyprland.org/Configuring/Variables/ for more\ndecoration {\n    # rounding\n    rounding              = 5\n    dim_inactive          = true\n    dim_strength          = 0.4\n\n    blur {\n        # blur\n        enabled           = true\n        size              = 8\n        passes            = 2\n        noise             = 0\n        contrast          = 1\n        new_optimizations = true\n    }\n\n    # shadow\n    drop_shadow            = false\n    shadow_range           = 4\n    shadow_render_power    = 3\n    col.shadow             = rgba(1a1a1aee)\n}\n\nanimations {\n    enabled   = true\n    bezier    = fluent_decel  , 0    , 0.2  , 0.4  , 1\n    bezier    = easeOutCirc   , 0    , 0.55 , 0.45 , 1\n    bezier    = easeOutCubic  , 0.33 , 1    , 0.68 , 1\n    bezier    = easeinoutsine , 0.37 , 0    , 0.63 , 1\n\n    # Windows\n    animation = windowsIn   , 1 , 3 , easeOutCubic  , popin 30% # window open\n    animation = windowsOut  , 1 , 3 , fluent_decel  , popin 70% # window close.\n    animation = windowsMove , 1 , 2 , easeinoutsine , slide     # everything in between, moving, dragging, resizing.\n    \n    # Fade\n    animation = fadeIn      , 1 , 3   , easeOutCubic        # fade in (open) -> layers and windows\n    animation = fadeOut     , 1 , 1.7 , easeOutCubic        # fade out (close) -> layers and windows\n    animation = fadeSwitch  , 0 , 1   , easeOutCirc         # fade on changing activewindow and its opacity\n    animation = fadeShadow  , 1 , 10  , easeOutCirc         # fade on changing activewindow for shadows\n    animation = fadeDim     , 1 , 4   , fluent_decel        # the easing of the dimming of inactive windows\n    animation = border      , 1 , 2.7 , easeOutCirc         # for animating the border's color switch speed\n    animation = borderangle , 1 , 30  , fluent_decel , once # for animating the border's gradient angle - styles: once (default), loop\n    animation = workspaces  , 1 , 2   , easeOutCubic\n}\n\n# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more\ndwindle {\n    pseudotile     = false # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below\n    preserve_split = true # you probably want this\n    force_split    = 2\n    smart_split    = false\n    smart_resizing = true\n}"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/hypr/KeyBinds.conf",
    "content": "#################################################################################\n#   _   _                  _                 _    ____             __ _         #      \n#  | | | |_   _ _ __  _ __| | __ _ _ __   __| |  / ___|___  _ __  / _(_) __ _   #\n#  | |_| | | | | '_ \\| '__| |/ _` | '_ \\ / _` | | |   / _ \\| '_ \\| |_| |/ _` |  #\n#  |  _  | |_| | |_) | |  | | (_| | | | | (_| | | |__| (_) | | | |  _| | (_| |  #\n#  |_| |_|\\__, | .__/|_|  |_|\\__,_|_| |_|\\__,_|  \\____\\___/|_| |_|_| |_|\\__, |  #\n#        |___/|_|                                                      |___/    # \n#                                                                               #\n#################################################################################\n\n\n\n# See https://wiki.hyprland.org/Configuring/Keywords/ for more\n$mainMod = SUPER\n\n# KeyBinds\n\n# Apps\nbind = $mainMod         , return            , exec             , kitty\nbind = $mainMod SHIFT   , return            , exec             , kitty --title kitty_float\nbind = $mainMod         , F                 , exec             , nautilus\nbind = $mainMod         , B                 , exec             , brave  \nbind = $mainMod         , C                 , exec             , code\nbind = CONTROL SHIFT    , Escape            , exec             , missioncenter\nbind =                  , XF86Keyboard      , exec             , gnome-calculator\nbind = $mainMod         , D                 , exec             , discord\nbind = $mainMod         , O                 , exec             , obsidian\n\n#AGS\nbind = $mainMod         , SPACE             , exec             , ags toggle-window applauncher\nbind = $mainMod SHIFT   , S                 , exec             , ags -r  \"recorder.start()\"\nbind = $mainMod CONTROL , P                 , exec             , ags toggle-window powermenu\nbind = $mainMod         , R                 , exec             , ~/.config/hypr/scripts/launch_ags.sh\n\n# System\nbind = $mainMod         , L                 , exec             , gtklock\nbind =                  , Home              , exec             , grimblast --notify copysave area   ~/Bilder/$(date +'Screenshot_%d-%m-%y_%H-%M.png')\nbind =                  , XF86Launch2       , exec             , grimblast --notify copysave output ~/Bilder/$(date +'Screenshot_%d-%m-%y_%H-%M.png')\n\n#NixOS\nbind = $mainMod Alt_L   , R                 , exec             , hyprctl reload\n\n# Virtual Machine \nbind   = ISO_Level3_Shift , Alt_L, submap, passthrough\nsubmap = passthrough\n\nbind   = ISO_Level3_Shift , Alt_L, submap, reset\nsubmap = reset\n\n#Window management\nbind = $mainMod         , Q                 , killactive       ,\nbind = $mainMod         , T                 , togglefloating   ,\nbind = $mainMod         , P                 , pseudo           , # dwindle\nbind = $mainMod         , J                 , togglesplit      , # dwindle\nbind = ALT              , Tab               , cyclenext        ,\nbind = $mainMod         , Tab               , bringactivetotop ,\n\n# Move focus with mainMod + arrow keys\nbind = $mainMod , left  , movefocus, l\nbind = $mainMod , right , movefocus, r\nbind = $mainMod , up    , movefocus, u\nbind = $mainMod , down  , movefocus, d\n\n# Switch workspaces with mainMod + [0-9]\nbind = $mainMod , 1     , workspace , 1\nbind = $mainMod , 2     , workspace , 2\nbind = $mainMod , 3     , workspace , 3\nbind = $mainMod , 4     , workspace , 4\nbind = $mainMod , 5     , workspace , 5\nbind = $mainMod , 6     , workspace , 6\nbind = $mainMod , 7     , workspace , 7\nbind = $mainMod , 8     , workspace , 8\nbind = $mainMod , 9     , workspace , 9\nbind = $mainMod , 0     , workspace , 10\n\n# Move active window to a workspace with mainMod + SHIFT + [0-9]\nbind = $mainMod SHIFT , 1 , movetoworkspace , 1\nbind = $mainMod SHIFT , 2 , movetoworkspace , 2\nbind = $mainMod SHIFT , 3 , movetoworkspace , 3\nbind = $mainMod SHIFT , 4 , movetoworkspace , 4\nbind = $mainMod SHIFT , 5 , movetoworkspace , 5\nbind = $mainMod SHIFT , 6 , movetoworkspace , 6\nbind = $mainMod SHIFT , 7 , movetoworkspace , 7\nbind = $mainMod SHIFT , 8 , movetoworkspace , 8\nbind = $mainMod SHIFT , 9 , movetoworkspace , 9\nbind = $mainMod SHIFT , 0 , movetoworkspace , 10\n\n# Move active window in workspace\nbind = $mainMod ALT , left  , movewindow, l\nbind = $mainMod ALT , right , movewindow, r\nbind = $mainMod ALT , up    , movewindow, u\nbind = $mainMod ALT , down  , movewindow, d\n\n# Mediacontrol with mediakeys\nbind = , XF86AudioPrev , exec , playerctl previous\nbind = , XF86AudioPlay , exec , playerctl play-pause\nbind = , XF86AudioNext , exec , playerctl next\n\n# Audiocontrol with ags\nbind = , XF86AudioRaiseVolume , exec , ags run-js \"audio.speaker.volume += 0.05; indicator.speaker()\"\nbind = , XF86AudioLowerVolume , exec , ags run-js \"audio.speaker.volume -= 0.05; indicator.speaker()\"\nbind = , XF86AudioMute        , exec , pamixer -t && ags run-js \"ags.Service.Indicator.speaker()\"\n\n# Resize windows with mainMod CTRL + arrowkeys\nbind = $mainMod CONTROL , Right , resizeactive , 30  0\nbind = $mainMod CONTROL , Left  , resizeactive , -30 0\nbind = $mainMod CONTROL , Up    , resizeactive , 0   -30\nbind = $mainMod CONTROL , Down  , resizeactive , 0   30\n\n# Move/resize windows with mainMod + LMB/RMB and dragging\nbindm = $mainMod , mouse:272 , movewindow\nbindm = $mainMod , mouse:273 , resizewindow\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/hypr/Misc.conf",
    "content": "#################################################################################\n#   _   _                  _                 _    ____             __ _         #      \n#  | | | |_   _ _ __  _ __| | __ _ _ __   __| |  / ___|___  _ __  / _(_) __ _   #\n#  | |_| | | | | '_ \\| '__| |/ _` | '_ \\ / _` | | |   / _ \\| '_ \\| |_| |/ _` |  #\n#  |  _  | |_| | |_) | |  | | (_| | | | | (_| | | |__| (_) | | | |  _| | (_| |  #\n#  |_| |_|\\__, | .__/|_|  |_|\\__,_|_| |_|\\__,_|  \\____\\___/|_| |_|_| |_|\\__, |  #\n#        |___/|_|                                                      |___/    # \n#                                                                               #\n#################################################################################\n\n\n\n# For all categories, see https://wiki.hyprland.org/Configuring/Variables/\ninput {\n    kb_layout      = de \n    kb_variant     =\n    kb_model       =\n    kb_options     =\n    kb_rules       =\n    follow_mouse   = 1\n    natural_scroll = false\n\n    touchpad {\n            natural_scroll       = true\n            scroll_factor        = 0.2 \n            tap-to-click         = false\n            tap_button_map       = l\n            clickfinger_behavior = true\n    }\n}\n\ngestures {\n    workspace_swipe                    = true\n    workspace_swipe_fingers            = 3\n    workspace_swipe_distance           = 1500\n    workspace_swipe_min_speed_to_force = 10\n    workspace_swipe_use_r              = true\n}\n\n# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more\ndevice:mx-master-2s-mouse {\n    sensitivity = 0.3\n}\n\n\n# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more\nmaster {\n    new_is_master = true\n}\n\n# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more\n\nmisc {\n    vfr                      = true\n    vrr                      = 0\n    animate_manual_resizes   = false\n    focus_on_activate        = false\n    render_ahead_of_time     = false\n    disable_hyprland_logo    = true\n    focus_on_activate        = true\n    key_press_enables_dpms   = true\n}\n\ndebug {\n    overlay = false\n}\n\n# Variables\nenv = XCURSOR_THEME, Bibata-Modern-Classic\nenv = XCURSOR_SIZE, 24\nenv = WLR_DRM_NO_ATOMIC,1\nenv = export TERM=kitty\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/hypr/WindowRules.conf",
    "content": "#################################################################################\n#   _   _                  _                 _    ____             __ _         #      \n#  | | | |_   _ _ __  _ __| | __ _ _ __   __| |  / ___|___  _ __  / _(_) __ _   #\n#  | |_| | | | | '_ \\| '__| |/ _` | '_ \\ / _` | | |   / _ \\| '_ \\| |_| |/ _` |  #\n#  |  _  | |_| | |_) | |  | | (_| | | | | (_| | | |__| (_) | | | |  _| | (_| |  #\n#  |_| |_|\\__, | .__/|_|  |_|\\__,_|_| |_|\\__,_|  \\____\\___/|_| |_|_| |_|\\__, |  #\n#        |___/|_|                                                      |___/    # \n#                                                                               #\n#################################################################################\n\n\n\nwindowrulev2 = float        , class:(BLHeliSuite32xl)\nwindowrulev2 = size 70% 70% , class:(BLHeliSuite32xl)\nwindowrulev2 = center       , class:(BLHeliSuite32xl)\n\nwindowrulev2 = float        , class:(betaflight-configurator)\nwindowrulev2 = size 70% 80% , class:(betaflight-configurator)\nwindowrulev2 = center       , class:(betaflight-configurator)\n\nwindowrulev2 = float        , class:(pavucontrol)\n\nwindowrulev2 = float        , class:(solaar)\n\nwindowrulev2 = float        , class:(missioncenter)\nwindowrulev2 = size 70% 70% , class:(missioncenter)\nwindowrulev2 = center       , class:(missioncenter)\n\nwindowrulev2 = float        , class:(ags)\nwindowrulev2 = size 70% 70% , class:(ags)\nwindowrulev2 = center       , class:(ags)\n\nwindowrulev2 = float        , class:(thunar)\nwindowrulev2 = size 70% 70% , class:(thunar)\nwindowrulev2 = center       , class:(thunar)\n\nwindowrulev2 = float        , title:(kitty_float)\nwindowrulev2 = size 70% 70% , title:(kitty_float)\nwindowrulev2 = center       , title:(kitty_float)\n\nwindowrulev2 = float        , class:(org.gnome.Nautilus)\nwindowrulev2 = size 70% 70% , class:(org.gnome.Nautilus)\nwindowrulev2 = center       , class:(org.gnome.Nautilus)\n\nwindowrulev2 = float        , title:(Raspberry Pi Imager)\nwindowrulev2 = size 70% 70% , title:(Raspberry Pi Imager)\nwindowrulev2 = center       , title:(Raspberry Pi Imager)\n\nwindowrulev2 = float        , title:(Open Folder)\nwindowrulev2 = float        , title:(Open File)\nwindowrulev2 = size 70% 70% , title:(Open Folder)\nwindowrulev2 = size 70% 70% , title:(Open File)\nwindowrulev2 = center       , class:(Open Folder)\nwindowrulev2 = center       , class:(Open File)\n\nwindowrulev2 = float        , class:(com.nextcloud.desktopclient.nextcloud)\nwindowrulev2 = size 30% 50% , class:(com.nextcloud.desktopclient.nextcloud)\nwindowrulev2 = center       , class:(com.nextcloud.desktopclient.nextcloud)\n\nwindowrulev2 = float        , class:(gthumb)\nwindowrulev2 = size 70% 80% , class:(gthumb)\nwindowrulev2 = center       , class:(gthumb)\n\nwindowrulev2 = float        , class:(obsidian)\nwindowrulev2 = size 70% 80% , class:(obsidian)\nwindowrulev2 = center       , class:(obsidian)\n\nwindowrulev2 = float        , class:(Bitwarden)\nwindowrulev2 = size 70% 80% , class:(Bitwarden)\nwindowrulev2 = center       , class:(Bitwarden)\n\nwindowrulev2 = float        , class:(Anydesk)\nwindowrulev2 = size 70% 80% , class:(Anydesk)\nwindowrulev2 = center       , class:(Anydesk)\n\nwindowrulev2 = float        , class:(com.hunterwittenborn.Celeste)\nwindowrulev2 = size 60% 70% , class:(com.hunterwittenborn.Celeste)\nwindowrulev2 = center       , class:(com.hunterwittenborn.Celeste)\n\nwindowrulev2 = float        , class:(celeste)\nwindowrulev2 = size 50% 60% , class:(celeste)\nwindowrulev2 = center       , class:(celeste)\n\nwindowrulev2 = float        , class:(io.github.kaii_lb.Overskride)\nwindowrulev2 = size 50% 60% , class:(io.github.kaii_lb.Overskride)\nwindowrulev2 = center       , class:(io.github.kaii_lb.Overskride)\n\nwindowrulev2 = float        , class:(org.gnome.Calculator)\n\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/hypr/hyprland.conf",
    "content": "########################################################################################\n#   _   _                  _                 _    ____             __ _       \n#  | | | |_   _ _ __  _ __| | __ _ _ __   __| |  / ___|___  _ __  / _(_) __ _ \n#  | |_| | | | | '_ \\| '__| |/ _` | '_ \\ / _` | | |   / _ \\| '_ \\| |_| |/ _` |\n#  |  _  | |_| | |_) | |  | | (_| | | | | (_| | | |__| (_) | | | |  _| | (_| |\n#  |_| |_|\\__, | .__/|_|  |_|\\__,_|_| |_|\\__,_|  \\____\\___/|_| |_|_| |_|\\__, |\n#        |___/|_|                                                      |___/ \n#\n#########################################################################################\n\n# Source files\nsource = ~/.config/hypr/monitors.conf\nsource = ~/.config/hypr/Autostart.conf\nsource = ~/.config/hypr/Misc.conf\nsource = ~/.config/hypr/KeyBinds.conf\nsource = ~/.config/hypr/Decoration.conf\nsource = ~/.config/hypr/WindowRules.conf\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/hypr/monitors.conf",
    "content": "#################################################################################\n#   _   _                  _                 _    ____             __ _         #      \n#  | | | |_   _ _ __  _ __| | __ _ _ __   __| |  / ___|___  _ __  / _(_) __ _   #\n#  | |_| | | | | '_ \\| '__| |/ _` | '_ \\ / _` | | |   / _ \\| '_ \\| |_| |/ _` |  #\n#  |  _  | |_| | |_) | |  | | (_| | | | | (_| | | |__| (_) | | | |  _| | (_| |  #\n#  |_| |_|\\__, | .__/|_|  |_|\\__,_|_| |_|\\__,_|  \\____\\___/|_| |_|_| |_|\\__, |  #\n#        |___/|_|                                                      |___/    # \n#                                                                               #\n#################################################################################\n\n\n\nmonitor = DP-1    , 2560x1440@120.0  , 0x0     , 1.0\n#monitor = HDMI-A-2 , 1920x1080@120.0 , 0x-1080 , 1.0   \n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/hypr/presets/monitors.exampleconf",
    "content": "#################################################################################\n#   _   _                  _                 _    ____             __ _         #      \n#  | | | |_   _ _ __  _ __| | __ _ _ __   __| |  / ___|___  _ __  / _(_) __ _   #\n#  | |_| | | | | '_ \\| '__| |/ _` | '_ \\ / _` | | |   / _ \\| '_ \\| |_| |/ _` |  #\n#  |  _  | |_| | |_) | |  | | (_| | | | | (_| | | |__| (_) | | | |  _| | (_| |  #\n#  |_| |_|\\__, | .__/|_|  |_|\\__,_|_| |_|\\__,_|  \\____\\___/|_| |_|_| |_|\\__, |  #\n#        |___/|_|                                                      |___/    # \n#                                                                               #\n#################################################################################\n\n\n\nmonitor = DP-1    , 2560x1440@120.0  , 0x0     , 1.0\n#monitor = HDMI-A-2 , 1920x1080@120.0 , 0x-1080 , 1.0   \n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/hypr/presets/monitors_external.conf",
    "content": "#################################################################################\n#   _   _                  _                 _    ____             __ _         #      \n#  | | | |_   _ _ __  _ __| | __ _ _ __   __| |  / ___|___  _ __  / _(_) __ _   #\n#  | |_| | | | | '_ \\| '__| |/ _` | '_ \\ / _` | | |   / _ \\| '_ \\| |_| |/ _` |  #\n#  |  _  | |_| | |_) | |  | | (_| | | | | (_| | | |__| (_) | | | |  _| | (_| |  #\n#  |_| |_|\\__, | .__/|_|  |_|\\__,_|_| |_|\\__,_|  \\____\\___/|_| |_|_| |_|\\__, |  #\n#        |___/|_|                                                      |___/    # \n#                                                                               #\n#################################################################################\n\n\n\nmonitor   = eDP-1    , 1920x1080@60.0    , 0x0     , 1.0\nmonitor   = HDMI-A-2 , 1920x1080@120.0   , 0x-1080 , 1.0\n\nworkspace = HDMI-A-2 , 0        , persistent:true\nworkspace = HDMI-A-2 , 1        , persistent:true\nworkspace = HDMI-A-2 , 2        , persistent:true\nworkspace = HDMI-A-2 , 3        , persistent:true\nworkspace = HDMI-A-2 , 4        , persistent:true\nworkspace = HDMI-A-2 , 5        , persistent:true\nworkspace = HDMI-A-2 , 6        , persistent:true\nworkspace = HDMI-A-2 , 7        , persistent:true\nworkspace = HDMI-A-2 , 8        , persistent:true\nworkspace = HDMI-A-2 , 9        , persistent:true\n\nworkspace = eDP-1 , 10        , persistent:true\nworkspace = eDP-1 , 11        , persistent:true\nworkspace = eDP-1 , 12        , persistent:true\nworkspace = eDP-1 , 13        , persistent:true\nworkspace = eDP-1 , 14        , persistent:true\nworkspace = eDP-1 , 15        , persistent:true\nworkspace = eDP-1 , 16        , persistent:true\nworkspace = eDP-1 , 17        , persistent:true\nworkspace = eDP-1 , 18        , persistent:true\nworkspace = eDP-1 , 19        , persistent:true\n\n# Switch workspaces with mainMod + [0-9]\nbind = $mainMod CTRL , 1     , workspace , 11\nbind = $mainMod CTRL , 2     , workspace , 12\nbind = $mainMod CTRL , 3     , workspace , 13\nbind = $mainMod CTRL , 4     , workspace , 14\nbind = $mainMod CTRL , 5     , workspace , 15\nbind = $mainMod CTRL , 6     , workspace , 16\nbind = $mainMod CTRL , 7     , workspace , 17\nbind = $mainMod CTRL , 8     , workspace , 18\nbind = $mainMod CTRL , 9     , workspace , 19\nbind = $mainMod CTRL , 0     , workspace , 20\n\n# Move active window to a workspace with mainMod + SHIFT + [0-9]\nbind = $mainMod CTRL SHIFT , 1 , movetoworkspace , 11\nbind = $mainMod CTRL SHIFT , 2 , movetoworkspace , 12\nbind = $mainMod CTRL SHIFT , 3 , movetoworkspace , 13\nbind = $mainMod CTRL SHIFT , 4 , movetoworkspace , 14\nbind = $mainMod CTRL SHIFT , 5 , movetoworkspace , 15\nbind = $mainMod CTRL SHIFT , 6 , movetoworkspace , 16\nbind = $mainMod CTRL SHIFT , 7 , movetoworkspace , 17\nbind = $mainMod CTRL SHIFT , 8 , movetoworkspace , 18\nbind = $mainMod CTRL SHIFT , 9 , movetoworkspace , 19\nbind = $mainMod CTRL SHIFT , 0 , movetoworkspace , 20\n\nexec      = hyprctl dispatch focusmonitor 1\n\nbindl     =       , switch:Lid Switch  , exec , ~/.dots/ags/launch.sh\n#monitor   = eDP-1, disable \n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/hypr/presets/monitors_internal.conf",
    "content": "#################################################################################\n#   _   _                  _                 _    ____             __ _         #      \n#  | | | |_   _ _ __  _ __| | __ _ _ __   __| |  / ___|___  _ __  / _(_) __ _   #\n#  | |_| | | | | '_ \\| '__| |/ _` | '_ \\ / _` | | |   / _ \\| '_ \\| |_| |/ _` |  #\n#  |  _  | |_| | |_) | |  | | (_| | | | | (_| | | |__| (_) | | | |  _| | (_| |  #\n#  |_| |_|\\__, | .__/|_|  |_|\\__,_|_| |_|\\__,_|  \\____\\___/|_| |_|_| |_|\\__, |  #\n#        |___/|_|                                                      |___/    # \n#                                                                               #\n#################################################################################\n\n\n\nmonitor   = eDP-1    , 1920x1080@60.0  , 0x0  , 1.0\n\nworkspace = eDP-1 , 0        , persistent:true\nworkspace = eDP-1 , 1        , persistent:true\nworkspace = eDP-1 , 2        , persistent:true\nworkspace = eDP-1 , 3        , persistent:true\nworkspace = eDP-1 , 4        , persistent:true\nworkspace = eDP-1 , 5        , persistent:true\nworkspace = eDP-1 , 6        , persistent:true\nworkspace = eDP-1 , 7        , persistent:true\nworkspace = eDP-1 , 8        , persistent:true\nworkspace = eDP-1 , 9        , persistent:true\n\n\n# lock screen if lid is closed \nbindl     =       , switch:Lid Switch  , exec , gtklock\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/hypr/scripts/brightness",
    "content": "#!/bin/sh\n\nprevious_brightness=$(brightnessctl g)\n\ncase $1 in\n    off)\n        brightnessctl -s -q\n        previous_brightness=$(brightnessctl g)\n        current_brightness=$previous_brightness\n        while [ \"$current_brightness\" -gt 1 ]; do\n            current_brightness=$((current_brightness - 1200))\n            brightnessctl s -q $current_brightness\n            sleep 0.01\n        done\n        ;;\n\n    on)\n        brightnessctl -r -q\n        ;;\nesac\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/hypr/scripts/launch_ags.sh",
    "content": "#!/usr/bin/env zsh\n\npkill  ags\n\n# Launch ags\necho \"---\" | tee -a /tmp/ags.log\nags 2>&1 | tee -a /tmp/ags.log & disown\n\necho \"shell launched...\""
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/hypr/scripts/monitor_attached.sh",
    "content": "#!/bin/sh\n\n#hyprctl monitors | grep HDMI-A-2 || exit\nrm ~/.dots/hypr/monitors.conf\ncp ~/.dots/hypr/presets/monitors_external.conf ~/.dots/hypr/monitors.conf\nhyprctl dispatch moveworkspacetomonitor 1  1\nhyprctl dispatch moveworkspacetomonitor 2  1\nhyprctl dispatch moveworkspacetomonitor 3  1\nhyprctl dispatch moveworkspacetomonitor 4  1\nhyprctl dispatch moveworkspacetomonitor 5  1\nhyprctl dispatch moveworkspacetomonitor 6  1\nhyprctl dispatch moveworkspacetomonitor 7  1\nhyprctl dispatch moveworkspacetomonitor 8  1\nhyprctl dispatch moveworkspacetomonitor 9  1\nhyprctl dispatch moveworkspacetomonitor 10 1\nhyprctl dispatch moveworkspacetomonitor 11 0\nhyprctl dispatch moveworkspacetomonitor 12 0\nhyprctl dispatch moveworkspacetomonitor 13 0\nhyprctl dispatch moveworkspacetomonitor 14 0\nhyprctl dispatch moveworkspacetomonitor 15 0\nhyprctl dispatch moveworkspacetomonitor 16 0\nhyprctl dispatch moveworkspacetomonitor 17 0\nhyprctl dispatch moveworkspacetomonitor 18 0\nhyprctl dispatch moveworkspacetomonitor 19 0\nhyprctl dispatch moveworkspacetomonitor 20 0\nhyprctl dispatch workspace 1"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/hypr/scripts/monitor_dettached.sh",
    "content": "#!/bin/sh\n\nrm ~/.dots/hypr/monitors.conf\ncp ~/.dots/hypr/presets/monitors_internal.conf ~/.dots/hypr/monitors.conf\nhyprctl dispatch moveworkspacetomonitor 1  0\nhyprctl dispatch moveworkspacetomonitor 2  0\nhyprctl dispatch moveworkspacetomonitor 3  0\nhyprctl dispatch moveworkspacetomonitor 4  0\nhyprctl dispatch moveworkspacetomonitor 5  0\nhyprctl dispatch moveworkspacetomonitor 6  0\nhyprctl dispatch moveworkspacetomonitor 7  0\nhyprctl dispatch moveworkspacetomonitor 8  0\nhyprctl dispatch moveworkspacetomonitor 9  0\nhyprctl dispatch moveworkspacetomonitor 10 0\nhyprctl dispatch workspace 1\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/kitty/kitty.conf",
    "content": "# vim:fileencoding=utf-8:foldmethod=marker\n\n#: Fonts {{{\n\n#: kitty has very powerful font management. You can configure\n#: individual font faces and even specify special fonts for particular\n#: characters.\n\nfont_family        Hurmit Nerd Font \n# bold_font        auto\n# italic_font      auto\n# bold_italic_font auto\n\n#: You can specify different fonts for the bold/italic/bold-italic\n#: variants. To get a full list of supported fonts use the `kitty\n#: +list-fonts` command. By default they are derived automatically, by\n#: the OSes font system. When bold_font or bold_italic_font is set to\n#: auto on macOS, the priority of bold fonts is semi-bold, bold,\n#: heavy. Setting them manually is useful for font families that have\n#: many weight variants like Book, Medium, Thick, etc. For example::\n\n#:     font_family      Operator Mono Book\n#:     bold_font        Operator Mono Medium\n#:     italic_font      Operator Mono Book Italic\n#:     bold_italic_font Operator Mono Medium Italic\n\nfont_size 16.0\n\n#: Font size (in pts)\n\n# force_ltr no\n\n#: kitty does not support BIDI (bidirectional text), however, for RTL\n#: scripts, words are automatically displayed in RTL. That is to say,\n#: in an RTL script, the words \"HELLO WORLD\" display in kitty as\n#: \"WORLD HELLO\", and if you try to select a substring of an RTL-\n#: shaped string, you will get the character that would be there had\n#: the the string been LTR. For example, assuming the Hebrew word\n#: ירושלים, selecting the character that on the screen appears to be ם\n#: actually writes into the selection buffer the character י.  kitty's\n#: default behaviorbehavior is useful in conjunction with a filter to reverse\n#: the word order, however, if you wish to manipulate RTL glyphs, it\n#: can be very challenging to work with, so this option is provided to\n#: turn it off. Furthermore, this option can be used with the command\n#: line program GNU FriBidi\n#: <https://github.com/fribidi/fribidi#executable> to get BIDI\n#: support, because it will force kitty to always treat the text as\n#: LTR, which FriBidi expects for terminals.\n\n# symbol_map\n\n#: E.g. symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols\n\n#: Map the specified Unicode codepoints to a particular font. Useful\n#: if you need special rendering for some symbols, such as for\n#: Powerline. Avoids the need for patched fonts. Each Unicode code\n#: point is specified in the form `U+<code point in hexadecimal>`. You\n#: can specify multiple code points, separated by commas and ranges\n#: separated by hyphens. This option can be specified multiple times.\n#: The syntax is::\n\n#:     symbol_map codepoints Font Family Name\n\n# narrow_symbols\n\n#: E.g. narrow_symbols U+E0A0-U+E0A3,U+E0C0-U+E0C7 1\n\n#: Usually, for Private Use Unicode characters and some symbol/dingbat\n#: characters, if the character is followed by one or more spaces,\n#: kitty will use those extra cells to render the character larger, if\n#: the character in the font has a wide aspect ratio. Using this\n#: option you can force kitty to restrict the specified code points to\n#: render in the specified number of cells (defaulting to one cell).\n#: This option can be specified multiple times. The syntax is::\n\n#:     narrow_symbols codepoints [optionally the number of cells]\n\n# disable_ligatures never\n\n#: Choose how you want to handle multi-character ligatures. The\n#: default is to always render them. You can tell kitty to not render\n#: them when the cursor is over them by using cursor to make editing\n#: easier, or have kitty never render them at all by using always, if\n#: you don't like them. The ligature strategy can be set per-window\n#: either using the kitty remote control facility or by defining\n#: shortcuts for it in kitty.conf, for example::\n\n#:     map alt+1 disable_ligatures_in active always\n#:     map alt+2 disable_ligatures_in all never\n#:     map alt+3 disable_ligatures_in tab cursor\n\n#: Note that this refers to programming ligatures, typically\n#: implemented using the calt OpenType feature. For disabling general\n#: ligatures, use the font_features option.\n\n# font_features\n\n#: E.g. font_features none\n\n#: Choose exactly which OpenType features to enable or disable. This\n#: is useful as some fonts might have features worthwhile in a\n#: terminal. For example, Fira Code includes a discretionary feature,\n#: zero, which in that font changes the appearance of the zero (0), to\n#: make it more easily distinguishable from Ø. Fira Code also includes\n#: other discretionary features known as Stylistic Sets which have the\n#: tags ss01 through ss20.\n\n#: For the exact syntax to use for individual features, see the\n#: HarfBuzz documentation <https://harfbuzz.github.io/harfbuzz-hb-\n#: common.html#hb-feature-from-string>.\n\n#: Note that this code is indexed by PostScript name, and not the font\n#: family. This allows you to define very precise feature settings;\n#: e.g. you can disable a feature in the italic font but not in the\n#: regular font.\n\n#: On Linux, font features are first read from the FontConfig database\n#: and then this option is applied, so they can be configured in a\n#: single, central place.\n\n#: To get the PostScript name for a font, use `kitty +list-fonts\n#: --psnames`:\n\n#: .. code-block:: sh\n\n#:     $ kitty +list-fonts --psnames | grep Fira\n#:     Fira Code\n#:     Fira Code Bold (FiraCode-Bold)\n#:     Fira Code Light (FiraCode-Light)\n#:     Fira Code Medium (FiraCode-Medium)\n#:     Fira Code Regular (FiraCode-Regular)\n#:     Fira Code Retina (FiraCode-Retina)\n\n#: The part in brackets is the PostScript name.\n\n#: Enable alternate zero and oldstyle numerals::\n\n#:     font_features FiraCode-Retina +zero +onum\n\n#: Enable only alternate zero in the bold font::\n\n#:     font_features FiraCode-Bold +zero\n\n#: Disable the normal ligatures, but keep the calt feature which (in\n#: this font) breaks up monotony::\n\n#:     font_features TT2020StyleB-Regular -liga +calt\n\n#: In conjunction with force_ltr, you may want to disable Arabic\n#: shaping entirely, and only look at their isolated forms if they\n#: show up in a document. You can do this with e.g.::\n\n#:     font_features UnifontMedium +isol -medi -fina -init\n\n# modify_font\n\n#: Modify font characteristics such as the position or thickness of\n#: the underline and strikethrough. The modifications can have the\n#: suffix px for pixels or % for percentage of original value. No\n#: suffix means use pts. For example::\n\n#:     modify_font underline_position -2\n#:     modify_font underline_thickness 150%\n#:     modify_font strikethrough_position 2px\n\n#: Additionally, you can modify the size of the cell in which each\n#: font glyph is rendered and the baseline at which the glyph is\n#: placed in the cell. For example::\n\n#:     modify_font cell_width 80%\n#:     modify_font cell_height -2px\n#:     modify_font baseline 3\n\n#: Note that modifying the baseline will automatically adjust the\n#: underline and strikethrough positions by the same amount.\n#: Increasing the baseline raises glyphs inside the cell and\n#: decreasing it lowers them. Decreasing the cell size might cause\n#: rendering artifacts, so use with care.\n\n# box_drawing_scale 0.001, 1, 1.5, 2\n\n#: The sizes of the lines used for the box drawing Unicode characters.\n#: These values are in pts. They will be scaled by the monitor DPI to\n#: arrive at a pixel value. There must be four values corresponding to\n#: thin, normal, thick, and very thick lines.\n\n# undercurl_style thin-sparse\n\n#: The style with which undercurls are rendered. This option takes the\n#: form (thin|thick)-(sparse|dense). Thin and thick control the\n#: thickness of the undercurl. Sparse and dense control how often the\n#: curl oscillates. With sparse the curl will peak once per character,\n#: with dense twice.\n\n# text_composition_strategy platform\n\n#: Control how kitty composites text glyphs onto the background color.\n#: The default value of platform tries for text rendering as close to\n#: \"native\" for the platform kitty is running on as possible.\n\n#: A value of legacy uses the old (pre kitty 0.28) strategy for how\n#: glyphs are composited. This will make dark text on light\n#: backgrounds look thicker and light text on dark backgrounds\n#: thinner. It might also make some text appear like the strokes are\n#: uneven.\n\n#: You can fine tune the actual contrast curve used for glyph\n#: composition by specifying two space separated numbers for this\n#: setting.\n\n#: The first number is the gamma adjustment, which controls the\n#: thickness of dark text on light backgrounds. Increasing the value\n#: will make text appear thicker. The default value for this is 1.0 on\n#: Linux and 1.7 on macOS. Valid values are 0.01 and above. The result\n#: is scaled based on the luminance difference between the background\n#: and the foreground. Dark text on light backgrounds receives the\n#: full impact of the curve while light text on dark backgrounds is\n#: affected very little.\n\n#: The second number is an additional multiplicative contrast. It is\n#: percentage ranging from 0 to 100. The default value is 0 on Linux\n#: and 30 on macOS.\n\n#: }}}\n\n#: Cursor customization {{{\n\n# cursor #cccccc\n\n#: Default cursor color. If set to the special value none the cursor\n#: will be rendered with a \"reverse video\" effect. It's color will be\n#: the color of the text in the cell it is over and the text will be\n#: rendered with the background color of the cell. Note that if the\n#: program running in the terminal sets a cursor color, this takes\n#: precedence. Also, the cursor colors are modified if the cell\n#: background and foreground colors have very low contrast.\n\n# cursor_text_color #111111\n\n#: The color of text under the cursor. If you want it rendered with\n#: the background color of the cell underneath instead, use the\n#: special keyword: background. Note that if cursor is set to none\n#: then this option is ignored.\n\n# cursor_shape block\n\n#: The cursor shape can be one of block, beam, underline. Note that\n#: when reloading the config this will be changed only if the cursor\n#: shape has not been set by the program running in the terminal. This\n#: sets the default cursor shape, applications running in the terminal\n#: can override it. In particular, shell integration\n#: <https://sw.kovidgoyal.net/kitty/shell-integration/> in kitty sets\n#: the cursor shape to beam at shell prompts. You can avoid this by\n#: setting shell_integration to no-cursor.\n\n# cursor_beam_thickness 1.5\n\n#: The thickness of the beam cursor (in pts).\n\n# cursor_underline_thickness 2.0\n\n#: The thickness of the underline cursor (in pts).\n\n# cursor_blink_interval -1\n\n#: The interval to blink the cursor (in seconds). Set to zero to\n#: disable blinking. Negative values mean use system default. Note\n#: that the minimum interval will be limited to repaint_delay.\n\n# cursor_stop_blinking_after 15.0\n\n#: Stop blinking cursor after the specified number of seconds of\n#: keyboard inactivity. Set to zero to never stop blinking.\n\n#: }}}\n\n#: Scrollback {{{\n\n# scrollback_lines 2000\n\n#: Number of lines of history to keep in memory for scrolling back.\n#: Memory is allocated on demand. Negative numbers are (effectively)\n#: infinite scrollback. Note that using very large scrollback is not\n#: recommended as it can slow down performance of the terminal and\n#: also use large amounts of RAM. Instead, consider using\n#: scrollback_pager_history_size. Note that on config reload if this\n#: is changed it will only affect newly created windows, not existing\n#: ones.\n\n# scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER\n\n#: Program with which to view scrollback in a new window. The\n#: scrollback buffer is passed as STDIN to this program. If you change\n#: it, make sure the program you use can handle ANSI escape sequences\n#: for colors and text formatting. INPUT_LINE_NUMBER in the command\n#: line above will be replaced by an integer representing which line\n#: should be at the top of the screen. Similarly CURSOR_LINE and\n#: CURSOR_COLUMN will be replaced by the current cursor position or\n#: set to 0 if there is no cursor, for example, when showing the last\n#: command output.\n\n# scrollback_pager_history_size 0\n\n#: Separate scrollback history size (in MB), used only for browsing\n#: the scrollback buffer with pager. This separate buffer is not\n#: available for interactive scrolling but will be piped to the pager\n#: program when viewing scrollback buffer in a separate window. The\n#: current implementation stores the data in UTF-8, so approximatively\n#: 10000 lines per megabyte at 100 chars per line, for pure ASCII,\n#: unformatted text. A value of zero or less disables this feature.\n#: The maximum allowed size is 4GB. Note that on config reload if this\n#: is changed it will only affect newly created windows, not existing\n#: ones.\n\n# scrollback_fill_enlarged_window no\n\n#: Fill new space with lines from the scrollback buffer after\n#: enlarging a window.\n\n# wheel_scroll_multiplier 5.0\n\n#: Multiplier for the number of lines scrolled by the mouse wheel.\n#: Note that this is only used for low precision scrolling devices,\n#: not for high precision scrolling devices on platforms such as macOS\n#: and Wayland. Use negative numbers to change scroll direction. See\n#: also wheel_scroll_min_lines.\n\n# wheel_scroll_min_lines 1\n\n#: The minimum number of lines scrolled by the mouse wheel. The scroll\n#: multiplier wheel_scroll_multiplier only takes effect after it\n#: reaches this number. Note that this is only used for low precision\n#: scrolling devices like wheel mice that scroll by very small amounts\n#: when using the wheel. With a negative number, the minimum number of\n#: lines will always be added.\n\n# touch_scroll_multiplier 1.0\n\n#: Multiplier for the number of lines scrolled by a touchpad. Note\n#: that this is only used for high precision scrolling devices on\n#: platforms such as macOS and Wayland. Use negative numbers to change\n#: scroll direction.\n\n#: }}}\n\nMouse {{{\n\n# mouse_hide_wait 3.0\n\n#: Hide mouse cursor after the specified number of seconds of the\n#: mouse not being used. Set to zero to disable mouse cursor hiding.\n#: Set to a negative value to hide the mouse cursor immediately when\n#: typing text. Disabled by default on macOS as getting it to work\n#: robustly with the ever-changing sea of bugs that is Cocoa is too\n#: much effort.\n\n# url_color #0087bd\n# url_style curly\n\n#: The color and style for highlighting URLs on mouse-over. url_style\n#: can be one of: none, straight, double, curly, dotted, dashed.\n\n# open_url_with default\n\n#: The program to open clicked URLs. The special value default with\n#: first look for any URL handlers defined via the open_actions\n#: <https://sw.kovidgoyal.net/kitty/open_actions/> facility and if non\n#: are found, it will use the Operating System's default URL handler\n#: (open on macOS and xdg-open on Linux).\n\n# url_prefixes file ftp ftps gemini git gopher http https irc ircs kitty mailto news sftp ssh\n\n#: The set of URL prefixes to look for when detecting a URL under the\n#: mouse cursor.\n\n# detect_urls yes\n\n#: Detect URLs under the mouse. Detected URLs are highlighted with an\n#: underline and the mouse cursor becomes a hand over them. Even if\n#: this option is disabled, URLs are still clickable.\n\n# url_excluded_characters\n\n#: Additional characters to be disallowed from URLs, when detecting\n#: URLs under the mouse cursor. By default, all characters that are\n#: legal in URLs are allowed. Additionally, newlines are allowed (but\n#: stripped). This is to accommodate programs such as mutt that add\n#: hard line breaks even for continued lines. \\n can be added to this\n#: option to disable this behavior. Special characters can be\n#: specified using backslash escapes, to specify a backslash use a\n#: double backslash.\n\nshow_hyperlink_targets yes\n\n#: When the mouse hovers over a terminal hyperlink, show the actual\n#: URL that will be activated when the hyperlink is clicked.\n\n# copy_on_select no\n\n#: Copy to clipboard or a private buffer on select. With this set to\n#: clipboard, selecting text with the mouse will cause the text to be\n#: copied to clipboard. Useful on platforms such as macOS that do not\n#: have the concept of primary selection. You can instead specify a\n#: name such as a1 to copy to a private kitty buffer. Map a shortcut\n#: with the paste_from_buffer action to paste from this private\n#: buffer. For example::\n\n#:     copy_on_select a1\n#:     map shift+cmd+v paste_from_buffer a1\n\n#: Note that copying to the clipboard is a security risk, as all\n#: programs, including websites open in your browser can read the\n#: contents of the system clipboard.\n\n# paste_actions quote-urls-at-prompt\n\n#: A comma separated list of actions to take when pasting text into\n#: the terminal. The supported paste actions are:\n\n#: quote-urls-at-prompt:\n#:     If the text being pasted is a URL and the cursor is at a shell prompt,\n#:     automatically quote the URL (needs shell_integration).\n#: confirm:\n#:     Confirm the paste if bracketed paste mode is not active or there is more\n#:     a large amount of text being pasted.\n#: filter:\n#:     Run the filter_paste() function from the file paste-actions.py in\n#:     the kitty config directory on the pasted text. The text returned by the\n#:     function will be actually pasted.\n\n# strip_trailing_spaces never\n\n#: Remove spaces at the end of lines when copying to clipboard. A\n#: value of smart will do it when using normal selections, but not\n#: rectangle selections. A value of always will always do it.\n\n# select_by_word_characters @-./_~?&=%+#\n\n#: Characters considered part of a word when double clicking. In\n#: addition to these characters any character that is marked as an\n#: alphanumeric character in the Unicode database will be matched.\n\n# select_by_word_characters_forward\n\n#: Characters considered part of a word when extending the selection\n#: forward on double clicking. In addition to these characters any\n#: character that is marked as an alphanumeric character in the\n#: Unicode database will be matched.\n\n#: If empty (default) select_by_word_characters will be used for both\n#: directions.\n\n# click_interval -1.0\n\n#: The interval between successive clicks to detect double/triple\n#: clicks (in seconds). Negative numbers will use the system default\n#: instead, if available, or fallback to 0.5.\n\nfocus_follows_mouse no\n\n#: Set the active window to the window under the mouse when moving the\n#: mouse around.\n\n# pointer_shape_when_grabbed arrow\n\n#: The shape of the mouse pointer when the program running in the\n#: terminal grabs the mouse. Valid values are: arrow, beam and hand.\n\n# default_pointer_shape beam\n\n#: The default shape of the mouse pointer. Valid values are: arrow,\n#: beam and hand.\n\n# pointer_shape_when_dragging beam\n\n#: The default shape of the mouse pointer when dragging across text.\n#: Valid values are: arrow, beam and hand.\n\nMouse actions {{{\n\n#: Mouse buttons can be mapped to perform arbitrary actions. The\n#: syntax is:\n\n#: .. code-block:: none\n\n#:     mouse_map button-name event-type modes action\n\n#: Where button-name is one of left, middle, right, b1 ... b8 with\n#: added keyboard modifiers. For example: ctrl+shift+left refers to\n#: holding the Ctrl+Shift keys while clicking with the left mouse\n#: button. The value b1 ... b8 can be used to refer to up to eight\n#: buttons on a mouse.\n\n#: event-type is one of press, release, doublepress, triplepress,\n#: click, doubleclick. modes indicates whether the action is performed\n#: when the mouse is grabbed by the program running in the terminal,\n#: or not. The values are grabbed or ungrabbed or a comma separated\n#: combination of them. grabbed refers to when the program running in\n#: the terminal has requested mouse events. Note that the click and\n#: double click events have a delay of click_interval to disambiguate\n#: from double and triple presses.\n\n#: You can run kitty with the kitty --debug-input command line option\n#: to see mouse events. See the builtin actions below to get a sense\n#: of what is possible.\n\n#: If you want to unmap an action, map it to no_op. For example, to\n#: disable opening of URLs with a plain click::\n\n#:     mouse_map left click ungrabbed no_op\n\n#: See all the mappable actions including mouse actions here\n#: <https://sw.kovidgoyal.net/kitty/actions/>.\n\n#: .. note::\n#:     Once a selection is started, releasing the button that started it will\n#:     automatically end it and no release event will be dispatched.\n\n# clear_all_mouse_actions no\n\n#: Remove all mouse action definitions up to this point. Useful, for\n#: instance, to remove the default mouse actions.\n\n#: Click the link under the mouse or move the cursor\n\n# mouse_map left click ungrabbed mouse_handle_click selection link prompt\n\n#::  First check for a selection and if one exists do nothing. Then\n#::  check for a link under the mouse cursor and if one exists, click\n#::  it. Finally check if the click happened at the current shell\n#::  prompt and if so, move the cursor to the click location. Note\n#::  that this requires shell integration\n#::  <https://sw.kovidgoyal.net/kitty/shell-integration/> to work.\n\n#: Click the link under the mouse or move the cursor even when grabbed\n\n# mouse_map shift+left click grabbed,ungrabbed mouse_handle_click selection link prompt\n\n#::  Same as above, except that the action is performed even when the\n#::  mouse is grabbed by the program running in the terminal.\n\n#: Click the link under the mouse cursor\n\n# mouse_map ctrl+shift+left release grabbed,ungrabbed mouse_handle_click link\n\n#::  Variant with Ctrl+Shift is present because the simple click based\n#::  version has an unavoidable delay of click_interval, to\n#::  disambiguate clicks from double clicks.\n\n#: Discard press event for link click\n\n# mouse_map ctrl+shift+left press grabbed discard_event\n\n#::  Prevent this press event from being sent to the program that has\n#::  grabbed the mouse, as the corresponding release event is used to\n#::  open a URL.\n\n#: Paste from the primary selection\n\n# mouse_map middle release ungrabbed paste_from_selection\n\n#: Start selecting text\n\n# mouse_map left press ungrabbed mouse_selection normal\n\n#: Start selecting text in a rectangle\n\n# mouse_map ctrl+alt+left press ungrabbed mouse_selection rectangle\n\n#: Select a word\n\n# mouse_map left doublepress ungrabbed mouse_selection word\n\n#: Select a line\n\n# mouse_map left triplepress ungrabbed mouse_selection line\n\n#: Select line from point\n\n# mouse_map ctrl+alt+left triplepress ungrabbed mouse_selection line_from_point\n\n#::  Select from the clicked point to the end of the line.\n\n#: Extend the current selection\n\n# mouse_map right press ungrabbed mouse_selection extend\n\n#::  If you want only the end of the selection to be moved instead of\n#::  the nearest boundary, use move-end instead of extend.\n\n#: Paste from the primary selection even when grabbed\n\n# mouse_map shift+middle release ungrabbed,grabbed paste_selection\n# mouse_map shift+middle press grabbed discard_event\n\n#: Start selecting text even when grabbed\n\n# mouse_map shift+left press ungrabbed,grabbed mouse_selection normal\n\n#: Start selecting text in a rectangle even when grabbed\n\n# mouse_map ctrl+shift+alt+left press ungrabbed,grabbed mouse_selection rectangle\n\n#: Select a word even when grabbed\n\n# mouse_map shift+left doublepress ungrabbed,grabbed mouse_selection word\n\n#: Select a line even when grabbed\n\n# mouse_map shift+left triplepress ungrabbed,grabbed mouse_selection line\n\n#: Select line from point even when grabbed\n\n# mouse_map ctrl+shift+alt+left triplepress ungrabbed,grabbed mouse_selection line_from_point\n\n#::  Select from the clicked point to the end of the line even when\n#::  grabbed.\n\n#: Extend the current selection even when grabbed\n\n# mouse_map shift+right press ungrabbed,grabbed mouse_selection extend\n\n#: Show clicked command output in pager\n\n# mouse_map ctrl+shift+right press ungrabbed mouse_show_command_output\n\n#::  Requires shell integration\n#::  <https://sw.kovidgoyal.net/kitty/shell-integration/> to work.\n\n }}}\n\n}}}\n\n#: Performance tuning {{{\n\n# repaint_delay 10\n\n#: Delay between screen updates (in milliseconds). Decreasing it,\n#: increases frames-per-second (FPS) at the cost of more CPU usage.\n#: The default value yields ~100 FPS which is more than sufficient for\n#: most uses. Note that to actually achieve 100 FPS, you have to\n#: either set sync_to_monitor to no or use a monitor with a high\n#: refresh rate. Also, to minimize latency when there is pending input\n#: to be processed, this option is ignored.\n\n# input_delay 3\n\n#: Delay before input from the program running in the terminal is\n#: processed (in milliseconds). Note that decreasing it will increase\n#: responsiveness, but also increase CPU usage and might cause flicker\n#: in full screen programs that redraw the entire screen on each loop,\n#: because kitty is so fast that partial screen updates will be drawn.\n\n# sync_to_monitor yes\n\n#: Sync screen updates to the refresh rate of the monitor. This\n#: prevents screen tearing\n#: <https://en.wikipedia.org/wiki/Screen_tearing> when scrolling.\n#: However, it limits the rendering speed to the refresh rate of your\n#: monitor. With a very high speed mouse/high keyboard repeat rate,\n#: you may notice some slight input latency. If so, set this to no.\n\n#: }}}\n\n#: Terminal bell {{{\n\n# enable_audio_bell yes\n\n#: The audio bell. Useful to disable it in environments that require\n#: silence.\n\n# visual_bell_duration 0.0\n\n#: The visual bell duration (in seconds). Flash the screen when a bell\n#: occurs for the specified number of seconds. Set to zero to disable.\n\n# visual_bell_color none\n\n#: The color used by visual bell. Set to none will fall back to\n#: selection background color. If you feel that the visual bell is too\n#: bright, you can set it to a darker color.\n\n# window_alert_on_bell yes\n\n#: Request window attention on bell. Makes the dock icon bounce on\n#: macOS or the taskbar flash on linux.\n\n# bell_on_tab \"🔔 \"\n\n#: Some text or a Unicode symbol to show on the tab if a window in the\n#: tab that does not have focus has a bell. If you want to use leading\n#: or trailing spaces, surround the text with quotes. See\n#: tab_title_template for how this is rendered.\n\n#: For backwards compatibility, values of yes, y and true are\n#: converted to the default bell symbol and no, n, false and none are\n#: converted to the empty string.\n\n# command_on_bell none\n\n#: Program to run when a bell occurs. The environment variable\n#: KITTY_CHILD_CMDLINE can be used to get the program running in the\n#: window in which the bell occurred.\n\n# bell_path none\n\n#: Path to a sound file to play as the bell sound. If set to none, the\n#: system default bell sound is used. Must be in a format supported by\n#: the operating systems sound API, such as WAV or OGA on Linux\n#: (libcanberra) or AIFF, MP3 or WAV on macOS (NSSound)\n\n# linux_bell_theme __custom\n\n#: The XDG Sound Theme kitty will use to play the bell sound. Defaults\n#: to the custom theme name used by GNOME and Budgie, falling back to\n#: the default freedesktop theme if it does not exist. This option may\n#: be removed if Linux ever provides desktop-agnostic support for\n#: setting system sound themes.\n\n#: }}}\n\n#: Window layout {{{\n\n# remember_window_size  yes\n# initial_window_width  640\n# initial_window_height 400\n\n#: If enabled, the OS Window size will be remembered so that new\n#: instances of kitty will have the same size as the previous\n#: instance. If disabled, the OS Window will initially have size\n#: configured by initial_window_width/height, in pixels. You can use a\n#: suffix of \"c\" on the width/height values to have them interpreted\n#: as number of cells instead of pixels.\n\n# enabled_layouts *\n\n#: The enabled window layouts. A comma separated list of layout names.\n#: The special value all means all layouts. The first listed layout\n#: will be used as the startup layout. Default configuration is all\n#: layouts in alphabetical order. For a list of available layouts, see\n#: the layouts <https://sw.kovidgoyal.net/kitty/overview/#layouts>.\n\n# window_resize_step_cells 2\n# window_resize_step_lines 2\n\n#: The step size (in units of cell width/cell height) to use when\n#: resizing kitty windows in a layout with the shortcut\n#: start_resizing_window. The cells value is used for horizontal\n#: resizing, and the lines value is used for vertical resizing.\n\nwindow_border_width 0pt\n\n#: The width of window borders. Can be either in pixels (px) or pts\n#: (pt). Values in pts will be rounded to the nearest number of pixels\n#: based on screen resolution. If not specified, the unit is assumed\n#: to be pts. Note that borders are displayed only when more than one\n#: window is visible. They are meant to separate multiple windows.\n\ndraw_minimal_borders no\n\n#: Draw only the minimum borders needed. This means that only the\n#: borders that separate the window from a neighbor are drawn. Note\n#: that setting a non-zero window_margin_width overrides this and\n#: causes all borders to be drawn.\n\nwindow_margin_width 0\n\n#: The window margin (in pts) (blank area outside the border). A\n#: single value sets all four sides. Two values set the vertical and\n#: horizontal sides. Three values set top, horizontal and bottom. Four\n#: values set top, right, bottom and left.\n\nsingle_window_margin_width 0\n\n#: The window margin to use when only a single window is visible (in\n#: pts). Negative values will cause the value of window_margin_width\n#: to be used instead. A single value sets all four sides. Two values\n#: set the vertical and horizontal sides. Three values set top,\n#: horizontal and bottom. Four values set top, right, bottom and left.\n\n# window_padding_width 0\n\n#: The window padding (in pts) (blank area between the text and the\n#: window border). A single value sets all four sides. Two values set\n#: the vertical and horizontal sides. Three values set top, horizontal\n#: and bottom. Four values set top, right, bottom and left.\n\n# placement_strategy center\n\n#: When the window size is not an exact multiple of the cell size, the\n#: cell area of the terminal window will have some extra padding on\n#: the sides. You can control how that padding is distributed with\n#: this option. Using a value of center means the cell area will be\n#: placed centrally. A value of top-left means the padding will be\n#: only at the bottom and right edges.\n\n#active_border_color #88c0d0\n\n#: The color for the border of the active window. Set this to none to\n#: not draw borders around the active window.\n\n# inactive_border_color #cccccc\n\n#: The color for the border of inactive windows.\n\n# bell_border_color #ff5a00\n\n#: The color for the border of inactive windows in which a bell has\n#: occurred.\n\n\n#: Fade the text in inactive windows by the specified amount (a number\n#: between zero and one, with zero being fully faded).\n\nhide_window_decorations yes\n\n#: Hide the window decorations (title-bar and window borders) with\n#: yes. On macOS, titlebar-only can be used to only hide the titlebar.\n#: Whether this works and exactly what effect it has depends on the\n#: window manager/operating system. Note that the effects of changing\n#: this option when reloading config are undefined.\n\n# window_logo_path none\n\n#: Path to a logo image. Must be in PNG format. Relative paths are\n#: interpreted relative to the kitty config directory. The logo is\n#: displayed in a corner of every kitty window. The position is\n#: controlled by window_logo_position. Individual windows can be\n#: configured to have different logos either using the launch action\n#: or the remote control <https://sw.kovidgoyal.net/kitty/remote-\n#: control/> facility.\n\n# window_logo_position bottom-right\n\n#: Where to position the window logo in the window. The value can be\n#: one of: top-left, top, top-right, left, center, right, bottom-left,\n#: bottom, bottom-right.\n\n# window_logo_alpha 0.5\n\n#: The amount the logo should be faded into the background. With zero\n#: being fully faded and one being fully opaque.\n\n# resize_debounce_time 0.1\n\n#: The time to wait before redrawing the screen when a resize event is\n#: received (in seconds). On platforms such as macOS, where the\n#: operating system sends events corresponding to the start and end of\n#: a resize, this number is ignored.\n\n# resize_draw_strategy static\n\n#: Choose how kitty draws a window while a resize is in progress. A\n#: value of static means draw the current window contents, mostly\n#: unchanged. A value of scale means draw the current window contents\n#: scaled. A value of blank means draw a blank window. A value of size\n#: means show the window size in cells.\n\n# resize_in_steps no\n\n#: Resize the OS window in steps as large as the cells, instead of\n#: with the usual pixel accuracy. Combined with initial_window_width\n#: and initial_window_height in number of cells, this option can be\n#: used to keep the margins as small as possible when resizing the OS\n#: window. Note that this does not currently work on Wayland.\n\n# visual_window_select_characters 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\n#: The list of characters for visual window selection. For example,\n#: for selecting a window to focus on with focus_visible_window. The\n#: value should be a series of unique numbers or alphabets, case\n#: insensitive, from the set [0-9A-Z]. Specify your preference as a\n#: string of characters.\n\n# confirm_os_window_close -1\n\n#: Ask for confirmation when closing an OS window or a tab with at\n#: least this number of kitty windows in it by window manager (e.g.\n#: clicking the window close button or pressing the operating system\n#: shortcut to close windows) or by the close_tab action. A value of\n#: zero disables confirmation. This confirmation also applies to\n#: requests to quit the entire application (all OS windows, via the\n#: quit action). Negative values are converted to positive ones,\n#: however, with shell_integration enabled, using negative values\n#: means windows sitting at a shell prompt are not counted, only\n#: windows where some command is currently running. Note that if you\n#: want confirmation when closing individual windows, you can map the\n#: close_window_with_confirmation action.\n\n#: }}}\n\nTab bar {{{\n\n# tab_bar_edge bottom\n\n#: The edge to show the tab bar on, top or bottom.\n\n# tab_bar_margin_width 0.0\n\n#: The margin to the left and right of the tab bar (in pts).\n\n# tab_bar_margin_height 0.0 0.0\n\n#: The margin above and below the tab bar (in pts). The first number\n#: is the margin between the edge of the OS Window and the tab bar.\n#: The second number is the margin between the tab bar and the\n#: contents of the current tab.\n\ntab_bar_style separator\n\n#: The tab bar style, can be one of:\n\n#: fade\n#:     Each tab's edges fade into the background color. (See also tab_fade)\n#: slant\n#:     Tabs look like the tabs in a physical file.\n#: separator\n#:     Tabs are separated by a configurable separator. (See also\n#:     tab_separator)\n#: powerline\n#:     Tabs are shown as a continuous line with \"fancy\" separators.\n#:     (See also tab_powerline_style)\n#: custom\n#:     A user-supplied Python function called draw_tab is loaded from the file\n#:     tab_bar.py in the kitty config directory. For examples of how to\n#:     write such a function, see the functions named draw_tab_with_* in\n#:     kitty's source code: kitty/tab_bar.py. See also\n#:     this discussion <https://github.com/kovidgoyal/kitty/discussions/4447>\n#:     for examples from kitty users.\n#: hidden\n#:     The tab bar is hidden. If you use this, you might want to create\n#:     a mapping for the select_tab action which presents you with a list of\n#:     tabs and allows for easy switching to a tab.\n\n# tab_bar_align left\n\n#: The horizontal alignment of the tab bar, can be one of: left,\n#: center, right.\n\n# tab_bar_min_tabs 2\n\n#: The minimum number of tabs that must exist before the tab bar is\n#: shown.\n\n# tab_switch_strategy previous\n\n#: The algorithm to use when switching to a tab when the current tab\n#: is closed. The default of previous will switch to the last used\n#: tab. A value of left will switch to the tab to the left of the\n#: closed tab. A value of right will switch to the tab to the right of\n#: the closed tab. A value of last will switch to the right-most tab.\n\n# tab_fade 0.25 0.5 0.75 1\n\n#: Control how each tab fades into the background when using fade for\n#: the tab_bar_style. Each number is an alpha (between zero and one)\n#: that controls how much the corresponding cell fades into the\n#: background, with zero being no fade and one being full fade. You\n#: can change the number of cells used by adding/removing entries to\n#: this list.\n\ntab_separator \" \"\n\n#: The separator between tabs in the tab bar when using separator as\n#: the tab_bar_style.\n\ntab_powerline_style round\n\n#: The powerline separator style between tabs in the tab bar when\n#: using powerline as the tab_bar_style, can be one of: angled,\n#: slanted, round.\n\n# tab_activity_symbol none\n\n#: Some text or a Unicode symbol to show on the tab if a window in the\n#: tab that does not have focus has some activity. If you want to use\n#: leading or trailing spaces, surround the text with quotes. See\n#: tab_title_template for how this is rendered.\n\n# tab_title_max_length 0\n\n#: The maximum number of cells that can be used to render the text in\n#: a tab. A value of zero means that no limit is applied.\n\n# tab_title_template \"{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}\"\n\n#: A template to render the tab title. The default just renders the\n#: title with optional symbols for bell and activity. If you wish to\n#: include the tab-index as well, use something like: {index}:{title}.\n#: Useful if you have shortcuts mapped for goto_tab N. If you prefer\n#: to see the index as a superscript, use {sup.index}. All data\n#: available is:\n\n#: title\n#:     The current tab title.\n#: index\n#:     The tab index useable with goto_tab N goto_tab shortcuts.\n#: layout_name\n#:     The current layout name.\n#: num_windows\n#:     The number of windows in the tab.\n#: num_window_groups\n#:     The number of window groups (not counting overlay windows) in the tab.\n#: tab.active_wd\n#:     The working directory of the currently active window in the tab\n#:     (expensive, requires syscall). Use active_oldest_wd to get\n#:     the directory of the oldest foreground process rather than the newest.\n#: tab.active_exe\n#:     The name of the executable running in the foreground of the currently\n#:     active window in the tab (expensive, requires syscall). Use\n#:     active_oldest_exe for the oldest foreground process.\n#: max_title_length\n#:     The maximum title length available.\n\n#: Note that formatting is done by Python's string formatting\n#: machinery, so you can use, for instance, {layout_name[:2].upper()}\n#: to show only the first two letters of the layout name, upper-cased.\n#: If you want to style the text, you can use styling directives, for\n#: example:\n#: `{fmt.fg.red}red{fmt.fg.tab}normal{fmt.bg._00FF00}greenbg{fmt.bg.tab}`.\n#: Similarly, for bold and italic:\n#: `{fmt.bold}bold{fmt.nobold}normal{fmt.italic}italic{fmt.noitalic}`.\n#: Note that for backward compatibility, if {bell_symbol} or\n#: {activity_symbol} are not present in the template, they are\n#: prepended to it.\n\n# active_tab_title_template none\n\n#: Template to use for active tabs. If not specified falls back to\n#: tab_title_template.\n\n# active_tab_foreground   #000\n# active_tab_background   #eee\n# active_tab_font_style   bold-italic\n# inactive_tab_foreground #444\n# inactive_tab_background #999\n# inactive_tab_font_style normal\n\n#: Tab bar colors and styles.\n\n# tab_bar_background none\n\n#: Background color for the tab bar. Defaults to using the terminal\n#: background color.\n\n# tab_bar_margin_color none\n\n#: Color for the tab bar margin area. Defaults to using the terminal\n#: background color for margins above and below the tab bar. For side\n#: margins the default color is chosen to match the background color\n#: of the neighboring tab.\n\n }}}\n\n\n# Color scheme {{{\n\nforeground #dddddd\nbackground #282c34\n\n#: The foreground and background colors.\n\nbackground_opacity 1\n\n#: The opacity of the background. A number between zero and one, where\n#: one is opaque and zero is fully transparent. This will only work if\n#: supported by the OS (for instance, when using a compositor under\n#: X11). Note that it only sets the background color's opacity in\n#: cells that have the same background color as the default terminal\n#: background, so that things like the status bar in vim, powerline\n#: prompts, etc. still look good. But it means that if you use a color\n#: theme with a background color in your editor, it will not be\n#: rendered as transparent. Instead you should change the default\n#: background color in your kitty config and not use a background\n#: color in the editor color scheme. Or use the escape codes to set\n#: the terminals default colors in a shell script to launch your\n#: editor. Be aware that using a value less than 1.0 is a (possibly\n#: significant) performance hit. If you want to dynamically change\n#: transparency of windows, set dynamic_background_opacity to yes\n#: (this is off by default as it has a performance cost). Changing\n#: this option when reloading the config will only work if\n#: dynamic_background_opacity was enabled in the original config.\n\n# background_image none\n\n#: Path to a background image. Must be in PNG format.\n\n# background_image_layout tiled\n\n#: Whether to tile, scale or clamp the background image. The value can\n#: be one of tiled, mirror-tiled, scaled, clamped or centered.\n\nbackground_image_linear yes\n\n#: When background image is scaled, whether linear interpolation\n#: should be used.\n\n# dynamic_background_opacity no\n\n#: Allow changing of the background_opacity dynamically, using either\n#: keyboard shortcuts (increase_background_opacity and\n#: decrease_background_opacity) or the remote control facility.\n#: Changing this option by reloading the config is not supported.\n\nbackground_tint 1.0\n\n#: How much to tint the background image by the background color. This\n#: option makes it easier to read the text. Tinting is done using the\n#: current background color for each window. This option applies only\n#: if background_opacity is set and transparent windows are supported\n#: or background_image is set.\n\n# background_tint_gaps 1.0\n\n#: How much to tint the background image at the window gaps by the\n#: background color, after applying background_tint. Since this is\n#: multiplicative with background_tint, it can be used to lighten the\n#: tint over the window gaps for a *separated* look.\n\n# dim_opacity 0.75\n\n#: How much to dim text that has the DIM/FAINT attribute set. One\n#: means no dimming and zero means fully dimmed (i.e. invisible).\n\n# selection_foreground #000000\n# selection_background #fffacd\n\n#: The foreground and background colors for text selected with the\n#: mouse. Setting both of these to none will cause a \"reverse video\"\n#: effect for selections, where the selection will be the cell text\n#: color and the text will become the cell background color. Setting\n#: only selection_foreground to none will cause the foreground color\n#: to be used unchanged. Note that these colors can be overridden by\n#: the program running in the terminal.\n\n#: The color table {{{\n\n#: The 256 terminal colors. There are 8 basic colors, each color has a\n#: dull and bright version, for the first 16 colors. You can set the\n#: remaining 240 colors as color16 to color255.\n\n# color0 #000000\n# color8 #767676\n\n#: black\n\n# color1 #cc0403\n# color9 #f2201f\n\n#: red\n\n# color2  #19cb00\n# color10 #23fd00\n\n#: green\n\n# color3  #cecb00\n# color11 #fffd00\n\n#: yellow\n\n# color4  #0d73cc\n# color12 #1a8fff\n\n#: blue\n\n# color5  #cb1ed1\n# color13 #fd28ff\n\n#: magenta\n\n# color6  #0dcdcd\n# color14 #14ffff\n\n#: cyan\n\n# color7  #dddddd\n# color15 #ffffff\n\n#: white\n\n# mark1_foreground black\n\n#: Color for marks of type 1\n\n# mark1_background #98d3cb\n\n#: Color for marks of type 1 (light steel blue)\n\n# mark2_foreground black\n\n#: Color for marks of type 2\n\n# mark2_background #f2dcd3\n\n#: Color for marks of type 1 (beige)\n\n# mark3_foreground black\n\n#: Color for marks of type 3\n\n# mark3_background #f274bc\n\n#: Color for marks of type 3 (violet)\n\n# }}}\n\n\nAdvanced {{{\n\n# shell .\n\n#: The shell program to execute. The default value of . means to use\n#: whatever shell is set as the default shell for the current user.\n#: Note that on macOS if you change this, you might need to add\n#: --login and --interactive to ensure that the shell starts in\n#: interactive mode and reads its startup rc files.\n\n# editor .\n\n#: The terminal based text editor (such as vim or nano) to use when\n#: editing the kitty config file or similar tasks.\n\n#: The default value of . means to use the environment variables\n#: VISUAL and EDITOR in that order. If these variables aren't set,\n#: kitty will run your shell ($SHELL -l -i -c env) to see if your\n#: shell startup rc files set VISUAL or EDITOR. If that doesn't work,\n#: kitty will cycle through various known editors (vim, emacs, etc.)\n#: and take the first one that exists on your system.\n\n# close_on_child_death no\n\n#: Close the window when the child process (shell) exits. With the\n#: default value no, the terminal will remain open when the child\n#: exits as long as there are still processes outputting to the\n#: terminal (for example disowned or backgrounded processes). When\n#: enabled with yes, the window will close as soon as the child\n#: process exits. Note that setting it to yes means that any\n#: background processes still using the terminal can fail silently\n#: because their stdout/stderr/stdin no longer work.\n\n# remote_control_password\n\n#: Allow other programs to control kitty using passwords. This option\n#: can be specified multiple times to add multiple passwords. If no\n#: passwords are present kitty will ask the user for permission if a\n#: program tries to use remote control with a password. A password can\n#: also *optionally* be associated with a set of allowed remote\n#: control actions. For example::\n\n#:     remote_control_password \"my passphrase\" get-colors set-colors focus-window focus-tab\n\n#: Only the specified actions will be allowed when using this\n#: password. Glob patterns can be used too, for example::\n\n#:     remote_control_password \"my passphrase\" set-tab-* resize-*\n\n#: To get a list of available actions, run::\n\n#:     kitty @ --help\n\n#: A set of actions to be allowed when no password is sent can be\n#: specified by using an empty password. For example::\n\n#:     remote_control_password \"\" *-colors\n\n#: Finally, the path to a python module can be specified that provides\n#: a function is_cmd_allowed that is used to check every remote\n#: control command. For example::\n\n#:     remote_control_password \"my passphrase\" my_rc_command_checker.py\n\n#: Relative paths are resolved from the kitty configuration directory.\n#: See rc_custom_auth <https://sw.kovidgoyal.net/kitty/remote-\n#: control/#rc-custom-auth> for details.\n\n# allow_remote_control no\n\n#: Allow other programs to control kitty. If you turn this on, other\n#: programs can control all aspects of kitty, including sending text\n#: to kitty windows, opening new windows, closing windows, reading the\n#: content of windows, etc. Note that this even works over SSH\n#: connections. The default setting of no prevents any form of remote\n#: control. The meaning of the various values are:\n\n#: password\n#:     Remote control requests received over both the TTY device and the socket\n#:     are confirmed based on passwords, see remote_control_password.\n\n#: socket-only\n#:     Remote control requests received over a socket are accepted\n#:     unconditionally. Requests received over the TTY are denied.\n#:     See listen_on.\n\n#: socket\n#:     Remote control requests received over a socket are accepted\n#:     unconditionally. Requests received over the TTY are confirmed based on\n#:     password.\n\n#: no\n#:     Remote control is completely disabled.\n\n#: yes\n#:     Remote control requests are always accepted.\n\n# listen_on none\n\n#: Listen to the specified UNIX socket for remote control connections.\n#: Note that this will apply to all kitty instances. It can be\n#: overridden by the kitty --listen-on command line option, which also\n#: supports listening on a TCP socket. This option accepts only UNIX\n#: sockets, such as unix:${TEMP}/mykitty or unix:@mykitty (on Linux).\n#: Environment variables are expanded and relative paths are resolved\n#: with respect to the temporary directory. If {kitty_pid} is present,\n#: then it is replaced by the PID of the kitty process, otherwise the\n#: PID of the kitty process is appended to the value, with a hyphen.\n#: See the help for kitty --listen-on for more details. Note that this\n#: will be ignored unless allow_remote_control is set to either: yes,\n#: socket or socket-only. Changing this option by reloading the config\n#: is not supported.\n\n# env\n\n#: Specify the environment variables to be set in all child processes.\n#: Using the name with an equal sign (e.g. env VAR=) will set it to\n#: the empty string. Specifying only the name (e.g. env VAR) will\n#: remove the variable from the child process' environment. Note that\n#: environment variables are expanded recursively, for example::\n\n#:     env VAR1=a\n#:     env VAR2=${HOME}/${VAR1}/b\n\n#: The value of VAR2 will be <path to home directory>/a/b.\n\n# watcher\n\n#: Path to python file which will be loaded for watchers\n#: <https://sw.kovidgoyal.net/kitty/launch/#watchers>. Can be\n#: specified more than once to load multiple watchers. The watchers\n#: will be added to every kitty window. Relative paths are resolved\n#: relative to the kitty config directory. Note that reloading the\n#: config will only affect windows created after the reload.\n\n# exe_search_path\n\n#: Control where kitty finds the programs to run. The default search\n#: order is: First search the system wide PATH, then ~/.local/bin and\n#: ~/bin. If still not found, the PATH defined in the login shell\n#: after sourcing all its startup files is tried. Finally, if present,\n#: the PATH specified by the env option is tried.\n\n#: This option allows you to prepend, append, or remove paths from\n#: this search order. It can be specified multiple times for multiple\n#: paths. A simple path will be prepended to the search order. A path\n#: that starts with the + sign will be append to the search order,\n#: after ~/bin above. A path that starts with the - sign will be\n#: removed from the entire search order. For example::\n\n#:     exe_search_path /some/prepended/path\n#:     exe_search_path +/some/appended/path\n#:     exe_search_path -/some/excluded/path\n\n# update_check_interval 24\n\n#: The interval to periodically check if an update to kitty is\n#: available (in hours). If an update is found, a system notification\n#: is displayed informing you of the available update. The default is\n#: to check every 24 hours, set to zero to disable. Update checking is\n#: only done by the official binary builds. Distro packages or source\n#: builds do not do update checking. Changing this option by reloading\n#: the config is not supported.\n\n# startup_session none\n\n#: Path to a session file to use for all kitty instances. Can be\n#: overridden by using the kitty --session =none command line option\n#: for individual instances. See sessions\n#: <https://sw.kovidgoyal.net/kitty/overview/#sessions> in the kitty\n#: documentation for details. Note that relative paths are interpreted\n#: with respect to the kitty config directory. Environment variables\n#: in the path are expanded. Changing this option by reloading the\n#: config is not supported.\n\n# clipboard_control write-clipboard write-primary read-clipboard-ask read-primary-ask\n\n#: Allow programs running in kitty to read and write from the\n#: clipboard. You can control exactly which actions are allowed. The\n#: possible actions are: write-clipboard, read-clipboard, write-\n#: primary, read-primary, read-clipboard-ask, read-primary-ask. The\n#: default is to allow writing to the clipboard and primary selection\n#: and to ask for permission when a program tries to read from the\n#: clipboard. Note that disabling the read confirmation is a security\n#: risk as it means that any program, even the ones running on a\n#: remote server via SSH can read your clipboard. See also\n#: clipboard_max_size.\n\n# clipboard_max_size 512\n\n#: The maximum size (in MB) of data from programs running in kitty\n#: that will be stored for writing to the system clipboard. A value of\n#: zero means no size limit is applied. See also clipboard_control.\n\n# file_transfer_confirmation_bypass\n\n#: The password that can be supplied to the file transfer kitten\n#: <https://sw.kovidgoyal.net/kitty/kittens/transfer/> to skip the\n#: transfer confirmation prompt. This should only be used when\n#: initiating transfers from trusted computers, over trusted networks\n#: or encrypted transports, as it allows any programs running on the\n#: remote machine to read/write to the local filesystem, without\n#: permission.\n\n# allow_hyperlinks yes\n\n#: Process hyperlink escape sequences (OSC 8). If disabled OSC 8\n#: escape sequences are ignored. Otherwise they become clickable\n#: links, that you can click with the mouse or by using the hints\n#: kitten <https://sw.kovidgoyal.net/kitty/kittens/hints/>. The\n#: special value of ask means that kitty will ask before opening the\n#: link when clicked.\n\nshell_integration enabled\n\n#: Enable shell integration on supported shells. This enables features\n#: such as jumping to previous prompts, browsing the output of the\n#: previous command in a pager, etc. on supported shells. Set to\n#: disabled to turn off shell integration, completely. It is also\n#: possible to disable individual features, set to a space separated\n#: list of these values: no-rc, no-cursor, no-title, no-cwd, no-\n#: prompt-mark, no-complete. See Shell integration\n#: <https://sw.kovidgoyal.net/kitty/shell-integration/> for details.\n\n# allow_cloning ask\n\n#: Control whether programs running in the terminal can request new\n#: windows to be created. The canonical example is clone-in-kitty\n#: <https://sw.kovidgoyal.net/kitty/shell-integration/#clone-shell>.\n#: By default, kitty will ask for permission for each clone request.\n#: Allowing cloning unconditionally gives programs running in the\n#: terminal (including over SSH) permission to execute arbitrary code,\n#: as the user who is running the terminal, on the computer that the\n#: terminal is running on.\n\n# clone_source_strategies venv,conda,env_var,path\n\n#: Control what shell code is sourced when running clone-in-kitty in\n#: the newly cloned window. The supported strategies are:\n\n#: venv\n#:     Source the file $VIRTUAL_ENV/bin/activate. This is used by the\n#:     Python stdlib venv module and allows cloning venvs automatically.\n#: conda\n#:     Run conda activate $CONDA_DEFAULT_ENV. This supports the virtual\n#:     environments created by conda.\n#: env_var\n#:     Execute the contents of the environment variable\n#:     KITTY_CLONE_SOURCE_CODE with eval.\n#: path\n#:     Source the file pointed to by the environment variable\n#:     KITTY_CLONE_SOURCE_PATH.\n\n#: This option must be a comma separated list of the above values.\n#: This only source the first valid one in the above order.\n\nterm xterm-kitty\n\n#: The value of the TERM environment variable to set. Changing this\n#: can break many terminal programs, only change it if you know what\n#: you are doing, not because you read some advice on \"Stack Overflow\"\n#: to change it. The TERM variable is used by various programs to get\n#: information about the capabilities and behavior of the terminal. If\n#: you change it, depending on what programs you run, and how\n#: different the terminal you are changing it to is, various things\n#: from key-presses, to colors, to various advanced features may not\n#: work. Changing this option by reloading the config will only affect\n#: newly created windows.\n\n}}}\n\n\n#: OS specific tweaks {{{\n\n# wayland_titlebar_color system\n\n#: The color of the kitty window's titlebar on Wayland systems with\n#: client side window decorations such as GNOME. A value of system\n#: means to use the default system color, a value of background means\n#: to use the background color of the currently active window and\n#: finally you can use an arbitrary color, such as #12af59 or red.\n\n# macos_titlebar_color system\n\n#: The color of the kitty window's titlebar on macOS. A value of\n#: system means to use the default system color, light or dark can\n#: also be used to set it explicitly. A value of background means to\n#: use the background color of the currently active window and finally\n#: you can use an arbitrary color, such as #12af59 or red. WARNING:\n#: This option works by using a hack when arbitrary color (or\n#: background) is configured, as there is no proper Cocoa API for it.\n#: It sets the background color of the entire window and makes the\n#: titlebar transparent. As such it is incompatible with\n#: background_opacity. If you want to use both, you are probably\n#: better off just hiding the titlebar with hide_window_decorations.\n\n# macos_option_as_alt no\n\n#: Use the Option key as an Alt key on macOS. With this set to no,\n#: kitty will use the macOS native Option+Key to enter Unicode\n#: character behavior. This will break any Alt+Key keyboard shortcuts\n#: in your terminal programs, but you can use the macOS Unicode input\n#: technique. You can use the values: left, right or both to use only\n#: the left, right or both Option keys as Alt, instead. Note that\n#: kitty itself always treats Option the same as Alt. This means you\n#: cannot use this option to configure different kitty shortcuts for\n#: Option+Key vs. Alt+Key. Also, any kitty shortcuts using\n#: Option/Alt+Key will take priority, so that any such key presses\n#: will not be passed to terminal programs running inside kitty.\n#: Changing this option by reloading the config is not supported.\n\n# macos_hide_from_tasks no\n\n#: Hide the kitty window from running tasks on macOS (⌘+Tab and the\n#: Dock). Changing this option by reloading the config is not\n#: supported.\n\n# macos_quit_when_last_window_closed no\n\n#: Have kitty quit when all the top-level windows are closed on macOS.\n#: By default, kitty will stay running, even with no open windows, as\n#: is the expected behavior on macOS.\n\n# macos_window_resizable yes\n\n#: Disable this if you want kitty top-level OS windows to not be\n#: resizable on macOS. Changing this option by reloading the config\n#: will only affect newly created OS windows.\n\n# macos_thicken_font 0\n\n#: Draw an extra border around the font with the given width, to\n#: increase legibility at small font sizes on macOS. For example, a\n#: value of 0.75 will result in rendering that looks similar to sub-\n#: pixel antialiasing at common font sizes. Note that in modern kitty,\n#: this option is obsolete (although still supported). Consider using\n#: text_composition_strategy instead.\n\n# macos_traditional_fullscreen no\n\n#: Use the macOS traditional full-screen transition, that is faster,\n#: but less pretty.\n\n# macos_show_window_title_in all\n\n#: Control where the window title is displayed on macOS. A value of\n#: window will show the title of the currently active window at the\n#: top of the macOS window. A value of menubar will show the title of\n#: the currently active window in the macOS global menu bar, making\n#: use of otherwise wasted space. A value of all will show the title\n#: in both places, and none hides the title. See\n#: macos_menubar_title_max_length for how to control the length of the\n#: title in the menu bar.\n\n# macos_menubar_title_max_length 0\n\n#: The maximum number of characters from the window title to show in\n#: the macOS global menu bar. Values less than one means that there is\n#: no maximum limit.\n\n# macos_custom_beam_cursor no\n\n#: Use a custom mouse cursor for macOS that is easier to see on both\n#: light and dark backgrounds. Nowadays, the default macOS cursor\n#: already comes with a white border. WARNING: this might make your\n#: mouse cursor invisible on dual GPU machines. Changing this option\n#: by reloading the config is not supported.\n\n# macos_colorspace srgb\n\n#: The colorspace in which to interpret terminal colors. The default\n#: of srgb will cause colors to match those seen in web browsers. The\n#: value of default will use whatever the native colorspace of the\n#: display is. The value of displayp3 will use Apple's special\n#: snowflake display P3 color space, which will result in over\n#: saturated (brighter) colors with some color shift. Reloading\n#: configuration will change this value only for newly created OS\n#: windows.\n\n# linux_display_server auto\n\n#: Choose between Wayland and X11 backends. By default, an appropriate\n#: backend based on the system state is chosen automatically. Set it\n#: to x11 or wayland to force the choice. Changing this option by\n#: reloading the config is not supported.\n\n#: }}}\n\n\n#: Keyboard shortcuts {{{\n\n#: Keys are identified simply by their lowercase Unicode characters.\n#: For example: a for the A key, [ for the left square bracket key,\n#: etc. For functional keys, such as Enter or Escape, the names are\n#: present at Functional key definitions\n#: <https://sw.kovidgoyal.net/kitty/keyboard-protocol/#functional>.\n#: For modifier keys, the names are ctrl (control, ⌃), shift (⇧), alt\n#: (opt, option, ⌥), super (cmd, command, ⌘). See also: GLFW mods\n#: <https://www.glfw.org/docs/latest/group__mods.html>\n\n#: On Linux you can also use XKB key names to bind keys that are not\n#: supported by GLFW. See XKB keys\n#: <https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon-\n#: keysyms.h> for a list of key names. The name to use is the part\n#: after the XKB_KEY_ prefix. Note that you can only use an XKB key\n#: name for keys that are not known as GLFW keys.\n\n#: Finally, you can use raw system key codes to map keys, again only\n#: for keys that are not known as GLFW keys. To see the system key\n#: code for a key, start kitty with the kitty --debug-input option,\n#: kitty will output some debug text for every key event. In that text\n#: look for native_code, the value of that becomes the key name in the\n#: shortcut. For example:\n\n#: .. code-block:: none\n\n#:     on_key_input: glfw key: 0x61 native_code: 0x61 action: PRESS mods: none text: 'a'\n\n#: Here, the key name for the A key is 0x61 and you can use it with::\n\n#:     map ctrl+0x61 something\n\n#: to map Ctrl+A to something.\n\n#: You can use the special action no_op to unmap a keyboard shortcut\n#: that is assigned in the default configuration::\n\n#:     map kitty_mod+space no_op\n\n#: If you would like kitty to completely ignore a key event, not even\n#: sending it to the program running in the terminal, map it to\n#: discard_event::\n\n#:     map kitty_mod+f1 discard_event\n\n#: You can combine multiple actions to be triggered by a single\n#: shortcut with combine action, using the syntax below::\n\n#:     map key combine <separator> action1 <separator> action2 <separator> action3 ...\n\n#: For example::\n\n#:     map kitty_mod+e combine : new_window : next_layout\n\n#: This will create a new window and switch to the next available\n#: layout.\n\n#: You can use multi-key shortcuts with the syntax shown below::\n\n#:     map key1>key2>key3 action\n\n#: For example::\n\n#:     map ctrl+f>2 set_font_size 20\n\n#: The full list of actions that can be mapped to key presses is\n#: available here <https://sw.kovidgoyal.net/kitty/actions/>.\n\nkitty_mod ctrl+shift\n\n#: Special modifier key alias for default shortcuts. You can change\n#: the value of this option to alter all default shortcuts that use\n#: kitty_mod.\n\n# clear_all_shortcuts no\n\n#: Remove all shortcut definitions up to this point. Useful, for\n#: instance, to remove the default shortcuts.\n\n# action_alias\n\n#: E.g. action_alias launch_tab launch --type=tab --cwd=current\n\n#: Define action aliases to avoid repeating the same options in\n#: multiple mappings. Aliases can be defined for any action and will\n#: be expanded recursively. For example, the above alias allows you to\n#: create mappings to launch a new tab in the current working\n#: directory without duplication::\n\n#:     map f1 launch_tab vim\n#:     map f2 launch_tab emacs\n\n#: Similarly, to alias kitten invocation::\n\n#:     action_alias hints kitten hints --hints-offset=0\n\n# kitten_alias\n\n#: E.g. kitten_alias hints hints --hints-offset=0\n\n#: Like action_alias above, but specifically for kittens. Generally,\n#: prefer to use action_alias. This option is a legacy version,\n#: present for backwards compatibility. It causes all invocations of\n#: the aliased kitten to be substituted. So the example above will\n#: cause all invocations of the hints kitten to have the --hints-\n#: offset=0 option applied.\n\n#: Clipboard {{{\n\n#: Copy to clipboard\n\n# map kitty_mod+c copy_to_clipboard\n# map cmd+c       copy_to_clipboard\n\n#::  There is also a copy_or_interrupt action that can be optionally\n#::  mapped to Ctrl+C. It will copy only if there is a selection and\n#::  send an interrupt otherwise. Similarly,\n#::  copy_and_clear_or_interrupt will copy and clear the selection or\n#::  send an interrupt if there is no selection.\n\n#: Paste from clipboard\n\n# map kitty_mod+v paste_from_clipboard\n# map cmd+v       paste_from_clipboard\n\n#: Paste from selection\n\n# map kitty_mod+s  paste_from_selection\n# map shift+insert paste_from_selection\n\n#: Pass selection to program\n\n# map kitty_mod+o pass_selection_to_program\n\n#::  You can also pass the contents of the current selection to any\n#::  program with pass_selection_to_program. By default, the system's\n#::  open program is used, but you can specify your own, the selection\n#::  will be passed as a command line argument to the program. For\n#::  example::\n\n#::      map kitty_mod+o pass_selection_to_program firefox\n\n#::  You can pass the current selection to a terminal program running\n#::  in a new kitty window, by using the @selection placeholder::\n\n#::      map kitty_mod+y new_window less @selection\n\n#: }}}\n\n#: Scrolling {{{\n\n#: Scroll line up\n\n# map kitty_mod+up    scroll_line_up\n# map kitty_mod+k     scroll_line_up\n# map opt+cmd+page_up scroll_line_up\n# map cmd+up          scroll_line_up\n\n#: Scroll line down\n\n# map kitty_mod+down    scroll_line_down\n# map kitty_mod+j       scroll_line_down\n# map opt+cmd+page_down scroll_line_down\n# map cmd+down          scroll_line_down\n\n#: Scroll page up\n\n# map kitty_mod+page_up scroll_page_up\n# map cmd+page_up       scroll_page_up\n\n#: Scroll page down\n\n# map kitty_mod+page_down scroll_page_down\n# map cmd+page_down       scroll_page_down\n\n#: Scroll to top\n\n# map kitty_mod+home scroll_home\n# map cmd+home       scroll_home\n\n#: Scroll to bottom\n\n# map kitty_mod+end scroll_end\n# map cmd+end       scroll_end\n\n#: Scroll to previous shell prompt\n\n# map kitty_mod+z scroll_to_prompt -1\n\n#::  Use a parameter of 0 for scroll_to_prompt to scroll to the last\n#::  jumped to or the last clicked position. Requires shell\n#::  integration <https://sw.kovidgoyal.net/kitty/shell-integration/>\n#::  to work.\n\n#: Scroll to next shell prompt\n\n# map kitty_mod+x scroll_to_prompt 1\n\n#: Browse scrollback buffer in pager\n\n# map kitty_mod+h show_scrollback\n\n#::  You can pipe the contents of the current screen and history\n#::  buffer as STDIN to an arbitrary program using launch --stdin-\n#::  source. For example, the following opens the scrollback buffer in\n#::  less in an overlay window::\n\n#::      map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R\n\n#::  For more details on piping screen and buffer contents to external\n#::  programs, see launch <https://sw.kovidgoyal.net/kitty/launch/>.\n\n#: Browse output of the last shell command in pager\n\n# map kitty_mod+g show_last_command_output\n\n#::  You can also define additional shortcuts to get the command\n#::  output. For example, to get the first command output on screen::\n\n#::      map f1 show_first_command_output_on_screen\n\n#::  To get the command output that was last accessed by a keyboard\n#::  action or mouse action::\n\n#::      map f1 show_last_visited_command_output\n\n#::  You can pipe the output of the last command run in the shell\n#::  using the launch action. For example, the following opens the\n#::  output in less in an overlay window::\n\n#::      map f1 launch --stdin-source=@last_cmd_output --stdin-add-formatting --type=overlay less +G -R\n\n#::  To get the output of the first command on the screen, use\n#::  @first_cmd_output_on_screen. To get the output of the last jumped\n#::  to command, use @last_visited_cmd_output.\n\n#::  Requires shell integration\n#::  <https://sw.kovidgoyal.net/kitty/shell-integration/> to work.\n\n#: }}}\n\n#: Window management {{{\n\n#: New window\n\n# map kitty_mod+enter new_window\n# map cmd+enter       new_window\n\n#::  You can open a new kitty window running an arbitrary program, for\n#::  example::\n\n#::      map kitty_mod+y launch mutt\n\n#::  You can open a new window with the current working directory set\n#::  to the working directory of the current window using::\n\n#::      map ctrl+alt+enter launch --cwd=current\n\n#::  You can open a new window that is allowed to control kitty via\n#::  the kitty remote control facility with launch --allow-remote-\n#::  control. Any programs running in that window will be allowed to\n#::  control kitty. For example::\n\n#::      map ctrl+enter launch --allow-remote-control some_program\n\n#::  You can open a new window next to the currently active window or\n#::  as the first window, with::\n\n#::      map ctrl+n launch --location=neighbor\n#::      map ctrl+f launch --location=first\n\n#::  For more details, see launch\n#::  <https://sw.kovidgoyal.net/kitty/launch/>.\n\n#: New OS window\n\n# map kitty_mod+n new_os_window\n# map cmd+n       new_os_window\n\n#::  Works like new_window above, except that it opens a top-level OS\n#::  window. In particular you can use new_os_window_with_cwd to open\n#::  a window with the current working directory.\n\n#: Close window\n\n# map kitty_mod+w close_window\n# map shift+cmd+d close_window\n\n#: Next window\n\n# map kitty_mod+] next_window\n\n#: Previous window\n\n# map kitty_mod+[ previous_window\n\n#: Move window forward\n\n# map kitty_mod+f move_window_forward\n\n#: Move window backward\n\n# map kitty_mod+b move_window_backward\n\n#: Move window to top\n\n# map kitty_mod+` move_window_to_top\n\n#: Start resizing window\n\n# map kitty_mod+r start_resizing_window\n# map cmd+r       start_resizing_window\n\n#: First window\n\n# map kitty_mod+1 first_window\n# map cmd+1       first_window\n\n#: Second window\n\n# map kitty_mod+2 second_window\n# map cmd+2       second_window\n\n#: Third window\n\n# map kitty_mod+3 third_window\n# map cmd+3       third_window\n\n#: Fourth window\n\n# map kitty_mod+4 fourth_window\n# map cmd+4       fourth_window\n\n#: Fifth window\n\n# map kitty_mod+5 fifth_window\n# map cmd+5       fifth_window\n\n#: Sixth window\n\n# map kitty_mod+6 sixth_window\n# map cmd+6       sixth_window\n\n#: Seventh window\n\n# map kitty_mod+7 seventh_window\n# map cmd+7       seventh_window\n\n#: Eight window\n\n# map kitty_mod+8 eighth_window\n# map cmd+8       eighth_window\n\n#: Ninth window\n\n# map kitty_mod+9 ninth_window\n# map cmd+9       ninth_window\n\n#: Tenth window\n\n# map kitty_mod+0 tenth_window\n\n#: Visually select and focus window\n\n# map kitty_mod+f7 focus_visible_window\n\n#::  Display overlay numbers and alphabets on the window, and switch\n#::  the focus to the window when you press the key. When there are\n#::  only two windows, the focus will be switched directly without\n#::  displaying the overlay. You can change the overlay characters and\n#::  their order with option visual_window_select_characters.\n\n#: Visually swap window with another\n\n# map kitty_mod+f8 swap_with_window\n\n#::  Works like focus_visible_window above, but swaps the window.\n\n#: }}}\n\n#: Tab management {{{\n\n#: Next tab\n\n# map kitty_mod+right next_tab\n# map shift+cmd+]     next_tab\n# map ctrl+tab        next_tab\n\n#: Previous tab\n\n# map kitty_mod+left previous_tab\n# map shift+cmd+[    previous_tab\n# map ctrl+shift+tab previous_tab\n\n#: New tab\n\n# map kitty_mod+t new_tab\n# map cmd+t       new_tab\n\n#: Close tab\n\n# map kitty_mod+q close_tab\n# map cmd+w       close_tab\n\n#: Close OS window\n\n# map shift+cmd+w close_os_window\n\n#: Move tab forward\n\n# map kitty_mod+. move_tab_forward\n\n#: Move tab backward\n\n# map kitty_mod+, move_tab_backward\n\n#: Set tab title\n\n# map kitty_mod+alt+t set_tab_title\n# map shift+cmd+i     set_tab_title\n\n\n#: You can also create shortcuts to go to specific tabs, with 1 being\n#: the first tab, 2 the second tab and -1 being the previously active\n#: tab, and any number larger than the last tab being the last tab::\n\n#:     map ctrl+alt+1 goto_tab 1\n#:     map ctrl+alt+2 goto_tab 2\n\n#: Just as with new_window above, you can also pass the name of\n#: arbitrary commands to run when using new_tab and new_tab_with_cwd.\n#: Finally, if you want the new tab to open next to the current tab\n#: rather than at the end of the tabs list, use::\n\n#:     map ctrl+t new_tab !neighbor [optional cmd to run]\n#: }}}\n\n#: Layout management {{{\n\n#: Next layout\n\n# map kitty_mod+l next_layout\n\n\n#: You can also create shortcuts to switch to specific layouts::\n\n#:     map ctrl+alt+t goto_layout tall\n#:     map ctrl+alt+s goto_layout stack\n\n#: Similarly, to switch back to the previous layout::\n\n#:     map ctrl+alt+p last_used_layout\n\n#: There is also a toggle_layout action that switches to the named\n#: layout or back to the previous layout if in the named layout.\n#: Useful to temporarily \"zoom\" the active window by switching to the\n#: stack layout::\n\n#:     map ctrl+alt+z toggle_layout stack\n#: }}}\n\n: Font sizes {{{\n\n#: You can change the font size for all top-level kitty OS windows at\n#: a time or only the current one.\n\n#: Increase font size\n\n# map kitty_mod+equal  change_font_size all +2.0\n map kitty_mod+plus   change_font_size all +2.0\n# map kitty_mod+kp_add change_font_size all +2.0\n# map cmd+plus         change_font_size all +2.0\n# map cmd+equal        change_font_size all +2.0\n# map shift+cmd+equal  change_font_size all +2.0\n\n#: Decrease font size\n\n map kitty_mod+minus       change_font_size all -2.0\n# map kitty_mod+kp_subtract change_font_size all -2.0\n# map cmd+minus             change_font_size all -2.0\n# map shift+cmd+minus       change_font_size all -2.0\n\n#: Reset font size\n\n# map kitty_mod+backspace change_font_size all 0\n# map cmd+0               change_font_size all 0\n\n\n#: To setup shortcuts for specific font sizes::\n\n#:     map kitty_mod+f6 change_font_size all 10.0\n\n#: To setup shortcuts to change only the current OS window's font\n#: size::\n\n#:     map kitty_mod+f6 change_font_size current 10.0\n: }}}\n\n#: Select and act on visible text {{{\n\n#: Use the hints kitten to select text and either pass it to an\n#: external program or insert it into the terminal or copy it to the\n#: clipboard.\n\n#: Open URL\n\n# map kitty_mod+e open_url_with_hints\n\n#::  Open a currently visible URL using the keyboard. The program used\n#::  to open the URL is specified in open_url_with.\n\n#: Insert selected path\n\n# map kitty_mod+p>f kitten hints --type path --program -\n\n#::  Select a path/filename and insert it into the terminal. Useful,\n#::  for instance to run git commands on a filename output from a\n#::  previous git command.\n\n#: Open selected path\n\n# map kitty_mod+p>shift+f kitten hints --type path\n\n#::  Select a path/filename and open it with the default open program.\n\n#: Insert selected line\n\n# map kitty_mod+p>l kitten hints --type line --program -\n\n#::  Select a line of text and insert it into the terminal. Useful for\n#::  the output of things like: `ls -1`.\n\n#: Insert selected word\n\n# map kitty_mod+p>w kitten hints --type word --program -\n\n#::  Select words and insert into terminal.\n\n#: Insert selected hash\n\n# map kitty_mod+p>h kitten hints --type hash --program -\n\n#::  Select something that looks like a hash and insert it into the\n#::  terminal. Useful with git, which uses SHA1 hashes to identify\n#::  commits.\n\n#: Open the selected file at the selected line\n\n# map kitty_mod+p>n kitten hints --type linenum\n\n#::  Select something that looks like filename:linenum and open it in\n#::  vim at the specified line number.\n\n#: Open the selected hyperlink\n\n# map kitty_mod+p>y kitten hints --type hyperlink\n\n#::  Select a hyperlink (i.e. a URL that has been marked as such by\n#::  the terminal program, for example, by `ls --hyperlink=auto`).\n\n\n#: The hints kitten has many more modes of operation that you can map\n#: to different shortcuts. For a full description see hints kitten\n#: <https://sw.kovidgoyal.net/kitty/kittens/hints/>.\n#: }}}\n\n#: Miscellaneous {{{\n\n#: Show documentation\n\n# map kitty_mod+f1 show_kitty_doc overview\n\n#: Toggle fullscreen\n\n# map kitty_mod+f11 toggle_fullscreen\n# map ctrl+cmd+f    toggle_fullscreen\n\n#: Toggle maximized\n\n# map kitty_mod+f10 toggle_maximized\n\n#: Toggle macOS secure keyboard entry\n\n# map opt+cmd+s toggle_macos_secure_keyboard_entry\n\n#: Unicode input\n\n# map kitty_mod+u    kitten unicode_input\n# map ctrl+cmd+space kitten unicode_input\n\n#: Edit config file\n\n# map kitty_mod+f2 edit_config_file\n# map cmd+,        edit_config_file\n\n#: Open the kitty command shell\n\n# map kitty_mod+escape kitty_shell window\n\n#::  Open the kitty shell in a new window / tab / overlay / os_window\n#::  to control kitty using commands.\n\n#: Increase background opacity\n\n# map kitty_mod+a>m set_background_opacity +0.1\n\n#: Decrease background opacity\n\n# map kitty_mod+a>l set_background_opacity -0.1\n\n#: Make background fully opaque\n\n# map kitty_mod+a>1 set_background_opacity 1\n\n#: Reset background opacity\n\n# map kitty_mod+a>d set_background_opacity default\n\n#: Reset the terminal\n\n# map kitty_mod+delete clear_terminal reset active\n# map opt+cmd+r        clear_terminal reset active\n\n#::  You can create shortcuts to clear/reset the terminal. For\n#::  example::\n\n#::      # Reset the terminal\n#::      map f1 clear_terminal reset active\n#::      # Clear the terminal screen by erasing all contents\n#::      map f1 clear_terminal clear active\n#::      # Clear the terminal scrollback by erasing it\n#::      map f1 clear_terminal scrollback active\n#::      # Scroll the contents of the screen into the scrollback\n#::      map f1 clear_terminal scroll active\n#::      # Clear everything up to the line with the cursor\n#::      map f1 clear_terminal to_cursor active\n\n#::  If you want to operate on all kitty windows instead of just the\n#::  current one, use all instead of active.\n\n#::  It is also possible to remap Ctrl+L to both scroll the current\n#::  screen contents into the scrollback buffer and clear the screen,\n#::  instead of just clearing the screen, for example, for ZSH add the\n#::  following to ~/.zshrc:\n\n#::  .. code-block:: zsh\n\n#::      scroll-and-clear-screen() {\n#::          printf '\\n%.0s' {1..$LINES}\n#::          zle clear-screen\n#::      }\n#::      zle -N scroll-and-clear-screen\n#::      bindkey '^l' scroll-and-clear-screen\n\n#: Clear up to cursor line\n\n# map cmd+k clear_terminal to_cursor active\n\n#: Reload kitty.conf\n\n# map kitty_mod+f5 load_config_file\n# map ctrl+cmd+,   load_config_file\n\n#::  Reload kitty.conf, applying any changes since the last time it\n#::  was loaded. Note that a handful of options cannot be dynamically\n#::  changed and require a full restart of kitty. Particularly, when\n#::  changing shortcuts for actions located on the macOS global menu\n#::  bar, a full restart is needed. You can also map a keybinding to\n#::  load a different config file, for example::\n\n#::      map f5 load_config /path/to/alternative/kitty.conf\n\n#::  Note that all options from the original kitty.conf are discarded,\n#::  in other words the new configuration *replace* the old ones.\n\n#: Debug kitty configuration\n\n# map kitty_mod+f6 debug_config\n# map opt+cmd+,    debug_config\n\n#::  Show details about exactly what configuration kitty is running\n#::  with and its host environment. Useful for debugging issues.\n\n#: Send arbitrary text on key presses\n\n#::  E.g. map ctrl+shift+alt+h send_text all Hello World\n\n#::  You can tell kitty to send arbitrary (UTF-8) encoded text to the\n#::  client program when pressing specified shortcut keys. For\n#::  example::\n\n#::      map ctrl+alt+a send_text all Special text\n\n#::  This will send \"Special text\" when you press the Ctrl+Alt+A key\n#::  combination. The text to be sent decodes ANSI C escapes\n#::  <https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-\n#::  Quoting.html> so you can use escapes like \\e to send control\n#::  codes or \\u21fb to send Unicode characters (or you can just input\n#::  the Unicode characters directly as UTF-8 text). You can use\n#::  `kitty +kitten show_key` to get the key escape codes you want to\n#::  emulate.\n\n#::  The first argument to send_text is the keyboard modes in which to\n#::  activate the shortcut. The possible values are normal,\n#::  application, kitty or a comma separated combination of them. The\n#::  modes normal and application refer to the DECCKM cursor key mode\n#::  for terminals, and kitty refers to the kitty extended keyboard\n#::  protocol. The special value all means all of them.\n\n#::  Some more examples::\n\n#::      # Output a word and move the cursor to the start of the line (like typing and pressing Home)\n#::      map ctrl+alt+a send_text normal Word\\e[H\n#::      map ctrl+alt+a send_text application Word\\eOH\n#::      # Run a command at a shell prompt (like typing the command and pressing Enter)\n#::      map ctrl+alt+a send_text normal,application some command with arguments\\r\n\n#: Open kitty Website\n\n# map shift+cmd+/ open_url https://sw.kovidgoyal.net/kitty/\n\n#: Hide macOS kitty application\n\n# map cmd+h hide_macos_app\n\n#: Hide macOS other applications\n\n# map opt+cmd+h hide_macos_other_apps\n\n#: Minimize macOS window\n\n# map cmd+m minimize_macos_window\n\n#: Quit kitty\n\n# map cmd+q quit\n\n#: }}}\n\n#: }}}\n\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/neofetch/ascii.txt",
    "content": "    .--.\n   |o_o |\n   |:_/ |\n  //   \\ \\\n (|     | )\n/'\\_   _/`\\\n\\___)=(___/\n\n"
  },
  {
    "path": "nixos/hosts/desktop/home-dotfiles-desktop/neofetch/config.conf",
    "content": "print_info() {\n    prin \"\"\n    prin \"$(color 6)󰌢 \"\"OptiPlex 3060\"\n    info underline\n    info \"$(color 7)┌\"$(color 1)\"󰣇 \" distro\n    info \"$(color 7)├\"$(color 2)\" \" kernel\n    info \"$(color 7)├\"$(color 3)\" \" uptime\n    info \"$(color 7)├\"$(color 5)\" \" de \n    info \"$(color 7)├\"$(color 4)\" \" packages\n    info \"$(color 7)├\"$(color 6)\"󰞱 \" cpu\n    info \"$(color 7)└\"$(color 2)\"󰍛 \" memory\n    prin \"\"\n    prin \"$(color 3)󰮯 $(color 2)  $(color 1) $(color 4)  $(color 5) $(color 6)  $(color 7)󰊠\"\n    #prin \"\"\n    prin \"$(color 3)Hi$(color 7), $(color 2)M$(color 1)o$(color 4)m $(color 5)=$(color 6)) \"\n\n}\n\n\n\n# Title\n\n\n# Hide/Show Fully qualified domain name.\n#\n# Default:  'off'\n# Values:   'on', 'off'\n# Flag:     --title_fqdn\ntitle_fqdn=\"off\"\n\n\n# Kernel\n\n\n# Shorten the output of the kernel function.\n#\n# Default:  'on'\n# Values:   'on', 'off'\n# Flag:     --kernel_shorthand\n# Supports: Everything except *BSDs (except PacBSD and PC-BSD)\n#\n# Example:\n# on:  '4.8.9-1-ARCH'\n# off: 'Linux 4.8.9-1-ARCH'\nkernel_shorthand=\"on\"\n\n\n# Distro\n\n\n# Shorten the output of the distro function\n#\n# Default:  'off'\n# Values:   'on', 'tiny', 'off'\n# Flag:     --distro_shorthand\n# Supports: Everything except Windows and Haiku\ndistro_shorthand=\"off\"\n\n# Show/Hide OS Architecture.\n# Show 'x86_64', 'x86' and etc in 'Distro:' output.\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --os_arch\n#\n# Example:\n# on:  'Arch Linux x86_64'\n# off: 'Arch Linux'\nos_arch=\"on\"\n\n\n# Uptime\n\n\n# Shorten the output of the uptime function\n#\n# Default: 'on'\n# Values:  'on', 'tiny', 'off'\n# Flag:    --uptime_shorthand\n#\n# Example:\n# on:   '2 days, 10 hours, 3 mins'\n# tiny: '2d 10h 3m'\n# off:  '2 days, 10 hours, 3 minutes'\nuptime_shorthand=\"on\"\n\n\n# Memory\n\n\n# Show memory pecentage in output.\n#\n# Default: 'off'\n# Values:  'on', 'off'\n# Flag:    --memory_percent\n#\n# Example:\n# on:   '1801MiB / 7881MiB (22%)'\n# off:  '1801MiB / 7881MiB'\nmemory_percent=\"off\"\n\n# Change memory output unit.\n#\n# Default: 'mib'\n# Values:  'kib', 'mib', 'gib'\n# Flag:    --memory_unit\n#\n# Example:\n# kib  '1020928KiB / 7117824KiB'\n# mib  '1042MiB / 6951MiB'\n# gib: ' 0.98GiB / 6.79GiB'\nmemory_unit=\"gib\"\n\n\n# Packages\n\n\n# Show/Hide Package Manager names.\n#\n# Default: 'tiny'\n# Values:  'on', 'tiny' 'off'\n# Flag:    --package_managers\n#\n# Example:\n# on:   '998 (pacman), 8 (flatpak), 4 (snap)'\n# tiny: '908 (pacman, flatpak, snap)'\n# off:  '908'\npackage_managers=\"on\"\n\n\n# Shell\n\n\n# Show the path to $SHELL\n#\n# Default: 'off'\n# Values:  'on', 'off'\n# Flag:    --shell_path\n#\n# Example:\n# on:  '/bin/bash'\n# off: 'bash'\nshell_path=\"off\"\n\n# Show $SHELL version\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --shell_version\n#\n# Example:\n# on:  'bash 4.4.5'\n# off: 'bash'\nshell_version=\"on\"\n\n\n# CPU\n\n\n# CPU speed type\n#\n# Default: 'bios_limit'\n# Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'.\n# Flag:    --speed_type\n# Supports: Linux with 'cpufreq'\n# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value.\nspeed_type=\"bios_limit\"\n\n# CPU speed shorthand\n#\n# Default: 'off'\n# Values: 'on', 'off'.\n# Flag:    --speed_shorthand\n# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz\n#\n# Example:\n# on:    'i7-6500U (4) @ 3.1GHz'\n# off:   'i7-6500U (4) @ 3.100GHz'\nspeed_shorthand=\"off\"\n\n# Enable/Disable CPU brand in output.\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --cpu_brand\n#\n# Example:\n# on:   'Intel i7-6500U'\n# off:  'i7-6500U (4)'\ncpu_brand=\"on\"\n\n# CPU Speed\n# Hide/Show CPU speed.\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --cpu_speed\n#\n# Example:\n# on:  'Intel i7-6500U (4) @ 3.1GHz'\n# off: 'Intel i7-6500U (4)'\ncpu_speed=\"on\"\n\n# CPU Cores\n# Display CPU cores in output\n#\n# Default: 'logical'\n# Values:  'logical', 'physical', 'off'\n# Flag:    --cpu_cores\n# Support: 'physical' doesn't work on BSD.\n#\n# Example:\n# logical:  'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores)\n# physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores)\n# off:      'Intel i7-6500U @ 3.1GHz'\ncpu_cores=\"logical\"\n\n# CPU Temperature\n# Hide/Show CPU temperature.\n# Note the temperature is added to the regular CPU function.\n#\n# Default: 'off'\n# Values:  'C', 'F', 'off'\n# Flag:    --cpu_temp\n# Supports: Linux, BSD\n# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable\n#       coretemp kernel module. This only supports newer Intel processors.\n#\n# Example:\n# C:   'Intel i7-6500U (4) @ 3.1GHz [27.2°C]'\n# F:   'Intel i7-6500U (4) @ 3.1GHz [82.0°F]'\n# off: 'Intel i7-6500U (4) @ 3.1GHz'\ncpu_temp=\"off\"\n\n\n# GPU\n\n\n# Enable/Disable GPU Brand\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --gpu_brand\n#\n# Example:\n# on:  'AMD HD 7950'\n# off: 'HD 7950'\ngpu_brand=\"on\"\n\n# Which GPU to display\n#\n# Default: 'all'\n# Values:  'all', 'dedicated', 'integrated'\n# Flag:    --gpu_type\n# Supports: Linux\n#\n# Example:\n# all:\n#   GPU1: AMD HD 7950\n#   GPU2: Intel Integrated Graphics\n#\n# dedicated:\n#   GPU1: AMD HD 7950\n#\n# integrated:\n#   GPU1: Intel Integrated Graphics\ngpu_type=\"dedicated\"\n\n\n# Resolution\n\n\n# Display refresh rate next to each monitor\n# Default: 'off'\n# Values:  'on', 'off'\n# Flag:    --refresh_rate\n# Supports: Doesn't work on Windows.\n#\n# Example:\n# on:  '1920x1080 @ 60Hz'\n# off: '1920x1080'\nrefresh_rate=\"off\"\n\n\n# Gtk Theme / Icons / Font\n\n\n# Shorten output of GTK Theme / Icons / Font\n#\n# Default: 'off'\n# Values:  'on', 'off'\n# Flag:    --gtk_shorthand\n#\n# Example:\n# on:  'Numix, Adwaita'\n# off: 'Numix [GTK2], Adwaita [GTK3]'\ngtk_shorthand=\"off\"\n\n\n# Enable/Disable gtk2 Theme / Icons / Font\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --gtk2\n#\n# Example:\n# on:  'Numix [GTK2], Adwaita [GTK3]'\n# off: 'Adwaita [GTK3]'\ngtk2=\"on\"\n\n# Enable/Disable gtk3 Theme / Icons / Font\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --gtk3\n#\n# Example:\n# on:  'Numix [GTK2], Adwaita [GTK3]'\n# off: 'Numix [GTK2]'\ngtk3=\"on\"\n\n\n# IP Address\n\n\n# Website to ping for the public IP\n#\n# Default: 'http://ident.me'\n# Values:  'url'\n# Flag:    --ip_host\npublic_ip_host=\"http://ident.me\"\n\n# Public IP timeout.\n#\n# Default: '2'\n# Values:  'int'\n# Flag:    --ip_timeout\npublic_ip_timeout=2\n\n\n# Desktop Environment\n\n\n# Show Desktop Environment version\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --de_version\nde_version=\"on\"\n\n\n# Disk\n\n\n# Which disks to display.\n# The values can be any /dev/sdXX, mount point or directory.\n# NOTE: By default we only show the disk info for '/'.\n#\n# Default: '/'\n# Values:  '/', '/dev/sdXX', '/path/to/drive'.\n# Flag:    --disk_show\n#\n# Example:\n# disk_show=('/' '/dev/sdb1'):\n#      'Disk (/): 74G / 118G (66%)'\n#      'Disk (/mnt/Videos): 823G / 893G (93%)'\n#\n# disk_show=('/'):\n#      'Disk (/): 74G / 118G (66%)'\n#\ndisk_show=('/')\n\n# Disk subtitle.\n# What to append to the Disk subtitle.\n#\n# Default: 'mount'\n# Values:  'mount', 'name', 'dir', 'none'\n# Flag:    --disk_subtitle\n#\n# Example:\n# name:   'Disk (/dev/sda1): 74G / 118G (66%)'\n#         'Disk (/dev/sdb2): 74G / 118G (66%)'\n#\n# mount:  'Disk (/): 74G / 118G (66%)'\n#         'Disk (/mnt/Local Disk): 74G / 118G (66%)'\n#         'Disk (/mnt/Videos): 74G / 118G (66%)'\n#\n# dir:    'Disk (/): 74G / 118G (66%)'\n#         'Disk (Local Disk): 74G / 118G (66%)'\n#         'Disk (Videos): 74G / 118G (66%)'\n#\n# none:   'Disk: 74G / 118G (66%)'\n#         'Disk: 74G / 118G (66%)'\n#         'Disk: 74G / 118G (66%)'\ndisk_subtitle=\"mount\"\n\n# Disk percent.\n# Show/Hide disk percent.\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --disk_percent\n#\n# Example:\n# on:  'Disk (/): 74G / 118G (66%)'\n# off: 'Disk (/): 74G / 118G'\ndisk_percent=\"on\"\n\n\n# Song\n\n\n# Manually specify a music player.\n#\n# Default: 'auto'\n# Values:  'auto', 'player-name'\n# Flag:    --music_player\n#\n# Available values for 'player-name':\n#\n# amarok\n# audacious\n# banshee\n# bluemindo\n# clementine\n# cmus\n# deadbeef\n# deepin-music\n# dragon\n# elisa\n# exaile\n# gnome-music\n# gmusicbrowser\n# gogglesmm\n# guayadeque\n# io.elementary.music\n# iTunes\n# juk\n# lollypop\n# mocp\n# mopidy\n# mpd\n# muine\n# netease-cloud-music\n# olivia\n# playerctl\n# pogo\n# pragha\n# qmmp\n# quodlibet\n# rhythmbox\n# sayonara\n# smplayer\n# spotify\n# strawberry\n# tauonmb\n# tomahawk\n# vlc\n# xmms2d\n# xnoise\n# yarock\nmusic_player=\"mpd\"\n\n# Format to display song information.\n#\n# Default: '%artist% - %album% - %title%'\n# Values:  '%artist%', '%album%', '%title%'\n# Flag:    --song_format\n#\n# Example:\n# default: 'Song: Jet - Get Born - Sgt Major'\nsong_format=\"%artist% - %album% - %title%\"\n\n# Print the Artist, Album and Title on separate lines\n#\n# Default: 'off'\n# Values:  'on', 'off'\n# Flag:    --song_shorthand\n#\n# Example:\n# on:  'Artist: The Fratellis'\n#      'Album: Costello Music'\n#      'Song: Chelsea Dagger'\n#\n# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger'\nsong_shorthand=\"off\"\n\n# 'mpc' arguments (specify a host, password etc).\n#\n# Default:  ''\n# Example: mpc_args=(-h HOST -P PASSWORD)\nmpc_args=()\n\n\n# Text Colors\n\n\n# Text Colors\n#\n# Default:  'distro'\n# Values:   'distro', 'num' 'num' 'num' 'num' 'num' 'num'\n# Flag:     --colors\n#\n# Each number represents a different part of the text in\n# this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info'\n#\n# Example:\n# colors=(distro)      - Text is colored based on Distro colors.\n# colors=(4 6 1 8 8 6) - Text is colored in the order above.\ncolors=(distro)\n\n\n# Text Options\n\n\n# Toggle bold text\n#\n# Default:  'on'\n# Values:   'on', 'off'\n# Flag:     --bold\nbold=\"on\"\n\n# Enable/Disable Underline\n#\n# Default:  'on'\n# Values:   'on', 'off'\n# Flag:     --underline\nunderline_enabled=\"on\"\n\n# Underline character\n#\n# Default:  '-'\n# Values:   'string'\n# Flag:     --underline_char\nunderline_char=\"-\"\n\n\n# Info Separator\n# Replace the default separator with the specified string.\n#\n# Default:  ':'\n# Flag:     --separator\n#\n# Example:\n# separator=\"->\":   'Shell-> bash'\n# separator=\" =\":   'WM = dwm'\nseparator=\"󰇙\"\n\n\n# Color Blocks\n\n\n# Color block range\n# The range of colors to print.\n#\n# Default:  '0', '15'\n# Values:   'num'\n# Flag:     --block_range\n#\n# Example:\n#\n# Display colors 0-7 in the blocks.  (8 colors)\n# neofetch --block_range 0 7\n#\n# Display colors 0-15 in the blocks. (16 colors)\n# neofetch --block_range 0 15\nblock_range=(0 15)\n\n# Toggle color blocks\n#\n# Default:  'on'\n# Values:   'on', 'off'\n# Flag:     --color_blocks\ncolor_blocks=\"on\"\n\n# Color block width in spaces\n#\n# Default:  '3'\n# Values:   'num'\n# Flag:     --block_width\nblock_width=3\n\n# Color block height in lines\n#\n# Default:  '1'\n# Values:   'num'\n# Flag:     --block_height\nblock_height=1\n\n# Color Alignment\n#\n# Default: 'auto'\n# Values: 'auto', 'num'\n# Flag: --col_offset\n#\n# Number specifies how far from the left side of the terminal (in spaces) to\n# begin printing the columns, in case you want to e.g. center them under your\n# text.\n# Example:\n# col_offset=\"auto\" - Default behavior of neofetch\n# col_offset=7      - Leave 7 spaces then print the colors\ncol_offset=\"auto\"\n\n# Progress Bars\n\n\n# Bar characters\n#\n# Default:  '-', '='\n# Values:   'string', 'string'\n# Flag:     --bar_char\n#\n# Example:\n# neofetch --bar_char 'elapsed' 'total'\n# neofetch --bar_char '-' '='\nbar_char_elapsed=\"-\"\nbar_char_total=\"=\"\n\n# Toggle Bar border\n#\n# Default:  'on'\n# Values:   'on', 'off'\n# Flag:     --bar_border\nbar_border=\"on\"\n\n# Progress bar length in spaces\n# Number of chars long to make the progress bars.\n#\n# Default:  '15'\n# Values:   'num'\n# Flag:     --bar_length\nbar_length=15\n\n# Progress bar colors\n# When set to distro, uses your distro's logo colors.\n#\n# Default:  'distro', 'distro'\n# Values:   'distro', 'num'\n# Flag:     --bar_colors\n#\n# Example:\n# neofetch --bar_colors 3 4\n# neofetch --bar_colors distro 5\nbar_color_elapsed=\"distro\"\nbar_color_total=\"distro\"\n\n\n# Info display\n# Display a bar with the info.\n#\n# Default: 'off'\n# Values:  'bar', 'infobar', 'barinfo', 'off'\n# Flags:   --cpu_display\n#          --memory_display\n#          --battery_display\n#          --disk_display\n#\n# Example:\n# bar:     '[---=======]'\n# infobar: 'info [---=======]'\n# barinfo: '[---=======] info'\n# off:     'info'\ncpu_display=\"off\"\nmemory_display=\"off\"\nbattery_display=\"off\"\ndisk_display=\"off\"\n\n\n# Backend Settings\n\n\n# Image backend.\n#\n# Default:  'ascii'\n# Values:   'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off',\n#           'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'\n# Flag:     --backend\nimage_backend=\"kitty\"\n\n# Image Source\n#\n# Which image or ascii file to display.\n#\n# Default:  'auto'\n# Values:   'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'\n#           'command output (neofetch --ascii \"$(fortune | cowsay -W 30)\")'\n# Flag:     --source\n#\n# NOTE: 'auto' will pick the best image source for whatever image backend is used.\n#       In ascii mode, distro ascii art will be used and in an image mode, your\n#       wallpaper will be used.\nimage_source=\"$HOME/.dots/backgrounds/hl.png\"\n\n\n# Ascii Options\n\n\n# Ascii distro\n# Which distro's ascii art to display.\n#\n# Default: 'auto'\n# Values:  'auto', 'distro_name'\n# Flag:    --ascii_distro\n# NOTE: AIX, Alpine, Anarchy, Android, Antergos, antiX, \"AOSC OS\",\n#       \"AOSC OS/Retro\", Apricity, ArcoLinux, ArchBox, ARCHlabs,\n#       ArchStrike, XFerience, ArchMerge, Arch, Artix, Arya, Bedrock,\n#       Bitrig, BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD,\n#       BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS,\n#       Chapeau, Chrom*, Cleanjaro, ClearOS, Clear_Linux, Clover,\n#       Condres, Container_Linux, CRUX, Cucumber, Debian, Deepin,\n#       DesaOS, Devuan, DracOS, DarkOs, DragonFly, Drauger, Elementary,\n#       EndeavourOS, Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD,\n#       FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo, Pentoo,\n#       gNewSense, GNOME, GNU, GoboLinux, Grombyang, Guix, Haiku, Huayra,\n#       Hyperbola, janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion,\n#       Korora, KSLinux, Kubuntu, LEDE, LFS, Linux_Lite,\n#       LMDE, Lubuntu, Lunar, macos, Mageia, MagpieOS, Mandriva,\n#       Manjaro, Maui, Mer, Minix, LinuxMint, MX_Linux, Namib,\n#       Neptune, NetBSD, Netrunner, Nitrux, NixOS, Nurunner,\n#       NuTyX, OBRevenge, OpenBSD, openEuler, OpenIndiana, openmamba,\n#       OpenMandriva, OpenStage, OpenWrt, osmc, Oracle, OS Elbrus, PacBSD,\n#       Parabola, Pardus, Parrot, Parsix, TrueOS, PCLinuxOS, Peppermint,\n#       popos, Porteus, PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix,\n#       Raspbian, Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan,\n#       Regata, Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific,\n#       Septor, SereneLinux, SharkLinux, Siduction, Slackware, SliTaz,\n#       SmartOS, Solus, Source_Mage, Sparky, Star, SteamOS, SunOS,\n#       openSUSE_Leap, openSUSE_Tumbleweed, openSUSE, SwagArch, Tails,\n#       Trisquel, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio,\n#       Ubuntu, Venom, Void, Obarun, windows10, Windows7, Xubuntu, Zorin,\n#       and IRIX have ascii logos\n# NOTE: Arch, Ubuntu, Redhat, and Dragonfly have 'old' logo variants.\n#       Use '{distro name}_old' to use the old logos.\n# NOTE: Ubuntu has flavor variants.\n#       Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME,\n#       Ubuntu-Studio, Ubuntu-Mate  or Ubuntu-Budgie to use the flavors.\n# NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu,\n#       CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android,\n#       Antrix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola,\n#       Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS,\n#       Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian,\n#       postmarketOS, and Void have a smaller logo variant.\n#       Use '{distro name}_small' to use the small variants.\nascii_distro=\"arch_small\"\n\n# Ascii Colors\n#\n# Default:  'distro'\n# Values:   'distro', 'num' 'num' 'num' 'num' 'num' 'num'\n# Flag:     --ascii_colors\n#\n# Example:\n# ascii_colors=(distro)      - Ascii is colored based on Distro colors.\n# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors.\nascii_colors=(distro)\n\n# Bold ascii logo\n# Whether or not to bold the ascii logo.\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --ascii_bold\nascii_bold=\"on\"\n\n\n# Image Options\n\n\n# Image loop\n# Setting this to on will make neofetch redraw the image constantly until\n# Ctrl+C is pressed. This fixes display issues in some terminal emulators.\n#\n# Default:  'off'\n# Values:   'on', 'off'\n# Flag:     --loop\nimage_loop=\"off\"\n\n# Thumbnail directory\n#\n# Default: '~/.cache/thumbnails/neofetch'\n# Values:  'dir'\nthumbnail_dir=\"${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch\"\n\n# Crop mode\n#\n# Default:  'normal'\n# Values:   'normal', 'fit', 'fill'\n# Flag:     --crop_mode\n#\n# See this wiki page to learn about the fit and fill options.\n# https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F\ncrop_mode=\"fit\"\n\n# Crop offset\n# Note: Only affects 'normal' crop mode.\n#\n# Default:  'center'\n# Values:   'northwest', 'north', 'northeast', 'west', 'center'\n#           'east', 'southwest', 'south', 'southeast'\n# Flag:     --crop_offset\ncrop_offset=\"center\"\n\n# Image size\n# The image is half the terminal width by default.\n#\n# Default: 'auto'\n# Values:  'auto', '00px', '00%', 'none'\n# Flags:   --image_size\n#          --size\nimage_size=\"218px\"\n\n# Gap between image and text\n#\n# Default: '3'\n# Values:  'num', '-num'\n# Flag:    --gap\ngap=0\n\n# Image offsets\n# Only works with the w3m backend.\n#\n# Default: '0'\n# Values:  'px'\n# Flags:   --xoffset\n#          --yoffset\nyoffset=2\nxoffset=0\n\n# Image background color\n# Only works with the w3m backend.\n#\n# Default: ''\n# Values:  'color', 'blue'\n# Flag:    --b\n"
  },
  {
    "path": "nixos/hosts/desktop/home-programs-desktop.nix",
    "content": "{ inputs, config, pkgs, ... }:\n\n{\n  imports = [\n    inputs.ags.homeManagerModules.default\n  ];\n\n  nixpkgs.config.allowUnfree = true;\n\n  programs.home-manager.enable = true;\n\n  programs = {\n    ags = {\n      enable = true;\n      configDir = ./home-dotfiles-desktop/ags;\n      extraPackages = [ pkgs.libsoup_3 ];\n    };\n\n    kitty = {\n      enable = true;\n      extraConfig = builtins.readFile ./home-dotfiles-desktop/kitty/kitty.conf;\n    };\n\n    vscode = {\n      enable = true;\n      extensions = with pkgs.vscode-extensions; [\n        bbenoist.nix\n        jnoortheen.nix-ide\n        piousdeer.adwaita-theme\n        pkief.material-product-icons\n        #asvetliakov.vscode-neovim\n      ];\n      userSettings = { };\n    };\n\n    git = {\n      enable = true;\n      userName = \"RoccoRakete\";\n      userEmail = \"m.schaumann@mscloud.uk\";\n      extraConfig = {\n        credential.helper = \"${\n          pkgs.git.override { withLibsecret = true; }\n        }/bin/git-credential-libsecret\";\n      };\n    };\n  };\n\n  # Packages that should be installed to the user profile.\n  home.packages = [\n    pkgs.htop\n  ];\n}\n"
  },
  {
    "path": "nixos/hosts/desktop/link-dotfiles-desktop.nix",
    "content": "{ config, ... }:\n\n{\n  # neofetch\n  home.file.\"${config.xdg.configHome}/neofetch\" = {\n    source = ./home-dotfiles-desktop/neofetch;\n    recursive = true;\n    enable = true;\n  };\n\n  # Hyprland\n  home.file.\"${config.xdg.configHome}/hypr\" = {\n    source = ./home-dotfiles-desktop/hypr;\n    recursive = true;\n    enable = true;\n  };\n\n  # gtklock\n  home.file.\"${config.xdg.configHome}/gtklock\" = {\n    source = ../../global-dotfiles/gtklock;\n    recursive = true;\n    enable = true;\n  };\n\n  # neovim\n  home.file.\"${config.xdg.configHome}/nvim\" = {\n    source = ../../global-dotfiles/nvim;\n    recursive = true;\n    enable = true;\n  };\n}\n\n"
  },
  {
    "path": "nixos/hosts/laptop/configs-laptop/thinkfan.nix",
    "content": "{ ... }:\n\n{\n  services = {\n    thinkfan.enable = true;\n    thinkfan.extraArgs = [ \"-b\" \"-10\" \"-s\" \"1\" ];\n    thinkfan.sensors = [\n      {\n        query = \"/proc/acpi/ibm/thermal\";\n        type = \"tpacpi\";\n        #indices= [0];\n      }\n    ];\n    thinkfan.fans = [\n      {\n        query = \"/proc/acpi/ibm/fan\";\n        type = \"tpacpi\";\n      }\n    ];\n    thinkfan.levels = [\n      [ 0 0 75 ]\n      [ 1 72 90 ]\n      [ 2 86 95 ]\n      [ \"level auto\" 92 32767 ]\n    ];\n  };\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/configuration-laptop.nix",
    "content": "{ lib, ... }:\n\nlet\n  vars = import ../../variables.nix;\nin\n\n{\n  imports =\n    [\n      ./hardware-configuration-laptop.nix\n      ./configs-laptop/thinkfan.nix\n      ../../configs/nixos-configs/services.nix\n      ../../configs/nixos-configs/services.nix\n      ../../configs/nixos-configs/programs.nix\n      ../../configs/nixos-configs/nixvim/nvim.nix\n      ../../configs/nixos-configs/bluetooth.nix\n      ../../configs/nixos-configs/tlp.nix\n      ../../nixos.nix\n      ../../packages.nix\n    ];\n\n  services.logind = {\n    lidSwitchDocked = \"ignore\";\n    #lidSwitch = \"ignore\";\n  };\n\n  # Networking\n  networking = {\n    hostName = vars.laptop;\n    useDHCP = lib.mkDefault true;\n    networkmanager.enable = true;\n    firewall = {\n      enable = true;\n      allowedTCPPorts = [ 53317 ];\n      allowedUDPPorts = [ 53317 ];\n    };\n  };\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/hardware-configuration-laptop.nix",
    "content": "# Do not modify this file!  It was generated by ‘nixos-generate-config’\n# and may be overwritten by future invocations.  Please make changes\n# to /etc/nixos/configuration.nix instead.\n{ config, lib, modulesPath, ... }:\n\n{\n  imports =\n    [\n      (modulesPath + \"/installer/scan/not-detected.nix\")\n    ];\n\n  boot.initrd.availableKernelModules = [ \"xhci_pci\" \"thunderbolt\" \"nvme\" ];\n  boot.initrd.kernelModules = [ ];\n  boot.kernelModules = [ \"kvm-intel\" ];\n  boot.extraModulePackages = [ ];\n\n  fileSystems.\"/\" =\n    {\n      device = \"/dev/disk/by-uuid/ad644324-dbe0-423c-a4ca-632ac0d5b75a\";\n      fsType = \"ext4\";\n    };\n\n  fileSystems.\"/boot\" =\n    {\n      device = \"/dev/disk/by-uuid/7D4A-11C2\";\n      fsType = \"vfat\";\n    };\n\n  swapDevices =\n    [{ device = \"/dev/disk/by-uuid/3c634ef4-fe2b-48e6-a67e-e92bcf1a6975\"; }];\n\n  # Enables DHCP on each ethernet and wireless interface. In case of scripted networking\n  # (the default) this is the recommended approach. When using systemd-networkd it's\n  # still possible to use this option, but it's recommended to use it in conjunction\n  # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.\n  networking.useDHCP = lib.mkDefault true;\n  # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;\n  # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;\n\n  nixpkgs.hostPlatform = lib.mkDefault \"x86_64-linux\";\n  powerManagement.cpuFreqGovernor = lib.mkDefault \"ondemand\";\n  hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;\n  hardware.opengl.driSupport = true; # This is already enabled by default \n  hardware.opengl.driSupport32Bit = true; # For 32 bit applications \n  hardware.xpadneo.enable = true;\n    }\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/.eslintrc.yml",
    "content": "env:\n  es2022: true\nextends:\n  - \"eslint:recommended\"\n  - \"plugin:@typescript-eslint/recommended\"\nparser: \"@typescript-eslint/parser\"\nparserOptions:\n  ecmaVersion: 2022\n  sourceType: \"module\"\n  project: \"./tsconfig.json\"\n  warnOnUnsupportedTypeScriptVersion: false\nroot: true\nignorePatterns:\n  - types/\nplugins:\n  - \"@typescript-eslint\"\nrules:\n  \"@typescript-eslint/ban-ts-comment\":\n    - \"off\"\n  \"@typescript-eslint/no-non-null-assertion\":\n    - \"off\"\n  # \"@typescript-eslint/no-explicit-any\":\n  #   - \"off\"\n  \"@typescript-eslint/no-unused-vars\":\n    - error\n    - varsIgnorePattern: (^unused|_$)\n      argsIgnorePattern: ^(unused|_)\n  \"@typescript-eslint/no-empty-interface\":\n    - \"off\"\n\n  arrow-parens:\n    - error\n    - as-needed\n  comma-dangle:\n    - error\n    - always-multiline\n  comma-spacing:\n    - error\n    - before: false\n      after: true\n  comma-style:\n    - error\n    - last\n  curly:\n    - error\n    - multi-or-nest\n    - consistent\n  dot-location:\n    - error\n    - property\n  eol-last:\n    - error\n  eqeqeq:\n    - error\n    - always\n  indent:\n    - error\n    - 4\n    - SwitchCase: 1\n  keyword-spacing:\n    - error\n    - before: true\n  lines-between-class-members:\n    - error\n    - always\n    - exceptAfterSingleLine: true\n  padded-blocks:\n    - error\n    - never\n    - allowSingleLineBlocks: false\n  prefer-const:\n    - error\n  quotes:\n    - error\n    - double\n    - avoidEscape: true\n  semi:\n    - error\n    - never\n  nonblock-statement-body-position:\n    - error\n    - below\n  no-trailing-spaces:\n    - error\n  no-useless-escape:\n    - off\n  max-len:\n    - error\n    - code: 100\n\n  func-call-spacing:\n    - error\n  array-bracket-spacing:\n    - error\n  space-before-function-paren:\n    - error\n    - never\n  space-before-blocks:\n    - error\n  key-spacing:\n    - error\n  object-curly-spacing:\n    - error\n    - always\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/.gitignore",
    "content": "node_modules\ntypes\npackage-lock.json\nbun.lockb\nflake.lock\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/config.js",
    "content": "const v = {\n    ags: pkg.version.split(\".\").map(Number),\n    expect: [1, 8, 0],\n}\n\nfunction mismatch() {\n    print(`my config needs at least v${v.expect.join(\".\")}, yours is v${v.ags.join(\".\")}`)\n    App.connect(\"config-parsed\", app => app.Quit())\n    return {}\n}\n\nfunction check() {\n    if (v.ags[1] < v.expect[1])\n        return false\n\n    if (v.ags[2] < v.expect[2])\n        return false\n\n    return true\n}\n\nconst main = \"/tmp/ags/main.js\"\nconst outdir = `${App.configDir}/main.ts`\n\ntry {\n    await Utils.execAsync([\n        \"bun\", \"build\", outdir,\n        \"--outfile\", main,\n        \"--external\", \"resource://*\",\n        \"--external\", \"gi://*\",\n        \"--external\", \"file://*\",\n    ])\n} catch (error) {\n    console.error(error)\n    App.quit()\n}\n\nexport default check() ? (await import(`file://${main}`)).default : mismatch()\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/default.nix",
    "content": "{ inputs\n, system\n, stdenv\n, writeShellScriptBin\n, swww\n, bun\n, dart-sass\n, fd\n, brightnessctl\n, accountsservice\n}:\nlet\n  ags = inputs.ags.packages.${system}.default.override {\n    extraPackages = [accountsservice];\n  };\n\n  pname = \"asztal\";\n  config = stdenv.mkDerivation {\n    inherit pname;\n    version = \"1.7.6\";\n    src = ./.;\n\n    buildPhase = ''\n      ${bun}/bin/bun build ./main.ts \\\n        --outfile main.js \\\n        --external \"resource://*\" \\\n        --external \"gi://*\"\n\n      ${bun}/bin/bun build ./greeter/greeter.ts \\\n        --outfile greeter.js \\\n        --external \"resource://*\" \\\n        --external \"gi://*\"\n    '';\n\n    installPhase = ''\n      mkdir $out\n      cp -r assets $out\n      cp -r style $out\n      cp -r greeter $out\n      cp -r widget $out\n      cp -f main.js $out/config.js\n      cp -f greeter.js $out/greeter.js\n    '';\n  };\nin {\n  desktop = {\n    inherit config;\n    script = writeShellScriptBin pname ''\n      export PATH=$PATH:${dart-sass}/bin\n      export PATH=$PATH:${fd}/bin\n      export PATH=$PATH:${brightnessctl}/bin\n      export PATH=$PATH:${swww}/bin\n      ${ags}/bin/ags -b ${pname} -c ${config}/config.js $@\n    '';\n  };\n  greeter = {\n    inherit config;\n    script = writeShellScriptBin \"greeter\" ''\n      export PATH=$PATH:${dart-sass}/bin\n      export PATH=$PATH:${fd}/bin\n      ${ags}/bin/ags -b ${pname} -c ${config}/greeter.js $@\n    '';\n  };\n}\n\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/greeter/auth.ts",
    "content": "import type Gtk from \"gi://Gtk?version=3.0\"\nimport AccountsService from \"gi://AccountsService?version=1.0\"\nimport icons from \"lib/icons\"\n\nconst { iconFile, realName, userName } = AccountsService.UserManager.get_default().list_users()[0]\n\nconst loggingin = Variable(false)\n\nasync function login(password: string) {\n    const greetd = await Service.import(\"greetd\")\n    return greetd.login(userName, password, \"Hyprland\", [\n        \"WLR_NO_HARDWARE_CURSORS=1\",\n        \"_JAVA_AWT_WM_NONREPARENTING=1\",\n    ])\n}\n\nconst avatar = Widget.Box({\n    class_name: \"avatar\",\n    hpack: \"center\",\n    css: `background-image: url('${iconFile}')`,\n})\n\nconst password = Widget.Entry({\n    placeholder_text: \"Password\",\n    hexpand: true,\n    visibility: false,\n    on_accept: ({ text }) => {\n        loggingin.value = true\n        login(text!).catch(res => {\n            loggingin.value = false\n            response.label = res?.description || JSON.stringify(res)\n            revealer.reveal_child = true\n        })\n    },\n})\n\nconst response = Widget.Label({\n    class_name: \"response\",\n    wrap: true,\n    max_width_chars: 35,\n    hpack: \"center\",\n    hexpand: true,\n    xalign: .5,\n})\n\nconst revealer = Widget.Revealer({\n    transition: \"slide_down\",\n    child: response,\n})\n\nexport default Widget.Box({\n    class_name: \"auth\",\n    attribute: { password },\n    vertical: true,\n    children: [\n        Widget.Overlay({\n            child: Widget.Box(\n                {\n                    css: \"min-width: 200px; min-height: 200px;\",\n                    vertical: true,\n                },\n                Widget.Box({\n                    class_name: \"wallpaper\",\n                    css: `background-image: url('${WALLPAPER}')`,\n                }),\n                Widget.Box({\n                    class_name: \"wallpaper-contrast\",\n                    vexpand: true,\n                }),\n            ),\n            overlay: Widget.Box<Gtk.Widget>(\n                {\n                    vpack: \"end\",\n                    vertical: true,\n                },\n                avatar,\n                Widget.Box({\n                    hpack: \"center\",\n                    children: [\n                        Widget.Icon(icons.ui.avatar),\n                        Widget.Label(realName || userName),\n                    ],\n                }),\n                Widget.Box<Gtk.Widget>(\n                    {\n                        class_name: \"password\",\n                    },\n                    Widget.Spinner({\n                        visible: loggingin.bind(),\n                        active: true,\n                    }),\n                    Widget.Icon({\n                        visible: loggingin.bind().as(b => !b),\n                        icon: icons.ui.lock,\n                    }),\n                    password,\n                ),\n            ),\n        }),\n        Widget.Box(\n            { class_name: \"response-box\" },\n            revealer,\n        ),\n    ],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/greeter/greeter.scss",
    "content": "@import \"../style/mixins/floating-widget.scss\";\n@import \"../style/mixins/widget.scss\";\n@import \"../style/mixins/spacing.scss\";\n@import \"../style/mixins/unset.scss\";\n@import \"../style/mixins/a11y-button.scss\";\n@import \"../widget/bar/bar.scss\";\n\nwindow#greeter {\n    background-color: lighten($bg, 6%);\n    color: $fg;\n\n    .bar {\n        background-color: transparent;\n\n        .date {\n            @include unset($rec: true);\n            @include panel-button($flat: true, $reactive: false);\n        }\n    }\n\n    .auth {\n        @include floating_widget;\n        border-radius: $radius;\n        min-width: 400px;\n        padding: 0;\n\n        .wallpaper {\n            min-height: 220px;\n            background-size: cover;\n            border-top-left-radius: $radius;\n            border-top-right-radius: $radius;\n        }\n\n        .wallpaper-contrast {\n            min-height: 100px;\n        }\n\n        .avatar {\n            border-radius: 99px;\n            min-width: 140px;\n            min-height: 140px;\n            background-size: cover;\n            box-shadow: 3px 3px 6px 0 $shadow-color;\n            margin-bottom: $spacing;\n        }\n\n\n        .password {\n            entry {\n                @include button;\n                padding: $padding*.7 $padding;\n                margin-left: $spacing*.5;\n            }\n\n            margin: 0 $padding*4;\n            margin-top: $spacing;\n        }\n\n        .response-box {\n            color: $error-bg;\n            margin: $spacing 0;\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/greeter/greeter.ts",
    "content": "import \"./session\"\nimport GLib from \"gi://GLib?version=2.0\"\nimport style from \"style/style\"\nimport gtk from \"lib/gtk\"\nimport RegularWindow from \"widget/RegularWindow\"\nimport statusbar from \"./statusbar\"\nimport auth from \"./auth\"\n\nconst win = RegularWindow({\n    name: \"greeter\",\n    setup: self => {\n        self.set_default_size(500, 500)\n        self.show_all()\n        auth.attribute.password.grab_focus()\n    },\n    child: Widget.Overlay({\n        child: Widget.Box({ expand: true }),\n        overlays: [\n            Widget.Box({\n                vpack: \"start\",\n                hpack: \"fill\",\n                hexpand: true,\n                child: statusbar,\n            }),\n            Widget.Box({\n                vpack: \"center\",\n                hpack: \"center\",\n                child: auth,\n            }),\n        ],\n    }),\n})\n\nexport default {\n    onConfigParsed() {\n        style()\n        gtk()\n    },\n    icons: \"./assets\",\n    windows: [win],\n    cursorTheme: GLib.getenv(\"XCURSOR_THEME\"),\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/greeter/session.ts",
    "content": "import GLib from \"gi://GLib?version=2.0\"\nimport AccountsService from \"gi://AccountsService?version=1.0\"\n\nconst { userName } = AccountsService.UserManager.get_default().list_users()[0]\n\ndeclare global {\n    const WALLPAPER: string\n}\n\nObject.assign(globalThis, {\n    TMP: `${GLib.get_tmp_dir()}/greeter`,\n    OPTIONS: \"/var/cache/greeter/options.json\",\n    WALLPAPER: \"/var/cache/greeter/background\",\n    // TMP: \"/tmp/ags\",\n    // OPTIONS: Utils.CACHE_DIR + \"/options.json\",\n    // WALLPAPER: Utils.HOME + \"/.config/background\",\n    USER: userName,\n})\n\nUtils.ensureDirectory(TMP)\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/greeter/statusbar.ts",
    "content": "import options from \"options\"\nimport { clock } from \"lib/variables\"\nimport icons from \"lib/icons\"\nimport BatteryBar from \"widget/bar/buttons/BatteryBar\"\nimport PanelButton from \"widget/bar/PanelButton\"\n\nconst { scheme } = options.theme\nconst { monochrome } = options.bar.powermenu\n\nconst poweroff = PanelButton({\n    class_name: \"powermenu\",\n    child: Widget.Icon(icons.powermenu.shutdown),\n    on_clicked: () => Utils.exec(\"shutdown now\"),\n    setup: self => self.hook(monochrome, () => {\n        self.toggleClassName(\"colored\", !monochrome.value)\n        self.toggleClassName(\"box\")\n    }),\n})\n\nconst date = PanelButton({\n    class_name: \"date\",\n    child: Widget.Label({\n        label: clock.bind().as(c => c.format(options.bar.date.format.value) || \"\"),\n    }),\n})\n\nconst darkmode = PanelButton({\n    class_name: \"darkmode\",\n    child: Widget.Icon({ icon: scheme.bind().as(s => icons.color[s]) }),\n    on_clicked: () => scheme.value = scheme.value === \"dark\" ? \"light\" : \"dark\",\n})\n\nexport default Widget.CenterBox({\n    class_name: \"bar\",\n    hexpand: true,\n    center_widget: date,\n    end_widget: Widget.Box({\n        hpack: \"end\",\n        children: [\n            darkmode,\n            BatteryBar(),\n            poweroff,\n        ],\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/greeter.js",
    "content": "const main = \"/tmp/ags/greeter.js\"\nconst entry = `${App.configDir}/greeter/greeter.ts`\n\ntry {\n    await Utils.execAsync([\n        \"bun\", \"build\", entry,\n        \"--outfile\", main,\n        \"--external\", \"resource://*\",\n        \"--external\", \"gi://*\",\n        \"--external\", \"file://*\",\n    ])\n} catch (error) {\n    console.error(error)\n    App.quit()\n}\n\nconst { default: config } = await import(`file://${main}`)\nexport default config\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/lib/battery.ts",
    "content": "import icons from \"./icons\"\n\nexport default async function init() {\n    const bat = await Service.import(\"battery\")\n    bat.connect(\"notify::percent\", ({ percent, charging }) => {\n        const low = 30\n        if (percent !== low || percent !== low / 2 || !charging)\n            return\n\n        Utils.notify({\n            summary: `${percent}% Battery Percentage`,\n            iconName: icons.battery.warning,\n            urgency: \"critical\",\n        })\n    })\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/lib/experiments.ts",
    "content": "// these are functionalities that I might include in ags\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Binding } from \"types/service\"\nimport { Variable } from \"resource:///com/github/Aylur/ags/variable.js\"\nimport { App } from \"resource:///com/github/Aylur/ags/app.js\"\nimport GObject from \"gi://GObject?version=2.0\"\n\ntype GObj = GObject.Object | App\ntype B<T> = Binding<Variable<T>, any, T>\n\n// eslint-disable-next-line max-len\nexport function watch<T>(init: T, objs: Array<GObj | [GObj, signal?: string]>, callback: () => T): B<T>\nexport function watch<T>(init: T, obj: GObj, signal: string, callback: () => T): B<T>\nexport function watch<T>(init: T, obj: GObj, callback: () => T): B<T>\nexport function watch<T>(\n    init: T,\n    objs: GObj | Array<GObj | [GObj, signal?: string]>,\n    sigOrFn: string | (() => T),\n    callback?: () => T,\n) {\n    const v = new Variable(init)\n    const f = typeof sigOrFn === \"function\" ? sigOrFn : callback ?? (() => v.value)\n    const set = () => v.value = f()\n\n    if (Array.isArray(objs)) {\n        // multiple objects\n        for (const obj of objs) {\n            if (Array.isArray(obj)) {\n                // obj signal pair\n                const [o, s = \"changed\"] = obj\n                o.connect(s, set)\n            } else {\n                // obj on changed\n                obj.connect(\"changed\", set)\n            }\n        }\n    } else {\n        // watch single object\n        const signal = typeof sigOrFn === \"string\" ? sigOrFn : \"changed\"\n        objs.connect(signal, set)\n    }\n\n    return v.bind()\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/lib/gtk.ts",
    "content": "import Gio from \"gi://Gio\"\nimport options from \"options\"\n\nconst settings = new Gio.Settings({\n    schema: \"org.gnome.desktop.interface\",\n})\n\nfunction gtk() {\n    const scheme = options.theme.scheme.value\n    settings.set_string(\"color-scheme\", `prefer-${scheme}`)\n}\n\nexport default function init() {\n    options.theme.scheme.connect(\"changed\", gtk)\n    gtk()\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/lib/hyprland.ts",
    "content": "import options from \"options\"\nconst { messageAsync } = await Service.import(\"hyprland\")\n\nconst { hyprland } = options\nconst {\n    spacing,\n    radius,\n    border: { width },\n    blur,\n    shadows,\n    dark: { primary: { bg: darkActive } },\n    light: { primary: { bg: lightActive } },\n    scheme,\n} = options.theme\n\nconst deps = [\n    \"hyprland\",\n    spacing.id,\n    radius.id,\n    blur.id,\n    width.id,\n    shadows.id,\n    darkActive.id,\n    lightActive.id,\n    scheme.id,\n]\n\nexport default function init() {\n    options.handler(deps, setupHyprland)\n    setupHyprland()\n}\n\nfunction activeBorder() {\n    const color = scheme.value === \"dark\"\n        ? darkActive.value\n        : lightActive.value\n\n    return color.replace(\"#\", \"\")\n}\n\nfunction sendBatch(batch: string[]) {\n    const cmd = batch\n        .filter(x => !!x)\n        .map(x => `keyword ${x}`)\n        .join(\"; \")\n\n    return messageAsync(`[[BATCH]]/${cmd}`)\n}\n\nasync function setupHyprland() {\n    const wm_gaps = Math.floor(hyprland.gaps.value * spacing.value)\n\n    sendBatch([\n        `general:border_size ${width.value}`,\n        `general:gaps_out ${wm_gaps}`,\n        `general:gaps_in ${Math.floor(wm_gaps / 2)}`,\n        `general:col.active_border rgba(${activeBorder()}ff)`,\n        `general:col.inactive_border rgba(${hyprland.inactiveBorder.value})`,\n        `decoration:rounding ${radius.value}`,\n        `decoration:drop_shadow ${shadows.value ? \"yes\" : \"no\"}`,\n    ])\n\n    await sendBatch(App.windows.map(({ name }) => `layerrule unset, ${name}`))\n\n    if (blur.value > 0) {\n        sendBatch(App.windows.flatMap(({ name }) => [\n            `layerrule unset, ${name}`,\n            `layerrule blur, ${name}`,\n            `layerrule ignorealpha ${/* based on shadow color */.29}, ${name}`,\n        ]))\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/lib/icons.ts",
    "content": "export const substitutes = {\n    \"transmission-gtk\": \"transmission\",\n    \"blueberry.py\": \"blueberry\",\n    \"Caprine\": \"facebook-messenger\",\n    \"com.raggesilver.BlackBox-symbolic\": \"terminal-symbolic\",\n    \"org.wezfurlong.wezterm-symbolic\": \"terminal-symbolic\",\n    \"audio-headset-bluetooth\": \"audio-headphones-symbolic\",\n    \"audio-card-analog-usb\": \"audio-speakers-symbolic\",\n    \"audio-card-analog-pci\": \"audio-card-symbolic\",\n    \"preferences-system\": \"emblem-system-symbolic\",\n    \"com.github.Aylur.ags-symbolic\": \"controls-symbolic\",\n    \"com.github.Aylur.ags\": \"controls-symbolic\",\n}\n\nexport default {\n    fallback: {\n        executable: \"application-x-executable-symbolic\",\n        notification: \"dialog-information-symbolic\",\n        video: \"video-x-generic-symbolic\",\n        audio: \"audio-x-generic-symbolic\",\n    },\n    ui: {\n        close: \"window-close-symbolic\",\n        colorpicker: \"color-select-symbolic\",\n        info: \"info-symbolic\",\n        link: \"external-link-symbolic\",\n        lock: \"system-lock-screen-symbolic\",\n        menu: \"open-menu-symbolic\",\n        refresh: \"view-refresh-symbolic\",\n        search: \"system-search-symbolic\",\n        settings: \"emblem-system-symbolic\",\n        themes: \"preferences-desktop-theme-symbolic\",\n        tick: \"object-select-symbolic\",\n        time: \"hourglass-symbolic\",\n        toolbars: \"toolbars-symbolic\",\n        warning: \"dialog-warning-symbolic\",\n        avatar: \"avatar-default-symbolic\",\n        arrow: {\n            right: \"pan-end-symbolic\",\n            left: \"pan-start-symbolic\",\n            down: \"pan-down-symbolic\",\n            up: \"pan-up-symbolic\",\n        },\n    },\n    audio: {\n        mic: {\n            muted: \"microphone-disabled-symbolic\",\n            low: \"microphone-sensitivity-low-symbolic\",\n            medium: \"microphone-sensitivity-medium-symbolic\",\n            high: \"microphone-sensitivity-high-symbolic\",\n        },\n        volume: {\n            muted: \"audio-volume-muted-symbolic\",\n            low: \"audio-volume-low-symbolic\",\n            medium: \"audio-volume-medium-symbolic\",\n            high: \"audio-volume-high-symbolic\",\n            overamplified: \"audio-volume-overamplified-symbolic\",\n        },\n        type: {\n            headset: \"audio-headphones-symbolic\",\n            speaker: \"audio-speakers-symbolic\",\n            card: \"audio-card-symbolic\",\n        },\n        mixer: \"mixer-symbolic\",\n    },\n    asusctl: {\n        profile: {\n            Balanced: \"power-profile-balanced-symbolic\",\n            Quiet: \"power-profile-power-saver-symbolic\",\n            Performance: \"power-profile-performance-symbolic\",\n        },\n        mode: {\n            Integrated: \"processor-symbolic\",\n            Hybrid: \"controller-symbolic\",\n        },\n    },\n    battery: {\n        charging: \"battery-flash-symbolic\",\n        warning: \"battery-empty-symbolic\",\n    },\n    bluetooth: {\n        enabled: \"bluetooth-active-symbolic\",\n        disabled: \"bluetooth-disabled-symbolic\",\n    },\n    brightness: {\n        indicator: \"display-brightness-symbolic\",\n        keyboard: \"keyboard-brightness-symbolic\",\n        screen: \"display-brightness-symbolic\",\n    },\n    powermenu: {\n        sleep: \"weather-clear-night-symbolic\",\n        reboot: \"system-reboot-symbolic\",\n        logout: \"system-log-out-symbolic\",\n        shutdown: \"system-shutdown-symbolic\",\n    },\n    recorder: {\n        recording: \"media-record-symbolic\",\n    },\n    notifications: {\n        noisy: \"org.gnome.Settings-notifications-symbolic\",\n        silent: \"notifications-disabled-symbolic\",\n        message: \"chat-bubbles-symbolic\",\n    },\n    trash: {\n        full: \"user-trash-full-symbolic\",\n        empty: \"user-trash-symbolic\",\n    },\n    mpris: {\n        shuffle: {\n            enabled: \"media-playlist-shuffle-symbolic\",\n            disabled: \"media-playlist-consecutive-symbolic\",\n        },\n        loop: {\n            none: \"media-playlist-repeat-symbolic\",\n            track: \"media-playlist-repeat-song-symbolic\",\n            playlist: \"media-playlist-repeat-symbolic\",\n        },\n        playing: \"media-playback-pause-symbolic\",\n        paused: \"media-playback-start-symbolic\",\n        stopped: \"media-playback-start-symbolic\",\n        prev: \"media-skip-backward-symbolic\",\n        next: \"media-skip-forward-symbolic\",\n    },\n    system: {\n        cpu: \"org.gnome.SystemMonitor-symbolic\",\n        ram: \"drive-harddisk-solidstate-symbolic\",\n        temp: \"temperature-symbolic\",\n    },\n    color: {\n        dark: \"dark-mode-symbolic\",\n        light: \"light-mode-symbolic\",\n    },\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/lib/init.ts",
    "content": "import css from \"style/style\"\nimport matugen from \"./matugen\"\nimport hyprland from \"./hyprland\"\nimport tmux from \"./tmux\"\nimport gtk from \"./gtk\"\nimport lowBattery from \"./battery\"\nimport swww from \"./swww\"\nimport notifications from \"./notifications\"\n\nexport async function init() {\n    try {\n        gtk()\n        css()\n        tmux()\n        matugen()\n        lowBattery()\n        notifications()\n        hyprland()\n        css()\n        swww()\n    } catch (error) {\n        logError(error)\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/lib/matugen.ts",
    "content": "import options from \"options\"\nimport { sh, dependencies } from \"./utils\"\n\nexport default function init() {\n    options.wallpaper.connect(\"changed\", () => matugen())\n    options.autotheme.connect(\"changed\", () => matugen())\n}\n\nfunction animate(...setters: Array<() => void>) {\n    const delay = options.transition.value / 2\n    setters.forEach((fn, i) => Utils.timeout(delay * i, fn))\n}\n\nexport async function matugen(\n    type: \"image\" | \"color\" = \"image\",\n    arg = options.wallpaper.value,\n) {\n    if (!options.autotheme.value || !dependencies(\"matugen\"))\n        return\n\n    const colors = await sh(`matugen --dry-run -j hex ${type} ${arg}`)\n    const c = JSON.parse(colors).colors as { light: Colors, dark: Colors }\n    const { dark, light } = options.theme\n\n    animate(\n        () => {\n            dark.widget.value = c.dark.on_surface\n            light.widget.value = c.light.on_surface\n        },\n        () => {\n            dark.border.value = c.dark.outline\n            light.border.value = c.light.outline\n        },\n        () => {\n            dark.bg.value = c.dark.surface\n            light.bg.value = c.light.surface\n        },\n        () => {\n            dark.fg.value = c.dark.on_surface\n            light.fg.value = c.light.on_surface\n        },\n        () => {\n            dark.primary.bg.value = c.dark.primary\n            light.primary.bg.value = c.light.primary\n            options.bar.battery.charging.value = options.theme.scheme.value === \"dark\"\n                ? c.dark.primary : c.light.primary\n        },\n        () => {\n            dark.primary.fg.value = c.dark.on_primary\n            light.primary.fg.value = c.light.on_primary\n        },\n        () => {\n            dark.error.bg.value = c.dark.error\n            light.error.bg.value = c.light.error\n        },\n        () => {\n            dark.error.fg.value = c.dark.on_error\n            light.error.fg.value = c.light.on_error\n        },\n    )\n}\n\ntype Colors = {\n    background: string\n    error: string\n    error_container: string\n    inverse_on_surface: string\n    inverse_primary: string\n    inverse_surface: string\n    on_background: string\n    on_error: string\n    on_error_container: string\n    on_primary: string\n    on_primary_container: string\n    on_primary_fixed: string\n    on_primary_fixed_variant: string\n    on_secondary: string\n    on_secondary_container: string\n    on_secondary_fixed: string\n    on_secondary_fixed_variant: string\n    on_surface: string\n    on_surface_variant: string\n    on_tertiary: string\n    on_tertiary_container: string\n    on_tertiary_fixed: string\n    on_tertiary_fixed_variant: string\n    outline: string\n    outline_variant: string\n    primary: string\n    primary_container: string\n    primary_fixed: string\n    primary_fixed_dim: string\n    scrim: string\n    secondary: string\n    secondary_container: string\n    secondary_fixed: string\n    secondary_fixed_dim: string\n    shadow: string\n    surface: string\n    surface_bright: string\n    surface_container: string\n    surface_container_high: string\n    surface_container_highest: string\n    surface_container_low: string\n    surface_container_lowest: string\n    surface_dim: string\n    surface_variant: string\n    tertiary: string\n    tertiary_container: string\n    tertiary_fixed: string\n    tertiary_fixed_dim: string\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/lib/notifications.ts",
    "content": "import options from \"options\"\nconst notifs = await Service.import(\"notifications\")\n\n// TODO: consider adding this to upstream\n\nconst { blacklist } = options.notifications\n\nexport default function init() {\n    const notify = notifs.constructor.prototype.Notify.bind(notifs)\n    notifs.constructor.prototype.Notify = function(appName: string, ...rest: unknown[]) {\n        if (blacklist.value.includes(appName))\n            return Number.MAX_SAFE_INTEGER\n\n        return notify(appName, ...rest)\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/lib/option.ts",
    "content": "import { Variable } from \"resource:///com/github/Aylur/ags/variable.js\"\nimport { wait } from \"./utils\"\nimport options from \"options\"\n\ntype OptProps = {\n    persistent?: boolean\n}\n\nexport class Opt<T = unknown> extends Variable<T> {\n    static { Service.register(this) }\n\n    constructor(initial: T, { persistent = false }: OptProps = {}) {\n        super(initial)\n        this.initial = initial\n        this.persistent = persistent\n    }\n\n    initial: T\n    id = \"\"\n    persistent: boolean\n    toString() { return `${this.value}` }\n    toJSON() { return `opt:${this.value}` }\n\n    init(cacheFile: string) {\n        const cacheV = JSON.parse(Utils.readFile(cacheFile) || \"{}\")[this.id]\n        if (cacheV !== undefined)\n            this.value = cacheV\n\n        this.connect(\"changed\", () => {\n            const cache = JSON.parse(Utils.readFile(cacheFile) || \"{}\")\n            cache[this.id] = this.value\n            Utils.writeFileSync(JSON.stringify(cache, null, 2), cacheFile)\n        })\n    }\n\n    reset() {\n        if (this.persistent)\n            return\n\n        if (JSON.stringify(this.value) !== JSON.stringify(this.initial)) {\n            this.value = this.initial\n            return this.id\n        }\n    }\n}\n\nexport const opt = <T>(initial: T, opts?: OptProps) => new Opt(initial, opts)\n\nfunction getOptions(object: object, path = \"\"): Opt[] {\n    return Object.keys(object).flatMap(key => {\n        const obj: Opt = object[key]\n        const id = path ? path + \".\" + key : key\n\n        if (obj instanceof Variable) {\n            obj.id = id\n            return obj\n        }\n\n        if (typeof obj === \"object\")\n            return getOptions(obj, id)\n\n        return []\n    })\n}\n\nexport function mkOptions<T extends object>(cacheFile: string, object: T) {\n    for (const opt of getOptions(object))\n        opt.init(cacheFile)\n\n    const configFile = `${TMP}/config.json`\n    const values = getOptions(object).reduce((obj, { id, value }) => ({ [id]: value, ...obj }), {})\n    Utils.writeFileSync(JSON.stringify(values, null, 2), configFile)\n    Utils.monitorFile(configFile, () => {\n        const cache = JSON.parse(Utils.readFile(configFile) || \"{}\")\n        for (const opt of getOptions(object)) {\n            if (JSON.stringify(cache[opt.id]) !== JSON.stringify(opt.value))\n                opt.value = cache[opt.id]\n        }\n    })\n\n    async function reset(\n        [opt, ...list] = getOptions(object),\n        id = opt?.reset(),\n    ): Promise<Array<string>> {\n        if (!opt)\n            return wait(0, () => [])\n\n        return id\n            ? [id, ...(await wait(50, () => reset(list)))]\n            : await wait(0, () => reset(list))\n    }\n\n    return Object.assign(object, {\n        configFile,\n        array: () => getOptions(object),\n        async reset() {\n            return (await reset()).join(\"\\n\")\n        },\n        handler(deps: string[], callback: () => void) {\n            for (const opt of getOptions(options)) {\n                if (deps.some(i => opt.id.startsWith(i)))\n                    opt.connect(\"changed\", callback)\n            }\n        },\n    })\n}\n\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/lib/session.ts",
    "content": "import GLib from \"gi://GLib?version=2.0\"\n\ndeclare global {\n    const OPTIONS: string\n    const TMP: string\n    const USER: string\n}\n\nObject.assign(globalThis, {\n    OPTIONS: `${GLib.get_user_cache_dir()}/ags/options.json`,\n    TMP: `${GLib.get_tmp_dir()}/asztal`,\n    USER: GLib.get_user_name(),\n})\n\nUtils.ensureDirectory(TMP)\nApp.addIcons(`${App.configDir}/assets`)\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/lib/swww.ts",
    "content": "import options from \"options\"\nimport { dependencies, sh } from \"./utils\"\n\n// this is where the gtk portal sets the wallpaper\nconst WP = `/home/${Utils.USER}/.config/background`\n\nasync function wallpaper() {\n    const pos = await sh(\"hyprctl cursorpos\")\n\n    await sh([\n        \"swww\", \"img\",\n        \"--transition-type\", \"grow\",\n        \"--transition-pos\", pos.replace(\" \", \"\"),\n        options.wallpaper.value,\n    ])\n}\n\nexport default async function init() {\n    if (!dependencies(\"swww\"))\n        return\n\n    Utils.monitorFile(WP, () => options.wallpaper.setValue(WP))\n    options.wallpaper.connect(\"changed\", wallpaper)\n\n    Utils.execAsync(\"swww init\").catch(() => { })\n    wallpaper()\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/lib/tmux.ts",
    "content": "import options from \"options\"\nimport { sh } from \"./utils\"\n\nexport async function tmux() {\n    const { scheme, dark, light } = options.theme\n    const hex = scheme.value === \"dark\" ? dark.primary.bg.value : light.primary.bg.value\n    if (await sh(\"which tmux\"))\n        sh(`tmux set @main_accent \"${hex}\"`)\n}\n\nexport default function init() {\n    options.theme.dark.primary.bg.connect(\"changed\", tmux)\n    options.theme.light.primary.bg.connect(\"changed\", tmux)\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/lib/utils.ts",
    "content": "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { type Config } from \"types/app\"\nimport { type Application } from \"types/service/applications\"\nimport { substitutes } from \"./icons\"\nimport Gtk from \"gi://Gtk?version=3.0\"\nimport Gdk from \"gi://Gdk\"\nimport GLib from \"gi://GLib?version=2.0\"\n\nexport function config<T extends Gtk.Window>(config: Config<T>) {\n    return config\n}\n\n/**\n  * @returns substitute icon || name || fallback icon\n  */\nexport function icon(name: string | null, fallback = name) {\n    if (!name)\n        return fallback || \"\"\n\n    if (GLib.file_test(name, GLib.FileTest.EXISTS))\n        return name\n\n    const icon = (substitutes[name] || name)\n    if (Utils.lookUpIcon(icon))\n        return icon\n\n    print(`no icon substitute \"${icon}\" for \"${name}\", fallback: \"${fallback}\"`)\n    return fallback\n}\n\n/**\n * @returns execAsync([\"bash\", \"-c\", cmd])\n */\nexport async function bash(strings: TemplateStringsArray | string, ...values: unknown[]) {\n    const cmd = typeof strings === \"string\" ? strings : strings\n        .flatMap((str, i) => str + `${values[i] ?? \"\"}`)\n        .join(\"\")\n\n    return Utils.execAsync([\"bash\", \"-c\", cmd]).catch(err => {\n        console.error(cmd, err)\n        return \"\"\n    })\n}\n\n/**\n * @returns execAsync(cmd)\n */\nexport async function sh(cmd: string | string[]) {\n    return Utils.execAsync(cmd).catch(err => {\n        console.error(typeof cmd === \"string\" ? cmd : cmd.join(\" \"), err)\n        return \"\"\n    })\n}\n\nexport function forMonitors(widget: (monitor: number) => Gtk.Window) {\n    const n = Gdk.Display.get_default()?.get_n_monitors() || 1\n    return range(n, 0).map(widget).flat(1)\n}\n\n/**\n * @returns [start...length]\n */\nexport function range(length: number, start = 1) {\n    return Array.from({ length }, (_, i) => i + start)\n}\n\n/**\n * promisified timeout\n */\nexport function wait<T>(ms: number, callback: () => T): Promise<T> {\n    return new Promise(resolve => Utils.timeout(ms, () => {\n        resolve(callback())\n    }))\n}\n\n/**\n * @returns true if all of the `bins` are found\n */\nexport function dependencies(...bins: string[]) {\n    const missing = bins.filter(bin => {\n        return !Utils.exec(`which ${bin}`)\n    })\n\n    if (missing.length > 0)\n        console.warn(\"missing dependencies:\", missing.join(\", \"))\n\n    return missing.length === 0\n}\n\n/**\n * run app detached\n */\nexport function launchApp(app: Application) {\n    const exe = app.executable\n        .split(/\\s+/)\n        .filter(str => !str.startsWith(\"%\") && !str.startsWith(\"@\"))\n        .join(\" \")\n\n    bash(`${exe} &`)\n    app.frequency += 1\n}\n\n/**\n * to use with drag and drop\n */\nexport function createSurfaceFromWidget(widget: Gtk.Widget) {\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    const cairo = imports.gi.cairo as any\n    const alloc = widget.get_allocation()\n    const surface = new cairo.ImageSurface(\n        cairo.Format.ARGB32,\n        alloc.width,\n        alloc.height,\n    )\n    const cr = new cairo.Context(surface)\n    cr.setSourceRGBA(255, 255, 255, 0)\n    cr.rectangle(0, 0, alloc.width, alloc.height)\n    cr.fill()\n    widget.draw(cr)\n    return surface\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/lib/variables.ts",
    "content": "import GLib from \"gi://GLib\"\n// import options from \"options\"\n//\n// const intval = options.system.fetchInterval.value\n// const tempPath = options.system.temperature.value\n\nexport const clock = Variable(GLib.DateTime.new_now_local(), {\n    poll: [1000, () => GLib.DateTime.new_now_local()],\n})\n\nexport const uptime = Variable(0, {\n    poll: [60_000, \"cat /proc/uptime\", line =>\n        Number.parseInt(line.split(\".\")[0]) / 60,\n    ],\n})\n\n// export const distro = GLib.get_os_info(\"ID\")\n\n// const divide = ([total, free]: string[]) => Number.parseInt(free) / Number.parseInt(total)\n//\n// export const cpu = Variable(0, {\n//     poll: [intval, \"top -b -n 1\", out => divide([\"100\", out.split(\"\\n\")\n//         .find(line => line.includes(\"Cpu(s)\"))\n//         ?.split(/\\s+/)[1]\n//         .replace(\",\", \".\") || \"0\"])],\n// })\n//\n// export const ram = Variable(0, {\n//     poll: [intval, \"free\", out => divide(out.split(\"\\n\")\n//         .find(line => line.includes(\"Mem:\"))\n//         ?.split(/\\s+/)\n//         .splice(1, 2) || [\"1\", \"1\"])],\n// })\n//\n// export const temperature = Variable(0, {\n//     poll: [intval, `cat ${tempPath}`, n => {\n//         return Number.parseInt(n) / 100_000\n//     }],\n// })\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/main.ts",
    "content": "import \"lib/session\"\nimport \"lib/init\"\nimport options from \"options\"\nimport Bar from \"widget/bar/Bar\"\nimport Applauncher from \"widget/applauncher/Applauncher\"\nimport Overview from \"widget/overview/Overview\"\nimport PowerMenu from \"widget/powermenu/PowerMenu\"\nimport Verification from \"widget/powermenu/Verification\"\nimport NotificationPopups from \"widget/notifications/NotificationPopups\"\nimport ScreenCorners from \"widget/bar/ScreenCorners\"\nimport OSD from \"widget/osd/OSD\"\nimport SettingsDialog from \"widget/settings/SettingsDialog\"\nimport { config, forMonitors } from \"lib/utils\"\nimport { setupQuickSettings } from \"widget/quicksettings/QuickSettings\"\nimport { setupDateMenu } from \"widget/datemenu/DateMenu\"\nimport { init } from \"lib/init\"\n\nexport default config({\n    onConfigParsed: () => {\n        setupQuickSettings()\n        setupDateMenu()\n        init()\n    },\n    closeWindowDelay: {\n        \"applauncher\": options.transition.value,\n        \"overview\": options.transition.value,\n        \"quicksettings\": options.transition.value,\n        \"datemenu\": options.transition.value,\n    },\n    windows: [\n        ...forMonitors(Bar),\n        ...forMonitors(NotificationPopups),\n        ...forMonitors(ScreenCorners),\n        ...forMonitors(OSD),\n        Applauncher(),\n        Overview(),\n        PowerMenu(),\n        Verification(),\n        SettingsDialog(),\n    ],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/options.ts",
    "content": "import { type BarWidget } from \"widget/bar/Bar\"\nimport { opt, mkOptions } from \"lib/option\"\n\nconst options = mkOptions(OPTIONS, {\n    autotheme: opt(false),\n\n    wallpaper: opt(`/home/${USER}/.config/background`, { persistent: true }),\n\n    theme: {\n        dark: {\n            primary: {\n                bg: opt(\"#51a4e7\"),\n                fg: opt(\"#141414\"),\n            },\n            error: {\n                bg: opt(\"#e55f86\"),\n                fg: opt(\"#141414\"),\n            },\n            bg: opt(\"#171717\"),\n            fg: opt(\"#eeeeee\"),\n            widget: opt(\"#eeeeee\"),\n            border: opt(\"#eeeeee\"),\n        },\n        light: {\n            primary: {\n                bg: opt(\"#426ede\"),\n                fg: opt(\"#eeeeee\"),\n            },\n            error: {\n                bg: opt(\"#b13558\"),\n                fg: opt(\"#eeeeee\"),\n            },\n            bg: opt(\"#fffffa\"),\n            fg: opt(\"#080808\"),\n            widget: opt(\"#080808\"),\n            border: opt(\"#080808\"),\n        },\n\n        blur: opt(0),\n        scheme: opt<\"dark\" | \"light\">(\"dark\"),\n        widget: { opacity: opt(94) },\n        border: {\n            width: opt(0),\n            opacity: opt(96),\n        },\n\n        shadows: opt(true),\n        padding: opt(7),\n        spacing: opt(5),\n        radius: opt(15),\n    },\n\n    transition: opt(200),\n\n    font: {\n        size: opt(13),\n        name: opt(\"Ubuntu Nerd Font\"),\n    },\n\n    bar: {\n        flatButtons: opt(true),\n        position: opt<\"top\" | \"bottom\">(\"top\"),\n        corners: opt(false),\n        layout: {\n            start: opt<BarWidget[]>([\n                \"launcher\",\n                \"workspaces\",\n                //\"taskbar\",\n                \"expander\",\n                //\"messages\",\n            ]),\n            center: opt<BarWidget[]>([\n                \"date\",\n            ]),\n            end: opt<BarWidget[]>([\n                //\"media\",\n                \"expander\",\n                \"systray\",\n                \"colorpicker\",\n                \"screenrecord\",\n                \"battery\",\n                \"system\",\n                \"powermenu\",\n            ]),\n        },\n        launcher: {\n            icon: {\n                colored: opt(true),\n                icon: opt(\"nixos\"),\n            },\n            label: {\n                colored: opt(false),\n                label: opt(\" Applications\"),\n            },\n            action: opt(() => App.toggleWindow(\"applauncher\")),\n        },\n        date: {\n            format: opt(\"%d.%m.%y - %H:%M\"),\n            action: opt(() => App.toggleWindow(\"datemenu\")),\n        },\n        battery: {\n            bar: opt<\"hidden\" | \"regular\" | \"whole\">(\"hidden\"),\n            charging: opt(\"#00D787\"),\n            percentage: opt(true),\n            blocks: opt(7),\n            width: opt(50),\n            low: opt(30),\n        },\n        workspaces: {\n            workspaces: opt(10),\n        },\n        taskbar: {\n            monochrome: opt(true),\n            exclusive: opt(false),\n        },\n        messages: {\n            action: opt(() => App.toggleWindow(\"datemenu\")),\n        },\n        systray: {\n            ignore: opt([\n                \"KDE Connect Indicator\",\n                \"spotify-client\",\n            ]),\n        },\n        media: {\n            monochrome: opt(true),\n            preferred: opt(\"spotify\"),\n            direction: opt<\"left\" | \"right\">(\"right\"),\n            length: opt(40),\n        },\n        powermenu: {\n            monochrome: opt(false),\n            action: opt(() => App.toggleWindow(\"powermenu\")),\n        },\n    },\n\n    applauncher: {\n        iconSize: opt(62),\n        width: opt(0),\n        margin: opt(80),\n        maxItem: opt(10),\n            favorites: opt([\n            [\n                \"firefox\",\n                \"org.gnome.Nautilus\",\n                \"obsidian\",\n                \"spotify\",\n\t\t\"kitty\"\n            ],\n            [\n                \"betaflight-configurator\",\n                \"org.gnome.Calendar\",\n                \"discord\",\n                \"neovide\",\n                \"gimp\",\n            ],\n        ]),  \n    },\n\n    overview: {\n        scale: opt(9),\n        workspaces: opt(10),\n        monochromeIcon: opt(true),\n    },\n\n    powermenu: {\n        sleep: opt(\"systemctl suspend\"),\n        reboot: opt(\"systemctl reboot\"),\n        logout: opt(\"pkill Hyprland\"),\n        shutdown: opt(\"shutdown now\"),\n        layout: opt<\"line\" | \"box\">(\"line\"),\n        labels: opt(true),\n    },\n\n    quicksettings: {\n        avatar: {\n            image: opt(`/var/lib/AccountsService/icons/${Utils.USER}`),\n            size: opt(70),\n        },\n        width: opt(380),\n        position: opt<\"left\" | \"center\" | \"right\">(\"right\"),\n        networkSettings: opt(\"gtk-launch gnome-control-center\"),\n        media: {\n            monochromeIcon: opt(true),\n            coverSize: opt(100),\n        },\n    },\n\n    datemenu: {\n        position: opt<\"left\" | \"center\" | \"right\">(\"center\"),\n    },\n\n    osd: {\n        progress: {\n            vertical: opt(true),\n            pack: {\n                h: opt<\"start\" | \"center\" | \"end\">(\"end\"),\n                v: opt<\"start\" | \"center\" | \"end\">(\"center\"),\n            },\n        },\n        microphone: {\n            pack: {\n                h: opt<\"start\" | \"center\" | \"end\">(\"center\"),\n                v: opt<\"start\" | \"center\" | \"end\">(\"end\"),\n            },\n        },\n    },\n\n    notifications: {\n        position: opt<Array<\"top\" | \"bottom\" | \"left\" | \"right\">>([\"top\", \"right\"]),\n        blacklist: opt([\"Spotify\"]),\n        width: opt(440),\n    },\n\n    hyprland: {\n        gaps: opt(2.4),\n        inactiveBorder: opt(\"333333ff\"),\n    },\n})\n\nglobalThis[\"options\"] = options\nexport default options\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/package.json",
    "content": "{\n    \"name\": \"ags-dotfiles\",\n    \"author\": \"Aylur\",\n    \"kofi\": \"https://ko-fi.com/aylur\",\n    \"repository\": {\n        \"type\": \"git\",\n        \"url\": \"git+https://github.com/Aylur/dotfiles.git\"\n    },\n    \"devDependencies\": {\n        \"@girs/accountsservice-1.0\": \"^1.0.0-3.2.7\",\n        \"@typescript-eslint/eslint-plugin\": \"^6.20.0\",\n        \"eslint\": \"^8.56.0\",\n        \"eslint-config-standard-with-typescript\": \"^43.0.1\",\n        \"eslint-plugin-import\": \"^2.29.1\",\n        \"eslint-plugin-n\": \"^16.6.2\",\n        \"eslint-plugin-promise\": \"^6.1.1\",\n        \"typescript\": \"^5.3.3\"\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/service/asusctl.ts",
    "content": "import { sh } from \"lib/utils\"\n\ntype Profile = \"Performance\" | \"Balanced\" | \"Quiet\"\ntype Mode = \"Hybrid\" | \"Integrated\"\n\nclass Asusctl extends Service {\n    static {\n        Service.register(this, {}, {\n            \"profile\": [\"string\", \"r\"],\n            \"mode\": [\"string\", \"r\"],\n        })\n    }\n\n    available = !!Utils.exec(\"which asusctl\")\n    #profile: Profile = \"Balanced\"\n    #mode: Mode = \"Hybrid\"\n\n    async nextProfile() {\n        await sh(\"asusctl profile -n\")\n        const profile = await sh(\"asusctl profile -p\")\n        const p = profile.split(\" \")[3] as Profile\n        this.#profile = p\n        this.changed(\"profile\")\n    }\n\n    async setProfile(prof: Profile) {\n        await sh(`asusctl profile --profile-set ${prof}`)\n        this.#profile = prof\n        this.changed(\"profile\")\n    }\n\n    async nextMode() {\n        await sh(`supergfxctl -m ${this.#mode === \"Hybrid\" ? \"Integrated\" : \"Hybrid\"}`)\n        this.#mode = await sh(\"supergfxctl -g\") as Mode\n        this.changed(\"profile\")\n    }\n\n    constructor() {\n        super()\n\n        if (this.available) {\n            sh(\"asusctl profile -p\").then(p => this.#profile = p.split(\" \")[3] as Profile)\n            sh(\"supergfxctl -g\").then(m => this.#mode = m as Mode)\n        }\n    }\n\n    get profiles(): Profile[] { return [\"Performance\", \"Balanced\", \"Quiet\"] }\n    get profile() { return this.#profile }\n    get mode() { return this.#mode }\n}\n\nexport default new Asusctl()\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/service/brightness.ts",
    "content": "import { bash, dependencies, sh } from \"lib/utils\"\n\nif (!dependencies(\"brightnessctl\"))\n    App.quit()\n\nconst get = (args: string) => Number(Utils.exec(`brightnessctl ${args}`))\nconst screen = await bash`ls -w1 /sys/class/backlight | head -1`\nconst kbd = await bash`ls -w1 /sys/class/leds | head -1`\n\nclass Brightness extends Service {\n    static {\n        Service.register(this, {}, {\n            \"screen\": [\"float\", \"rw\"],\n            \"kbd\": [\"int\", \"rw\"],\n        })\n    }\n\n    #kbdMax = get(`--device ${kbd} max`)\n    #kbd = get(`--device ${kbd} get`)\n    #screenMax = get(\"max\")\n    #screen = get(\"get\") / get(\"max\")\n\n    get kbd() { return this.#kbd }\n    get screen() { return this.#screen }\n\n    set kbd(value) {\n        if (value < 0 || value > this.#kbdMax)\n            return\n\n        sh(`brightnessctl -d ${kbd} s ${value} -q`).then(() => {\n            this.#kbd = value\n            this.changed(\"kbd\")\n        })\n    }\n\n    set screen(percent) {\n        if (percent < 0)\n            percent = 0\n\n        if (percent > 1)\n            percent = 1\n\n        sh(`brightnessctl set ${Math.floor(percent * 100)}% -q`).then(() => {\n            this.#screen = percent\n            this.changed(\"screen\")\n        })\n    }\n\n    constructor() {\n        super()\n\n        const screenPath = `/sys/class/backlight/${screen}/brightness`\n        const kbdPath = `/sys/class/leds/${kbd}/brightness`\n\n        Utils.monitorFile(screenPath, async f => {\n            const v = await Utils.readFileAsync(f)\n            this.#screen = Number(v) / this.#screenMax\n            this.changed(\"screen\")\n        })\n\n        Utils.monitorFile(kbdPath, async f => {\n            const v = await Utils.readFileAsync(f)\n            this.#kbd = Number(v) / this.#kbdMax\n            this.changed(\"kbd\")\n        })\n    }\n}\n\nexport default new Brightness()\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/service/colorpicker.ts",
    "content": "import icons from \"lib/icons\"\nimport { bash, dependencies } from \"lib/utils\"\n\nconst COLORS_CACHE = Utils.CACHE_DIR + \"/colorpicker.json\"\nconst MAX_NUM_COLORS = 10\n\nclass ColorPicker extends Service {\n    static {\n        Service.register(this, {}, {\n            \"colors\": [\"jsobject\"],\n        })\n    }\n\n    notifID = 0\n    #colors = JSON.parse(Utils.readFile(COLORS_CACHE) || \"[]\") as string[]\n\n    get colors() { return [...this.#colors] }\n    set colors(colors) {\n        this.#colors = colors\n        this.changed(\"colors\")\n    }\n\n    // TODO: doesn't work?\n    async wlCopy(color: string) {\n        if (dependencies(\"wl-copy\"))\n            bash(`wl-copy ${color}`)\n    }\n\n    async pick() {\n        if (!dependencies(\"hyprpicker\"))\n            return\n\n        const color = await bash(\"hyprpicker -a -r\")\n        if (!color)\n            return\n\n        colorpicker.wlCopy(color)\n        const list = colorpicker.colors\n        if (!list.includes(color)) {\n            list.push(color)\n            if (list.length > MAX_NUM_COLORS)\n                list.shift()\n\n            colorpicker.colors = list\n            Utils.writeFile(JSON.stringify(list, null, 2), COLORS_CACHE)\n        }\n\n        colorpicker.notifID = await Utils.notify({\n            id: colorpicker.notifID,\n            iconName: icons.ui.colorpicker,\n            summary: color,\n        })\n    }\n}\n\nconst colorpicker = new ColorPicker\nexport default colorpicker\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/service/powermenu.ts",
    "content": "import options from \"options\"\n\nconst { sleep, reboot, logout, shutdown } = options.powermenu\n\nexport type Action = \"sleep\" | \"reboot\" | \"logout\" | \"shutdown\"\n\nclass PowerMenu extends Service {\n    static {\n        Service.register(this, {}, {\n            \"title\": [\"string\"],\n            \"cmd\": [\"string\"],\n        })\n    }\n\n    #title = \"\"\n    #cmd = \"\"\n\n    get title() { return this.#title }\n    get cmd() { return this.#cmd }\n\n    action(action: Action) {\n        [this.#cmd, this.#title] = {\n            sleep: [sleep.value, \"Sleep\"],\n            reboot: [reboot.value, \"Reboot\"],\n            logout: [logout.value, \"Log Out\"],\n            shutdown: [shutdown.value, \"Shutdown\"],\n        }[action]\n\n        this.notify(\"cmd\")\n        this.notify(\"title\")\n        this.emit(\"changed\")\n        App.closeWindow(\"powermenu\")\n        App.openWindow(\"verification\")\n    }\n\n    readonly shutdown = () => {\n        this.action(\"shutdown\")\n    }\n}\n\nconst powermenu = new PowerMenu\nglobalThis[\"powermenu\"] = powermenu\nexport default powermenu\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/service/screenrecord.ts",
    "content": "import GLib from \"gi://GLib\"\nimport icons from \"lib/icons\"\nimport { dependencies, sh, bash } from \"lib/utils\"\n\nconst now = () => GLib.DateTime.new_now_local().format(\"%Y-%m-%d_%H-%M-%S\")\n\nclass Recorder extends Service {\n    static {\n        Service.register(this, {}, {\n            \"timer\": [\"int\"],\n            \"recording\": [\"boolean\"],\n        })\n    }\n\n    #recordings = Utils.HOME + \"/Videos/Screencasting\"\n    #screenshots = Utils.HOME + \"/Pictures/Screenshots\"\n    #file = \"\"\n    #interval = 0\n\n    recording = false\n    timer = 0\n\n    async start() {\n        if (!dependencies(\"slurp\", \"wf-recorder\"))\n            return\n\n        if (this.recording)\n            return\n\n        Utils.ensureDirectory(this.#recordings)\n        this.#file = `${this.#recordings}/${now()}.mp4`\n        sh(`wf-recorder -g ${await sh(\"slurp\")} -f ${this.#file} --pixel-format yuv420p`)\n\n        this.recording = true\n        this.changed(\"recording\")\n\n        this.timer = 0\n        this.#interval = Utils.interval(1000, () => {\n            this.changed(\"timer\")\n            this.timer++\n        })\n    }\n\n    async stop() {\n        if (!this.recording)\n            return\n\n        await bash(\"killall -INT wf-recorder\")\n        this.recording = false\n        this.changed(\"recording\")\n        GLib.source_remove(this.#interval)\n\n        Utils.notify({\n            iconName: icons.fallback.video,\n            summary: \"Screenrecord\",\n            body: this.#file,\n            actions: {\n                \"Show in Files\": () => sh(`xdg-open ${this.#recordings}`),\n                \"View\": () => sh(`xdg-open ${this.#file}`),\n            },\n        })\n    }\n\n    async screenshot(full = false) {\n        if (!dependencies(\"slurp\", \"wayshot\"))\n            return\n\n        const file = `${this.#screenshots}/${now()}.png`\n        Utils.ensureDirectory(this.#screenshots)\n\n        const wayshot = `wayshot -f ${file} ${full ? \"\" : `-s \"${await sh(\"slurp\")}\"`}`\n        await sh(wayshot)\n        bash(`wl-copy < ${file}`)\n\n        Utils.notify({\n            image: file,\n            summary: \"Screenshot\",\n            body: this.#file,\n            actions: {\n                \"Show in Files\": () => sh(`xdg-open ${this.#screenshots}`),\n                \"View\": () => sh(`xdg-open ${file}`),\n                \"Edit\": () => {\n                    if (dependencies(\"swappy\"))\n                        sh(`swappy, -f ${file}`)\n                },\n            },\n        })\n    }\n}\n\nconst recorder = new Recorder\nglobalThis[\"recorder\"] = recorder\nexport default recorder\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/style/extra.scss",
    "content": "@import './mixins/button.scss';\n\n* {\n    font-size: $font-size;\n    font-family: $font-name;\n}\n\nseparator {\n    &.horizontal {\n        min-height: $border-width;\n    }\n\n    &.vertical {\n        min-width: $border-width;\n    }\n}\n\nwindow.popup {\n    >* {\n        border: none;\n        box-shadow: none;\n    }\n\n    menu {\n        border-radius: $popover-radius;\n        background-color: $bg;\n        padding: $popover-padding;\n        border: $border-width solid $popover-border-color;\n\n        separator {\n            background-color: $border-color;\n        }\n\n        menuitem {\n            @include button;\n            padding: $spacing * .5;\n            margin: ($spacing * .5) 0;\n\n            &:first-child {\n                margin-top: 0;\n            }\n\n            &:last-child {\n                margin-bottom: 0;\n            }\n        }\n    }\n}\n\ntooltip {\n    * {\n        all: unset;\n    }\n\n    background-color: transparent;\n    border: none;\n\n    >*>* {\n        background-color: $bg;\n        border-radius: $radius;\n        border: $border-width solid $popover-border-color;\n        color: $fg;\n        padding: 8px;\n        margin: 4px;\n        box-shadow: 0 0 3px 0 $shadow-color;\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/style/mixins/a11y-button.scss",
    "content": "@import './button';\n\n@mixin accs-button($flat: false, $reactive: true) {\n    @include unset;\n    color: $fg;\n\n    >* {\n        border-radius: $radius;\n        transition: $transition;\n\n        @if $flat {\n            background-color: transparent;\n            box-shadow: none;\n        }\n\n        @else {\n            background-color: $widget-bg;\n            box-shadow: inset 0 0 0 $border-width $border-color;\n        }\n    }\n\n\n    @if $reactive {\n\n        &:focus>*,\n        &.focused>* {\n            @include button-focus;\n        }\n\n        &:hover>* {\n            @include button-hover;\n        }\n\n        &:active,\n        &.active,\n        &.on,\n        &:checked {\n            >* {\n                @include button-active;\n            }\n\n            &:hover>* {\n                box-shadow: inset 0 0 0 $border-width $border-color,\n                    inset 0 0 0 99px $hover-bg;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/style/mixins/button.scss",
    "content": "@mixin button-focus() {\n    box-shadow: inset 0 0 0 $border-width $primary-bg;\n    background-color: $hover-bg;\n    color: $hover-fg;\n}\n\n@mixin button-hover() {\n    box-shadow: inset 0 0 0 $border-width $border-color;\n    background-color: $hover-bg;\n    color: $hover-fg;\n}\n\n@mixin button-active() {\n    box-shadow: inset 0 0 0 $border-width $border-color;\n    background-image: $active-gradient;\n    background-color: $primary-bg;\n    color: $primary-fg;\n}\n\n@mixin button-disabled() {\n    box-shadow: none;\n    background-color: transparent;\n    color: transparentize($fg, 0.7);\n}\n\n@mixin button($flat: false, $reactive: true, $radius: $radius, $focusable: true) {\n    all: unset;\n    transition: $transition;\n    border-radius: $radius;\n    color: $fg;\n\n    @if $flat {\n        background-color: transparent;\n        background-image: none;\n        box-shadow: none;\n    }\n\n    @else {\n        background-color: $widget-bg;\n        box-shadow: inset 0 0 0 $border-width $border-color;\n    }\n\n    @if $reactive {\n        @if $focusable {\n            &:focus {\n                @include button-focus;\n            }\n        }\n\n        &:hover {\n            @include button-hover;\n        }\n\n        &:active,\n        &.on,\n        &.active,\n        &:checked {\n            @include button-active;\n\n            &:hover {\n                box-shadow: inset 0 0 0 $border-width $border-color,\n                    inset 0 0 0 99px $hover-bg;\n            }\n        }\n    }\n\n    &:disabled {\n        @include button-disabled;\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/style/mixins/floating-widget.scss",
    "content": "@mixin floating-widget {\n    @if $shadows {\n        box-shadow: 0 0 5px 0 $shadow-color;\n    }\n\n    margin: max($spacing, 8px);\n    border: $border-width solid $popover-border-color;\n    background-color: $bg;\n    color: $fg;\n    border-radius: $popover-radius;\n    padding: $popover-padding;\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/style/mixins/hidden.scss",
    "content": "@mixin hidden {\n    background-color: transparent;\n    background-image: none;\n    border-color: transparent;\n    box-shadow: none;\n    -gtk-icon-transform: scale(0);\n\n    * {\n        background-color: transparent;\n        background-image: none;\n        border-color: transparent;\n        box-shadow: none;\n        -gtk-icon-transform: scale(0);\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/style/mixins/media.scss",
    "content": "@mixin media() {\n    @include widget;\n    padding: $padding;\n\n    .cover {\n        @if $shadows {\n            box-shadow: 2px 2px 2px 0 $shadow-color;\n        }\n\n        background-size: cover;\n        background-position: center;\n        border-radius: $radius*0.8;\n        margin-right: $spacing;\n    }\n\n    button {\n        @include button($flat: true);\n        padding: $padding * .5;\n\n        &.play-pause {\n            margin: 0 ($spacing * .5);\n        }\n\n        image {\n            font-size: 1.2em;\n        }\n    }\n\n    .artist {\n        color: transparentize($fg, .2);\n        font-size: .9em;\n    }\n\n    scale {\n        @include slider($width: .5em, $slider: false, $gradient: linear-gradient($fg, $fg));\n        margin-bottom: $padding * .5;\n\n        trough {\n            border: none;\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/style/mixins/scrollable.scss",
    "content": "@mixin scrollable {\n\n    scrollbar,\n    scrollbar * {\n        all: unset;\n    }\n\n    scrollbar.vertical {\n        transition: $transition;\n        background-color: transparentize($bg, 0.7);\n\n        &:hover {\n            background-color: transparentize($bg, 0.3);\n\n            slider {\n                background-color: transparentize($fg, 0.3);\n                min-width: .6em;\n            }\n        }\n    }\n\n\n    scrollbar.vertical slider {\n        background-color: transparentize($fg, 0.5);\n        border-radius: $radius;\n        min-width: .4em;\n        min-height: 2em;\n        transition: $transition;\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/style/mixins/slider.scss",
    "content": "@import './unset';\n\n@mixin slider($width: 0.7em, $slider-width: .5em, $gradient: $active-gradient, $slider: true, $focusable: true, $radius: $radius) {\n    @include unset($rec: true);\n\n    trough {\n        transition: $transition;\n        border-radius: $radius;\n        border: $border;\n        background-color: $widget-bg;\n        min-height: $width;\n        min-width: $width;\n\n        highlight,\n        progress {\n            border-radius: max($radius - $border-width, 0);\n            background-image: $gradient;\n            min-height: $width;\n            min-width: $width;\n        }\n    }\n\n    slider {\n        box-shadow: none;\n        background-color: transparent;\n        border: $border-width solid transparent;\n        transition: $transition;\n        border-radius: $radius;\n        min-height: $width;\n        min-width: $width;\n        margin: -$slider-width;\n    }\n\n    &:hover {\n        trough {\n            background-color: $hover-bg;\n        }\n\n        slider {\n            @if $slider {\n                background-color: $fg;\n                border-color: $border-color;\n\n                @if $shadows {\n                    box-shadow: 0 0 3px 0 $shadow-color;\n                }\n            }\n        }\n    }\n\n    &:disabled {\n\n        highlight,\n        progress {\n            background-color: transparentize($fg, 0.4);\n            background-image: none;\n        }\n    }\n\n    @if $focusable {\n        trough:focus {\n            background-color: $hover-bg;\n            box-shadow: inset 0 0 0 $border-width $primary-bg;\n\n            slider {\n                @if $slider {\n                    background-color: $fg;\n                    box-shadow: inset 0 0 0 $border-width $primary-bg;\n                }\n            }\n        }\n\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/style/mixins/spacing.scss",
    "content": "@mixin spacing($multiplier: 1, $spacing: $spacing, $rec: false) {\n  &.horizontal > * {\n    margin: 0 calc($spacing * $multiplier / 2);\n\n    &:first-child {\n      margin-left: 0;\n    }\n\n    &:last-child {\n      margin-right: 0;\n      margin-left: 0;\n    }\n  }\n\n  &.vertical > * {\n    margin: calc($spacing * $multiplier / 2) 0;\n\n    &:first-child {\n      margin-top: 0;\n    }\n\n    &:last-child {\n      margin-bottom: 0;\n    }\n  }\n\n  @if $rec {\n    box {\n      &.horizontal > * {\n        margin: 0 $spacing * $multiplier / 2;\n\n        &:first-child {\n          margin-left: 0;\n        }\n\n        &:last-child {\n          margin-right: 0;\n        }\n      }\n\n      &.vertical > * {\n        margin: $spacing * $multiplier / 2 0;\n\n        &:first-child {\n          margin-top: 0;\n        }\n\n        &:last-child {\n          margin-bottom: 0;\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/style/mixins/switch.scss",
    "content": "@import './button';\n\n@mixin switch {\n    @include button;\n\n    slider {\n        background-color: $primary-fg;\n        border-radius: $radius;\n        min-width: 24px;\n        min-height: 24px;\n    }\n\n    image {\n        color: transparent;\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/style/mixins/unset.scss",
    "content": "@mixin unset($rec: false) {\n    all: unset;\n\n    @if $rec {\n        * {\n            all: unset\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/style/mixins/widget.scss",
    "content": "@mixin widget {\n    transition: $transition;\n    border-radius: $radius;\n    color: $fg;\n    background-color: $widget-bg;\n    border: $border;\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/style/style.ts",
    "content": "/* eslint-disable max-len */\nimport { type Opt } from \"lib/option\"\nimport options from \"options\"\nimport { bash, dependencies, sh } from \"lib/utils\"\n\nconst deps = [\n    \"font\",\n    \"theme\",\n    \"bar.flatButtons\",\n    \"bar.position\",\n    \"bar.battery.charging\",\n    \"bar.battery.blocks\",\n]\n\nconst {\n    dark,\n    light,\n    blur,\n    scheme,\n    padding,\n    spacing,\n    radius,\n    shadows,\n    widget,\n    border,\n} = options.theme\n\nconst popoverPaddingMultiplier = 1.6\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst t = (dark: Opt<any> | string, light: Opt<any> | string) => scheme.value === \"dark\"\n    ? `${dark}` : `${light}`\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst $ = (name: string, value: string | Opt<any>) => `$${name}: ${value};`\n\nconst variables = () => [\n    $(\"bg\", blur.value ? `transparentize(${t(dark.bg, light.bg)}, ${blur.value / 100})` : t(dark.bg, light.bg)),\n    $(\"fg\", t(dark.fg, light.fg)),\n\n    $(\"primary-bg\", t(dark.primary.bg, light.primary.bg)),\n    $(\"primary-fg\", t(dark.primary.fg, light.primary.fg)),\n\n    $(\"error-bg\", t(dark.error.bg, light.error.bg)),\n    $(\"error-fg\", t(dark.error.fg, light.error.fg)),\n\n    $(\"scheme\", scheme),\n    $(\"padding\", `${padding}pt`),\n    $(\"spacing\", `${spacing}pt`),\n    $(\"radius\", `${radius}px`),\n    $(\"transition\", `${options.transition}ms`),\n\n    $(\"shadows\", `${shadows}`),\n\n    $(\"widget-bg\", `transparentize(${t(dark.widget, light.widget)}, ${widget.opacity.value / 100})`),\n\n    $(\"hover-bg\", `transparentize(${t(dark.widget, light.widget)}, ${(widget.opacity.value * .9) / 100})`),\n    $(\"hover-fg\", `lighten(${t(dark.fg, light.fg)}, 8%)`),\n\n    $(\"border-width\", `${border.width}px`),\n    $(\"border-color\", `transparentize(${t(dark.border, light.border)}, ${border.opacity.value / 100})`),\n    $(\"border\", \"$border-width solid $border-color\"),\n\n    $(\"active-gradient\", `linear-gradient(to right, ${t(dark.primary.bg, light.primary.bg)}, darken(${t(dark.primary.bg, light.primary.bg)}, 4%))`),\n    $(\"shadow-color\", t(\"rgba(0,0,0,.6)\", \"rgba(0,0,0,.4)\")),\n    $(\"text-shadow\", t(\"2pt 2pt 2pt $shadow-color\", \"none\")),\n\n    $(\"popover-border-color\", `transparentize(${t(dark.border, light.border)}, ${Math.max(((border.opacity.value - 1) / 100), 0)})`),\n    $(\"popover-padding\", `$padding * ${popoverPaddingMultiplier}`),\n    $(\"popover-radius\", radius.value === 0 ? \"0\" : \"$radius + $popover-padding\"),\n\n    $(\"font-size\", `${options.font.size}pt`),\n    $(\"font-name\", options.font.name),\n\n    // etc\n    $(\"charging-bg\", options.bar.battery.charging),\n    $(\"bar-battery-blocks\", options.bar.battery.blocks),\n    $(\"bar-position\", options.bar.position),\n    $(\"hyprland-gaps-multiplier\", options.hyprland.gaps),\n]\n\nasync function resetCss() {\n    if (!dependencies(\"sass\", \"fd\"))\n        return\n\n    try {\n        const vars = `${TMP}/variables.scss`\n        await Utils.writeFile(variables().join(\"\\n\"), vars)\n\n        const fd = await sh(`fd \".scss\" ${App.configDir}`)\n        const files = fd.split(/\\s+/).map(f => `@import '${f}';`)\n        const scss = [`@import '${vars}';`, ...files].join(\"\\n\")\n        const css = await bash`echo \"${scss}\" | sass --stdin`\n        const file = `${TMP}/style.css`\n\n        await Utils.writeFile(css, file)\n\n        App.resetCss()\n        App.applyCss(file)\n    } catch (error) {\n        logError(error)\n    }\n}\n\nexport default function init() {\n    Utils.monitorFile(App.configDir, resetCss)\n    options.handler(deps, resetCss)\n    resetCss()\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/tsconfig.json",
    "content": "{\n    \"compilerOptions\": {\n        \"target\": \"ES2022\",\n        \"module\": \"ES2022\",\n        \"lib\": [\n            \"ES2022\"\n        ],\n        \"allowJs\": true,\n        \"checkJs\": true,\n        \"strict\": true,\n        \"noImplicitAny\": false,\n        \"baseUrl\": \".\",\n        \"typeRoots\": [\n            \"./types\",\n            \"./node_modules/@girs\"\n        ],\n        \"skipLibCheck\": true\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/PopupWindow.ts",
    "content": "import { type WindowProps } from \"types/widgets/window\"\nimport { type RevealerProps } from \"types/widgets/revealer\"\nimport { type EventBoxProps } from \"types/widgets/eventbox\"\nimport type Gtk from \"gi://Gtk?version=3.0\"\nimport options from \"options\"\n\ntype Transition = RevealerProps[\"transition\"]\ntype Child = WindowProps[\"child\"]\n\ntype PopupWindowProps = Omit<WindowProps, \"name\"> & {\n    name: string\n    layout?: keyof ReturnType<typeof Layout>\n    transition?: Transition,\n}\n\nexport const Padding = (name: string, {\n    css = \"\",\n    hexpand = true,\n    vexpand = true,\n}: EventBoxProps = {}) => Widget.EventBox({\n    hexpand,\n    vexpand,\n    can_focus: false,\n    child: Widget.Box({ css }),\n    setup: w => w.on(\"button-press-event\", () => App.toggleWindow(name)),\n})\n\nconst PopupRevealer = (\n    name: string,\n    child: Child,\n    transition: Transition = \"slide_down\",\n) => Widget.Box(\n    { css: \"padding: 1px;\" },\n    Widget.Revealer({\n        transition,\n        child: Widget.Box({\n            class_name: \"window-content\",\n            child,\n        }),\n        transitionDuration: options.transition.bind(),\n        setup: self => self.hook(App, (_, wname, visible) => {\n            if (wname === name)\n                self.reveal_child = visible\n        }),\n    }),\n)\n\nconst Layout = (name: string, child: Child, transition?: Transition) => ({\n    \"center\": () => Widget.CenterBox({},\n        Padding(name),\n        Widget.CenterBox(\n            { vertical: true },\n            Padding(name),\n            PopupRevealer(name, child, transition),\n            Padding(name),\n        ),\n        Padding(name),\n    ),\n    \"top\": () => Widget.CenterBox({},\n        Padding(name),\n        Widget.Box<Gtk.Widget>(\n            { vertical: true },\n            PopupRevealer(name, child, transition),\n            Padding(name),\n        ),\n        Padding(name),\n    ),\n    \"top-right\": () => Widget.Box<Gtk.Widget>({},\n        Padding(name),\n        Widget.Box<Gtk.Widget>(\n            {\n                hexpand: false,\n                vertical: true,\n            },\n            PopupRevealer(name, child, transition),\n            Padding(name),\n        ),\n    ),\n    \"top-center\": () => Widget.Box<Gtk.Widget>({},\n        Padding(name),\n        Widget.Box<Gtk.Widget>(\n            {\n                hexpand: false,\n                vertical: true,\n            },\n            PopupRevealer(name, child, transition),\n            Padding(name),\n        ),\n        Padding(name),\n    ),\n    \"top-left\": () => Widget.Box<Gtk.Widget>({},\n        Widget.Box<Gtk.Widget>(\n            {\n                hexpand: false,\n                vertical: true,\n            },\n            PopupRevealer(name, child, transition),\n            Padding(name),\n        ),\n        Padding(name),\n    ),\n    \"bottom-left\": () => Widget.Box<Gtk.Widget>({},\n        Widget.Box<Gtk.Widget>(\n            {\n                hexpand: false,\n                vertical: true,\n            },\n            Padding(name),\n            PopupRevealer(name, child, transition),\n        ),\n        Padding(name),\n    ),\n    \"bottom-center\": () => Widget.Box<Gtk.Widget>({},\n        Padding(name),\n        Widget.Box<Gtk.Widget>(\n            {\n                hexpand: false,\n                vertical: true,\n            },\n            Padding(name),\n            PopupRevealer(name, child, transition),\n        ),\n        Padding(name),\n    ),\n    \"bottom-right\": () => Widget.Box<Gtk.Widget>({},\n        Padding(name),\n        Widget.Box<Gtk.Widget>(\n            {\n                hexpand: false,\n                vertical: true,\n            },\n            Padding(name),\n            PopupRevealer(name, child, transition),\n        ),\n    ),\n})\n\nexport default ({\n    name,\n    child,\n    layout = \"center\",\n    transition,\n    exclusivity = \"ignore\",\n    ...props\n}: PopupWindowProps) => Widget.Window<Gtk.Widget>({\n    name,\n    class_names: [name, \"popup-window\"],\n    setup: w => w.keybind(\"Escape\", () => App.closeWindow(name)),\n    visible: false,\n    keymode: \"on-demand\",\n    exclusivity,\n    layer: \"top\",\n    anchor: [\"top\", \"bottom\", \"right\", \"left\"],\n    child: Layout(name, child, transition)[layout](),\n    ...props,\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/RegularWindow.ts",
    "content": "import Gtk from \"gi://Gtk?version=3.0\"\n\nexport default Widget.subclass<typeof Gtk.Window, Gtk.Window.ConstructorProperties>(Gtk.Window)\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/applauncher/AppItem.ts",
    "content": "import { type Application } from \"types/service/applications\"\nimport options from \"options\"\nimport { launchApp, icon } from \"lib/utils\"\nimport icons from \"lib/icons\"\n\nconst { iconSize } = options.applauncher\n\nexport const QuickButton = (app: Application) => Widget.Button({\n    hexpand: true,\n    tooltip_text: app.name,\n    on_clicked: () => {\n        App.closeWindow(\"applauncher\")\n        launchApp(app)\n    },\n    child: Widget.Icon({\n        size: iconSize.bind(),\n        icon: icon(app.icon_name, icons.fallback.executable),\n    }),\n})\n\nexport const AppItem = (app: Application) => {\n    const title = Widget.Label({\n        class_name: \"title\",\n        label: app.name,\n        hexpand: true,\n        xalign: 0,\n        vpack: \"center\",\n        truncate: \"end\",\n    })\n\n    const description = Widget.Label({\n        class_name: \"description\",\n        label: app.description || \"\",\n        hexpand: true,\n        wrap: true,\n        max_width_chars: 30,\n        xalign: 0,\n        justification: \"left\",\n        vpack: \"center\",\n    })\n\n    const appicon = Widget.Icon({\n        icon: icon(app.icon_name, icons.fallback.executable),\n        size: iconSize.bind(),\n    })\n\n    const textBox = Widget.Box({\n        vertical: true,\n        vpack: \"center\",\n        children: app.description ? [title, description] : [title],\n    })\n\n    return Widget.Button({\n        class_name: \"app-item\",\n        attribute: { app },\n        child: Widget.Box({\n            children: [appicon, textBox],\n        }),\n        on_clicked: () => {\n            App.closeWindow(\"applauncher\")\n            launchApp(app)\n        },\n    })\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/applauncher/Applauncher.ts",
    "content": "import PopupWindow, { Padding } from \"widget/PopupWindow\"\nimport { AppItem, QuickButton } from \"./AppItem\"\nimport icons from \"lib/icons\"\nimport options from \"options\"\nimport type Gtk from \"gi://Gtk?version=3.0\"\nimport { launchApp } from \"lib/utils\"\n\nconst apps = await Service.import(\"applications\")\nconst { query } = apps\nconst { width, margin, maxItem, favorites } = options.applauncher\n\nconst SeparatedAppItem = (app: Parameters<typeof AppItem>[0]) => Widget.Revealer(\n    { attribute: { app } },\n    Widget.Box<Gtk.Widget>(\n        { vertical: true },\n        Widget.Separator(),\n        AppItem(app),\n    ),\n)\n\nconst Applauncher = () => {\n    const applist = Variable(query(\"\"))\n    let first = applist.value[0]\n\n    const list = Widget.Box({\n        vertical: true,\n        children: applist.bind().as(list => list.map(SeparatedAppItem)),\n    })\n\n    list.hook(apps, () => applist.value = query(\"\"), \"notify::frequents\")\n\n    const entry = Widget.Entry({\n        hexpand: true,\n        primary_icon_name: icons.ui.search,\n        on_accept: () => {\n            entry.text !== \"\" && launchApp(first)\n            App.toggleWindow(\"applauncher\")\n        },\n        on_change: ({ text }) => {\n            first = query(text || \"\")[0]\n            list.children.reduce((i, item) => {\n                if (!text || i >= maxItem.value) {\n                    item.reveal_child = false\n                    return i\n                }\n                if (item.attribute.app.match(text)) {\n                    item.reveal_child = true\n                    return ++i\n                }\n                item.reveal_child = false\n                return i\n            }, 0)\n        },\n    })\n\n    const quicklaunch = Widget.Revealer({\n        setup: self => self.hook(entry, () => self.reveal_child = !entry.text, \"notify::text\"),\n        visible: favorites.bind().as(f => f.length > 0),\n        child: Widget.Box({\n            vertical: true,\n            children: favorites.bind().as(favs => favs.flatMap(fs => [\n                Widget.Separator(),\n                Widget.Box({\n                    class_name: \"quicklaunch horizontal\",\n                    children: fs\n                        .map(f => query(f)?.[0])\n                        .filter(f => f)\n                        .map(QuickButton),\n                }),\n            ])),\n        }),\n    })\n\n    function focus() {\n        entry.text = \"Search\"\n        entry.set_position(-1)\n        entry.select_region(0, -1)\n        entry.grab_focus()\n        quicklaunch.reveal_child = true\n    }\n\n    const layout = Widget.Box({\n        css: width.bind().as(v => `min-width: ${v}pt;`),\n        class_name: \"applauncher\",\n        vertical: true,\n        vpack: \"start\",\n        setup: self => self.hook(App, (_, win, visible) => {\n            if (win !== \"applauncher\")\n                return\n\n            entry.text = \"\"\n            if (visible)\n                focus()\n        }),\n        children: [\n            entry,\n            quicklaunch,\n            list,\n        ],\n    })\n\n    return Widget.Box<Gtk.Widget>(\n        { vertical: true, css: \"padding: 1px\" },\n        Padding(\"applauncher\", {\n            css: margin.bind().as(v => `min-height: ${v}pt;`),\n            vexpand: false,\n        }),\n        layout,\n    )\n}\n\nexport default () => PopupWindow({\n    name: \"applauncher\",\n    layout: \"top\",\n    child: Applauncher(),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/applauncher/applauncher.scss",
    "content": "@use \"sass:math\";\n@use \"sass:color\";\n\nwindow#applauncher .applauncher {\n    @include floating_widget;\n\n    .quicklaunch {\n        @include spacing;\n\n        button {\n            @include button($flat: true);\n            padding: $padding;\n        }\n    }\n\n    entry {\n        @include button;\n        padding: $padding;\n        margin: $spacing;\n\n        selection {\n            color: color.mix($fg, $bg, 50%);\n            background-color: transparent;\n        }\n\n        label,\n        image {\n            color: $fg;\n        }\n    }\n\n    separator {\n        margin: 4pt 0;\n        background-color: $popover-border-color;\n    }\n\n    button.app-item {\n        @include button($flat: true, $reactive: false);\n\n        >box {\n            @include spacing(0.5);\n        }\n\n        transition: $transition;\n        padding: $padding;\n\n        label {\n            transition: $transition;\n\n            &.title {\n                color: $fg;\n            }\n\n            &.description {\n                color: transparentize($fg, 0.3);\n            }\n        }\n\n        image {\n            transition: $transition;\n        }\n\n        &:hover,\n        &:focus {\n            .title {\n                color: $primary-bg;\n            }\n\n            .description {\n\n                color: transparentize($primary-bg, .4);\n            }\n\n            image {\n                -gtk-icon-shadow: 2px 2px $primary-bg;\n            }\n        }\n\n        &:active {\n            background-color: transparentize($primary-bg, 0.5);\n            border-radius: $radius;\n            box-shadow: inset 0 0 0 $border-width $border-color;\n\n            .title {\n                color: $fg;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/bar/Bar.ts",
    "content": "import BatteryBar from \"./buttons/BatteryBar\"\nimport ColorPicker from \"./buttons/ColorPicker\"\nimport Date from \"./buttons/Date\"\nimport Launcher from \"./buttons/Launcher\"\nimport Media from \"./buttons/Media\"\nimport PowerMenu from \"./buttons/PowerMenu\"\nimport SysTray from \"./buttons/SysTray\"\nimport SystemIndicators from \"./buttons/SystemIndicators\"\nimport Taskbar from \"./buttons/Taskbar\"\nimport Workspaces from \"./buttons/Workspaces\"\nimport ScreenRecord from \"./buttons/ScreenRecord\"\nimport Messages from \"./buttons/Messages\"\nimport options from \"options\"\n\nconst { start, center, end } = options.bar.layout\nconst pos = options.bar.position.bind()\n\nexport type BarWidget = keyof typeof widget\n\nconst widget = {\n    battery: BatteryBar,\n    colorpicker: ColorPicker,\n    date: Date,\n    launcher: Launcher,\n    media: Media,\n    powermenu: PowerMenu,\n    systray: SysTray,\n    system: SystemIndicators,\n    taskbar: Taskbar,\n    workspaces: Workspaces,\n    screenrecord: ScreenRecord,\n    messages: Messages,\n    expander: () => Widget.Box({ expand: true }),\n}\n\nexport default (monitor: number) => Widget.Window({\n    monitor,\n    class_name: \"bar\",\n    name: `bar${monitor}`,\n    exclusivity: \"exclusive\",\n    anchor: pos.as(pos => [pos, \"right\", \"left\"]),\n    child: Widget.CenterBox({\n        css: \"min-width: 2px; min-height: 2px;\",\n        startWidget: Widget.Box({\n            hexpand: true,\n            children: start.bind().as(s => s.map(w => widget[w]())),\n        }),\n        centerWidget: Widget.Box({\n            hpack: \"center\",\n            children: center.bind().as(c => c.map(w => widget[w]())),\n        }),\n        endWidget: Widget.Box({\n            hexpand: true,\n            children: end.bind().as(e => e.map(w => widget[w]())),\n        }),\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/bar/PanelButton.ts",
    "content": "import options from \"options\"\nimport { ButtonProps } from \"types/widgets/button\"\n\ntype PanelButtonProps = ButtonProps & {\n    window?: string,\n    flat?: boolean\n}\n\nexport default ({\n    window = \"\",\n    flat,\n    child,\n    setup,\n    ...rest\n}: PanelButtonProps) => Widget.Button({\n    child: Widget.Box({ child }),\n    setup: self => {\n        let open = false\n\n        self.toggleClassName(\"panel-button\")\n        self.toggleClassName(window)\n\n        self.hook(options.bar.flatButtons, () => {\n            self.toggleClassName(\"flat\", flat ?? options.bar.flatButtons.value)\n        })\n\n        self.hook(App, (_, win, visible) => {\n            if (win !== window)\n                return\n\n            if (open && !visible) {\n                open = false\n                self.toggleClassName(\"active\", false)\n            }\n\n            if (visible) {\n                open = true\n                self.toggleClassName(\"active\")\n            }\n        })\n\n        if (setup)\n            setup(self)\n    },\n    ...rest,\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/bar/ScreenCorners.ts",
    "content": "import options from \"options\"\n\nconst { corners } = options.bar\n\nexport default (monitor: number) => Widget.Window({\n    monitor,\n    name: `corner${monitor}`,\n    class_name: \"screen-corner\",\n    anchor: [\"top\", \"bottom\", \"right\", \"left\"],\n    click_through: true,\n    child: Widget.Box({\n        class_name: \"shadow\",\n        child: Widget.Box({\n            class_name: \"border\",\n            expand: true,\n            child: Widget.Box({\n                class_name: \"corner\",\n                expand: true,\n            }),\n        }),\n    }),\n    setup: self => self.hook(corners, () => {\n        self.toggleClassName(\"corners\", corners.value)\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/bar/bar.scss",
    "content": "@use \"sass:color\";\n\n$bar-spacing: $spacing * 0.3;\n$button-radius: $radius;\n\n@mixin panel-button($flat: true, $reactive: true) {\n  @include accs-button($flat, $reactive);\n\n  > * {\n    border-radius: $button-radius;\n    margin: $bar-spacing;\n  }\n\n  label,\n  image {\n    font-weight: bold;\n  }\n\n  > * {\n    padding: $padding * 0.4 $padding * 0.8;\n  }\n}\n\n.bar {\n  background-color: $bg;\n\n  .panel-button {\n    @include panel-button;\n\n    &:not(.flat) {\n      @include accs-button($flat: false);\n    }\n  }\n\n  .launcher {\n    .colored {\n      color: transparentize($primary-bg, 0.2);\n    }\n\n    &:hover .colored {\n      color: $primary-bg;\n    }\n\n    &:active .colored,\n    &.active .colored {\n      color: $primary-fg;\n    }\n  }\n\n  .workspaces {\n    label {\n      font-size: 0;\n      min-width: 12pt;\n      min-height: 12pt;\n      border-radius: $radius * 0.6;\n      box-shadow: inset 0 0 0 $border-width $border-color;\n      margin: 0 $padding * 0.5;\n      transition: $transition * 0.5;\n      background-color: transparentize($fg, 0.8);\n\n      &.occupied {\n        background-color: transparentize($fg, 0.2);\n        min-width: 12pt;\n        min-height: 12pt;\n      }\n\n      &.active {\n        // background-color: $primary-bg;\n        background-image: $active-gradient;\n        min-width: 25pt;\n        min-height: 12pt;\n      }\n    }\n\n    &.active,\n    &:active {\n      label {\n        background-color: transparentize($primary-fg, 0.3);\n\n        &.occupied {\n          background-color: transparentize($primary-fg, 0.15);\n        }\n\n        &.active {\n          background-color: $primary-fg;\n        }\n      }\n    }\n  }\n\n  .media label {\n    margin: 0 ($spacing * 0.5);\n  }\n\n  .taskbar .indicator.active {\n    background-color: $primary-bg;\n    border-radius: $radius;\n    min-height: 4pt;\n    min-width: 6pt;\n    margin: 2pt;\n  }\n\n  .powermenu.colored,\n  .recorder {\n    image {\n      color: transparentize($error-bg, 0.3);\n    }\n\n    &:hover image {\n      color: transparentize($error-bg, 0.15);\n    }\n\n    &:active image {\n      color: $primary-fg;\n    }\n  }\n\n  .quicksettings > box > box {\n    @include spacing(\n      $spacing: if($bar-spacing==0, $padding / 2, $bar-spacing * 7)\n    );\n  }\n\n  .quicksettings:not(.active):not(:active) {\n    .bluetooth {\n      color: $primary-bg;\n\n      label {\n        font-size: $font-size * 0.7;\n        color: $fg;\n        text-shadow: $text-shadow;\n        clicked {\n          font-size: $font-size * 0.7;\n        }\n      }\n    }\n  }\n\n  .battery-bar {\n    > * {\n      padding: 0;\n    }\n\n    &.bar-hidden > box {\n      padding: 0 $spacing * 0.5;\n\n      image {\n        margin: 0;\n      }\n    }\n\n    levelbar * {\n      all: unset;\n      transition: $transition;\n    }\n\n    .whole {\n      @if $shadows {\n        image {\n          -gtk-icon-shadow: $text-shadow;\n        }\n\n        label {\n          text-shadow: $text-shadow;\n        }\n      }\n    }\n\n    .regular image {\n      margin-left: $spacing * 0.5;\n    }\n\n    trough {\n      @include widget;\n      min-height: 12pt;\n      min-width: 12pt;\n    }\n\n    .regular trough {\n      margin-right: $spacing * 0.5;\n    }\n\n    block {\n      margin: 0;\n\n      &:last-child {\n        border-radius: 0 $button-radius $button-radius 0;\n      }\n\n      &:first-child {\n        border-radius: $button-radius 0 0 $button-radius;\n      }\n    }\n\n    .vertical {\n      block {\n        &:last-child {\n          border-radius: 0 0 $button-radius $button-radius;\n        }\n\n        &:first-child {\n          border-radius: $button-radius $button-radius 0 0;\n        }\n      }\n    }\n\n    @for $i from 1 through $bar-battery-blocks {\n      block:nth-child(#{$i}).filled {\n        background-color: color.mix($bg, $primary-bg, $i * 3);\n      }\n\n      &.low block:nth-child(#{$i}).filled {\n        background-color: color.mix($bg, $error-bg, $i * 3);\n      }\n\n      &.charging block:nth-child(#{$i}).filled {\n        background-color: color.mix($bg, $charging-bg, $i * 3);\n      }\n\n      &:active .regular block:nth-child(#{$i}).filled {\n        background-color: color.mix($bg, $primary-fg, $i * 3);\n      }\n    }\n\n    &.low image {\n      color: $error-bg;\n    }\n\n    &.charging image {\n      color: $charging-bg;\n    }\n\n    &:active image {\n      color: $primary-fg;\n    }\n  }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/bar/buttons/BatteryBar.ts",
    "content": "import icons from \"lib/icons\"\nimport options from \"options\"\nimport PanelButton from \"../PanelButton\"\n\nconst battery = await Service.import(\"battery\")\nconst { bar, percentage, blocks, width, low } = options.bar.battery\n\nconst Indicator = () => Widget.Icon({\n    setup: self => self.hook(battery, () => {\n        self.icon = battery.charging || battery.charged\n            ? icons.battery.charging\n            : battery.icon_name\n    }),\n})\n\nconst PercentLabel = () => Widget.Revealer({\n    transition: \"slide_right\",\n    click_through: true,\n    reveal_child: percentage.bind(),\n    child: Widget.Label({\n        label: battery.bind(\"percent\").as(p => `${p}%`),\n    }),\n})\n\nconst LevelBar = () => {\n    const level = Widget.LevelBar({\n        mode: 1,\n        max_value: blocks.bind(),\n        visible: bar.bind().as(b => b !== \"hidden\"),\n        value: battery.bind(\"percent\").as(p => (p / 100) * blocks.value),\n    })\n    const update = () => {\n        level.value = (battery.percent / 100) * blocks.value\n        level.css = `block { min-width: ${width.value / blocks.value}pt; }`\n    }\n    return level\n        .hook(width, update)\n        .hook(blocks, update)\n        .hook(bar, () => {\n            level.vpack = bar.value === \"whole\" ? \"fill\" : \"center\"\n            level.hpack = bar.value === \"whole\" ? \"fill\" : \"center\"\n        })\n}\n\nconst WholeButton = () => Widget.Overlay({\n    vexpand: true,\n    child: LevelBar(),\n    class_name: \"whole\",\n    pass_through: true,\n    overlay: Widget.Box({\n        hpack: \"center\",\n        children: [\n            Widget.Icon({\n                icon: icons.battery.charging,\n                visible: Utils.merge([\n                    battery.bind(\"charging\"),\n                    battery.bind(\"charged\"),\n                ], (ing, ed) => ing || ed),\n            }),\n            Widget.Box({\n                hpack: \"center\",\n                vpack: \"center\",\n                child: PercentLabel(),\n            }),\n        ],\n    }),\n})\n\nconst Regular = () => Widget.Box({\n    class_name: \"regular\",\n    children: [\n        Indicator(),\n        PercentLabel(),\n        LevelBar(),\n    ],\n})\n\nexport default () => PanelButton({\n    class_name: \"battery-bar\",\n    hexpand: false,\n    on_clicked: () => { percentage.value = !percentage.value },\n    visible: battery.bind(\"available\"),\n    child: Widget.Box({\n        expand: true,\n        visible: battery.bind(\"available\"),\n        child: bar.bind().as(b => b === \"whole\" ? WholeButton() : Regular()),\n    }),\n    setup: self => self\n        .hook(bar, w => w.toggleClassName(\"bar-hidden\", bar.value === \"hidden\"))\n        .hook(battery, w => {\n            w.toggleClassName(\"charging\", battery.charging || battery.charged)\n            w.toggleClassName(\"low\", battery.percent < low.value)\n        }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/bar/buttons/ColorPicker.ts",
    "content": "import PanelButton from \"../PanelButton\"\nimport colorpicker from \"service/colorpicker\"\nimport Gdk from \"gi://Gdk\"\n\nconst css = (color: string) => `\n* {\n    background-color: ${color};\n    color: transparent;\n}\n*:hover {\n    color: white;\n    text-shadow: 2px 2px 3px rgba(0,0,0,.8);\n}`\n\nexport default () => {\n    const menu = Widget.Menu({\n        class_name: \"colorpicker\",\n        children: colorpicker.bind(\"colors\").as(c => c.map(color => Widget.MenuItem({\n            child: Widget.Label(color),\n            css: css(color),\n            on_activate: () => colorpicker.wlCopy(color),\n        }))),\n    })\n\n    return PanelButton({\n        class_name: \"color-picker\",\n        child: Widget.Icon(\"color-select-symbolic\"),\n        tooltip_text: colorpicker.bind(\"colors\").as(v => `${v.length} colors`),\n        on_clicked: colorpicker.pick,\n        on_secondary_click: self => {\n            if (colorpicker.colors.length === 0)\n                return\n\n            menu.popup_at_widget(self, Gdk.Gravity.SOUTH, Gdk.Gravity.NORTH, null)\n        },\n    })\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/bar/buttons/Date.ts",
    "content": "import { clock } from \"lib/variables\"\nimport PanelButton from \"../PanelButton\"\nimport options from \"options\"\n\nconst { format, action } = options.bar.date\nconst time = Utils.derive([clock, format], (c, f) => c.format(f) || \"\")\n\nexport default () => PanelButton({\n    window: \"datemenu\",\n    on_clicked: action.bind(),\n    child: Widget.Label({ label: time.bind() }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/bar/buttons/Launcher.ts",
    "content": "import PanelButton from \"../PanelButton\"\nimport options from \"options\"\n\nconst { icon, label, action } = options.bar.launcher\n\nexport default () => PanelButton({\n    window: \"launcher\",\n    on_clicked: action.bind(),\n    child: Widget.Box([\n        Widget.Icon({\n            class_name: icon.colored.bind().as(c => c ? \"colored\" : \"\"),\n            visible: icon.icon.bind().as(v => !!v),\n            icon: icon.icon.bind(),\n        }),\n        Widget.Label({\n            class_name: label.colored.bind().as(c => c ? \"colored\" : \"\"),\n            visible: label.label.bind().as(v => !!v),\n            label: label.label.bind(),\n        }),\n    ]),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/bar/buttons/Media.ts",
    "content": "import { type MprisPlayer } from \"types/service/mpris\"\nimport PanelButton from \"../PanelButton\"\nimport options from \"options\"\nimport icons from \"lib/icons\"\nimport { icon } from \"lib/utils\"\n\nconst mpris = await Service.import(\"mpris\")\nconst { length, direction, preferred, monochrome } = options.bar.media\n\nconst getPlayer = (name = preferred.value) =>\n    mpris.getPlayer(name) || mpris.players[0] || null\n\nconst Content = (player: MprisPlayer) => {\n    const revealer = Widget.Revealer({\n        click_through: true,\n        visible: length.bind().as(l => l > 0),\n        transition: direction.bind().as(d => `slide_${d}` as const),\n        setup: self => {\n            let current = \"\"\n            self.hook(player, () => {\n                if (current === player.track_title)\n                    return\n\n                current = player.track_title\n                self.reveal_child = true\n                Utils.timeout(3000, () => {\n                    !self.is_destroyed && (self.reveal_child = false)\n                })\n            })\n        },\n        child: Widget.Label({\n            truncate: \"end\",\n            max_width_chars: length.bind(),\n            label: player.bind(\"track_title\").as(() =>\n                `${player.track_artists.join(\", \")} - ${player.track_title}`),\n        }),\n    })\n\n    const playericon = Widget.Icon({\n        icon: Utils.merge([player.bind(\"entry\"), monochrome.bind()], (entry => {\n            const name = `${entry}${monochrome.value ? \"-symbolic\" : \"\"}`\n            return icon(name, icons.fallback.audio)\n        })),\n    })\n\n    return Widget.Box({\n        attribute: { revealer },\n        children: direction.bind().as(d => d === \"right\"\n            ? [playericon, revealer] : [revealer, playericon]),\n    })\n}\n\nexport default () => {\n    let player = getPlayer()\n\n    const btn = PanelButton({\n        class_name: \"media\",\n        child: Widget.Icon(icons.fallback.audio),\n    })\n\n    const update = () => {\n        player = getPlayer()\n        btn.visible = !!player\n\n        if (!player)\n            return\n\n        const content = Content(player)\n        const { revealer } = content.attribute\n        btn.child = content\n        btn.on_primary_click = () => { player.playPause() }\n        btn.on_secondary_click = () => { player.playPause() }\n        btn.on_scroll_up = () => { player.next() }\n        btn.on_scroll_down = () => { player.previous() }\n        btn.on_hover = () => { revealer.reveal_child = true }\n        btn.on_hover_lost = () => { revealer.reveal_child = false }\n    }\n\n    return btn\n        .hook(preferred, update)\n        .hook(mpris, update, \"notify::players\")\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/bar/buttons/Messages.ts",
    "content": "import icons from \"lib/icons\"\nimport PanelButton from \"../PanelButton\"\nimport options from \"options\"\n\nconst n = await Service.import(\"notifications\")\nconst notifs = n.bind(\"notifications\")\nconst action = options.bar.messages.action.bind()\n\nexport default () => PanelButton({\n    class_name: \"messages\",\n    on_clicked: action,\n    visible: notifs.as(n => n.length > 0),\n    child: Widget.Box([\n        Widget.Icon(icons.notifications.message),\n    ]),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/bar/buttons/PowerMenu.ts",
    "content": "import icons from \"lib/icons\"\nimport PanelButton from \"../PanelButton\"\nimport options from \"options\"\n\nconst { monochrome, action } = options.bar.powermenu\n\nexport default () => PanelButton({\n    window: \"powermenu\",\n    on_clicked: action.bind(),\n    child: Widget.Icon(icons.powermenu.shutdown),\n    setup: self => self.hook(monochrome, () => {\n        self.toggleClassName(\"colored\", !monochrome.value)\n        self.toggleClassName(\"box\")\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/bar/buttons/ScreenRecord.ts",
    "content": "import PanelButton from \"../PanelButton\"\nimport screenrecord from \"service/screenrecord\"\nimport icons from \"lib/icons\"\n\nexport default () => PanelButton({\n    class_name: \"recorder\",\n    on_clicked: () => screenrecord.stop(),\n    visible: screenrecord.bind(\"recording\"),\n    child: Widget.Box({\n        children: [\n            Widget.Icon(icons.recorder.recording),\n            Widget.Label({\n                label: screenrecord.bind(\"timer\").as(time => {\n                    const sec = time % 60\n                    const min = Math.floor(time / 60)\n                    return `${min}:${sec < 10 ? \"0\" + sec : sec}`\n                }),\n            }),\n        ],\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/bar/buttons/SysTray.ts",
    "content": "import { type TrayItem } from \"types/service/systemtray\"\nimport PanelButton from \"../PanelButton\"\nimport Gdk from \"gi://Gdk\"\nimport options from \"options\"\n\nconst systemtray = await Service.import(\"systemtray\")\nconst { ignore } = options.bar.systray\n\nconst SysTrayItem = (item: TrayItem) => PanelButton({\n    class_name: \"tray-item\",\n    child: Widget.Icon({ icon: item.bind(\"icon\") }),\n    tooltip_markup: item.bind(\"tooltip_markup\"),\n    setup: self => {\n        const menu = item.menu\n        if (!menu)\n            return\n\n        const id = item.menu?.connect(\"popped-up\", () => {\n            self.toggleClassName(\"active\")\n            menu.connect(\"notify::visible\", () => {\n                self.toggleClassName(\"active\", menu.visible)\n            })\n            menu.disconnect(id!)\n        })\n\n        if (id)\n            self.connect(\"destroy\", () => item.menu?.disconnect(id))\n    },\n\n    on_primary_click: btn => item.menu?.popup_at_widget(\n        btn, Gdk.Gravity.SOUTH, Gdk.Gravity.NORTH, null),\n\n    on_secondary_click: btn => item.menu?.popup_at_widget(\n        btn, Gdk.Gravity.SOUTH, Gdk.Gravity.NORTH, null),\n})\n\nexport default () => Widget.Box()\n    .bind(\"children\", systemtray, \"items\", i => i\n        .filter(({ id }) => !ignore.value.includes(id))\n        .map(SysTrayItem))\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/bar/buttons/SystemIndicators.ts",
    "content": "import PanelButton from \"../PanelButton\"\nimport icons from \"lib/icons\"\nimport asusctl from \"service/asusctl\"\n\nconst notifications = await Service.import(\"notifications\")\nconst bluetooth = await Service.import(\"bluetooth\")\nconst audio = await Service.import(\"audio\")\nconst network = await Service.import(\"network\")\n\nconst ProfileIndicator = () => Widget.Icon()\n    .bind(\"visible\", asusctl, \"profile\", p => p !== \"Balanced\")\n    .bind(\"icon\", asusctl, \"profile\", p => icons.asusctl.profile[p])\n\nconst ModeIndicator = () => Widget.Icon()\n    .bind(\"visible\", asusctl, \"mode\", m => m !== \"Hybrid\")\n    .bind(\"icon\", asusctl, \"mode\", m => icons.asusctl.mode[m])\n\nconst MicrophoneIndicator = () => Widget.Icon()\n    .hook(audio, self => self.visible =\n        audio.recorders.length > 0\n        || audio.microphone.stream?.is_muted\n        || audio.microphone.is_muted)\n    .hook(audio.microphone, self => {\n        const vol = audio.microphone.stream!.is_muted ? 0 : audio.microphone.volume\n        const { muted, low, medium, high } = icons.audio.mic\n        const cons = [[67, high], [34, medium], [1, low], [0, muted]] as const\n        self.icon = cons.find(([n]) => n <= vol * 100)?.[1] || \"\"\n    })\n\nconst DNDIndicator = () => Widget.Icon({\n    visible: notifications.bind(\"dnd\"),\n    icon: icons.notifications.silent,\n})\n\nconst BluetoothIndicator = () => Widget.Overlay({\n    class_name: \"bluetooth\",\n    passThrough: true,\n    child: Widget.Icon({\n        icon: icons.bluetooth.enabled,\n        visible: bluetooth.bind(\"enabled\"),\n    }),\n    overlay: Widget.Label({\n        hpack: \"end\",\n        vpack: \"start\",\n        label: bluetooth.bind(\"connected_devices\").as(c => `${c.length}`),\n        visible: bluetooth.bind(\"connected_devices\").as(c => c.length > 0),\n    }),\n})\n\nconst NetworkIndicator = () => Widget.Icon().hook(network, self => {\n    const icon = network[network.primary || \"wifi\"]?.icon_name\n    self.icon = icon || \"\"\n    self.visible = !!icon\n})\n\nconst AudioIndicator = () => Widget.Icon({\n    icon: audio.speaker.bind(\"volume\").as(vol => {\n        const { muted, low, medium, high, overamplified } = icons.audio.volume\n        const cons = [[101, overamplified], [67, high], [34, medium], [1, low], [0, muted]] as const\n        const icon = cons.find(([n]) => n <= vol * 100)?.[1] || \"\"\n        return audio.speaker.is_muted ? muted : icon\n    }),\n})\n\nexport default () => PanelButton({\n    window: \"quicksettings\",\n    on_clicked: () => App.toggleWindow(\"quicksettings\"),\n    on_scroll_up: () => audio.speaker.volume += 0.02,\n    on_scroll_down: () => audio.speaker.volume -= 0.02,\n    child: Widget.Box([\n        // @ts-expect-error\n        asusctl?.available && ProfileIndicator(),\n        // @ts-expect-error\n        asusctl?.available && ModeIndicator(),\n        DNDIndicator(),\n        BluetoothIndicator(),\n        NetworkIndicator(),\n        AudioIndicator(),\n        MicrophoneIndicator(),\n    ]),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/bar/buttons/Taskbar.ts",
    "content": "import { launchApp, icon } from \"lib/utils\"\nimport icons from \"lib/icons\"\nimport options from \"options\"\nimport PanelButton from \"../PanelButton\"\n\nconst hyprland = await Service.import(\"hyprland\")\nconst apps = await Service.import(\"applications\")\nconst { monochrome, exclusive } = options.bar.taskbar\nconst { position } = options.bar\n\nconst focus = (address: string) => hyprland.messageAsync(\n    `dispatch focuswindow address:${address}`)\n\nconst DummyItem = (address: string) => Widget.Box({\n    attribute: { address },\n    visible: false,\n})\n\nconst AppItem = (address: string) => {\n    const client = hyprland.getClient(address)\n    if (!client || client.class === \"\")\n        return DummyItem(address)\n\n    const app = apps.list.find(app => app.match(client.class))\n\n    const btn = PanelButton({\n        class_name: \"panel-button\",\n        tooltip_text: client.title,\n        on_primary_click: () => focus(address),\n        on_middle_click: () => app && launchApp(app),\n        child: Widget.Icon({\n            icon: monochrome.bind().as(m => icon(\n                (app?.icon_name || client.class) + (m ? \"-symbolic\" : \"\"),\n                icons.fallback.executable,\n            )),\n        }),\n    })\n\n    return Widget.Box(\n        {\n            attribute: { address },\n            visible: Utils.watch(true, [exclusive, hyprland], () => {\n                return exclusive.value\n                    ? hyprland.active.workspace.id === client.workspace.id\n                    : true\n            }),\n        },\n        Widget.Overlay({\n            child: btn,\n            pass_through: true,\n            overlay: Widget.Box({\n                className: \"indicator\",\n                hpack: \"center\",\n                vpack: position.bind().as(p => p === \"top\" ? \"start\" : \"end\"),\n                setup: w => w.hook(hyprland, () => {\n                    w.toggleClassName(\"active\", hyprland.active.client.address === address)\n                }),\n            }),\n        }),\n    )\n}\n\nfunction sortItems<T extends { attribute: { address: string } }>(arr: T[]) {\n    return arr.sort(({ attribute: a }, { attribute: b }) => {\n        const aclient = hyprland.getClient(a.address)!\n        const bclient = hyprland.getClient(b.address)!\n        return aclient.workspace.id - bclient.workspace.id\n    })\n}\n\nexport default () => Widget.Box({\n    class_name: \"taskbar\",\n    children: sortItems(hyprland.clients.map(c => AppItem(c.address))),\n    setup: w => w\n        .hook(hyprland, (w, address?: string) => {\n            if (typeof address === \"string\")\n                w.children = w.children.filter(ch => ch.attribute.address !== address)\n        }, \"client-removed\")\n        .hook(hyprland, (w, address?: string) => {\n            if (typeof address === \"string\")\n                w.children = sortItems([...w.children, AppItem(address)])\n        }, \"client-added\")\n        .hook(hyprland, (w, event?: string) => {\n            if (event === \"movewindow\")\n                w.children = sortItems(w.children)\n        }, \"event\"),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/bar/buttons/Workspaces.ts",
    "content": "import PanelButton from \"../PanelButton\"\nimport options from \"options\"\nimport { sh, range } from \"lib/utils\"\n\nconst hyprland = await Service.import(\"hyprland\")\nconst { workspaces } = options.bar.workspaces\n\nconst dispatch = (arg: string | number) => {\n    sh(`hyprctl dispatch workspace ${arg}`)\n}\n\nconst Workspaces = (ws: number) => Widget.Box({\n    children: range(ws || 20).map(i => Widget.Label({\n        attribute: i,\n        vpack: \"center\",\n        label: `${i}`,\n        setup: self => self.hook(hyprland, () => {\n            self.toggleClassName(\"active\", hyprland.active.workspace.id === i)\n            self.toggleClassName(\"occupied\", (hyprland.getWorkspace(i)?.windows || 0) > 0)\n        }),\n    })),\n    setup: box => {\n        if (ws === 0) {\n            box.hook(hyprland.active.workspace, () => box.children.map(btn => {\n                btn.visible = hyprland.workspaces.some(ws => ws.id === btn.attribute)\n            }))\n        }\n    },\n})\n\nexport default () => PanelButton({\n    window: \"overview\",\n    class_name: \"workspaces\",\n    on_scroll_up: () => dispatch(\"m+1\"),\n    on_scroll_down: () => dispatch(\"m-1\"),\n    on_clicked: () => App.toggleWindow(\"overview\"),\n    child: workspaces.bind().as(Workspaces),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/bar/screencorner.scss",
    "content": "$_shadow-size: $padding;\n$_radius: $radius * $hyprland-gaps-multiplier;\n$_margin: 99px;\n\nwindow.screen-corner {\n    box.shadow {\n        margin-right: $_margin * -1;\n        margin-left: $_margin * -1;\n\n        @if $shadows {\n            box-shadow: inset 0 0 $_shadow-size 0 $shadow-color;\n        }\n\n        @if $bar-position ==\"top\" {\n            margin-bottom: $_margin * -1;\n        }\n\n        @if $bar-position ==\"bottom\" {\n            margin-top: $_margin * -1;\n        }\n    }\n\n    box.border {\n        @if $bar-position ==\"top\" {\n            border-top: $border-width solid $bg;\n        }\n\n        @if $bar-position ==\"bottom\" {\n            border-bottom: $border-width solid $bg;\n        }\n\n        margin-right: $_margin;\n        margin-left: $_margin;\n    }\n\n    box.corner {\n        box-shadow: 0 0 0 $border-width $border-color;\n    }\n\n    &.corners {\n        box.border {\n            border-radius: if($radius>0, $radius * $hyprland-gaps-multiplier, 0);\n            box-shadow: 0 0 0 $_radius $bg;\n        }\n\n        box.corner {\n            border-radius: if($radius>0, $radius * $hyprland-gaps-multiplier, 0);\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/datemenu/DateColumn.ts",
    "content": "import { clock, uptime } from \"lib/variables\"\n\nfunction up(up: number) {\n    const h = Math.floor(up / 60)\n    const m = Math.floor(up % 60)\n    return `uptime: ${h}:${m < 10 ? \"0\" + m : m}`\n}\n\nexport default () => Widget.Box({\n    vertical: true,\n    class_name: \"date-column vertical\",\n    children: [\n        Widget.Box({\n            class_name: \"clock-box\",\n            vertical: true,\n            children: [\n                Widget.Label({\n                    class_name: \"clock\",\n                    label: clock.bind().as(t => t.format(\"%H:%M\")!),\n                }),\n                Widget.Label({\n                    class_name: \"uptime\",\n                    label: uptime.bind().as(up),\n                }),\n            ],\n        }),\n        Widget.Box({\n            class_name: \"calendar\",\n            children: [\n                Widget.Calendar({\n                    hexpand: true,\n                    hpack: \"center\",\n                }),\n            ],\n        }),\n    ],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/datemenu/DateMenu.ts",
    "content": "import PopupWindow from \"widget/PopupWindow\"\nimport NotificationColumn from \"./NotificationColumn\"\nimport DateColumn from \"./DateColumn\"\nimport options from \"options\"\n\nconst { bar, datemenu } = options\nconst pos = bar.position.bind()\nconst layout = Utils.derive([bar.position, datemenu.position], (bar, qs) =>\n    `${bar}-${qs}` as const,\n)\n\nconst Settings = () => Widget.Box({\n    class_name: \"datemenu horizontal\",\n    vexpand: false,\n    children: [\n        NotificationColumn(),\n        Widget.Separator({ orientation: 1 }),\n        DateColumn(),\n    ],\n})\n\nconst DateMenu = () => PopupWindow({\n    name: \"datemenu\",\n    exclusivity: \"exclusive\",\n    transition: pos.as(pos => pos === \"top\" ? \"slide_down\" : \"slide_up\"),\n    layout: layout.value,\n    child: Settings(),\n})\n\nexport function setupDateMenu() {\n    App.addWindow(DateMenu())\n    layout.connect(\"changed\", () => {\n        App.removeWindow(\"datemenu\")\n        App.addWindow(DateMenu())\n    })\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/datemenu/NotificationColumn.ts",
    "content": "import { type Notification as Notif } from \"types/service/notifications\"\nimport Notification from \"widget/notifications/Notification\"\nimport options from \"options\"\nimport icons from \"lib/icons\"\n\nconst notifications = await Service.import(\"notifications\")\nconst notifs = notifications.bind(\"notifications\")\n\nconst Animated = (n: Notif) => Widget.Revealer({\n    transition_duration: options.transition.value,\n    transition: \"slide_down\",\n    child: Notification(n),\n    setup: self => Utils.timeout(options.transition.value, () => {\n        if (!self.is_destroyed)\n            self.reveal_child = true\n    }),\n})\n\nconst ClearButton = () => Widget.Button({\n    on_clicked: notifications.clear,\n    sensitive: notifs.as(n => n.length > 0),\n    child: Widget.Box({\n        children: [\n            Widget.Label(\"Clear \"),\n            Widget.Icon({\n                icon: notifs.as(n => icons.trash[n.length > 0 ? \"full\" : \"empty\"]),\n            }),\n        ],\n    }),\n})\n\nconst Header = () => Widget.Box({\n    class_name: \"header\",\n    children: [\n        Widget.Label({ label: \"Notifications\", hexpand: true, xalign: 0 }),\n        ClearButton(),\n    ],\n})\n\nconst NotificationList = () => {\n    const map: Map<number, ReturnType<typeof Animated>> = new Map\n    const box = Widget.Box({\n        vertical: true,\n        children: notifications.notifications.map(n => {\n            const w = Animated(n)\n            map.set(n.id, w)\n            return w\n        }),\n        visible: notifs.as(n => n.length > 0),\n    })\n\n    function remove(_: unknown, id: number) {\n        const n = map.get(id)\n        if (n) {\n            n.reveal_child = false\n            Utils.timeout(options.transition.value, () => {\n                n.destroy()\n                map.delete(id)\n            })\n        }\n    }\n\n    return box\n        .hook(notifications, remove, \"closed\")\n        .hook(notifications, (_, id: number) => {\n            if (id !== undefined) {\n                if (map.has(id))\n                    remove(null, id)\n\n                const n = notifications.getNotification(id)!\n\n                const w = Animated(n)\n                map.set(id, w)\n                box.children = [w, ...box.children]\n            }\n        }, \"notified\")\n}\n\nconst Placeholder = () => Widget.Box({\n    class_name: \"placeholder\",\n    vertical: true,\n    vpack: \"center\",\n    hpack: \"center\",\n    vexpand: true,\n    hexpand: true,\n    visible: notifs.as(n => n.length === 0),\n    children: [\n        Widget.Icon(icons.notifications.silent),\n        Widget.Label(\"Your inbox is empty\"),\n    ],\n})\n\nexport default () => Widget.Box({\n    class_name: \"notifications\",\n    css: options.notifications.width.bind().as(w => `min-width: ${w}px`),\n    vertical: true,\n    children: [\n        Header(),\n        Widget.Scrollable({\n            vexpand: true,\n            hscroll: \"never\",\n            class_name: \"notification-scrollable\",\n            child: Widget.Box({\n                class_name: \"notification-list vertical\",\n                vertical: true,\n                children: [\n                    NotificationList(),\n                    Placeholder(),\n                ],\n            }),\n        }),\n    ],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/datemenu/datemenu.scss",
    "content": "@import \"../notifications/notifications.scss\";\n\n@mixin calendar {\n    @include widget;\n    padding: $padding*2 $padding*2 0;\n\n    calendar {\n        all: unset;\n\n        &.button {\n            @include button($flat: true);\n        }\n\n        &:selected {\n            box-shadow: inset 0 -8px 0 0 transparentize($primary-bg, 0.5),\n                inset 0 0 0 1px $primary-bg;\n            border-radius: $radius*0.6;\n        }\n\n        &.header {\n            background-color: transparent;\n            border: none;\n            color: transparentize($fg, 0.5);\n        }\n\n        &.highlight {\n            background-color: transparent;\n            color: transparentize($primary-bg, 0.5);\n        }\n\n        &:indeterminate {\n            color: transparentize($fg, 0.9);\n        }\n\n        font-size: 1.1em;\n        padding: .2em;\n    }\n}\n\nwindow#datemenu .datemenu {\n    @include floating-widget;\n\n    .notifications {\n        .header {\n            margin-bottom: $spacing;\n            margin-right: $spacing;\n\n            >label {\n                margin-left: $radius * .5;\n            }\n\n            button {\n                @include button;\n                padding: $padding*.7 $padding;\n            }\n        }\n\n        .notification-scrollable {\n            @include scrollable;\n        }\n\n        .notification-list {\n            margin-right: $spacing;\n        }\n\n        .notification {\n            @include notification;\n            @include widget;\n            padding: $padding;\n            margin-bottom: $spacing;\n        }\n\n        .placeholder {\n            image {\n                font-size: 7em;\n            }\n\n            label {\n                font-size: 1.2em;\n            }\n        }\n    }\n\n\n    separator {\n        background-color: $popover-border-color;\n        border-radius: $radius;\n        margin-right: $spacing;\n    }\n\n    .datemenu {\n        @include spacing;\n    }\n\n    .clock-box {\n        padding: $padding;\n\n        .clock {\n            font-size: 5em;\n        }\n\n        .uptime {\n            color: transparentize($fg, 0.2);\n        }\n    }\n\n    .calendar {\n        @include calendar;\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/desktop/Desktop.ts",
    "content": "import options from \"options\"\nimport { matugen } from \"lib/matugen\"\nconst mpris = await Service.import(\"mpris\")\n\nconst pref = () => options.bar.media.preferred.value\n\nexport default (monitor: number) => Widget.Window({\n    monitor,\n    layer: \"bottom\",\n    name: `desktop${monitor}`,\n    class_name: \"desktop\",\n    anchor: [\"top\", \"bottom\", \"left\", \"right\"],\n    child: Widget.Box({\n        expand: true,\n        css: options.theme.dark.primary.bg.bind().as(c => `\n            transition: 500ms;\n            background-color: ${c}`),\n        child: Widget.Box({\n            class_name: \"wallpaper\",\n            expand: true,\n            vpack: \"center\",\n            hpack: \"center\",\n            setup: self => self\n                .hook(mpris, () => {\n                    const img = mpris.getPlayer(pref())!.cover_path\n                    matugen(\"image\", img)\n                    Utils.timeout(500, () => self.css = `\n                        background-image: url('${img}');\n                        background-size: contain;\n                        background-repeat: no-repeat;\n                        transition: 200ms;\n                        min-width: 700px;\n                        min-height: 700px;\n                        border-radius: 30px;\n                        box-shadow: 25px 25px 30px 0 rgba(0,0,0,0.5);`,\n                    )\n                }),\n        }),\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/notifications/Notification.ts",
    "content": "import { type Notification } from \"types/service/notifications\"\nimport GLib from \"gi://GLib\"\nimport icons from \"lib/icons\"\n\nconst time = (time: number, format = \"%H:%M\") => GLib.DateTime\n    .new_from_unix_local(time)\n    .format(format)\n\nconst NotificationIcon = ({ app_entry, app_icon, image }: Notification) => {\n    if (image) {\n        return Widget.Box({\n            vpack: \"start\",\n            hexpand: false,\n            class_name: \"icon img\",\n            css: `\n                background-image: url(\"${image}\");\n                background-size: cover;\n                background-repeat: no-repeat;\n                background-position: center;\n                min-width: 78px;\n                min-height: 78px;\n            `,\n        })\n    }\n\n    let icon = icons.fallback.notification\n    if (Utils.lookUpIcon(app_icon))\n        icon = app_icon\n\n    if (Utils.lookUpIcon(app_entry || \"\"))\n        icon = app_entry || \"\"\n\n    return Widget.Box({\n        vpack: \"start\",\n        hexpand: false,\n        class_name: \"icon\",\n        css: `\n            min-width: 78px;\n            min-height: 78px;\n        `,\n        child: Widget.Icon({\n            icon,\n            size: 58,\n            hpack: \"center\", hexpand: true,\n            vpack: \"center\", vexpand: true,\n        }),\n    })\n}\n\nexport default (notification: Notification) => {\n    const content = Widget.Box({\n        class_name: \"content\",\n        children: [\n            NotificationIcon(notification),\n            Widget.Box({\n                hexpand: true,\n                vertical: true,\n                children: [\n                    Widget.Box({\n                        children: [\n                            Widget.Label({\n                                class_name: \"title\",\n                                xalign: 0,\n                                justification: \"left\",\n                                hexpand: true,\n                                max_width_chars: 24,\n                                truncate: \"end\",\n                                wrap: true,\n                                label: notification.summary.trim(),\n                                use_markup: true,\n                            }),\n                            Widget.Label({\n                                class_name: \"time\",\n                                vpack: \"start\",\n                                label: time(notification.time),\n                            }),\n                            Widget.Button({\n                                class_name: \"close-button\",\n                                vpack: \"start\",\n                                child: Widget.Icon(\"window-close-symbolic\"),\n                                on_clicked: notification.close,\n                            }),\n                        ],\n                    }),\n                    Widget.Label({\n                        class_name: \"description\",\n                        hexpand: true,\n                        use_markup: true,\n                        xalign: 0,\n                        justification: \"left\",\n                        label: notification.body.trim(),\n                        max_width_chars: 24,\n                        wrap: true,\n                    }),\n                ],\n            }),\n        ],\n    })\n\n    const actionsbox = notification.actions.length > 0 ? Widget.Revealer({\n        transition: \"slide_down\",\n        child: Widget.EventBox({\n            child: Widget.Box({\n                class_name: \"actions horizontal\",\n                children: notification.actions.map(action => Widget.Button({\n                    class_name: \"action-button\",\n                    on_clicked: () => notification.invoke(action.id),\n                    hexpand: true,\n                    child: Widget.Label(action.label),\n                })),\n            }),\n        }),\n    }) : null\n\n    const eventbox = Widget.EventBox({\n        vexpand: false,\n        on_primary_click: notification.dismiss,\n        on_hover() {\n            if (actionsbox)\n                actionsbox.reveal_child = true\n        },\n        on_hover_lost() {\n            if (actionsbox)\n                actionsbox.reveal_child = true\n\n            notification.dismiss()\n        },\n        child: Widget.Box({\n            vertical: true,\n            children: actionsbox ? [content, actionsbox] : [content],\n        }),\n    })\n\n    return Widget.Box({\n        class_name: `notification ${notification.urgency}`,\n        child: eventbox,\n    })\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/notifications/NotificationPopups.ts",
    "content": "import Notification from \"./Notification\"\nimport options from \"options\"\n\nconst notifications = await Service.import(\"notifications\")\nconst { transition } = options\nconst { position } = options.notifications\nconst { timeout, idle } = Utils\n\nfunction Animated(id: number) {\n    const n = notifications.getNotification(id)!\n    const widget = Notification(n)\n\n    const inner = Widget.Revealer({\n        css: \"border: 1px solid magenta;\",\n        transition: \"slide_left\",\n        transition_duration: transition.value,\n        child: widget,\n    })\n\n    const outer = Widget.Revealer({\n        css: \"border: 1px solid yellow;\",\n        transition: \"slide_down\",\n        transition_duration: transition.value,\n        child: inner,\n    })\n\n    const box = Widget.Box({\n        hpack: \"end\",\n        child: outer,\n    })\n\n    idle(() => {\n        outer.reveal_child = true\n        timeout(transition.value, () => {\n            inner.reveal_child = true\n        })\n    })\n\n    return Object.assign(box, {\n        dismiss() {\n            inner.reveal_child = false\n            timeout(transition.value, () => {\n                outer.reveal_child = false\n                timeout(transition.value, () => {\n                    box.destroy()\n                })\n            })\n        },\n    })\n}\n\nfunction PopupList() {\n    const map: Map<number, ReturnType<typeof Animated>> = new Map\n    const box = Widget.Box({\n        hpack: \"end\",\n        vertical: true,\n        css: options.notifications.width.bind().as(w => `min-width: ${w}px;`),\n    })\n\n    function remove(_: unknown, id: number) {\n        map.get(id)?.dismiss()\n        map.delete(id)\n    }\n\n    return box\n        .hook(notifications, (_, id: number) => {\n            if (id !== undefined) {\n                if (map.has(id))\n                    remove(null, id)\n\n                if (notifications.dnd)\n                    return\n\n                const w = Animated(id)\n                map.set(id, w)\n                box.children = [w, ...box.children]\n            }\n        }, \"notified\")\n        .hook(notifications, remove, \"dismissed\")\n        .hook(notifications, remove, \"closed\")\n}\n\nexport default (monitor: number) => Widget.Window({\n    monitor,\n    name: `notifications${monitor}`,\n    anchor: position.bind(),\n    class_name: \"notifications\",\n    child: Widget.Box({\n        css: \"padding: 2px;\",\n        child: PopupList(),\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/notifications/notifications.scss",
    "content": "@mixin notification() {\n    &.critical {\n        box-shadow: inset 0 0 .5em 0 $error-bg;\n    }\n\n    &:hover button.close-button {\n        @include button-hover;\n        background-color: transparentize($error-bg, .5);\n    }\n\n    .content {\n        .title {\n            margin-right: $spacing;\n            color: $fg;\n            font-size: 1.1em;\n        }\n\n        .time {\n            color: transparentize($fg, .2);\n        }\n\n        .description {\n            font-size: .9em;\n            color: transparentize($fg, .2);\n        }\n\n        .icon {\n            border-radius: $radius*0.8;\n            margin-right: $spacing;\n\n            &.img {\n                border: $border;\n            }\n        }\n    }\n\n    box.actions {\n        @include spacing(0.5);\n        margin-top: $spacing;\n\n        button {\n            @include button;\n            border-radius: $radius*0.8;\n            font-size: 1.2em;\n            padding: $padding * 0.7;\n        }\n    }\n\n    button.close-button {\n        @include button($flat: true);\n        margin-left: $spacing / 2;\n        border-radius: $radius*0.8;\n        min-width: 1.2em;\n        min-height: 1.2em;\n\n        &:hover {\n            background-color: transparentize($error-bg, .2);\n        }\n\n        &:active {\n            background-image: none;\n            background-color: $error-bg;\n        }\n    }\n}\n\nwindow.notifications {\n    @include unset;\n\n    .notification {\n        @include notification;\n        @include floating-widget;\n        border-radius: $radius;\n\n        .description {\n            min-width: 350px;\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/osd/OSD.ts",
    "content": "import { icon } from \"lib/utils\"\nimport icons from \"lib/icons\"\nimport Progress from \"./Progress\"\nimport brightness from \"service/brightness\"\nimport type Gtk from \"gi://Gtk?version=3.0\"\nimport options from \"options\"\n\nconst audio = await Service.import(\"audio\")\nconst { progress, microphone } = options.osd\n\nconst DELAY = 2500\n\nfunction OnScreenProgress(vertical: boolean) {\n    const indicator = Widget.Icon({\n        size: 32,\n        vpack: \"start\",\n    })\n    const progress = Progress({\n        vertical,\n        width: vertical ? 42 : 200,\n        height: vertical ? 200 : 42,\n        child: indicator,\n    })\n\n    const revealer = Widget.Revealer({\n        transition: \"slide_left\",\n        child: progress,\n    })\n\n    let count = 0\n    function show(value: number, icon: string) {\n        revealer.reveal_child = true\n        indicator.icon = icon\n        progress.setValue(value)\n        count++\n        Utils.timeout(DELAY, () => {\n            count--\n\n            if (count === 0)\n                revealer.reveal_child = false\n        })\n    }\n\n    return revealer\n        .hook(brightness, () => show(\n            brightness.screen,\n            icons.brightness.screen,\n        ), \"notify::screen\")\n        .hook(brightness, () => show(\n            brightness.kbd,\n            icons.brightness.keyboard,\n        ), \"notify::kbd\")\n        .hook(audio.speaker, () => show(\n            audio.speaker.volume,\n            icon(audio.speaker.icon_name || \"\", icons.audio.type.speaker),\n        ), \"notify::volume\")\n}\n\nfunction MicrophoneMute() {\n    const icon = Widget.Icon({\n        class_name: \"microphone\",\n    })\n\n    const revealer = Widget.Revealer({\n        transition: \"slide_up\",\n        child: icon,\n    })\n\n    let count = 0\n    let mute = audio.microphone.stream?.is_muted ?? false\n\n    return revealer.hook(audio.microphone, () => Utils.idle(() => {\n        if (mute !== audio.microphone.stream?.is_muted) {\n            mute = audio.microphone.stream!.is_muted\n            icon.icon = icons.audio.mic[mute ? \"muted\" : \"high\"]\n            revealer.reveal_child = true\n            count++\n\n            Utils.timeout(DELAY, () => {\n                count--\n                if (count === 0)\n                    revealer.reveal_child = false\n            })\n        }\n    }))\n}\n\nexport default (monitor: number) => Widget.Window({\n    monitor,\n    name: `indicator${monitor}`,\n    class_name: \"indicator\",\n    layer: \"overlay\",\n    click_through: true,\n    anchor: [\"right\", \"left\", \"top\", \"bottom\"],\n    child: Widget.Box({\n        css: \"padding: 2px;\",\n        expand: true,\n        child: Widget.Overlay<Gtk.Widget>(\n            { child: Widget.Box({ expand: true }) },\n            Widget.Box({\n                hpack: progress.pack.h.bind(),\n                vpack: progress.pack.v.bind(),\n                child: progress.vertical.bind().as(OnScreenProgress),\n            }),\n            Widget.Box({\n                hpack: microphone.pack.h.bind(),\n                vpack: microphone.pack.v.bind(),\n                child: MicrophoneMute(),\n            }),\n        ),\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/osd/Progress.ts",
    "content": "import type Gtk from \"gi://Gtk?version=3.0\"\nimport GLib from \"gi://GLib?version=2.0\"\nimport { range } from \"lib/utils\"\nimport options from \"options\"\n\ntype ProgressProps = {\n    height?: number\n    width?: number\n    vertical?: boolean\n    child: Gtk.Widget\n}\n\nexport default ({\n    height = 18,\n    width = 180,\n    vertical = false,\n    child,\n}: ProgressProps) => {\n    const fill = Widget.Box({\n        class_name: \"fill\",\n        hexpand: vertical,\n        vexpand: !vertical,\n        hpack: vertical ? \"fill\" : \"start\",\n        vpack: vertical ? \"end\" : \"fill\",\n        child,\n    })\n\n    const container = Widget.Box({\n        class_name: \"progress\",\n        child: fill,\n        css: `\n            min-width: ${width}px;\n            min-height: ${height}px;\n        `,\n    })\n\n    let fill_size = 0\n    let animations: number[] = []\n\n    return Object.assign(container, {\n        setValue(value: number) {\n            if (value < 0)\n                return\n\n            if (animations.length > 0) {\n                for (const id of animations)\n                    GLib.source_remove(id)\n\n                animations = []\n            }\n\n            const axis = vertical ? \"height\" : \"width\"\n            const axisv = vertical ? height : width\n            const min = vertical ? width : height\n            const preferred = (axisv - min) * value + min\n\n            if (!fill_size) {\n                fill_size = preferred\n                fill.css = `min-${axis}: ${preferred}px;`\n                return\n            }\n\n            const frames = options.transition.value / 10\n            const goal = preferred - fill_size\n            const step = goal / frames\n\n            animations = range(frames, 0).map(i => Utils.timeout(5 * i, () => {\n                fill_size += step\n                fill.css = `min-${axis}: ${fill_size}px`\n                animations.shift()\n            }))\n        },\n    })\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/osd/osd.scss",
    "content": "window.indicator {\n  .progress {\n    @include floating-widget;\n    margin: max($spacing * 5, 8px);\n    padding: $padding * 0.5;\n    border-radius: if($radius >0, calc($radius + $padding * 0.5), 0);\n    @debug $radius;\n\n    .fill {\n      border-radius: $radius;\n      background-color: $primary-bg;\n      color: $primary-fg;\n\n      image {\n        -gtk-icon-transform: scale(0.7);\n      }\n    }\n  }\n\n  .microphone {\n    @include floating-widget;\n    margin: $spacing * 2;\n    padding: $popover-padding * 2;\n    font-size: 58px;\n    color: transparentize($fg, 0.1);\n  }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/overview/Overview.ts",
    "content": "import PopupWindow from \"widget/PopupWindow\"\nimport Workspace from \"./Workspace\"\nimport options from \"options\"\nimport { range } from \"lib/utils\"\n\nconst hyprland = await Service.import(\"hyprland\")\n\nconst Overview = (ws: number) => Widget.Box({\n    class_name: \"overview horizontal\",\n    children: ws > 0\n        ? range(ws).map(Workspace)\n        : hyprland.workspaces\n            .map(({ id }) => Workspace(id))\n            .sort((a, b) => a.attribute.id - b.attribute.id),\n\n    setup: w => {\n        if (ws > 0)\n            return\n\n        w.hook(hyprland, (w, id?: number) => {\n            if (id === undefined)\n                return\n\n            w.children = w.children\n                .filter(ch => ch.attribute.id !== Number(id))\n        }, \"workspace-removed\")\n        w.hook(hyprland, (w, id?: number) => {\n            if (id === undefined)\n                return\n\n            w.children = [...w.children, Workspace(Number(id))]\n                .sort((a, b) => a.attribute.id - b.attribute.id)\n        }, \"workspace-added\")\n    },\n})\n\nexport default () => PopupWindow({\n    name: \"overview\",\n    layout: \"center\",\n    child: options.overview.workspaces.bind().as(Overview),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/overview/Window.ts",
    "content": "import { type Client } from \"types/service/hyprland\"\nimport { createSurfaceFromWidget, icon } from \"lib/utils\"\nimport Gdk from \"gi://Gdk\"\nimport Gtk from \"gi://Gtk?version=3.0\"\nimport options from \"options\"\nimport icons from \"lib/icons\"\n\nconst monochrome = options.overview.monochromeIcon\nconst TARGET = [Gtk.TargetEntry.new(\"text/plain\", Gtk.TargetFlags.SAME_APP, 0)]\nconst scale = (size: number) => (options.overview.scale.value / 100) * size\nconst hyprland = await Service.import(\"hyprland\")\nconst apps = await Service.import(\"applications\")\nconst dispatch = (args: string) => hyprland.messageAsync(`dispatch ${args}`)\n\nexport default ({ address, size: [w, h], class: c, title }: Client) => Widget.Button({\n    class_name: \"client\",\n    attribute: { address },\n    tooltip_text: `${title}`,\n    child: Widget.Icon({\n        css: `\n            min-width: ${scale(w)}px;\n            min-height: ${scale(h)}px;\n        `,\n        icon: monochrome.bind().as(m => {\n            const app = apps.list.find(app => app.match(c))\n            if (!app)\n                return icons.fallback.executable\n\n            return icon(\n                app.icon_name + (m ? \"-symbolic\" : \"\"),\n                icons.fallback.executable,\n            )\n        }),\n    }),\n    on_secondary_click: () => dispatch(`closewindow address:${address}`),\n    on_clicked: () => {\n        dispatch(`focuswindow address:${address}`)\n        App.closeWindow(\"overview\")\n    },\n    setup: btn => btn\n        .on(\"drag-data-get\", (_w, _c, data) => data.set_text(address, address.length))\n        .on(\"drag-begin\", (_, context) => {\n            Gtk.drag_set_icon_surface(context, createSurfaceFromWidget(btn))\n            btn.toggleClassName(\"hidden\", true)\n        })\n        .on(\"drag-end\", () => btn.toggleClassName(\"hidden\", false))\n        .drag_source_set(Gdk.ModifierType.BUTTON1_MASK, TARGET, Gdk.DragAction.COPY),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/overview/Workspace.ts",
    "content": "import Window from \"./Window\"\nimport Gdk from \"gi://Gdk\"\nimport Gtk from \"gi://Gtk?version=3.0\"\nimport options from \"options\"\n\nconst TARGET = [Gtk.TargetEntry.new(\"text/plain\", Gtk.TargetFlags.SAME_APP, 0)]\nconst scale = (size: number) => (options.overview.scale.value / 100) * size\nconst hyprland = await Service.import(\"hyprland\")\n\nconst dispatch = (args: string) => hyprland.messageAsync(`dispatch ${args}`)\n\nconst size = (id: number) => {\n    const def = { h: 1080, w: 1920 }\n    const ws = hyprland.getWorkspace(id)\n    if (!ws)\n        return def\n\n    const mon = hyprland.getMonitor(ws.monitorID)\n    return mon ? { h: mon.height, w: mon.width } : def\n}\n\nexport default (id: number) => Widget.Box({\n    attribute: { id },\n    tooltipText: `${id}`,\n    class_name: \"workspace\",\n    vpack: \"center\",\n    css: `\n        min-width: ${scale(size(id).w)}px;\n        min-height: ${scale(size(id).h)}px;\n    `,\n    setup: box => box.hook(hyprland, () => {\n        box.toggleClassName(\"active\", hyprland.active.workspace.id === id)\n    }),\n    child: Widget.EventBox({\n        expand: true,\n        on_primary_click: () => {\n            App.closeWindow(\"overview\")\n            dispatch(`workspace ${id}`)\n        },\n        setup: eventbox => {\n            eventbox.drag_dest_set(Gtk.DestDefaults.ALL, TARGET, Gdk.DragAction.COPY)\n            eventbox.connect(\"drag-data-received\", (_w, _c, _x, _y, data) => {\n                const address = new TextDecoder().decode(data.get_data())\n                dispatch(`movetoworkspacesilent ${id},address:${address}`)\n            })\n        },\n        child: Widget.Fixed().hook(hyprland, fixed => {\n            fixed.get_children().forEach(ch => ch.destroy())\n            hyprland.clients\n                .filter(({ workspace }) => workspace.id === id)\n                .forEach(c => {\n                    const x = c.at[0] - (hyprland.getMonitor(c.monitor)?.x || 0)\n                    const y = c.at[1] - (hyprland.getMonitor(c.monitor)?.y || 0)\n                    c.mapped && fixed.put(Window(c), scale(x), scale(y))\n                })\n            fixed.show_all()\n        }, \"notify::clients\"),\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/overview/overview.scss",
    "content": "window#overview .overview {\n    @include floating-widget;\n    @include spacing;\n\n    .workspace {\n        &.active>widget {\n            border-color: $primary-bg\n        }\n\n        >widget {\n            @include widget;\n            border-radius: if($radius ==0, 0, $radius + $padding);\n\n            &:hover {\n                background-color: $hover-bg;\n            }\n\n            &:drop(active) {\n                border-color: $primary-bg;\n            }\n        }\n    }\n\n    .client {\n        @include button;\n        border-radius: $radius;\n        margin: $padding;\n\n        &.hidden {\n            @include hidden;\n            transition: 0;\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/powermenu/PowerMenu.ts",
    "content": "import PopupWindow from \"widget/PopupWindow\"\nimport powermenu, { type Action } from \"service/powermenu\"\nimport icons from \"lib/icons\"\nimport options from \"options\"\nimport type Gtk from \"gi://Gtk?version=3.0\"\n\nconst { layout, labels } = options.powermenu\n\nconst SysButton = (action: Action, label: string) => Widget.Button({\n    on_clicked: () => powermenu.action(action),\n    child: Widget.Box({\n        vertical: true,\n        class_name: \"system-button\",\n        children: [\n            Widget.Icon(icons.powermenu[action]),\n            Widget.Label({\n                label,\n                visible: labels.bind(),\n            }),\n        ],\n    }),\n})\n\nexport default () => PopupWindow({\n    name: \"powermenu\",\n    transition: \"crossfade\",\n    child: Widget.Box<Gtk.Widget>({\n        class_name: \"powermenu horizontal\",\n        setup: self => self.hook(layout, () => {\n            self.toggleClassName(\"box\", layout.value === \"box\")\n            self.toggleClassName(\"line\", layout.value === \"line\")\n        }),\n        children: layout.bind().as(layout => {\n            switch (layout) {\n                case \"line\": return [\n                    SysButton(\"shutdown\", \"Shutdown\"),\n                    SysButton(\"logout\", \"Log Out\"),\n                    SysButton(\"reboot\", \"Reboot\"),\n                    SysButton(\"sleep\", \"Sleep\"),\n                ]\n                case \"box\": return [\n                    Widget.Box(\n                        { vertical: true },\n                        SysButton(\"shutdown\", \"Shutdown\"),\n                        SysButton(\"logout\", \"Log Out\"),\n                    ),\n                    Widget.Box(\n                        { vertical: true },\n                        SysButton(\"reboot\", \"Reboot\"),\n                        SysButton(\"sleep\", \"Sleep\"),\n                    ),\n                ]\n            }\n        }),\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/powermenu/Verification.ts",
    "content": "import PopupWindow from \"widget/PopupWindow\"\nimport powermenu from \"service/powermenu\"\n\nexport default () => PopupWindow({\n    name: \"verification\",\n    transition: \"crossfade\",\n    child: Widget.Box({\n        class_name: \"verification\",\n        vertical: true,\n        children: [\n            Widget.Box({\n                class_name: \"text-box\",\n                vertical: true,\n                children: [\n                    Widget.Label({\n                        class_name: \"title\",\n                        label: powermenu.bind(\"title\"),\n                    }),\n                    Widget.Label({\n                        class_name: \"desc\",\n                        label: \"Are you sure?\",\n                    }),\n                ],\n            }),\n            Widget.Box({\n                class_name: \"buttons horizontal\",\n                vexpand: true,\n                vpack: \"end\",\n                homogeneous: true,\n                children: [\n                    Widget.Button({\n                        child: Widget.Label(\"No\"),\n                        on_clicked: () => App.toggleWindow(\"verification\"),\n                        setup: self => self.hook(App, (_, name: string, visible: boolean) => {\n                            if (name === \"verification\" && visible)\n                                self.grab_focus()\n                        }),\n                    }),\n                    Widget.Button({\n                        child: Widget.Label(\"Yes\"),\n                        on_clicked: () => Utils.exec(powermenu.cmd),\n                    }),\n                ],\n            }),\n        ],\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/powermenu/powermenu.scss",
    "content": "window#powermenu,\nwindow#verification {\n    // the fraction has to be more than hyprland ignorealpha\n    background-color: rgba(0, 0, 0, .4);\n}\n\nwindow#verification .verification {\n    @include floating-widget;\n    padding: $popover-padding * 1.5;\n    min-width: 300px;\n    min-height: 100px;\n\n    .text-box {\n        margin-bottom: $spacing;\n\n        .title {\n            font-size: 1.6em;\n        }\n\n        .desc {\n            color: transparentize($fg, 0.1);\n            font-size: 1.1em;\n        }\n    }\n\n    .buttons {\n        @include spacing;\n        margin-top: $padding;\n\n        button {\n            @include button;\n            font-size: 1.5em;\n            padding: $padding;\n        }\n    }\n}\n\nwindow#powermenu .powermenu {\n    @include floating-widget;\n\n    &.line {\n        padding: $popover-padding * 1.5;\n\n        button {\n            padding: $popover-padding;\n        }\n\n        label {\n            margin-bottom: $spacing * -.5;\n        }\n    }\n\n    &.box {\n        padding: $popover-padding * 2;\n\n        button {\n            padding: $popover-padding * 1.5;\n        }\n\n        label {\n            margin-bottom: $spacing * -1;\n        }\n    }\n\n    button {\n        @include unset;\n\n        image {\n            @include button;\n            border-radius: $radius + ($popover-padding * 1.4);\n            min-width: 1.7em;\n            min-height: 1.7em;\n            font-size: 4em;\n        }\n\n        label,\n        image {\n            color: transparentize($fg, 0.1);\n        }\n\n        label {\n            margin-top: $spacing * .3;\n        }\n\n        &:hover {\n            image {\n                @include button-hover;\n            }\n\n            label {\n                color: $fg;\n            }\n        }\n\n        &:focus image {\n            @include button-focus;\n        }\n\n        &:active image {\n            @include button-active;\n        }\n\n        &:focus,\n        &:active {\n            label {\n                color: $primary-bg;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/quicksettings/QuickSettings.ts",
    "content": "import type Gtk from \"gi://Gtk?version=3.0\"\nimport { ProfileSelector, ProfileToggle } from \"./widgets/AsusProfile\"\nimport { Header } from \"./widgets/Header\"\nimport { Volume, Microhone, SinkSelector, AppMixer } from \"./widgets/Volume\"\nimport { Brightness } from \"./widgets/Brightness\"\nimport { NetworkToggle, WifiSelection } from \"./widgets/Network\"\nimport { BluetoothToggle, BluetoothDevices } from \"./widgets/Bluetooth\"\nimport { DND } from \"./widgets/DND\"\nimport { DarkModeToggle } from \"./widgets/DarkMode\"\nimport { MicMute } from \"./widgets/MicMute\"\nimport { Media } from \"./widgets/Media\"\nimport PopupWindow from \"widget/PopupWindow\"\nimport options from \"options\"\n\nconst { bar, quicksettings } = options\nconst media = (await Service.import(\"mpris\")).bind(\"players\")\nconst layout = Utils.derive([bar.position, quicksettings.position], (bar, qs) =>\n    `${bar}-${qs}` as const,\n)\n\nconst Row = (\n    toggles: Array<() => Gtk.Widget> = [],\n    menus: Array<() => Gtk.Widget> = [],\n) => Widget.Box({\n    vertical: true,\n    children: [\n        Widget.Box({\n            homogeneous: true,\n            class_name: \"row horizontal\",\n            children: toggles.map(w => w()),\n        }),\n        ...menus.map(w => w()),\n    ],\n})\n\nconst Settings = () => Widget.Box({\n    vertical: true,\n    class_name: \"quicksettings vertical\",\n    css: quicksettings.width.bind().as(w => `min-width: ${w}px;`),\n    children: [\n        Header(),\n        Widget.Box({\n            class_name: \"sliders-box vertical\",\n            vertical: true,\n            children: [\n                Row(\n                    [Volume],\n                    [SinkSelector, AppMixer],\n                ),\n                Microhone(),\n                Brightness(),\n            ],\n        }),\n        Row(\n            [NetworkToggle, BluetoothToggle],\n            [WifiSelection, BluetoothDevices],\n        ),\n        Row(\n            [ProfileToggle, DarkModeToggle],\n            [ProfileSelector],\n        ),\n        Row([MicMute, DND]),\n        Widget.Box({\n            visible: media.as(l => l.length > 0),\n            child: Media(),\n        }),\n    ],\n})\n\nconst QuickSettings = () => PopupWindow({\n    name: \"quicksettings\",\n    exclusivity: \"exclusive\",\n    transition: bar.position.bind().as(pos => pos === \"top\" ? \"slide_down\" : \"slide_up\"),\n    layout: layout.value,\n    child: Settings(),\n})\n\nexport function setupQuickSettings() {\n    App.addWindow(QuickSettings())\n    layout.connect(\"changed\", () => {\n        App.removeWindow(\"quicksettings\")\n        App.addWindow(QuickSettings())\n    })\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/quicksettings/ToggleButton.ts",
    "content": "import { type Props as IconProps } from \"types/widgets/icon\"\nimport { type Props as LabelProps } from \"types/widgets/label\"\nimport type GObject from \"gi://GObject?version=2.0\"\nimport type Gtk from \"gi://Gtk?version=3.0\"\nimport icons from \"lib/icons\"\n\nexport const opened = Variable(\"\")\nApp.connect(\"window-toggled\", (_, name: string, visible: boolean) => {\n    if (name === \"quicksettings\" && !visible)\n        Utils.timeout(500, () => opened.value = \"\")\n})\n\nexport const Arrow = (name: string, activate?: false | (() => void)) => {\n    let deg = 0\n    let iconOpened = false\n    const icon = Widget.Icon(icons.ui.arrow.right).hook(opened, () => {\n        if (opened.value === name && !iconOpened || opened.value !== name && iconOpened) {\n            const step = opened.value === name ? 10 : -10\n            iconOpened = !iconOpened\n            for (let i = 0; i < 9; ++i) {\n                Utils.timeout(15 * i, () => {\n                    deg += step\n                    icon.setCss(`-gtk-icon-transform: rotate(${deg}deg);`)\n                })\n            }\n        }\n    })\n    return Widget.Button({\n        child: icon,\n        class_name: \"arrow\",\n        on_clicked: () => {\n            opened.value = opened.value === name ? \"\" : name\n            if (typeof activate === \"function\")\n                activate()\n        },\n    })\n}\n\ntype ArrowToggleButtonProps = {\n    name: string\n    icon: IconProps[\"icon\"]\n    label: LabelProps[\"label\"]\n    activate: () => void\n    deactivate: () => void\n    activateOnArrow?: boolean\n    connection: [GObject.Object, () => boolean]\n}\nexport const ArrowToggleButton = ({\n    name,\n    icon,\n    label,\n    activate,\n    deactivate,\n    activateOnArrow = true,\n    connection: [service, condition],\n}: ArrowToggleButtonProps) => Widget.Box({\n    class_name: \"toggle-button\",\n    setup: self => self.hook(service, () => {\n        self.toggleClassName(\"active\", condition())\n    }),\n    children: [\n        Widget.Button({\n            child: Widget.Box({\n                hexpand: true,\n                children: [\n                    Widget.Icon({\n                        class_name: \"icon\",\n                        icon,\n                    }),\n                    Widget.Label({\n                        class_name: \"label\",\n                        max_width_chars: 10,\n                        truncate: \"end\",\n                        label,\n                    }),\n                ],\n            }),\n            on_clicked: () => {\n                if (condition()) {\n                    deactivate()\n                    if (opened.value === name)\n                        opened.value = \"\"\n                } else {\n                    activate()\n                }\n            },\n        }),\n        Arrow(name, activateOnArrow && activate),\n    ],\n})\n\ntype MenuProps = {\n    name: string\n    icon: IconProps[\"icon\"]\n    title: LabelProps[\"label\"]\n    content: Gtk.Widget[]\n}\nexport const Menu = ({ name, icon, title, content }: MenuProps) => Widget.Revealer({\n    transition: \"slide_down\",\n    reveal_child: opened.bind().as(v => v === name),\n    child: Widget.Box({\n        class_names: [\"menu\", name],\n        vertical: true,\n        children: [\n            Widget.Box({\n                class_name: \"title-box\",\n                children: [\n                    Widget.Icon({\n                        class_name: \"icon\",\n                        icon,\n                    }),\n                    Widget.Label({\n                        class_name: \"title\",\n                        truncate: \"end\",\n                        label: title,\n                    }),\n                ],\n            }),\n            Widget.Separator(),\n            Widget.Box({\n                vertical: true,\n                class_name: \"content vertical\",\n                children: content,\n            }),\n        ],\n    }),\n})\n\ntype SimpleToggleButtonProps = {\n    icon: IconProps[\"icon\"]\n    label: LabelProps[\"label\"]\n    toggle: () => void\n    connection: [GObject.Object, () => boolean]\n}\nexport const SimpleToggleButton = ({\n    icon,\n    label,\n    toggle,\n    connection: [service, condition],\n}: SimpleToggleButtonProps) => Widget.Button({\n    on_clicked: toggle,\n    class_name: \"simple-toggle\",\n    setup: self => self.hook(service, () => {\n        self.toggleClassName(\"active\", condition())\n    }),\n    child: Widget.Box([\n        Widget.Icon({ icon }),\n        Widget.Label({\n            max_width_chars: 10,\n            truncate: \"end\",\n            label,\n        }),\n    ]),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/quicksettings/quicksettings.scss",
    "content": "window#quicksettings .quicksettings {\n    @include floating-widget;\n    @include spacing;\n\n    padding: $popover-padding * 1.4;\n\n    .avatar {\n        @include widget;\n        border-radius: $radius * 3;\n    }\n\n    .header {\n        @include spacing(.5);\n        color: transparentize($fg, .15);\n\n        button {\n            @include button;\n            padding: $padding;\n\n            image {\n                font-size: 1.4em;\n            }\n        }\n    }\n\n    .sliders-box {\n        @include widget;\n        padding: $padding;\n\n        button {\n            @include button($flat: true);\n            padding: $padding * .5;\n        }\n\n        .volume button.arrow:last-child {\n            margin-left: $spacing * .4;\n        }\n\n        .volume,\n        .brightness {\n            padding: $padding * .5;\n        }\n\n        scale {\n            @include slider;\n            margin: 0 ($spacing * .5);\n        }\n    }\n\n    .row {\n        @include spacing;\n    }\n\n    .menu {\n        @include unset;\n        @include widget;\n        padding: $padding;\n        margin-top: $spacing;\n\n        .icon {\n            margin: 0 ($spacing * .5);\n            margin-left: $spacing * .2;\n        }\n\n        .title {\n            font-weight: bold;\n        }\n\n        separator {\n            margin: ($radius * .5);\n            background-color: $border-color;\n        }\n\n        button {\n            @include button($flat: true);\n            padding: ($padding * .5);\n\n            image:first-child {\n                margin-right: $spacing * .5;\n            }\n        }\n\n        .bluetooth-devices {\n            @include spacing(.5);\n        }\n\n        switch {\n            @include switch;\n        }\n    }\n\n    .sliders-box .menu {\n        margin: ($spacing * .5) 0;\n\n        &.app-mixer {\n            .mixer-item {\n                padding: $padding * .5;\n                padding-left: 0;\n                padding-right: $padding * 2;\n\n                scale {\n                    @include slider($width: .5em);\n                }\n\n                image {\n                    font-size: 1.2em;\n                    margin: 0 $padding;\n                }\n            }\n        }\n    }\n\n    .toggle-button {\n        @include button;\n        font-weight: bold;\n\n        image {\n            font-size: 1.3em;\n        }\n\n        label {\n            margin-left: $spacing * .3;\n        }\n\n        button {\n            @include button($flat: true);\n\n            &:first-child {\n                padding: $padding * 1.2;\n                border-top-right-radius: 0;\n                border-bottom-right-radius: 0;\n            }\n\n            &:last-child {\n                padding: $padding * .5;\n                border-top-left-radius: 0;\n                border-bottom-left-radius: 0;\n            }\n        }\n\n        &.active {\n            background-color: $primary-bg;\n\n            label,\n            image {\n                color: $primary-fg;\n            }\n        }\n    }\n\n    .simple-toggle {\n        @include button;\n        font-weight: bold;\n        padding: $padding * 1.2;\n\n        label {\n            margin-left: $spacing * .3;\n        }\n\n        image {\n            font-size: 1.3em;\n        }\n    }\n\n    .media {\n        @include spacing;\n\n        .player {\n            @include media;\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/quicksettings/widgets/AsusProfile.ts",
    "content": "import { ArrowToggleButton, Menu } from \"../ToggleButton\"\nimport icons from \"lib/icons\"\nimport asusctl from \"service/asusctl\"\n\nconst profile = asusctl.bind(\"profile\")\n\nexport const ProfileToggle = () => ArrowToggleButton({\n    name: \"asusctl-profile\",\n    icon: profile.as(p => icons.asusctl.profile[p]),\n    label: profile,\n    connection: [asusctl, () => asusctl.profile !== \"Balanced\"],\n    activate: () => asusctl.setProfile(\"Quiet\"),\n    deactivate: () => asusctl.setProfile(\"Balanced\"),\n    activateOnArrow: false,\n})\n\nexport const ProfileSelector = () => Menu({\n    name: \"asusctl-profile\",\n    icon: profile.as(p => icons.asusctl.profile[p]),\n    title: \"Profile Selector\",\n    content: [\n        Widget.Box({\n            vertical: true,\n            hexpand: true,\n            children: [\n                Widget.Box({\n                    vertical: true,\n                    children: asusctl.profiles.map(prof => Widget.Button({\n                        on_clicked: () => asusctl.setProfile(prof),\n                        child: Widget.Box({\n                            children: [\n                                Widget.Icon(icons.asusctl.profile[prof]),\n                                Widget.Label(prof),\n                            ],\n                        }),\n                    })),\n                }),\n            ],\n        }),\n        Widget.Separator(),\n        Widget.Button({\n            on_clicked: () => Utils.execAsync(\"rog-control-center\"),\n            child: Widget.Box({\n                children: [\n                    Widget.Icon(icons.ui.settings),\n                    Widget.Label(\"Rog Control Center\"),\n                ],\n            }),\n        }),\n    ],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/quicksettings/widgets/Bluetooth.ts",
    "content": "import { type BluetoothDevice } from \"types/service/bluetooth\"\nimport { Menu, ArrowToggleButton } from \"../ToggleButton\"\nimport icons from \"lib/icons\"\n\nconst bluetooth = await Service.import(\"bluetooth\")\n\nexport const BluetoothToggle = () => ArrowToggleButton({\n    name: \"bluetooth\",\n    icon: bluetooth.bind(\"enabled\").as(p => icons.bluetooth[p ? \"enabled\" : \"disabled\"]),\n    label: Utils.watch(\"Disabled\", bluetooth, () => {\n        if (!bluetooth.enabled)\n            return \"Disabled\"\n\n        if (bluetooth.connected_devices.length === 1)\n            return bluetooth.connected_devices[0].alias\n\n        return `${bluetooth.connected_devices.length} Connected`\n    }),\n    connection: [bluetooth, () => bluetooth.enabled],\n    deactivate: () => bluetooth.enabled = false,\n    activate: () => bluetooth.enabled = true,\n})\n\nconst DeviceItem = (device: BluetoothDevice) => Widget.Box({\n    children: [\n        Widget.Icon(device.icon_name + \"-symbolic\"),\n        Widget.Label(device.name),\n        Widget.Label({\n            label: `${device.battery_percentage}%`,\n            visible: device.bind(\"battery_percentage\").as(p => p > 0),\n        }),\n        Widget.Box({ hexpand: true }),\n        Widget.Spinner({\n            active: device.bind(\"connecting\"),\n            visible: device.bind(\"connecting\"),\n        }),\n        Widget.Switch({\n            active: device.connected,\n            visible: device.bind(\"connecting\").as(p => !p),\n            setup: self => self.on(\"notify::active\", () => {\n                device.setConnection(self.active)\n            }),\n        }),\n    ],\n})\n\nexport const BluetoothDevices = () => Menu({\n    name: \"bluetooth\",\n    icon: icons.bluetooth.disabled,\n    title: \"Bluetooth\",\n    content: [\n        Widget.Box({\n            class_name: \"bluetooth-devices\",\n            hexpand: true,\n            vertical: true,\n            children: bluetooth.bind(\"devices\").as(ds => ds\n                .filter(d => d.name)\n                .map(DeviceItem)),\n        }),\n    ],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/quicksettings/widgets/Brightness.ts",
    "content": "import icons from \"lib/icons\"\nimport brightness from \"service/brightness\"\n\nconst BrightnessSlider = () => Widget.Slider({\n    draw_value: false,\n    hexpand: true,\n    value: brightness.bind(\"screen\"),\n    on_change: ({ value }) => brightness.screen = value,\n})\n\nexport const Brightness = () => Widget.Box({\n    class_name: \"brightness\",\n    children: [\n        Widget.Button({\n            vpack: \"center\",\n            child: Widget.Icon(icons.brightness.indicator),\n            on_clicked: () => brightness.screen = 0,\n            tooltip_text: brightness.bind(\"screen\").as(v =>\n                `Screen Brightness: ${Math.floor(v * 100)}%`),\n        }),\n        BrightnessSlider(),\n    ],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/quicksettings/widgets/DND.ts",
    "content": "import { SimpleToggleButton } from \"../ToggleButton\"\nimport icons from \"lib/icons\"\n\nconst n = await Service.import(\"notifications\")\nconst dnd = n.bind(\"dnd\")\n\nexport const DND = () => SimpleToggleButton({\n    icon: dnd.as(dnd => icons.notifications[dnd ? \"silent\" : \"noisy\"]),\n    label: dnd.as(dnd => dnd ? \"Silent\" : \"Noisy\"),\n    toggle: () => n.dnd = !n.dnd,\n    connection: [n, () => n.dnd],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/quicksettings/widgets/DarkMode.ts",
    "content": "import { SimpleToggleButton } from \"../ToggleButton\"\nimport icons from \"lib/icons\"\nimport options from \"options\"\n\nconst { scheme } = options.theme\n\nexport const DarkModeToggle = () => SimpleToggleButton({\n    icon: scheme.bind().as(s => icons.color[s]),\n    label: scheme.bind().as(s => s === \"dark\" ? \"Dark\" : \"Light\"),\n    toggle: () => scheme.value = scheme.value === \"dark\" ? \"light\" : \"dark\",\n    connection: [scheme, () => scheme.value === \"dark\"],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/quicksettings/widgets/Header.ts",
    "content": "import type Gtk from \"gi://Gtk?version=3.0\"\nimport icons from \"lib/icons\"\nimport { uptime } from \"lib/variables\"\nimport options from \"options\"\nimport powermenu, { Action } from \"service/powermenu\"\n\nconst battery = await Service.import(\"battery\")\nconst { image, size } = options.quicksettings.avatar\n\nfunction up(up: number) {\n    const h = Math.floor(up / 60)\n    const m = Math.floor(up % 60)\n    return `${h}h ${m < 10 ? \"0\" + m : m}m`\n}\n\nconst Avatar = () => Widget.Box({\n    class_name: \"avatar\",\n    css: Utils.merge([image.bind(), size.bind()], (img, size) => `\n        min-width: ${size}px;\n        min-height: ${size}px;\n        background-image: url('${img}');\n        background-size: cover;\n    `),\n})\n\nconst SysButton = (action: Action) => Widget.Button({\n    vpack: \"center\",\n    child: Widget.Icon(icons.powermenu[action]),\n    on_clicked: () => powermenu.action(action),\n})\n\nexport const Header = () => Widget.Box<Gtk.Widget>(\n    { class_name: \"header horizontal\" },\n    Avatar(),\n    Widget.Box({\n        vertical: true,\n        vpack: \"center\",\n        children: [\n            Widget.Box({\n                visible: battery.bind(\"available\"),\n                children: [\n                    Widget.Icon({ icon: battery.bind(\"icon_name\") }),\n                    Widget.Label({ label: battery.bind(\"percent\").as(p => `${p}%`) }),\n                ],\n            }),\n            Widget.Box([\n                Widget.Icon({ icon: icons.ui.time }),\n                Widget.Label({ label: uptime.bind().as(up) }),\n            ]),\n        ],\n    }),\n    Widget.Box({ hexpand: true }),\n    Widget.Button({\n        vpack: \"center\",\n        child: Widget.Icon(icons.ui.settings),\n        on_clicked: () => {\n            App.closeWindow(\"quicksettings\")\n            App.closeWindow(\"settings-dialog\")\n            App.openWindow(\"settings-dialog\")\n        },\n    }),\n    SysButton(\"logout\"),\n    SysButton(\"shutdown\"),\n)\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/quicksettings/widgets/Media.ts",
    "content": "import { type MprisPlayer } from \"types/service/mpris\"\nimport icons from \"lib/icons\"\nimport type Gtk from \"gi://Gtk?version=3.0\"\nimport options from \"options\"\nimport { icon } from \"lib/utils\"\n\nconst mpris = await Service.import(\"mpris\")\nconst players = mpris.bind(\"players\")\nconst { media } = options.quicksettings\n\nfunction lengthStr(length: number) {\n    const min = Math.floor(length / 60)\n    const sec = Math.floor(length % 60)\n    const sec0 = sec < 10 ? \"0\" : \"\"\n    return `${min}:${sec0}${sec}`\n}\n\nconst Player = (player: MprisPlayer) => {\n    const cover = Widget.Box({\n        class_name: \"cover\",\n        vpack: \"start\",\n        css: Utils.merge([player.bind(\"cover_path\"), media.coverSize.bind()], (path, size) => `\n            min-width: ${size}px;\n            min-height: ${size}px;\n            background-image: url('${path}');\n        `),\n    })\n\n    const title = Widget.Label({\n        class_name: \"title\",\n        max_width_chars: 20,\n        truncate: \"end\",\n        hpack: \"start\",\n        label: player.bind(\"track_title\"),\n    })\n\n    const artist = Widget.Label({\n        class_name: \"artist\",\n        max_width_chars: 20,\n        truncate: \"end\",\n        hpack: \"start\",\n        label: player.bind(\"track_artists\").as(a => a.join(\", \")),\n    })\n\n    const positionSlider = Widget.Slider({\n        class_name: \"position\",\n        draw_value: false,\n        on_change: ({ value }) => player.position = value * player.length,\n        setup: self => {\n            const update = () => {\n                const { length, position } = player\n                self.visible = length > 0\n                self.value = length > 0 ? position / length : 0\n            }\n            self.hook(player, update)\n            self.hook(player, update, \"position\")\n            self.poll(1000, update)\n        },\n    })\n\n    const positionLabel = Widget.Label({\n        class_name: \"position\",\n        hpack: \"start\",\n        setup: self => {\n            const update = (_: unknown, time?: number) => {\n                self.label = lengthStr(time || player.position)\n                self.visible = player.length > 0\n            }\n            self.hook(player, update, \"position\")\n            self.poll(1000, update)\n        },\n    })\n\n    const lengthLabel = Widget.Label({\n        class_name: \"length\",\n        hpack: \"end\",\n        visible: player.bind(\"length\").as(l => l > 0),\n        label: player.bind(\"length\").as(lengthStr),\n    })\n\n    const playericon = Widget.Icon({\n        class_name: \"icon\",\n        hexpand: true,\n        hpack: \"end\",\n        vpack: \"start\",\n        tooltip_text: player.identity || \"\",\n        icon: Utils.merge([player.bind(\"entry\"), media.monochromeIcon.bind()], (e, s) => {\n            const name = `${e}${s ? \"-symbolic\" : \"\"}`\n            return icon(name, icons.fallback.audio)\n        }),\n    })\n\n    const playPause = Widget.Button({\n        class_name: \"play-pause\",\n        on_clicked: () => player.playPause(),\n        visible: player.bind(\"can_play\"),\n        child: Widget.Icon({\n            icon: player.bind(\"play_back_status\").as(s => {\n                switch (s) {\n                    case \"Playing\": return icons.mpris.playing\n                    case \"Paused\":\n                    case \"Stopped\": return icons.mpris.stopped\n                }\n            }),\n        }),\n    })\n\n    const prev = Widget.Button({\n        on_clicked: () => player.previous(),\n        visible: player.bind(\"can_go_prev\"),\n        child: Widget.Icon(icons.mpris.prev),\n    })\n\n    const next = Widget.Button({\n        on_clicked: () => player.next(),\n        visible: player.bind(\"can_go_next\"),\n        child: Widget.Icon(icons.mpris.next),\n    })\n\n    return Widget.Box(\n        { class_name: \"player\", vexpand: false },\n        cover,\n        Widget.Box<Gtk.Widget>(\n            { vertical: true },\n            Widget.Box([\n                title,\n                playericon,\n            ]),\n            artist,\n            Widget.Box({ vexpand: true }),\n            positionSlider,\n            Widget.CenterBox({\n                class_name: \"footer horizontal\",\n                start_widget: positionLabel,\n                center_widget: Widget.Box([\n                    prev,\n                    playPause,\n                    next,\n                ]),\n                end_widget: lengthLabel,\n            }),\n        ),\n    )\n}\n\nexport const Media = () => Widget.Box({\n    vertical: true,\n    class_name: \"media vertical\",\n    children: players.as(p => p.map(Player)),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/quicksettings/widgets/MicMute.ts",
    "content": "import { SimpleToggleButton } from \"../ToggleButton\"\nimport icons from \"lib/icons\"\nconst { microphone } = await Service.import(\"audio\")\n\nconst icon = () => microphone.is_muted || microphone.stream?.is_muted\n    ? icons.audio.mic.muted\n    : icons.audio.mic.high\n\nconst label = () => microphone.is_muted || microphone.stream?.is_muted\n    ? \"Muted\"\n    : \"Unmuted\"\n\nexport const MicMute = () => SimpleToggleButton({\n    icon: Utils.watch(icon(), microphone, icon),\n    label: Utils.watch(label(), microphone, label),\n    toggle: () => microphone.is_muted = !microphone.is_muted,\n    connection: [microphone, () => microphone?.is_muted || false],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/quicksettings/widgets/Network.ts",
    "content": "import { Menu, ArrowToggleButton } from \"../ToggleButton\"\nimport icons from \"lib/icons.js\"\nimport { dependencies, sh } from \"lib/utils\"\nimport options from \"options\"\nconst { wifi } = await Service.import(\"network\")\n\nexport const NetworkToggle = () => ArrowToggleButton({\n    name: \"network\",\n    icon: wifi.bind(\"icon_name\"),\n    label: wifi.bind(\"ssid\").as(ssid => ssid || \"Not Connected\"),\n    connection: [wifi, () => wifi.enabled],\n    deactivate: () => wifi.enabled = false,\n    activate: () => {\n        wifi.enabled = true\n        wifi.scan()\n    },\n})\n\nexport const WifiSelection = () => Menu({\n    name: \"network\",\n    icon: wifi.bind(\"icon_name\"),\n    title: \"Wifi Selection\",\n    content: [\n        Widget.Box({\n            vertical: true,\n            setup: self => self.hook(wifi, () => self.children =\n                wifi.access_points.map(ap => Widget.Button({\n                    on_clicked: () => {\n                        if (dependencies(\"nmcli\"))\n                            Utils.execAsync(`nmcli device wifi connect ${ap.bssid}`)\n                    },\n                    child: Widget.Box({\n                        children: [\n                            Widget.Icon(ap.iconName),\n                            Widget.Label(ap.ssid || \"\"),\n                            Widget.Icon({\n                                icon: icons.ui.tick,\n                                hexpand: true,\n                                hpack: \"end\",\n                                setup: self => Utils.idle(() => {\n                                    if (!self.is_destroyed)\n                                        self.visible = ap.active\n                                }),\n                            }),\n                        ],\n                    }),\n                })),\n            ),\n        }),\n        Widget.Separator(),\n        Widget.Button({\n            on_clicked: () => sh(options.quicksettings.networkSettings.value),\n            child: Widget.Box({\n                children: [\n                    Widget.Icon(icons.ui.settings),\n                    Widget.Label(\"Network\"),\n                ],\n            }),\n        }),\n    ],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/quicksettings/widgets/Volume.ts",
    "content": "import type Gtk from \"gi://Gtk?version=3.0\"\nimport { type Stream } from \"types/service/audio\"\nimport { Arrow, Menu } from \"../ToggleButton\"\nimport { dependencies, icon, sh } from \"lib/utils\"\nimport icons from \"lib/icons.js\"\nconst audio = await Service.import(\"audio\")\n\ntype Type = \"microphone\" | \"speaker\"\n\nconst VolumeIndicator = (type: Type = \"speaker\") => Widget.Button({\n    vpack: \"center\",\n    on_clicked: () => audio[type].is_muted = !audio[type].is_muted,\n    child: Widget.Icon({\n        icon: audio[type].bind(\"icon_name\")\n            .as(i => icon(i || \"\", icons.audio.mic.high)),\n        tooltipText: audio[type].bind(\"volume\")\n            .as(vol => `Volume: ${Math.floor(vol * 100)}%`),\n    }),\n})\n\nconst VolumeSlider = (type: Type = \"speaker\") => Widget.Slider({\n    hexpand: true,\n    draw_value: false,\n    on_change: ({ value, dragging }) => dragging && (audio[type].volume = value),\n    value: audio[type].bind(\"volume\"),\n})\n\nexport const Volume = () => Widget.Box({\n    class_name: \"volume\",\n    children: [\n        VolumeIndicator(\"speaker\"),\n        VolumeSlider(\"speaker\"),\n        Widget.Box({\n            vpack: \"center\",\n            child: Arrow(\"sink-selector\"),\n        }),\n        Widget.Box({\n            vpack: \"center\",\n            child: Arrow(\"app-mixer\"),\n            visible: audio.bind(\"apps\").as(a => a.length > 0),\n        }),\n    ],\n})\n\nexport const Microhone = () => Widget.Box({\n    class_name: \"slider horizontal\",\n    visible: audio.bind(\"recorders\").as(a => a.length > 0),\n    children: [\n        VolumeIndicator(\"microphone\"),\n        VolumeSlider(\"microphone\"),\n    ],\n})\n\nconst MixerItem = (stream: Stream) => Widget.Box<Gtk.Widget>(\n    {\n        hexpand: true,\n        class_name: \"mixer-item horizontal\",\n    },\n    Widget.Icon({\n        tooltip_text: stream.bind(\"name\").as(n => n || \"\"),\n        icon: stream.bind(\"name\").as(n => {\n            return Utils.lookUpIcon(n || \"\")\n                ? (n || \"\")\n                : icons.fallback.audio\n        }),\n    }),\n    Widget.Box<Gtk.Widget>(\n        { vertical: true },\n        Widget.Label({\n            xalign: 0,\n            truncate: \"end\",\n            max_width_chars: 28,\n            label: stream.bind(\"description\").as(d => d || \"\"),\n        }),\n        Widget.Slider({\n            hexpand: true,\n            draw_value: false,\n            value: stream.bind(\"volume\"),\n            on_change: ({ value }) => stream.volume = value,\n        }),\n    ),\n)\n\nconst SinkItem = (stream: Stream) => Widget.Button({\n    hexpand: true,\n    on_clicked: () => audio.speaker = stream,\n    child: Widget.Box({\n        children: [\n            Widget.Icon({\n                icon: icon(stream.icon_name || \"\", icons.fallback.audio),\n                tooltip_text: stream.icon_name || \"\",\n            }),\n            Widget.Label((stream.description || \"\").split(\" \").slice(0, 4).join(\" \")),\n            Widget.Icon({\n                icon: icons.ui.tick,\n                hexpand: true,\n                hpack: \"end\",\n                visible: audio.speaker.bind(\"stream\").as(s => s === stream.stream),\n            }),\n        ],\n    }),\n})\n\nconst SettingsButton = () => Widget.Button({\n    on_clicked: () => {\n        if (dependencies(\"pavucontrol\"))\n            sh(\"pavucontrol\")\n    },\n    hexpand: true,\n    child: Widget.Box({\n        children: [\n            Widget.Icon(icons.ui.settings),\n            Widget.Label(\"Settings\"),\n        ],\n    }),\n})\n\nexport const AppMixer = () => Menu({\n    name: \"app-mixer\",\n    icon: icons.audio.mixer,\n    title: \"App Mixer\",\n    content: [\n        Widget.Box({\n            vertical: true,\n            class_name: \"vertical mixer-item-box\",\n            children: audio.bind(\"apps\").as(a => a.map(MixerItem)),\n        }),\n        Widget.Separator(),\n        SettingsButton(),\n    ],\n})\n\nexport const SinkSelector = () => Menu({\n    name: \"sink-selector\",\n    icon: icons.audio.type.headset,\n    title: \"Sink Selector\",\n    content: [\n        Widget.Box({\n            vertical: true,\n            children: audio.bind(\"speakers\").as(a => a.map(SinkItem)),\n        }),\n        Widget.Separator(),\n        SettingsButton(),\n    ],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/settings/Group.ts",
    "content": "import Row from \"./Row\"\n\nexport default <T>(title: string, ...rows: ReturnType<typeof Row<T>>[]) => Widget.Box({\n    class_name: \"group\",\n    vertical: true,\n    children: [\n        Widget.Label({\n            hpack: \"start\",\n            class_name: \"group-title\",\n            label: title,\n            setup: w => Utils.idle(() => w.visible = !!title),\n        }),\n        Widget.Box({\n            vertical: true,\n            children: rows,\n        }),\n    ],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/settings/Page.ts",
    "content": "import Group from \"./Group\"\n\nexport default <T>(\n    name: string,\n    icon: string,\n    ...groups: ReturnType<typeof Group<T>>[]\n) => Widget.Box({\n    class_name: \"page\",\n    attribute: { name, icon },\n    child: Widget.Scrollable({\n        css: \"min-height: 300px;\",\n        child: Widget.Box({\n            vexpand: true,\n            vertical: true,\n            children: groups,\n        }),\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/settings/Row.ts",
    "content": "import { Opt } from \"lib/option\"\nimport Setter from \"./Setter\"\nimport type Gtk from \"gi://Gtk?version=3.0\"\nimport icons from \"lib/icons\"\n\nexport type RowProps<T> = {\n    opt: Opt<T>\n    title: string\n    note?: string\n    type?:\n    | \"number\"\n    | \"color\"\n    | \"float\"\n    | \"object\"\n    | \"string\"\n    | \"enum\"\n    | \"boolean\"\n    | \"img\"\n    | \"font\"\n    enums?: string[]\n    max?: number\n    min?: number\n}\n\nexport default <T>(props: RowProps<T>) => Widget.Box<Gtk.Widget>(\n    {\n        class_name: \"row\",\n        tooltip_text: props.note ? `note: ${props.note}` : \"\",\n    },\n    Widget.Box<Gtk.Widget>(\n        { vertical: true, vpack: \"center\" },\n        Widget.Label({\n            xalign: 0,\n            class_name: \"row-title\",\n            label: props.title,\n        }),\n        Widget.Label({\n            xalign: 0,\n            class_name: \"id\",\n            label: props.opt.id,\n        }),\n    ),\n    Widget.Box({ hexpand: true }),\n    Widget.Box(\n        { vpack: \"center\" },\n        Setter(props),\n    ),\n    Widget.Button({\n        vpack: \"center\",\n        class_name: \"reset\",\n        child: Widget.Icon(icons.ui.refresh),\n        on_clicked: () => props.opt.reset(),\n        sensitive: props.opt.bind().as(v => v !== props.opt.initial),\n    }),\n)\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/settings/Setter.ts",
    "content": "import { type RowProps } from \"./Row\"\nimport { Opt } from \"lib/option\"\nimport icons from \"lib/icons\"\nimport Gdk from \"gi://Gdk\"\n\nfunction EnumSetter(opt: Opt<string>, values: string[]) {\n    const lbl = Widget.Label({ label: opt.bind().as(v => `${v}`) })\n    const step = (dir: 1 | -1) => {\n        const i = values.findIndex(i => i === lbl.label)\n        opt.setValue(dir > 0\n            ? i + dir > values.length - 1 ? values[0] : values[i + dir]\n            : i + dir < 0 ? values[values.length - 1] : values[i + dir],\n        )\n    }\n    const next = Widget.Button({\n        child: Widget.Icon(icons.ui.arrow.right),\n        on_clicked: () => step(+1),\n    })\n    const prev = Widget.Button({\n        child: Widget.Icon(icons.ui.arrow.left),\n        on_clicked: () => step(-1),\n    })\n    return Widget.Box({\n        class_name: \"enum-setter\",\n        children: [lbl, prev, next],\n    })\n}\n\nexport default function Setter<T>({\n    opt,\n    type = typeof opt.value as RowProps<T>[\"type\"],\n    enums,\n    max = 1000,\n    min = 0,\n}: RowProps<T>) {\n    switch (type) {\n        case \"number\": return Widget.SpinButton({\n            setup(self) {\n                self.set_range(min, max)\n                self.set_increments(1, 5)\n                self.on(\"value-changed\", () => opt.value = self.value as T)\n                self.hook(opt, () => self.value = opt.value as number)\n            },\n        })\n        case \"float\":\n        case \"object\": return Widget.Entry({\n            on_accept: self => opt.value = JSON.parse(self.text || \"\"),\n            setup: self => self.hook(opt, () => self.text = JSON.stringify(opt.value)),\n        })\n        case \"string\": return Widget.Entry({\n            on_accept: self => opt.value = self.text as T,\n            setup: self => self.hook(opt, () => self.text = opt.value as string),\n        })\n        case \"enum\": return EnumSetter(opt as unknown as Opt<string>, enums!)\n        case \"boolean\": return Widget.Switch()\n            .on(\"notify::active\", self => opt.value = self.active as T)\n            .hook(opt, self => self.active = opt.value as boolean)\n\n        case \"img\": return Widget.FileChooserButton()\n            .on(\"selection-changed\", self => {\n                opt.value = self.get_uri()?.replace(\"file://\", \"\") as T\n            })\n\n        case \"font\": return Widget.FontButton({\n            show_size: false,\n            use_size: false,\n            setup: self => self\n                .hook(opt, () => self.font = opt.value as string)\n                .on(\"font-set\", ({ font }) => opt.value = font!\n                    .split(\" \").slice(0, -1).join(\" \") as T),\n        })\n        case \"color\": return Widget.ColorButton({\n            setup: self => self\n                .hook(opt, () => {\n                    const rgba = new Gdk.RGBA()\n                    rgba.parse(opt.value as string)\n                    self.rgba = rgba\n                })\n                .on(\"color-set\", ({ rgba: { red, green, blue } }) => {\n                    const hex = (n: number) => {\n                        const c = Math.floor(255 * n).toString(16)\n                        return c.length === 1 ? `0${c}` : c\n                    }\n                    opt.value = `#${hex(red)}${hex(green)}${hex(blue)}` as T\n                }),\n        })\n        default: return Widget.Label({\n            label: `no setter with type ${type}`,\n        })\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/settings/SettingsDialog.ts",
    "content": "import RegularWindow from \"widget/RegularWindow\"\nimport layout from \"./layout\"\nimport icons from \"lib/icons\"\nimport options from \"options\"\n\nconst current = Variable(layout[0].attribute.name)\n\nconst Header = () => Widget.CenterBox({\n    class_name: \"header\",\n    start_widget: Widget.Button({\n        class_name: \"reset\",\n        on_clicked: options.reset,\n        hpack: \"start\",\n        vpack: \"start\",\n        child: Widget.Icon(icons.ui.refresh),\n        tooltip_text: \"Reset\",\n    }),\n    center_widget: Widget.Box({\n        class_name: \"pager horizontal\",\n        children: layout.map(({ attribute: { name, icon } }) => Widget.Button({\n            xalign: 0,\n            class_name: current.bind().as(v => `${v === name ? \"active\" : \"\"}`),\n            on_clicked: () => current.value = name,\n            child: Widget.Box([\n                Widget.Icon(icon),\n                Widget.Label(name),\n            ]),\n        })),\n    }),\n    end_widget: Widget.Button({\n        class_name: \"close\",\n        hpack: \"end\",\n        vpack: \"start\",\n        child: Widget.Icon(icons.ui.close),\n        on_clicked: () => App.closeWindow(\"settings-dialog\"),\n    }),\n})\n\nconst PagesStack = () => Widget.Stack({\n    transition: \"slide_left_right\",\n    children: layout.reduce((obj, page) => ({ ...obj, [page.attribute.name]: page }), {}),\n    shown: current.bind() as never,\n})\n\nexport default () => RegularWindow({\n    name: \"settings-dialog\",\n    class_name: \"settings-dialog\",\n    title: \"Settings\",\n    setup(win) {\n        win.on(\"delete-event\", () => {\n            win.hide()\n            return true\n        })\n        win.set_default_size(500, 600)\n    },\n    child: Widget.Box({\n        vertical: true,\n        children: [\n            Header(),\n            PagesStack(),\n        ],\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/settings/layout.ts",
    "content": "/* eslint-disable max-len */\nimport Row from \"./Row\"\nimport Group from \"./Group\"\nimport Page from \"./Page\"\nimport options from \"options\"\nimport icons from \"lib/icons\"\n\nconst {\n    wallpaper: wp,\n    autotheme: at,\n    font,\n    theme,\n    bar: b,\n    applauncher: al,\n    overview: ov,\n    powermenu: pm,\n    quicksettings: qs,\n    osd,\n} = options\n\nconst {\n    dark,\n    light,\n    blur,\n    scheme,\n    padding,\n    spacing,\n    radius,\n    shadows,\n    widget,\n    border,\n} = theme\n\nexport default [\n    Page(\"Theme\", icons.ui.themes,\n        Group(\"\",\n            Row({ opt: wp, title: \"Wallpaper\", type: \"img\" }),\n            Row({ opt: at, title: \"Auto Generate Color Scheme\" }),\n            Row({ opt: scheme, title: \"Color Scheme\", type: \"enum\", enums: [\"dark\", \"light\"] }),\n            Row({ opt: blur, title: \"Blur\", note: \"0 to disable\", max: 70 }),\n        ),\n        Group(\"Dark Colors\",\n            Row({ opt: dark.bg, title: \"Background\", type: \"color\" }),\n            Row({ opt: dark.fg, title: \"Foreground\", type: \"color\" }),\n            Row({ opt: dark.primary.bg, title: \"Primary\", type: \"color\" }),\n            Row({ opt: dark.primary.fg, title: \"On Primary\", type: \"color\" }),\n            Row({ opt: dark.error.bg, title: \"Error\", type: \"color\" }),\n            Row({ opt: dark.error.fg, title: \"On Error\", type: \"color\" }),\n            Row({ opt: dark.widget, title: \"Widget\", type: \"color\" }),\n            Row({ opt: dark.border, title: \"Border\", type: \"color\" }),\n        ),\n        Group(\"Light Colors\",\n            Row({ opt: light.bg, title: \"Background\", type: \"color\" }),\n            Row({ opt: light.fg, title: \"Foreground\", type: \"color\" }),\n            Row({ opt: light.primary.bg, title: \"Primary\", type: \"color\" }),\n            Row({ opt: light.primary.fg, title: \"On Primary\", type: \"color\" }),\n            Row({ opt: light.error.bg, title: \"Error\", type: \"color\" }),\n            Row({ opt: light.error.fg, title: \"On Error\", type: \"color\" }),\n            Row({ opt: light.widget, title: \"Widget\", type: \"color\" }),\n            Row({ opt: light.border, title: \"Border\", type: \"color\" }),\n        ),\n        Group(\"Theme\",\n            Row({ opt: shadows, title: \"Shadows\" }),\n            Row({ opt: widget.opacity, title: \"Widget Opacity\", max: 100 }),\n            Row({ opt: border.opacity, title: \"Border Opacity\", max: 100 }),\n            Row({ opt: border.width, title: \"Border Width\" }),\n        ),\n        Group(\"UI\",\n            Row({ opt: padding, title: \"Padding\" }),\n            Row({ opt: spacing, title: \"Spacing\" }),\n            Row({ opt: radius, title: \"Roundness\" }),\n            Row({ opt: font.size, title: \"Font Size\" }),\n            Row({ opt: font.name, title: \"Font Name\", type: \"font\" }),\n        ),\n    ),\n    Page(\"Bar\", icons.ui.toolbars,\n        Group(\"General\",\n            Row({ opt: b.flatButtons, title: \"Flat Buttons\" }),\n            Row({ opt: b.position, title: \"Position\", type: \"enum\", enums: [\"top\", \"bottom\"] }),\n            Row({ opt: b.corners, title: \"Corners\" }),\n        ),\n        Group(\"Launcher\",\n            Row({ opt: b.launcher.icon.icon, title: \"Icon\" }),\n            Row({ opt: b.launcher.icon.colored, title: \"Colored Icon\" }),\n            Row({ opt: b.launcher.label.label, title: \"Label\" }),\n            Row({ opt: b.launcher.label.colored, title: \"Colored Label\" }),\n        ),\n        Group(\"Workspaces\",\n            Row({ opt: b.workspaces.workspaces, title: \"Number of Workspaces\", note: \"0 to make it dynamic\" }),\n        ),\n        Group(\"Taskbar\",\n            Row({ opt: b.taskbar.monochrome, title: \"Monochrome\" }),\n            Row({ opt: b.taskbar.exclusive, title: \"Exclusive to workspaces\" }),\n        ),\n        Group(\"Date\",\n            Row({ opt: b.date.format, title: \"Date Format\" }),\n        ),\n        Group(\"Media\",\n            Row({ opt: b.media.monochrome, title: \"Monochrome\" }),\n            Row({ opt: b.media.preferred, title: \"Preferred Player\" }),\n            Row({ opt: b.media.direction, title: \"Slide Direction\", type: \"enum\", enums: [\"left\", \"right\"] }),\n            Row({ opt: b.media.length, title: \"Max Length of Label\" }),\n        ),\n        Group(\"Battery\",\n            Row({ opt: b.battery.bar, title: \"Style\", type: \"enum\", enums: [\"hidden\", \"regular\", \"whole\"] }),\n            Row({ opt: b.battery.blocks, title: \"Number of Blocks\" }),\n            Row({ opt: b.battery.width, title: \"Width of Bar\" }),\n            Row({ opt: b.battery.charging, title: \"Charging Color\", type: \"color\" }),\n        ),\n        Group(\"Powermenu\",\n            Row({ opt: b.powermenu.monochrome, title: \"Monochrome\" }),\n        ),\n    ),\n    Page(\"General\", icons.ui.settings,\n        Group(\"Applauncher\",\n            Row({ opt: al.iconSize, title: \"Icon Size\" }),\n            Row({ opt: al.width, title: \"Width\" }),\n            Row({ opt: al.maxItem, title: \"Max Items\" }),\n        ),\n        Group(\"Overview\",\n            Row({ opt: ov.scale, title: \"Scale\", max: 100 }),\n            Row({ opt: ov.workspaces, title: \"workspaces\", max: 11, note: \"set this to 0 to make it dynamic\" }),\n            Row({ opt: ov.monochromeIcon, title: \"Monochrome Icons\" }),\n        ),\n        Group(\"Powermenu\",\n            Row({ opt: pm.layout, title: \"Layout\", type: \"enum\", enums: [\"box\", \"line\"] }),\n            Row({ opt: pm.labels, title: \"Show Labels\" }),\n        ),\n        Group(\"Quicksettings\",\n            Row({ opt: qs.avatar.image, title: \"Avatar\", type: \"img\" }),\n            Row({ opt: qs.avatar.size, title: \"Avatar Size\" }),\n            Row({ opt: qs.media.monochromeIcon, title: \"Media Monochrome Icons\" }),\n            Row({ opt: qs.media.coverSize, title: \"Media Cover Art Size\" }),\n        ),\n        Group(\"On Screen Indicator\",\n            Row({ opt: osd.progress.vertical, title: \"Vertical\" }),\n            Row({ opt: osd.progress.pack.h, title: \"Horizontal Alignment\", type: \"enum\", enums: [\"start\", \"center\", \"end\"] }),\n            Row({ opt: osd.progress.pack.v, title: \"Vertical Alignment\", type: \"enum\", enums: [\"start\", \"center\", \"end\"] }),\n        ),\n    ),\n] as const\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags/widget/settings/settingsdialog.scss",
    "content": "window.settings-dialog {\n    background-color: $bg;\n    color: $fg;\n\n    .header {\n        .pager {\n            @include spacing(.5);\n        }\n\n        padding: $padding;\n\n        button {\n            @include button;\n            font-weight: bold;\n            padding: $padding*.5 $padding;\n\n            box {\n                @include spacing($spacing: .3em);\n            }\n        }\n\n        button.close {\n            padding: $padding * .4;\n        }\n\n        button.reset {\n            @include button($flat: true);\n            padding: $padding*.5;\n        }\n    }\n\n    .page {\n        padding: $padding*2;\n        padding-top: 0;\n    }\n\n    .group {\n        .group-title {\n            color: $primary-bg;\n            margin-bottom: $spacing*.5;\n        }\n\n        &:not(:first-child) {\n            margin-top: $spacing;\n        }\n    }\n\n    .row {\n        background-color: $widget-bg;\n        padding: $padding;\n        border: $border;\n        border-top: none;\n\n        &:first-child {\n            border-radius: $radius $radius 0 0;\n            border: $border;\n        }\n\n        &:last-child {\n            border-radius: 0 0 $radius $radius;\n        }\n\n        &:first-child:last-child {\n            border-radius: $radius;\n            border: $border;\n        }\n\n        button.reset {\n            margin-left: $spacing;\n        }\n\n        label.id,\n        label.note {\n            color: transparentize($fg, .4)\n        }\n\n        entry,\n        button {\n            @include button;\n            padding: $padding;\n        }\n\n        switch {\n            @include switch;\n        }\n\n        spinbutton {\n            @include unset;\n\n            entry {\n                border-radius: $radius 0 0 $radius;\n            }\n\n            button {\n                border-radius: 0;\n            }\n\n            button:last-child {\n                border-radius: 0 $radius $radius 0;\n            }\n        }\n\n        .enum-setter {\n            label {\n                background-color: $widget-bg;\n                border: $border;\n                padding: 0 $padding;\n                border-radius: $radius 0 0 $radius;\n            }\n\n            button {\n                border-radius: 0;\n            }\n\n            button:last-child {\n                border-radius: 0 $radius $radius 0;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/.eslintrc.yml",
    "content": "env:\n  es2021: true\nextends: eslint:recommended\noverrides: []\nparserOptions:\n  ecmaVersion: latest\n  sourceType: 'module'\nrules:\n  arrow-parens:\n    - error\n    - as-needed\n  comma-dangle:\n    - error\n    - always-multiline\n  comma-spacing:\n    - error\n    - before: false\n      after: true\n  comma-style:\n    - error\n    - last\n  curly:\n    - error\n    - multi-or-nest\n    - consistent\n  dot-location:\n    - error\n    - property\n  eol-last: error\n  indent:\n    - error\n    - 4\n    - SwitchCase: 1\n  keyword-spacing:\n    - error\n    - before: true\n  lines-between-class-members:\n    - error\n    - always\n    - exceptAfterSingleLine: true\n  padded-blocks:\n    - error\n    - never\n    - allowSingleLineBlocks: false\n  prefer-const: error\n  quotes:\n    - error\n    - single\n    - avoidEscape: true\n  semi:\n    - error\n    - always\n  nonblock-statement-body-position:\n    - error\n    - below\n  no-trailing-spaces:\n    - error\n  array-bracket-spacing:\n    - error\n    - never\n  key-spacing:\n    - error\n    - beforeColon: false\n      afterColon: true\n  object-curly-spacing: \n    - error\n    - always\n  no-useless-escape:\n    - off\nglobals:\n  pkg: readonly\n  ags: readonly\n  ARGV: readonly\n  imports: readonly\n  print: readonly\n  console: readonly\n  logError: readonly\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/.gitignore",
    "content": "node_modules\ntypes\npackage-lock.json\nweather_key\nsetup.sh\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/.stylelintrc.yml",
    "content": "extends: stylelint-config-standard-scss\nignoreFiles:\n  - \"**/*.js\"\n  - \"**/*.ts\"\nrules:\n  selector-type-no-unknown: null\n  declaration-empty-line-before: null\n  no-descending-specificity: null\n  selector-pseudo-class-no-unknown: null\n  color-function-notation: legacy\n  alpha-value-notation: number\n  scss/operator-no-unspaced: null\n  scss/no-global-function-names: null\n  scss/dollar-variable-empty-line-before: null\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/config.js",
    "content": "import { readFile } from 'resource:///com/github/Aylur/ags/utils.js';\nimport App from 'resource:///com/github/Aylur/ags/app.js';\nconst pkgjson = JSON.parse(readFile(App.configDir + '/package.json'));\nimport GLib from 'gi://GLib';\nconst SKIP_CHECK = 'AGS_SKIP_V_CHECK';\n\nconst v = {\n    ags: `v${pkg.version}`,\n    expected: `v${pkgjson.version}`,\n    check: !GLib.getenv(SKIP_CHECK),\n};\n\nfunction mismatch() {\n    print(`my config expects ${v.expected}, but your ags is ${v.ags}`);\n    print(`to skip the check run \"${SKIP_CHECK}=true ags\"`);\n    \n  App.connect('config-parsed', app => app.Quit());\n    return {};\n}\n\nexport default v.ags === v.expected || !v.check\n    ? (await import('./js/main.js')).default\n    : mismatch();\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/about/about.js",
    "content": "import PopupWindow from '../misc/PopupWindow.js';\nimport icons from '../icons.js';\n\nconst pkg = JSON.parse(Utils.readFile(App.configDir + '/package.json'));\nconst show = JSON.parse(Utils.readFile(Utils.CACHE_DIR + '/show_about') || 'true');\nconst dontShow = () => Utils.writeFile('false', Utils.CACHE_DIR + '/show_about');\nconst avatar = App.configDir + '/assets/od_fsociety.png';\n\n/**\n * @param {Object} o\n * @param {string} o.label\n * @param {string} o.link\n */\nconst LinkButton = ({ label, link }) => Widget.Button({\n    on_clicked: () => Utils.execAsync(['xdg-open', link]),\n    child: Widget.Box({\n        children: [\n            Widget.Label({ label, hexpand: true, xalign: 0 }),\n            Widget.Icon(icons.ui.link),\n        ],\n    }),\n});\n\nexport default () => PopupWindow({\n    name: 'about',\n    transition: 'slide_down',\n    child: Widget.Box({\n        vertical: true,\n        class_name: 'window-content',\n        children: [\n            Widget.Box({\n                class_name: 'avatar',\n                hpack: 'center',\n                css: `background-image: url('${avatar}');`,\n            }),\n            Widget.Box({\n                vertical: true,\n                class_name: 'labels vertical',\n                children: [\n                    Widget.Label({\n                        class_name: 'title',\n                        label: pkg.description,\n                    }),\n                    Widget.Label({\n                        class_name: 'author',\n                        label: pkg.author,\n                    }),\n                    Widget.Label({\n                        class_name: 'version',\n                        hpack: 'center',\n                        label: pkg.version,\n                    }),\n                ],\n            }),\n            Widget.Box({\n                class_name: 'buttons',\n                vertical: true,\n                vexpand: true,\n                vpack: 'end',\n                children: [\n                    LinkButton({\n                        label: 'Support me on Ko-fi',\n                        link: pkg.kofi,\n                    }),\n                    LinkButton({\n                        label: 'Report an Issue',\n                        link: pkg.bugs.url,\n                    }),\n                ],\n            }),\n            Widget.Button({\n                class_name: 'dont-show',\n                on_clicked: () => {\n                    dontShow();\n                    App.toggleWindow('about');\n                },\n                child: Widget.Box({\n                    children: [\n                        Widget.Label(\"Don't show again\"),\n                        Widget.Box({ hexpand: true }),\n                        Widget.Icon(icons.ui.close),\n                    ],\n                }),\n            }),\n        ],\n    }),\n});\n\nexport function showAbout(force = false) {\n    if (show || force)\n        App.toggleWindow('about');\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/applauncher/AppItem.js",
    "content": "import options from '../options.js';\n\n/** @param {import('resource:///com/github/Aylur/ags/service/applications.js').Application} app */\nexport default app => {\n    const title = Widget.Label({\n        class_name: 'title',\n        label: app.name,\n        xalign: 0,\n        vpack: 'center',\n        truncate: 'end',\n    });\n\n    const description = Widget.Label({\n        class_name: 'description',\n        label: app.description || '',\n        wrap: true,\n        xalign: 0,\n        justification: 'left',\n        vpack: 'center',\n    });\n\n    const icon = Widget.Icon({\n        icon: Utils.lookUpIcon(app.icon_name || '') ? app.icon_name || '' : '',\n        size: options.applauncher.icon_size.bind('value'),\n    });\n\n    const textBox = Widget.Box({\n        vertical: true,\n        vpack: 'center',\n        children: app.description ? [title, description] : [title],\n    });\n\n    return Widget.Button({\n        class_name: 'app-item',\n        attribute: app,\n        child: Widget.Box({\n            children: [icon, textBox],\n        }),\n        on_clicked: () => {\n            App.closeWindow('applauncher');\n            app.launch();\n        },\n    });\n};\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/applauncher/Applauncher.js",
    "content": "import Applications from 'resource:///com/github/Aylur/ags/service/applications.js';\nimport PopupWindow from '../misc/PopupWindow.js';\nimport AppItem from './AppItem.js';\nimport icons from '../icons.js';\nimport { launchApp } from '../utils.js';\nimport options from '../options.js';\n\nconst WINDOW_NAME = 'applauncher';\n\nconst Applauncher = () => {\n    const mkItems = () => [\n        Widget.Separator({ hexpand: true }),\n        ...Applications.query('').flatMap(app => Widget.Revealer({\n            setup: w => w.attribute = { app, revealer: w },\n            child: Widget.Box({\n                vertical: true,\n                children: [\n                    Widget.Separator({ hexpand: true }),\n                    AppItem(app),\n                    Widget.Separator({ hexpand: true }),\n                ],\n            }),\n        })),\n        Widget.Separator({ hexpand: true }),\n    ];\n\n    let items = mkItems();\n\n    const list = Widget.Box({\n        class_name: 'app-list',\n        vertical: true,\n        children: items,\n    });\n\n    const entry = Widget.Entry({\n        hexpand: true,\n        primary_icon_name: icons.apps.search,\n\n        // set some text so on-change works the first time\n        text: '-',\n        on_accept: ({ text }) => {\n            const list = Applications.query(text || '');\n            if (list[0]) {\n                App.toggleWindow(WINDOW_NAME);\n                launchApp(list[0]);\n            }\n        },\n        on_change: ({ text }) => items.map(item => {\n            if (item.attribute) {\n                const { app, revealer } = item.attribute;\n                revealer.reveal_child = app.match(text);\n            }\n        }),\n    });\n\n    return Widget.Box({\n        vertical: true,\n        children: [\n            entry,\n            Widget.Scrollable({\n                hscroll: 'never',\n                child: list,\n            }),\n        ],\n        setup: self => self.hook(App, (_, win, visible) => {\n            if (win !== WINDOW_NAME)\n                return;\n\n            entry.text = '-';\n            entry.text = '';\n            if (visible) {\n                entry.grab_focus();\n            }\n            else {\n                items = mkItems();\n                list.children = items;\n            }\n        }),\n    });\n};\n\nexport default () => PopupWindow({\n    name: WINDOW_NAME,\n    transition: 'slide_down',\n    child: Applauncher(),\n    anchor: options.applauncher.anchor.bind('value'),\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/bar/PanelButton.js",
    "content": "/**\n * @typedef {Object} PanelButtonProps\n * @property {import('types/widgets/button').ButtonProps['child']} content\n * @property {string=} window\n */\n\n/**\n * @param {import('types/widgets/button').ButtonProps & PanelButtonProps} o\n */\nexport default ({\n    class_name,\n    content,\n    window = '',\n    setup,\n    ...rest\n}) => Widget.Button({\n    class_name: `panel-button ${class_name}`,\n    child: Widget.Box({ children: [content] }),\n    setup: self => {\n        let open = false;\n\n        self.hook(App, (_, win, visible) => {\n            if (win !== window)\n                return;\n\n            if (open && !visible) {\n                open = false;\n                self.toggleClassName('active', false);\n            }\n\n            if (visible) {\n                open = true;\n                self.toggleClassName('active');\n            }\n        });\n\n        if (setup)\n            setup(self);\n    },\n    ...rest,\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/bar/TopBar.js",
    "content": "import SystemTray from 'resource:///com/github/Aylur/ags/service/systemtray.js';\nimport Battery from 'resource:///com/github/Aylur/ags/service/battery.js';\nimport OverviewButton from './buttons/OverviewButton.js';\nimport Workspaces from './buttons/Workspaces.js';\nimport DateButton from './buttons/DateButton.js';\nimport SysTray from './buttons/SysTray.js';\nimport ColorPicker from './buttons/ColorPicker.js';\nimport SystemIndicators from './buttons/SystemIndicators.js';\nimport PowerMenu from './buttons/PowerMenu.js';\nimport ScreenRecord from './buttons/ScreenRecord.js';\nimport BatteryBar from './buttons/BatteryBar.js';\nimport SubMenu from './buttons/SubMenu.js';\nimport Recorder from '../services/screenrecord.js';\nimport options from '../options.js';\nimport * as vars from '../variables.js';\n\nconst submenuItems = Variable(1);\nSystemTray.connect('changed', () => {\n    submenuItems.setValue(SystemTray.items.length + 1);\n});\n\n/**\n * @template {import('types/service').default} T\n * @param {T=} service\n * @param {(self: T) => boolean=} condition\n */\n\nconst SeparatorDot = (service, condition) => Widget.Separator({\n    vpack: 'center',\n    setup: self => {\n        const visibility = () => {\n            if (!options.bar.separators.value)\n                return self.visible = false;\n\n            self.visible = condition && service\n                ? condition(service)\n                : options.bar.separators.value;\n        };\n\n        if (service && condition)\n            self.hook(service, visibility);\n\n        self.on('draw', visibility);\n        self.bind('visible', options.bar.separators);\n    },\n});\n\nconst Start = () => Widget.Box({\n    class_name: 'start',\n    children: [\n        OverviewButton(),\n        SeparatorDot(),\n        Workspaces(),\n        Widget.Box({ hexpand: true }),\n    ],\n});\n\nconst Center = () => Widget.Box({\n    class_name: 'center',\n    children: [\n        DateButton(),\n    ],\n});\n\nconst SysProgress = (type, title, unit) => Widget.Box({\n    class_name: `circular-progress-box ${type}`,\n    hexpand: false,\n    binds: [['tooltipText', vars[type], 'value', v =>\n        `${title}: ${Math.floor(v * 100)}${unit}`]],\n    child: Widget.CircularProgress({\n        hexpand: true,\n        inverted: false,\n        class_name: `circular-progress ${type}`,\n        binds: [['value', vars[type]]],\n        start_at: 0.75,\n    }),\n});\n\nconst End = () => Widget.Box({\n    class_name: 'end',\n    children: [\n        Widget.Box({ hexpand: true }),\n\n        SubMenu({\n            items: submenuItems,\n            children: [\n                SysTray(),\n                ColorPicker(),\n            ],\n        }),\n\n        Widget.Box({\n            class_name: 'system-info horizontal',\n            children: [\n                SysProgress('cpu', 'Cpu', '%'),\n                SysProgress('ram', 'Ram', '%'),\n                SysProgress('temp', 'Temperature', '°'),\n            ],\n        }),\n\n        SeparatorDot(),\n        ScreenRecord(),\n        SeparatorDot(Recorder, r => r.recording),\n        BatteryBar(Battery, b => b.available),\n        SeparatorDot(Battery, b => b.available),\n        SystemIndicators(),\n        SeparatorDot(),\n        PowerMenu(),\n    ],\n});\n\n/** @param {number} monitor */\nexport default monitor => Widget.Window({\n    name: `bar${monitor}`,\n    class_name: 'transparent',\n    exclusivity: 'exclusive',\n    monitor,\n    anchor: options.bar.position.bind('value').transform(pos => ([\n        pos, 'left', 'right',\n    ])),\n\n    child: Widget.CenterBox({\n        class_name: 'panel',\n        start_widget: Start(),\n        center_widget: Center(),\n        end_widget: End(),\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/bar/buttons/BatteryBar.js",
    "content": "import Widget from \"resource:///com/github/Aylur/ags/widget.js\";\nimport Battery from \"resource:///com/github/Aylur/ags/service/battery.js\";\nimport icons from \"../../icons.js\";\nimport FontIcon from \"../../misc/FontIcon.js\";\nimport options from \"../../options.js\";\nimport PanelButton from \"../PanelButton.js\";\n\nconst Indicator = () =>\n  Widget.Stack({\n    children: { true: FontIcon(icons.battery.charging) },\n    visible: options.battery.bar.show_icon.bind(\"value\"),\n    setup: (self) =>\n      self.hook(Battery, () => {\n        self.shown = `${Battery.charging || Battery.charged}`;\n      }),\n  });\n\nconst PercentLabel = () =>\n  Widget.Revealer({\n    transition: \"slide_right\",\n    binds: [[\"reveal-child\", options.battery.show_percentage]],\n    child: Widget.Label({\n      binds: [[\"label\", Battery, \"percent\", (p) => `${p}%`]],\n    }),\n  });\n\nconst LevelBar = () =>\n  Widget.LevelBar({\n    connections: [\n      [\n        options.battery.bar.full,\n        (self) => {\n          const full = options.battery.bar.full.value;\n          self.vpack = full ? \"fill\" : \"center\";\n          self.hpack = full ? \"fill\" : \"center\";\n        },\n      ],\n    ],\n    binds: [[\"value\", Battery, \"percent\", (p) => p / 100]],\n  });\n\nconst WholeButton = () =>\n  Widget.Overlay({\n    class_name: \"whole-button\",\n    child: LevelBar(),\n    pass_through: true,\n    overlays: [\n      Widget.Box({\n        hpack: \"center\",\n        children: [\n          FontIcon({\n            icon: icons.battery.charging,\n            binds: [[\"visible\", Battery, \"charging\"]],\n          }),\n          Widget.Box({\n            hpack: \"center\",\n            vpack: \"center\",\n            child: PercentLabel(),\n          }),\n        ],\n      }),\n    ],\n  });\n\nexport default () =>\n  PanelButton({\n    class_name: \"battery-bar\",\n    on_clicked: () => {\n      const v = options.battery.show_percentage.value;\n      options.battery.show_percentage.value = !v;\n    },\n    content: Widget.Box({\n      connections: [\n        [\n          Battery,\n          (w) => {\n            w.toggleClassName(\"charging\", Battery.charging || Battery.charged);\n            w.toggleClassName(\n              \"medium\",\n              Battery.percent < options.battery.medium.value,\n            );\n            w.toggleClassName(\n              \"low\",\n              Battery.percent < options.battery.low.value,\n            );\n            w.toggleClassName(\"half\", Battery.percent < 48);\n          },\n        ],\n      ],\n      binds: [\n        [\"visible\", Battery, \"available\"],\n        [\n          \"children\",\n          options.battery.bar.full,\n          \"value\",\n          (full) =>\n            full ? [WholeButton()] : [Indicator(), PercentLabel(), LevelBar()],\n        ],\n      ],\n    }),\n  });\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/bar/buttons/ColorPicker.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Colors from '../../services/colorpicker.js';\nimport PanelButton from '../PanelButton.js';\nimport Gdk from 'gi://Gdk';\n\nexport default () => PanelButton({\n    class_name: 'color-picker',\n    content: Widget.Icon('color-select-symbolic'),\n    binds: [['tooltip-text', Colors, 'colors', v => `${v.length} colors`]],\n    on_clicked: () => Colors.pick(),\n\n    on_secondary_click: btn => {\n        if (Colors.colors.length === 0)\n            return;\n\n        Widget.Menu({\n            class_name: 'colorpicker',\n            children: Colors.colors.map(color => Widget.MenuItem({\n                child: Widget.Label(color),\n                css: `background-color: ${color}`,\n                on_activate: () => Colors.wlCopy(color),\n            })),\n        }).popup_at_widget(btn, Gdk.Gravity.SOUTH, Gdk.Gravity.NORTH, null);\n    },\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/bar/buttons/DateButton.js",
    "content": "import App from 'resource:///com/github/Aylur/ags/app.js';\nimport Clock from '../../misc/Clock.js';\nimport PanelButton from '../PanelButton.js';\n\nexport default ({ format = '%d.%m.%y - %H:%M' } = {}) => PanelButton({\n    class_name: 'dashboard panel-button',\n    on_clicked: () => App.toggleWindow('dashboard'),\n    window: 'dashboard',\n    content: Clock({ format }),\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/bar/buttons/FocusedClient.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport PanelButton from '../PanelButton.js';\nimport options from '../../options.js';\nimport { substitute } from '../../utils.js';\n\nexport const ClientLabel = () => Widget.Label({\n    binds: [['label', Hyprland.active.client, 'class', c => {\n        const { titles } = options.substitutions;\n        return substitute(titles, c);\n    }]],\n});\n\nexport const ClientIcon = () => Widget.Icon({\n    connections: [[Hyprland.active.client, self => {\n        const { icons } = options.substitutions;\n        const { client } = Hyprland.active;\n\n        const classIcon = substitute(icons, client.class) + '-symbolic';\n        const titleIcon = substitute(icons, client.class) + '-symbolic';\n\n        const hasTitleIcon = Utils.lookUpIcon(titleIcon);\n        const hasClassIcon = Utils.lookUpIcon(classIcon);\n\n        if (hasClassIcon)\n            self.icon = classIcon;\n\n        if (hasTitleIcon)\n            self.icon = titleIcon;\n\n        self.visible = !!(hasTitleIcon || hasClassIcon);\n    }]],\n});\n\nexport default () => PanelButton({\n    class_name: 'focused-client',\n    content: Widget.Box({\n        children: [\n            ClientIcon(),\n            ClientLabel(),\n        ],\n        binds: [['tooltip-text', Hyprland.active, 'client', c => c.title]],\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/bar/buttons/MediaIndicator.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Mpris from 'resource:///com/github/Aylur/ags/service/mpris.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport HoverRevealer from '../../misc/HoverRevealer.js';\nimport * as mpris from '../../misc/mpris.js';\nimport options from '../../options.js';\n\nexport const getPlayer = (name = options.mpris.preferred.value) =>\n    Mpris.getPlayer(name) || Mpris.players[0] || null;\n\n/**\n * @param {Object} o\n * @param {import('types/service/mpris').MprisPlayer} o.player\n * @param {import('../../misc/HoverRevealer').HoverRevealProps['direction']=} o.direction\n */\nconst Indicator = ({ player, direction = 'right' }) => HoverRevealer({\n    class_name: `media panel-button ${player.name}`,\n    direction,\n    on_primary_click: () => player.playPause(),\n    on_scroll_up: () => player.next(),\n    on_scroll_down: () => player.previous(),\n    on_secondary_click: () => player.playPause(),\n    indicator: mpris.PlayerIcon(player),\n    child: Widget.Label({\n        vexpand: true,\n        truncate: 'end',\n        max_width_chars: 40,\n        connections: [[player, label => {\n            label.label = `${player.track_artists.join(', ')} - ${player.track_title}`;\n        }]],\n    }),\n    connections: [[player, revealer => {\n        if (revealer._current === player.track_title)\n            return;\n\n        revealer._current = player.track_title;\n        revealer.reveal_child = true;\n        Utils.timeout(3000, () => {\n            revealer.reveal_child = false;\n        });\n    }]],\n});\n\n/**\n * @param {Object} o\n * @param {import('../../misc/HoverRevealer').HoverRevealProps['direction']=} o.direction\n */\nexport default ({ direction = 'right' } = {}) => {\n    let current = null;\n\n    const update = box => {\n        const player = getPlayer();\n        box.visible = !!player;\n\n        if (!player) {\n            current = null;\n            return;\n        }\n\n        if (current === player)\n            return;\n\n        current = player;\n        box.children = [Indicator({ player, direction })];\n    };\n\n    return Widget.Box({\n        connections: [\n            [options.mpris.preferred, update],\n            [Mpris, update, 'notify::players'],\n        ],\n    });\n};\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/bar/buttons/NotificationIndicator.js",
    "content": "import App from 'resource:///com/github/Aylur/ags/app.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Notifications from 'resource:///com/github/Aylur/ags/service/notifications.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport icons from '../../icons.js';\nimport HoverRevealer from '../../misc/HoverRevealer.js';\n\n/**\n * @param {Object} o\n * @param {import('../../misc/HoverRevealer').HoverRevealProps['direction']=} o.direction\n */\nexport default ({ direction = 'left' } = {}) => HoverRevealer({\n    class_name: 'notifications panel-button',\n    eventboxConnections: [\n        ['button-press-event', () => App.openWindow('dashboard')],\n        [Notifications, box => box.visible =\n            Notifications.notifications.length > 0 || Notifications.dnd],\n    ],\n    connections: [[Notifications, revealer => {\n        const title = Notifications.notifications[0]?.summary;\n        if (revealer._title === title)\n            return;\n\n        revealer._title = title;\n        revealer.reveal_child = true;\n        Utils.timeout(3000, () => {\n            revealer.reveal_child = false;\n        });\n    }]],\n    direction,\n    indicator: Widget.Icon({\n        binds: [['icon', Notifications, 'dnd', dnd => dnd\n            ? icons.notifications.silent\n            : icons.notifications.noisy,\n        ]],\n    }),\n    child: Widget.Label({\n        truncate: 'end',\n        max_width_chars: 40,\n        binds: [['label', Notifications, 'notifications', n => n.reverse()[0]?.summary || '']],\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/bar/buttons/OverviewButton.js",
    "content": "import App from 'resource:///com/github/Aylur/ags/app.js';\nimport PanelButton from '../PanelButton.js';\nimport FontIcon from '../../misc/FontIcon.js';\nimport { distroIcon } from '../../variables.js';\nimport options from '../../options.js';\n\nexport default () => PanelButton({\n    class_name: 'overview',\n    window: 'overview',\n    on_clicked: () => App.toggleWindow('overview'),\n    content: FontIcon({\n        binds: [['icon', options.bar.icon, 'value', v => {\n            return v === 'distro-icon' ? distroIcon : v;\n        }]],\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/bar/buttons/PowerMenu.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport App from 'resource:///com/github/Aylur/ags/app.js';\nimport icons from '../../icons.js';\nimport PanelButton from '../PanelButton.js';\n\nexport default () => PanelButton({\n    class_name: 'powermenu',\n    content: Widget.Icon(icons.powermenu.shutdown),\n    on_clicked: () => App.openWindow('powermenu'),\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/bar/buttons/ScreenRecord.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport PanelButton from '../PanelButton.js';\nimport Recorder from '../../services/screenrecord.js';\nimport icons from '../../icons.js';\n\nexport default () => PanelButton({\n    class_name: 'recorder',\n    on_clicked: () => Recorder.stop(),\n    binds: [['visible', Recorder, 'recording']],\n    content: Widget.Box({\n        children: [\n            Widget.Icon(icons.recorder.recording),\n            Widget.Label({\n                binds: [['label', Recorder, 'timer', time => {\n                    const sec = time % 60;\n                    const min = Math.floor(time / 60);\n                    return `${min}:${sec < 10 ? '0' + sec : sec}`;\n                }]],\n            }),\n        ],\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/bar/buttons/SubMenu.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport Variable from 'resource:///com/github/Aylur/ags/variable.js';\nimport icons from '../../icons.js';\nimport options from '../../options.js';\n\n/**\n * @param {import('types/widgets/revealer').default} revealer\n * @param {'left' | 'right' | 'up' | 'down'} direction\n * @param {import('types/variable').Variable} items\n */\nconst Arrow = (revealer, direction, items) => {\n    let deg = 0;\n\n    const icon = Widget.Icon({\n        icon: icons.ui.arrow[direction],\n    });\n\n    const animate = () => {\n        const t = options.transition.value / 20;\n        const step = revealer.reveal_child ? 10 : -10;\n        for (let i = 0; i < 18; ++i) {\n            Utils.timeout(t * i, () => {\n                deg += step;\n                icon.setCss(`-gtk-icon-transform: rotate(${deg}deg);`);\n            });\n        }\n    };\n\n    return Widget.Button({\n        class_name: 'panel-button sub-menu',\n        connections: [[items, btn => {\n            btn.tooltip_text = `${items.value} Items`;\n        }]],\n        on_clicked: () => {\n            animate();\n            revealer.reveal_child = !revealer.reveal_child;\n        },\n        child: icon,\n    });\n};\n\n/**\n * @param {Object} o\n * @param {import('types/widgets/box').default['children']} o.children\n * @param {'left' | 'right' | 'up' | 'down'=} o.direction\n * @param {import('types/variable').Variable} o.items\n */\nexport default ({ children, direction = 'left', items = Variable(0) }) => {\n    const posStart = direction === 'up' || direction === 'left';\n    const posEnd = direction === 'down' || direction === 'right';\n    const revealer = Widget.Revealer({\n        transition: `slide_${direction}`,\n        child: Widget.Box({\n            children,\n        }),\n    });\n\n    return Widget.Box({\n        vertical: direction === 'up' || direction === 'down',\n        children: [\n            posStart && revealer,\n            Arrow(revealer, direction, items),\n            posEnd && revealer,\n        ],\n    });\n};\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/bar/buttons/SysTray.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport SystemTray from 'resource:///com/github/Aylur/ags/service/systemtray.js';\nimport PanelButton from '../PanelButton.js';\nimport Gdk from 'gi://Gdk';\n\n/** @param {import('types/service/systemtray').TrayItem} item */\nconst SysTrayItem = item => PanelButton({\n    class_name: 'tray-item',\n    content: Widget.Icon({ binds: [['icon', item, 'icon']] }),\n    binds: [['tooltipMarkup', item, 'tooltip-markup']],\n    setup: self => {\n        const id = item.menu?.connect('popped-up', menu => {\n            self.toggleClassName('active');\n            menu.connect('notify::visible', menu => {\n                self.toggleClassName('active', menu.visible);\n            });\n            menu.disconnect(id);\n        });\n\n        if (id)\n            self.connect('destroy', () => item.menu?.disconnect(id));\n    },\n\n    // @ts-expect-error popup_at_widget missing from types?\n    on_primary_click: btn => item.menu?.popup_at_widget(\n        btn, Gdk.Gravity.SOUTH, Gdk.Gravity.NORTH, null),\n\n    // @ts-expect-error popup_at_widget missing from types?\n    on_secondary_click: btn => item.menu?.popup_at_widget(\n        btn, Gdk.Gravity.SOUTH, Gdk.Gravity.NORTH, null),\n});\n\nexport default () => Widget.Box({\n    binds: [['children', SystemTray, 'items', i => i.map(SysTrayItem)]],\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/bar/buttons/System.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport PanelButton from '../PanelButton.js';\nimport * as variables from '../../variables.js';\nimport icons from '../../icons.js';\n\n/** @param {'cpu' | 'ram'} type */\nconst System = type => {\n    const icon = Widget.Icon({\n        class_name: 'icon',\n        icon: icons.system[type],\n    });\n\n    const progress = Widget.Box({\n        class_name: 'progress',\n        child: Widget.CircularProgress({\n            binds: [['value', variables[type]]],\n        }),\n    });\n\n    const revealer = Widget.Revealer({\n        transition: 'slide_right',\n        child: Widget.Label({\n            binds: [['label', variables[type], 'value', v => {\n                return ` ${type}: ${Math.round(v * 100)}%`;\n            }]],\n        }),\n    });\n\n    return PanelButton({\n        class_name: `system ${type}`,\n        on_clicked: () => revealer.reveal_child = !revealer.reveal_child,\n        content: Widget.EventBox({\n            on_hover: () => revealer.reveal_child = true,\n            on_hover_lost: () => revealer.reveal_child = false,\n            child: Widget.Box({\n                children: [\n                    icon,\n                    Widget.Box({\n                        class_name: 'revealer',\n                        child: revealer,\n                    }),\n                    progress,\n                ],\n            }),\n        }),\n    });\n};\n\nexport const CPU = () => System('cpu');\nexport const RAM = () => System('ram');\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/bar/buttons/SystemIndicators.js",
    "content": "import App from 'resource:///com/github/Aylur/ags/app.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Notifications from 'resource:///com/github/Aylur/ags/service/notifications.js';\nimport Bluetooth from 'resource:///com/github/Aylur/ags/service/bluetooth.js';\nimport Audio from 'resource:///com/github/Aylur/ags/service/audio.js';\nimport Network from 'resource:///com/github/Aylur/ags/service/network.js';\nimport HoverRevealer from '../../misc/HoverRevealer.js';\nimport PanelButton from '../PanelButton.js';\nimport Asusctl from '../../services/asusctl.js';\nimport Indicator from '../../services/onScreenIndicator.js';\nimport icons from '../../icons.js';\nimport FontIcon from '../../misc/FontIcon.js';\n\nconst ProfileIndicator = () => Widget.Icon()\n\t.bind('visible', Asusctl, 'profile', p => p !== 'Balanced')\n\t.bind('icon', Asusctl, 'profile', i => icons.asusctl.profile[i]);\n\nconst ModeIndicator = () => FontIcon()\n\t.bind('visible', Asusctl, 'mode', m => m !== 'Hybrid')\n\t.bind('icon', Asusctl, 'mode', i => icons.asusctl.mode[i]);\n\nconst MicrophoneIndicator = () => Widget.Icon().hook(Audio, icon => {\n\tif (!Audio.microphone)\n\t\treturn;\n\n\tconst { muted, low, medium, high } = icons.audio.mic;\n\tif (Audio.microphone.is_muted)\n\t\treturn icon.icon = muted;\n\n\t/** @type {Array<[number, string]>} */\n\tconst cons = [[67, high], [34, medium], [1, low], [0, muted]];\n\ticon.icon = cons.find(([n]) => n <= Audio.microphone.volume * 100)?.[1] || '';\n\n\ticon.visible = Audio.recorders.length > 0 || Audio.microphone.is_muted;\n}, 'microphone-changed');\n\nconst DNDIndicator = () => Widget.Icon({\n\tvisible: Notifications.bind('dnd'),\n\ticon: icons.notifications.silent,\n});\n\nconst BluetoothDevicesIndicator = () => Widget.Box().hook(Bluetooth, box => {\n\tbox.children = Bluetooth.connectedDevices\n\t\t.map(({ iconName, name }) => HoverRevealer({\n\t\t\tindicator: Widget.Icon(iconName + '-symbolic'),\n\t\t\tchild: Widget.Label(name),\n\t\t}));\n\n\tbox.visible = Bluetooth.connectedDevices.length > 0;\n}, 'notify::connected-devices');\n\nconst BluetoothIndicator = () => Widget.Icon({\n\tclass_name: 'bluetooth',\n\ticon: icons.bluetooth.enabled,\n\tvisible: Bluetooth.bind('enabled'),\n});\n\nconst NetworkIndicator = () => Widget.Icon().hook(Network, self => {\n\tconst icon = Network[Network.primary || 'wifi']?.iconName;\n\tself.icon = icon || '';\n\tself.visible = !!icon;\n});\n\nconst AudioIndicator = () => Widget.Icon().hook(Audio, self => {\n\tif (!Audio.speaker)\n\t\treturn;\n\n\tconst { muted, low, medium, high, overamplified } = icons.audio.volume;\n\tif (Audio.speaker.is_muted)\n\t\treturn self.icon = muted;\n\n\n\t/** @type {Array<[number, string]>} */\n\tconst cons = [[101, overamplified], [67, high], [34, medium], [1, low], [0, muted]];\n\tself.icon = cons.find(([n]) => n <= Audio.speaker.volume * 100)?.[1] || '';\n}, 'speaker-changed');\n\nexport default () => PanelButton({\n\tclass_name: 'quicksettings panel-button',\n\ton_clicked: () => App.toggleWindow('quicksettings'),\n\tsetup: self => self\n\t\t.hook(App, (_, win, visible) => {\n\t\t\tself.toggleClassName('active', win === 'quicksettings' && visible);\n\t\t}),\n\ton_scroll_up: () => {\n\t\tAudio.speaker.volume += 0.02;\n\t\tIndicator.speaker();\n\t},\n\ton_scroll_down: () => {\n\t\tAudio.speaker.volume -= 0.02;\n\t\tIndicator.speaker();\n\t},\n\tcontent: Widget.Box({\n\t\tchildren: [\n\t\t\tAsusctl?.available && ProfileIndicator(),\n\t\t\tAsusctl?.available && ModeIndicator(),\n\t\t\tDNDIndicator(),\n\t\t\tBluetoothDevicesIndicator(),\n\t\t\tBluetoothIndicator(),\n\t\t\tNetworkIndicator(),\n\t\t\tAudioIndicator(),\n\t\t\tMicrophoneIndicator(),\n\t\t],\n\t}),\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/bar/buttons/Taskbar.js",
    "content": "import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';\nimport Applications from 'resource:///com/github/Aylur/ags/service/applications.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport PanelButton from '../PanelButton.js';\nimport { launchApp } from '../../utils.js';\nimport icons from '../../icons.js';\n\nconst focus = ({ address }) => Hyprland.sendMessage(`dispatch focuswindow address:${address}`);\n\n/** @param {import('types/widgets/box').default} box */\nconst setChildren = box => box.children = Hyprland.clients.map(client => {\n    if (Hyprland.active.workspace.id !== client.workspace.id)\n        return;\n\n    for (const app of Applications.list) {\n        if (client.class && app.match(client.class)) {\n            return PanelButton({\n                content: Widget.Icon(app.icon_name || icons.fallback.executable),\n                tooltip_text: app.name,\n                on_primary_click: () => focus(client),\n                on_middle_click: () => launchApp(app),\n            });\n        }\n    }\n});\n\nexport default () => Widget.Box({\n    connections: [\n        [Hyprland, setChildren, 'notify::clients'],\n        [Hyprland, setChildren, 'notify::active'],\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/bar/buttons/Workspaces.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport options from '../../options.js';\nimport { range } from '../../utils.js';\n\n/** @param {any} arg */\nconst dispatch = arg => Utils.execAsync(`hyprctl dispatch workspace ${arg}`);\n\nconst Workspaces = () => {\n    const ws = options.workspaces.value;\n    return Widget.Box({\n        children: range(ws || 20).map(i => Widget.Button({\n            setup: btn => btn.id = i,\n            on_clicked: () => dispatch(i),\n            child: Widget.Label({\n                label: `${i}`,\n                class_name: 'indicator',\n                vpack: 'center',\n            }),\n            connections: [[Hyprland, btn => {\n                btn.toggleClassName('active', Hyprland.active.workspace.id === i);\n                btn.toggleClassName('occupied', Hyprland.getWorkspace(i)?.windows > 0);\n            }]],\n        })),\n        connections: ws ? [] : [[Hyprland.active.workspace, box => box.children.map(btn => {\n            btn.visible = Hyprland.workspaces.some(ws => ws.id === btn.id);\n        })]],\n    });\n};\n\nexport default () => Widget.EventBox({\n    class_name: 'workspaces panel-button',\n    child: Widget.Box({\n        // its nested like this to keep it consistent with other PanelButton widgets\n        child: Widget.EventBox({\n            on_scroll_up: () => dispatch('m+1'),\n            on_scroll_down: () => dispatch('m-1'),\n            class_name: 'eventbox',\n            binds: [['child', options.workspaces, 'value', Workspaces]],\n        }),\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/dashboard/Dashboard.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport DateColumn from './DateColumn.js';\nimport NotificationColumn from './NotificationColumn.js';\nimport PopupWindow from '../misc/PopupWindow.js';\nimport options from '../options.js';\n\nexport default () => PopupWindow({\n    name: 'dashboard',\n    setup: self => self.hook(options.bar.position, () => {\n        self.anchor = [options.bar.position.value];\n        self.transition = 'crossfade';\n\n    }),\n    child: Widget.Box({\n        children: [\n            NotificationColumn(),\n            Widget.Separator({ orientation: 1 }),\n            DateColumn(),\n        ],\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/dashboard/DateColumn.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Clock from '../misc/Clock.js';\nimport * as vars from '../variables.js';\n\n\nexport default () => Widget.Box({\n    vertical: true,\n    class_name: 'datemenu vertical',\n    children: [\n        Widget.Box({\n            class_name: 'clock-box',\n            vertical: true,\n            children: [\n                Clock({ format: '%H:%M' }),\n                Widget.Label({\n                    class_name: 'uptime',\n                    label: vars.uptime.bind('value').transform(t => `uptime: ${t}`),\n\n                }),\n            ],\n        }),\n        Widget.Box({\n            class_name: 'calendar',\n            children: [\n                Widget.Calendar({\n                    hexpand: true,\n                    hpack: 'center',\n                }),\n            ],\n        }),\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/dashboard/NotificationColumn.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Notifications from 'resource:///com/github/Aylur/ags/service/notifications.js';\nimport icons from '../icons.js';\nimport Notification from '../misc/Notification.js';\nimport { timeout } from 'resource:///com/github/Aylur/ags/utils.js';\n\nconst ClearButton = () => Widget.Button({\n    on_clicked: () => {\n        const list = Array.from(Notifications.notifications);\n        for (let i = 0; i < list.length; i++)\n            timeout(50 * i, () => list[i]?.close());\n    },\n    sensitive: Notifications.bind('notifications').transform(n => n.length > 0),\n    child: Widget.Box({\n        children: [\n            Widget.Label('Clear '),\n            Widget.Icon({\n                icon: Notifications.bind('notifications').transform(n => icons.trash[n.length > 0 ? 'full' : 'empty']),\n            }),\n        ],\n    }),\n});\n\nconst Header = () => Widget.Box({\n    class_name: 'header',\n    children: [\n        Widget.Label({ label: 'Notifications', hexpand: true, xalign: 0 }),\n        ClearButton(),\n    ],\n});\n\nconst NotificationList = () => Widget.Box({\n    vertical: true,\n    vexpand: true,\n    children: Notifications.bind('notifications').transform(n => n.reverse().map(Notification)),\n    visible: Notifications.bind('notifications').transform(n => n.length > 0),\n});\n\nconst Placeholder = () => Widget.Box({\n    class_name: 'placeholder',\n    vertical: true,\n    vpack: 'center',\n    hpack: 'center',\n    vexpand: true,\n    hexpand: true,\n    visible: Notifications.bind('notifications').transform(n => n.length === 0),\n    children: [\n        Widget.Icon(icons.notifications.silent),\n        Widget.Label('Your inbox is empty'),\n    ],\n});\n\nexport default () => Widget.Box({\n    class_name: 'notifications',\n    vertical: true,\n    children: [\n        Header(),\n        Widget.Scrollable({\n            vexpand: true,\n            class_name: 'notification-scrollable',\n            child: Widget.Box({\n                class_name: 'notification-list',\n                vertical: true,\n                children: [\n                    NotificationList(),\n                    Placeholder(),\n                ],\n            }),\n        }),\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/desktop/Desktop.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Clock from '../misc/Clock.js';\nimport DesktopMenu from './DesktopMenu.js';\nimport options from '../options.js';\n\nconst DesktopClock = () => Widget.Box({\n    class_name: 'clock-box-shadow',\n    child: Widget.CenterBox({\n        class_name: 'clock-box',\n        start_widget: Clock({\n            class_name: 'clock',\n            hpack: 'center',\n            format: '%H',\n        }),\n        center_widget: Widget.Box({\n            class_name: 'separator-box',\n            vertical: true,\n            hexpand: true,\n            hpack: 'center',\n            children: [\n                Widget.Separator({ vpack: 'center', vexpand: true }),\n                Widget.Separator({ vpack: 'center', vexpand: true }),\n            ],\n        }),\n        end_widget: Clock({\n            class_name: 'clock',\n            hpack: 'center',\n            format: '%M',\n        }),\n    }),\n});\n\nconst Desktop = () => Widget.EventBox({\n    on_secondary_click: (_, event) => DesktopMenu().popup_at_pointer(event),\n    child: Widget.Box({\n        vertical: true,\n        vexpand: true,\n        hexpand: true,\n        visible: options.desktop.clock.enable.bind('value'),\n        setup: self => self.hook(options.desktop.clock.position, () => {\n            const [hpack = 'center', vpack = 'center', offset = 64] =\n                options.desktop.clock.position.value.split(' ') || [];\n\n            // @ts-expect-error\n            self.hpack = hpack; self.vpack = vpack;\n            self.setCss(`margin: ${Number(offset)}px;`);\n        }),\n        children: [\n            DesktopClock(),\n            Clock({ format: '%B %e. %A', class_name: 'date' }),\n        ],\n    }),\n});\n\n/** @param {number} monitor */\nexport default monitor => Widget.Window({\n    monitor,\n    keymode: 'on-demand',\n    name: `desktop${monitor}`,\n    layer: 'background',\n    class_name: 'desktop',\n    anchor: ['top', 'bottom', 'left', 'right'],\n    child: Desktop(),\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/desktop/DesktopMenu.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport App from 'resource:///com/github/Aylur/ags/app.js';\nimport PowerMenu from '../services/powermenu.js';\nimport icons from '../icons.js';\nimport Gtk from 'gi://Gtk';\nimport { openSettings } from '../settings/theme.js';\n\n/**\n * @param {string} label\n * @param {string} icon\n * @param {import('types/widgets/menu').MenuItemProps['on_activate']} on_activate\n */\nconst Item = (label, icon, on_activate) => Widget.MenuItem({\n    on_activate,\n    child: Widget.Box({\n        children: [\n            Widget.Icon(icon),\n            Widget.Label({\n                label,\n                hexpand: true,\n                xalign: 0,\n            }),\n        ],\n    }),\n});\n\nexport default () => Widget.Menu({\n    class_name: 'desktop-menu',\n    children: [\n        Widget.MenuItem({\n            child: Widget.Box({\n                children: [\n                    Widget.Icon(icons.powermenu.shutdown),\n                    Widget.Label({\n                        label: 'System',\n                        hexpand: true,\n                        xalign: 0,\n                    }),\n                ],\n            }),\n            submenu: Widget.Menu({\n                children: [\n                    Item('Shutdown', icons.powermenu.shutdown, () => PowerMenu.action('shutdown')),\n                    Item('Log Out', icons.powermenu.logout, () => PowerMenu.action('logout')),\n                    Item('Reboot', icons.powermenu.reboot, () => PowerMenu.action('reboot')),\n                    Item('Sleep', icons.powermenu.sleep, () => PowerMenu.action('reboot')),\n                ],\n            }),\n        }),\n        Item('Applications', icons.apps.apps, () => App.openWindow('applauncher')),\n        new Gtk.SeparatorMenuItem,\n        Item('Settings', icons.ui.settings, openSettings),\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/dock/Dock.js",
    "content": "import App from 'resource:///com/github/Aylur/ags/app.js';\nimport Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';\nimport Applications from 'resource:///com/github/Aylur/ags/service/applications.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport icons from '../icons.js';\nimport options from '../options.js';\nimport { launchApp, range } from '../utils.js';\n\nconst focus = ({ address }) => Hyprland.sendMessage(`dispatch focuswindow address:${address}`);\n\n/** @param {import('types/widgets/button').ButtonProps & { icon: string, pinned?: boolean }} o */\nconst AppButton = ({ icon, pinned = false, ...rest }) => {\n    const indicators = Widget.Box({\n        vpack: 'end',\n        hpack: 'center',\n        children: range(5, 0).map(() => Widget.Box({\n            class_name: 'indicator',\n            visible: false,\n        })),\n    });\n\n    return Widget.Button({\n        ...rest,\n        attribute: indicators,\n        child: Widget.Box({\n            class_name: 'box',\n            child: Widget.Overlay({\n                child: Widget.Icon({\n                    icon,\n                    size: options.desktop.dock.icon_size.bind('value'),\n                }),\n                pass_through: true,\n                overlays: pinned ? [indicators] : [],\n            }),\n        }),\n    });\n};\n\nconst Taskbar = () => Widget.Box({\n    children: Hyprland.bind('clients').transform(c => c.map(client => {\n        for (const appName of options.desktop.dock.pinned_apps.value) {\n            if (client.class.toLowerCase().includes(appName.toLowerCase()))\n                return null;\n        }\n        for (const app of Applications.list) {\n            if (client.title && app.match(client.title) ||\n                client.class && app.match(client.class)) {\n                return AppButton({\n                    icon: app.icon_name || '',\n                    tooltip_text: app.name,\n                    on_primary_click: () => focus(client),\n                    on_middle_click: () => launchApp(app),\n                });\n            }\n        }\n    })),\n});\n\nconst PinnedApps = () => Widget.Box({\n    class_name: 'pins',\n    homogeneous: true,\n    children: options.desktop.dock.pinned_apps.bind('value').transform(v => v\n        .map(term => ({ app: Applications.query(term)?.[0], term }))\n        .filter(({ app }) => app)\n        .map(({ app, term }) => AppButton({\n            pinned: true,\n            icon: app.icon_name || '',\n            on_primary_click: () => {\n                for (const client of Hyprland.clients) {\n                    if (client.class.toLowerCase().includes(term))\n                        return focus(client);\n                }\n\n                launchApp(app);\n            },\n            on_middle_click: () => launchApp(app),\n            tooltip_text: app.name,\n            setup: button => button.hook(Hyprland, () => {\n                const running = Hyprland.clients\n                    .filter(client => client.class.toLowerCase().includes(term));\n\n                const focused = running.find(client =>\n                    client.address === Hyprland.active.client.address);\n\n                const index = running.findIndex(c => c === focused);\n\n                for (let i = 0; i < 5; ++i) {\n                    const indicator = button.attribute.children[i];\n                    indicator.visible = i < running.length;\n                    indicator.toggleClassName('focused', i === index);\n                }\n\n                button.set_tooltip_text(running.length === 1 ? running[0].title : app.name);\n            }),\n        })),\n    ),\n});\n\nexport default () => {\n    const pinnedapps = PinnedApps();\n    const taskbar = Taskbar();\n    const applauncher = AppButton({\n        class_name: 'launcher nonrunning',\n        icon: icons.apps.apps,\n        tooltip_text: 'Applications',\n        on_clicked: () => App.toggleWindow('applauncher'),\n    });\n    const separator = Widget.Separator({\n        vpack: 'center',\n        hpack: 'center',\n        orientation: 1,\n        setup: self => self.hook(taskbar, () => {\n            self.visible = taskbar.children.length > 0;\n        }, 'notify::children'),\n    });\n    return Widget.Box({\n        class_name: 'dock',\n        children: [applauncher, pinnedapps, separator, taskbar],\n    });\n};\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/dock/FloatingDock.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';\nimport Dock from './Dock.js';\nimport options from '../options.js';\n\n/** @param {number} monitor */\nexport default monitor => {\n    const revealer = Widget.Revealer({\n        transition: 'slide_up',\n        child: Dock(),\n        setup: self => {\n            const update = () => {\n                const ws = Hyprland.getWorkspace(Hyprland.active.workspace.id);\n                if (Hyprland.getMonitor(monitor)?.name === ws?.monitor)\n                    self.reveal_child = ws?.windows === 0;\n            };\n            self\n                .hook(Hyprland, update, 'client-added')\n                .hook(Hyprland, update, 'client-removed')\n                .hook(Hyprland.active.workspace, update);\n        },\n    });\n\n    return Widget.Window({\n        monitor,\n        name: `dock${monitor}`,\n        class_name: 'floating-dock',\n        anchor: ['bottom'],\n        child: Widget.Box({\n            children: [\n                revealer,\n                Widget.Box({\n                    class_name: 'padding',\n                    css: 'padding: 2px;',\n                }),\n            ],\n        }),\n        setup: self => self\n            .on('enter-notify-event', () => revealer.reveal_child = true)\n            .on('leave-notify-event', () => revealer.reveal_child = false)\n            .bind('visible', options.bar.position, 'value', v => v !== 'bottom'),\n    });\n};\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/icons.js",
    "content": "export default {\n    lock: 'system-lock-screen-symbolic',\n    fallback: {\n        executable: 'application-x-executable-symbolic',\n    },\n    audio: {\n        mic: {\n            muted: 'microphone-disabled-symbolic',\n            low: 'microphone-sensitivity-low-symbolic',\n            medium: 'microphone-sensitivity-medium-symbolic',\n            high: 'microphone-sensitivity-high-symbolic',\n        },\n        volume: {\n            muted: 'audio-volume-muted-symbolic',\n            low: 'audio-volume-low-symbolic',\n            medium: 'audio-volume-medium-symbolic',\n            high: 'audio-volume-high-symbolic',\n            overamplified: 'audio-volume-overamplified-symbolic',\n        },\n        type: {\n            headset: 'audio-headphones-symbolic',\n            speaker: 'audio-speakers-symbolic',\n            card: 'audio-card-symbolic',\n        },\n        mixer: '',\n    },\n    asusctl: {\n        profile: {\n            Balanced: 'power-profile-balanced-symbolic',\n            Quiet: 'power-profile-power-saver-symbolic',\n            Performance: 'power-profile-performance-symbolic',\n        },\n        mode: {\n            Integrated: '',\n            Hybrid: '󰢮',\n        },\n    },\n    apps: {\n        apps: 'view-app-grid-symbolic',\n        search: 'folder-saved-search-symbolic',\n    },\n    battery: {\n        charging: '󱐋',\n        warning: 'battery-empty-symbolic',\n    },\n    bluetooth: {\n        enabled: 'bluetooth-active-symbolic',\n        disabled: 'bluetooth-disabled-symbolic',\n    },\n    brightness: {\n        indicator: 'display-brightness-symbolic',\n        keyboard: 'keyboard-brightness-symbolic',\n        screen: 'display-brightness-symbolic',\n    },\n    powermenu: {\n        sleep: 'weather-clear-night-symbolic',\n        reboot: 'system-reboot-symbolic',\n        logout: 'system-log-out-symbolic',\n        shutdown: 'system-shutdown-symbolic',\n    },\n    recorder: {\n        recording: 'media-record-symbolic',\n    },\n    notifications: {\n        noisy: 'preferences-system-notifications-symbolic',\n        silent: 'notifications-disabled-symbolic',\n    },\n    trash: {\n        full: 'user-trash-full-symbolic',\n        empty: 'user-trash-symbolic',\n    },\n    mpris: {\n        fallback: 'audio-x-generic-symbolic',\n        shuffle: {\n            enabled: '󰒟',\n            disabled: '󰒟',\n        },\n        loop: {\n            none: '󰓦',\n            track: '󰓦',\n            playlist: '󰑐',\n        },\n        playing: '󰏦',\n        paused: '󰐍',\n        stopped: '󰐍',\n        prev: '󰒮',\n        next: '󰒭',\n    },\n    ui: {\n        colorpicker: 'color-select-symbolic',\n        close: 'window-close-symbolic',\n        info: 'info-symbolic',\n        menu: 'open-menu-symbolic',\n        link: 'web-browser-symbolic',\n        settings: 'emblem-system-symbolic',\n        tick: 'object-select-symbolic',\n        arrow: {\n            right: 'pan-end-symbolic',\n            left: 'pan-start-symbolic',\n            down: 'pan-down-symbolic',\n            up: 'pan-up-symbolic',\n        },\n    },\n    system: {\n        cpu: 'org.gnome.SystemMonitor-symbolic',\n        ram: 'drive-harddisk-solidstate-symbolic',\n        temp: 'temperature-symbolic',\n    },\n    dialog: {\n        Search: '',\n        Applauncher: '󰵆',\n        Bar: '',\n        Border: '󰃇',\n        Color: '󰏘',\n        Desktop: '',\n        Font: '',\n        General: '󰒓',\n        Miscellaneous: '󰠱',\n        Theme: '󰃟',\n        Notifications: '󰂚 ',\n    },\n};\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/lockscreen/Lockscreen.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Avatar from '../misc/Avatar.js';\nimport Lockscreen from '../services/lockscreen.js';\nimport Layer from 'gi://GtkLayerShell';\n\nconst PasswordEntry = () => Widget.Box({\n    children: [\n        Widget.Entry({\n            setup: self => self.hook(Lockscreen, () => self.text = '', 'lock'),\n            visibility: false,\n            placeholder_text: 'Password',\n            on_accept: ({ text }) => Lockscreen.auth(text || ''),\n            hpack: 'center',\n            hexpand: true,\n        }),\n        Widget.Spinner({\n            active: true,\n            vpack: 'center',\n            setup: self => self.hook(Lockscreen, (_, auth) => self.visible = auth, 'authenticating'),\n        }),\n    ],\n});\n\n/** @param {number} monitor */\nexport default monitor => {\n    const win = Widget.Window({\n        name: `lockscreen${monitor}`,\n        class_name: 'lockscreen',\n        monitor,\n        layer: 'overlay',\n        visible: false,\n        setup: self => self.hook(Lockscreen, (_, lock) => self.visible = lock, 'lock'),\n        child: Widget.Box({\n            css: 'min-width: 3000px; min-height: 2000px;',\n            class_name: 'shader',\n            child: Widget.Box({\n                class_name: 'content',\n                vertical: true,\n                hexpand: true,\n                vexpand: true,\n                hpack: 'center',\n                vpack: 'center',\n                children: [\n                    Avatar({\n                        hpack: 'center',\n                        vpack: 'center',\n                    }),\n                    PasswordEntry(),\n                ],\n            }),\n        }),\n    });\n\n    Layer.set_keyboard_mode(win, Layer.KeyboardMode.EXCLUSIVE);\n    return win;\n};\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/lockscreen/auth.py",
    "content": "#! /usr/bin/env python\n\nimport pam\nimport sys\nimport getpass\n\nprint(pam.authenticate(getpass.getuser(), sys.argv[1]));\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/main.js",
    "content": "import Applauncher from './applauncher/Applauncher.js';\nimport Dashboard from './dashboard/Dashboard.js';\nimport Desktop from './desktop/Desktop.js';\nimport FloatingDock from './dock/FloatingDock.js';\nimport Lockscreen from './lockscreen/Lockscreen.js';\nimport Notifications from './notifications/Notifications.js';\nimport OSD from './osd/OSD.js';\nimport Overview from './overview/Overview.js';\nimport PowerMenu from './powermenu/PowerMenu.js';\nimport QuickSettings from './quicksettings/QuickSettings.js';\nimport ScreenCorners from './screencorner/ScreenCorners.js';\nimport TopBar from './bar/TopBar.js';\nimport Verification from './powermenu/Verification.js';\nimport About from './about/about.js';\nimport { init } from './settings/setup.js';\nimport { forMonitors } from './utils.js';\nimport { initWallpaper } from './settings/wallpaper.js';\nimport options from './options.js';\n\ninitWallpaper();\n\nconst windows = () => [\n    forMonitors(FloatingDock),\n    forMonitors(Lockscreen),\n    forMonitors(Notifications),\n    forMonitors(OSD),\n    forMonitors(ScreenCorners),\n    forMonitors(TopBar),\n    Applauncher(),\n    Dashboard(),\n    Overview(),\n    PowerMenu(),\n    QuickSettings(),\n    Verification(),\n    About(),\n];\n\nexport default {\n    onConfigParsed: init,\n    windows: windows().flat(1),\n    closeWindowDelay: {\n        'quicksettings': options.transition.value,\n        'dashboard': options.transition.value,\n    },\n};\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/misc/Avatar.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport options from '../options.js';\n\n/** @param {import('types/widgets/box').BoxProps=} props */\nexport default props => Widget.Box({\n    ...props,\n    class_name: 'avatar',\n    connections: [\n        [options.desktop.avatar, box => box.setCss(`\n            background-image: url('${options.desktop.avatar.value}');\n            background-size: cover;\n        `)],\n        ['draw', box => {\n            const h = box.get_allocated_height();\n            box.set_size_request(Math.ceil(h * 1.1), -1);\n        }],\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/misc/BatteryIcon.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Battery from 'resource:///com/github/Aylur/ags/service/battery.js';\n\nexport default () => Widget.Icon({\n    class_name: 'battery',\n    setup: icon => icon.hook(Battery, () => {\n\n        icon.toggleClassName('charging', Battery.charging);\n        icon.toggleClassName('charged', Battery.charged);\n        icon.toggleClassName('low', Battery.percent < 30);\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/misc/Clock.js",
    "content": "import { clock } from '../variables.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\n\n/**\n * @param {import('types/widgets/label').Props & {\n *   format?: string,\n *   interval?: number,\n * }} o\n */\nexport default ({\n\tformat = '%H:%M:%S %B %e. %A',\n\tinterval = 1000,\n\t...rest\n} = {}) => Widget.Label({\n\tclass_name: 'clock',\n\tlabel: clock.bind('value').transform(time => {\n\t\treturn time.format(format) || 'wrong format';\n\t}),\n\t...rest,\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/misc/FontIcon.js",
    "content": "import Gtk from 'gi://Gtk?version=3.0';\nimport { subclass, register } from 'resource:///com/github/Aylur/ags/widget.js';\nimport AgsLabel from 'resource:///com/github/Aylur/ags/widgets/label.js';\n\nclass FontIcon extends AgsLabel {\n    static { register(this); }\n\n    /** @param {string | import('types/widgets/label').Props & { icon?: string }} params */\n    constructor(params = '') {\n        // @ts-expect-error\n        const { icon = '', ...rest } = params;\n\n        super(typeof params === 'string' ? {} : rest);\n        this.toggleClassName('font-icon');\n\n        if (typeof params === 'object')\n            this.icon = icon;\n\n        if (typeof params === 'string')\n            this.icon = params;\n    }\n\n    get icon() { return this.label; }\n    set icon(icon) { this.label = icon; }\n\n    get size() {\n        return this.get_style_context()\n            .get_property('font-size', Gtk.StateFlags.NORMAL);\n    }\n\n    /** @returns {[number, number]} */\n    vfunc_get_preferred_height() {\n        return [this.size, this.size];\n    }\n\n    /** @returns {[number, number]} */\n    vfunc_get_preferred_width() {\n        return [this.size, this.size];\n    }\n}\n\nexport default subclass(FontIcon);\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/misc/HoverRevealer.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\n\n/**\n * @typedef {import('types/widgets/eventbox').EventBoxProps & {\n *    indicator?: import('types/widgets/box').BoxProps['child']\n *    direction?: 'left' | 'right' | 'down' | 'up'\n *    duration?: number\n *    setupRevealer?: (rev: ReturnType<typeof Widget.Revealer>) => void\n *    setupEventBox?: (rev: ReturnType<typeof Widget.EventBox>) => void\n * }} HoverRevealProps\n */\n\n/**\n * @param {HoverRevealProps} props\n */\nexport default ({\n    indicator,\n    child,\n    direction = 'left',\n    duration = 300,\n    setupEventBox,\n    setupRevealer,\n    ...rest\n}) => {\n    let open = false;\n    const vertical = direction === 'down' || direction === 'up';\n    const posStart = direction === 'down' || direction === 'right';\n    const posEnd = direction === 'up' || direction === 'left';\n\n    const revealer = Widget.Revealer({\n        transition: `slide_${direction}`,\n        setup: setupRevealer,\n        transition_duration: duration,\n        child,\n    });\n\n    const eventbox = Widget.EventBox({\n        ...rest,\n        setup: setupEventBox,\n        on_hover: () => {\n            if (open)\n                return;\n\n            revealer.reveal_child = true;\n            Utils.timeout(duration, () => open = true);\n        },\n        on_hover_lost: () => {\n            if (!open)\n                return;\n\n            revealer.reveal_child = false;\n            open = false;\n        },\n        child: Widget.Box({\n            vertical,\n            children: [\n                posStart && indicator,\n                revealer,\n                posEnd && indicator,\n            ],\n        }),\n    });\n\n    return Widget.Box({\n        children: [eventbox],\n    });\n};\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/misc/IconBrowser.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport RegularWindow from './RegularWindow.js';\nimport Gtk from 'gi://Gtk';\n\nexport default () => {\n    const selected = Widget.Label({\n        css: 'font-size: 1.2em;',\n    });\n\n    const flowbox = Widget.FlowBox({\n        min_children_per_line: 10,\n        setup: self => {\n            self.connect('child-activated', (_, child) => {\n                selected.label = child.get_child().iconName;\n            });\n\n            Gtk.IconTheme.get_default().list_icons(null).sort().map(icon => {\n                !icon.endsWith('.symbolic') && self.insert(Widget.Icon({\n                    icon,\n                    size: 38,\n                }), -1);\n            });\n\n            self.show_all();\n        },\n    });\n\n    const entry = Widget.Entry({\n        on_change: ({ text }) => flowbox.get_children().forEach(child => {\n            child.visible = child.get_child().iconName.includes(text);\n        }),\n    });\n\n    return RegularWindow({\n        name: 'icons',\n        visible: true,\n        child: Widget.Box({\n            css: 'padding: 30px;',\n            spacing: 20,\n            vertical: true,\n            children: [\n                entry,\n                Widget.Scrollable({\n                    hscroll: 'never',\n                    vscroll: 'always',\n                    hexpand: true,\n                    vexpand: true,\n                    css:\n                        'min-width: 500px;' +\n                        'min-height: 500px;',\n                    child: flowbox,\n                }),\n                selected,\n            ],\n        }),\n    });\n};\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/misc/Notification.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport GLib from 'gi://GLib';\n\n/** @param {import('types/service/notifications').Notification} n */\nconst NotificationIcon = ({ app_entry, app_icon, image }) => {\n    if (image) {\n        return Widget.Box({\n            vpack: 'start',\n            hexpand: false,\n            class_name: 'icon img',\n            css: `\n                background-image: url(\"${image}\");\n                background-size: cover;\n                background-repeat: no-repeat;\n                background-position: center;\n                min-width: 78px;\n                min-height: 78px;\n            `,\n        });\n    }\n\n    let icon = 'dialog-information-symbolic';\n    if (Utils.lookUpIcon(app_icon))\n        icon = app_icon;\n\n    if (Utils.lookUpIcon(app_entry || ''))\n        icon = app_entry || '';\n\n    return Widget.Box({\n        vpack: 'start',\n        hexpand: false,\n        class_name: 'icon',\n        css: `\n            min-width: 78px;\n            min-height: 78px;\n        `,\n        child: Widget.Icon({\n            icon, size: 58,\n            hpack: 'center', hexpand: true,\n            vpack: 'center', vexpand: true,\n        }),\n    });\n};\n\n/** @param {import('types/service/notifications').Notification} notification */\nexport default notification => {\n    const content = Widget.Box({\n        class_name: 'content',\n        children: [\n            NotificationIcon(notification),\n            Widget.Box({\n                hexpand: true,\n                vertical: true,\n                children: [\n                    Widget.Box({\n                        children: [\n                            Widget.Label({\n                                class_name: 'title',\n                                xalign: 0,\n                                justification: 'left',\n                                hexpand: true,\n                                max_width_chars: 24,\n                                truncate: 'end',\n                                wrap: true,\n                                label: notification.summary,\n                                use_markup: true,\n                            }),\n                            Widget.Label({\n                                class_name: 'time',\n                                vpack: 'start',\n                                label: GLib.DateTime.new_from_unix_local(notification.time).format('%H:%M'),\n                            }),\n                            Widget.Button({\n                                class_name: 'close-button',\n                                vpack: 'start',\n                                child: Widget.Icon('window-close-symbolic'),\n                                on_clicked: notification.close,\n                            }),\n                        ],\n                    }),\n                    Widget.Label({\n                        class_name: 'description',\n                        hexpand: true,\n                        use_markup: true,\n                        xalign: 0,\n                        justification: 'left',\n                        label: notification.body,\n                        max_width_chars: 24,\n                        wrap: true,\n                    }),\n                ],\n            }),\n        ],\n    });\n\n    const actionsbox = notification.actions.length > 0 ? Widget.Revealer({\n        transition: 'slide_down',\n        child: Widget.EventBox({\n            child: Widget.Box({\n                class_name: 'actions horizontal',\n                children: notification.actions.map(action => Widget.Button({\n                    class_name: 'action-button',\n                    on_clicked: () => notification.invoke(action.id),\n                    hexpand: true,\n                    child: Widget.Label(action.label),\n                })),\n            }),\n        }),\n    }) : null;\n\n    return Widget.EventBox({\n        class_name: `notification ${notification.urgency}`,\n        vexpand: false,\n        on_primary_click: () => notification.dismiss(),\n        on_hover() {\n            if (actionsbox)\n                actionsbox.reveal_child = true;\n        },\n        on_hover_lost() {\n            if (actionsbox)\n                actionsbox.reveal_child = true;\n\n            notification.dismiss();\n        },\n        child: Widget.Box({\n            vertical: true,\n            children: actionsbox ? [content, actionsbox] : [content],\n        }),\n    });\n};\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/misc/PopupWindow.js",
    "content": "import AgsWindow from 'resource:///com/github/Aylur/ags/widgets/window.js';\nimport App from 'resource:///com/github/Aylur/ags/app.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport options from '../options.js';\nimport GObject from 'gi://GObject';\n\nconst keyGrabber = Widget.Window({\n    name: 'key-grabber',\n    popup: true,\n    anchor: ['top', 'left', 'right', 'bottom'],\n    css: 'background-color: transparent;',\n    visible: false,\n    exclusivity: 'ignore',\n    keymode: 'on-demand',\n    layer: 'top',\n    attribute: { list: [] },\n    setup: self => self.on('notify::visible', ({ visible }) => {\n        if (!visible)\n            self.attribute?.list.forEach(name => App.closeWindow(name));\n    }),\n    child: Widget.EventBox({ vexpand: true }).on('button-press-event', () => {\n        App.closeWindow('key-grabber');\n        keyGrabber.attribute?.list.forEach(name => App.closeWindow(name));\n    }),\n});\n\n// add before any PopupWindow is instantiated\nApp.addWindow(keyGrabber);\n\nexport class PopupWindow extends AgsWindow {\n    static { GObject.registerClass(this); }\n\n    constructor({ name, child, transition = 'none', visible = false, ...rest }) {\n        super({\n            ...rest,\n            name,\n            popup: true,\n            keymode: 'exclusive',\n            layer: 'overlay',\n            class_names: ['popup-window', name],\n        });\n\n        child.toggleClassName('window-content');\n        this.revealer = Widget.Revealer({\n            transition,\n            child,\n            transition_duration: options.transition.value,\n            setup: self => self.hook(App, (_, wname, visible) => {\n                if (wname === name)\n                    this.revealer.reveal_child = visible;\n            }),\n        });\n\n        this.child = Widget.Box({\n            css: 'padding: 1px;',\n            child: this.revealer,\n        });\n\n        this.show_all();\n        this.visible = visible;\n\n        keyGrabber.bind('visible', this, 'visible');\n        keyGrabber.attribute?.list.push(name);\n    }\n\n    set transition(dir) { this.revealer.transition = dir; }\n    get transition() { return this.revealer.transition; }\n}\n\n/** @param {import('types/widgets/window').WindowProps & {\n *      name: string\n *      child: import('types/widgets/box').default\n *      transition?: import('types/widgets/revealer').RevealerProps['transition']\n *  }} config\n */\nexport default config => new PopupWindow(config);\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/misc/Progress.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\n\n/** @param {import('types/widgets/box').BoxProps & {\n *      width: number\n *      height: number\n * }} o */\nexport default ({\n    height = 18,\n    width = 180,\n    vertical = false,\n    child,\n    ...props\n}) => {\n    const fill = Widget.Box({\n        class_name: 'fill',\n        hexpand: vertical,\n        vexpand: !vertical,\n        hpack: vertical ? 'fill' : 'start',\n        vpack: vertical ? 'end' : 'fill',\n        children: [child],\n    });\n\n    let fill_size = 0;\n\n    return Widget.Box({\n        ...props,\n        class_name: 'progress',\n        css: `\n            min-width: ${width}px;\n            min-height: ${height}px;\n        `,\n        children: [fill],\n        attribute: value => {\n            if (value < 0)\n                return;\n\n            const axis = vertical ? 'height' : 'width';\n            const axisv = vertical ? height : width;\n            const min = vertical ? width : height;\n            const preferred = (axisv - min) * value + min;\n\n            if (!fill_size) {\n                fill_size = preferred;\n                fill.setCss(`min-${axis}: ${preferred}px;`);\n                return;\n            }\n\n            const frames = 10;\n            const goal = preferred - fill_size;\n            const step = goal / frames;\n\n            for (let i = 0; i < frames; ++i) {\n                Utils.timeout(5 * i, () => {\n                    fill_size += step;\n                    fill.setCss(`min-${axis}: ${fill_size}px`);\n                });\n            }\n        },\n    });\n};\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/misc/RegularWindow.js",
    "content": "import { subclass } from 'resource:///com/github/Aylur/ags/widget.js';\nimport Gtk from 'gi://Gtk';\n\nexport default subclass(Gtk.Window, 'RegularWindow');\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/misc/mpris.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport icons from '../icons.js';\nimport { blurImg } from '../utils.js';\n\n/**\n * @param {import('types/service/mpris').MprisPlayer} player\n * @param {import('types/widgets/box').BoxProps=} props\n */\nexport const CoverArt = (player, props) => Widget.Box({\n    ...props,\n    class_name: 'cover',\n    css: player.bind('cover_path').transform(p =>\n        `background-image: url(\"${p}\")`),\n});\n\n/**\n * @param {import('types/service/mpris').MprisPlayer} player\n * @param {import('types/widgets/box').BoxProps=} props\n */\nexport const BlurredCoverArt = (player, props) => Widget.Box({\n    ...props,\n    class_name: 'blurred-cover',\n    setup: self => self.hook(player, box => blurImg(player.cover_path).then(img => {\n        img && box.setCss(`background-image: url(\"${img}\")`);\n    }), 'notify::cover-path'),\n});\n\n/**\n * @param {import('types/service/mpris').MprisPlayer} player\n * @param {import('types/widgets/label').Props=} props\n */\nexport const TitleLabel = (player, props) => Widget.Label({\n    ...props,\n    class_name: 'title',\n    label: player.bind('track_title'),\n});\n\n/**\n * @param {import('types/service/mpris').MprisPlayer} player\n * @param {import('types/widgets/label').Props=} props\n */\nexport const ArtistLabel = (player, props) => Widget.Label({\n    ...props,\n    class_name: 'artist',\n    label: player.bind('track_artists').transform(a => a.join(', ') || ''),\n});\n\n/**\n * @param {import('types/service/mpris').MprisPlayer} player\n * @param {import('types/widgets/icon').Props & { symbolic?: boolean }=} props\n */\nexport const PlayerIcon = (player, { symbolic = true, ...props } = {}) => Widget.Icon({\n    ...props,\n    class_name: 'player-icon',\n    tooltip_text: player.identity || '',\n    setup: self => self.hook(player, icon => {\n        const name = `${player.entry}${symbolic ? '-symbolic' : ''}`;\n        Utils.lookUpIcon(name)\n            ? icon.icon = name\n            : icon.icon = icons.mpris.fallback;\n    }),\n});\n\n/**\n * @param {import('types/service/mpris').MprisPlayer} player\n * @param {import('types/widgets/slider').SliderProps=} props\n */\nexport const PositionSlider = (player, props) => Widget.Slider({\n    ...props,\n    class_name: 'position-slider',\n    draw_value: false,\n    on_change: ({ value }) => player.position = player.length * value,\n    setup: self => {\n        const update = () => {\n            if (self.dragging)\n                return;\n\n            self.visible = player.length > 0;\n            if (player.length > 0)\n                self.value = player.position / player.length;\n        };\n        self.hook(player, update);\n        self.hook(player, update, 'position');\n        self.poll(1000, update);\n    },\n});\n\n/** @param {number} length */\nfunction lengthStr(length) {\n    const min = Math.floor(length / 60);\n    const sec = Math.floor(length % 60);\n    const sec0 = sec < 10 ? '0' : '';\n    return `${min}:${sec0}${sec}`;\n}\n\n/** @param {import('types/service/mpris').MprisPlayer} player */\nexport const PositionLabel = player => Widget.Label({\n    setup: self => {\n        const update = (_, time) => {\n            player.length > 0\n                ? self.label = lengthStr(time || player.position)\n                : self.visible = !!player;\n        };\n        self.hook(player, update, 'position');\n        self.poll(1000, update);\n    },\n});\n\n/** @param {import('types/service/mpris').MprisPlayer} player */\nexport const LengthLabel = player => Widget.Label({\n    label: player.bind('length').transform(l => lengthStr(l)),\n    visible: player.bind('length').transform(l => l > 0),\n});\n\n/** @param {import('types/service/mpris').MprisPlayer} player */\nexport const Slash = player => Widget.Label({\n    label: '/',\n    visible: player.bind('length').transform(l => l > 0),\n});\n\n/**\n * @param {Object} o\n * @param {import('types/service/mpris').MprisPlayer} o.player\n * @param {import('types/widgets/stack').StackProps['children']} o.children\n * @param {'shuffle' | 'loop' | 'playPause' | 'previous' | 'next'} o.onClick\n * @param {string} o.prop\n * @param {string} o.canProp\n * @param {any} o.cantValue\n */\nconst PlayerButton = ({ player, children, onClick, prop, canProp, cantValue }) => Widget.Button({\n    child: Widget.Stack({ children }).bind('shown', player, prop, p => `${p}`),\n    on_clicked: () => player[onClick](),\n    visible: player.bind(canProp).transform(c => c !== cantValue),\n});\n\n/** @param {import('types/service/mpris').MprisPlayer} player */\nexport const ShuffleButton = player => PlayerButton({\n    player,\n    children: {\n        'true': Widget.Label({\n            class_name: 'shuffle enabled',\n            label: icons.mpris.shuffle.enabled,\n        }),\n        'false': Widget.Label({\n            class_name: 'shuffle disabled',\n            label: icons.mpris.shuffle.disabled,\n        }),\n    },\n    onClick: 'shuffle',\n    prop: 'shuffle-status',\n    canProp: 'shuffle-status',\n    cantValue: null,\n});\n\n/** @param {import('types/service/mpris').MprisPlayer} player */\nexport const LoopButton = player => PlayerButton({\n    player,\n    children: {\n        'None': Widget.Label({\n            class_name: 'loop none',\n            label: icons.mpris.loop.none,\n        }),\n        'Track': Widget.Label({\n            class_name: 'loop track',\n            label: icons.mpris.loop.track,\n        }),\n        'Playlist': Widget.Label({\n            class_name: 'loop playlist',\n            label: icons.mpris.loop.playlist,\n        }),\n    },\n    onClick: 'loop',\n    prop: 'loop-status',\n    canProp: 'loop-status',\n    cantValue: null,\n});\n\n/** @param {import('types/service/mpris').MprisPlayer} player */\nexport const PlayPauseButton = player => PlayerButton({\n    player,\n    children: {\n        'Playing': Widget.Label({\n            class_name: 'playing',\n            label: icons.mpris.playing,\n        }),\n        'Paused': Widget.Label({\n            class_name: 'paused',\n            label: icons.mpris.paused,\n        }),\n        'Stopped': Widget.Label({\n            class_name: 'stopped',\n            label: icons.mpris.stopped,\n        }),\n    },\n    onClick: 'playPause',\n    prop: 'play-back-status',\n    canProp: 'can-play',\n    cantValue: false,\n});\n\n/** @param {import('types/service/mpris').MprisPlayer} player */\nexport const PreviousButton = player => PlayerButton({\n    player,\n    children: {\n        'true': Widget.Label({\n            class_name: 'previous',\n            label: icons.mpris.prev,\n        }),\n    },\n    onClick: 'previous',\n    prop: 'can-go-prev',\n    canProp: 'can-go-prev',\n    cantValue: false,\n});\n\n/** @param {import('types/service/mpris').MprisPlayer} player */\nexport const NextButton = player => PlayerButton({\n    player,\n    children: {\n        'true': Widget.Label({\n            class_name: 'next',\n            label: icons.mpris.next,\n        }),\n    },\n    onClick: 'next',\n    prop: 'can-go-next',\n    canProp: 'can-go-next',\n    cantValue: false,\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/notifications/Notifications.js",
    "content": "import Notifications from 'resource:///com/github/Aylur/ags/service/notifications.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport Notification from '../misc/Notification.js';\nimport options from '../options.js';\n\n/** @param {import('types/widgets/revealer').default} parent */\nconst Popups = parent => {\n    const map = new Map();\n\n    const onDismissed = (_, id, force = false) => {\n        if (!id || !map.has(id))\n            return;\n\n        if (map.get(id).isHovered() && !force)\n            return;\n\n        if (map.size - 1 === 0)\n            parent.reveal_child = false;\n\n        Utils.timeout(200, () => {\n            map.get(id)?.destroy();\n            map.delete(id);\n        });\n    };\n\n    /** @param {import('types/widgets/box').default} box */\n    const onNotified = (box, id) => {\n        if (!id || Notifications.dnd)\n            return;\n\n        const n = Notifications.getNotification(id);\n        if (!n)\n            return;\n\n        if (options.notifications.black_list.value.includes(n.app_name || ''))\n            return;\n\n        map.delete(id);\n        map.set(id, Notification(n));\n        box.children = Array.from(map.values()).reverse();\n        Utils.timeout(10, () => {\n            parent.reveal_child = true;\n        });\n    };\n\n    return Widget.Box({ vertical: true })\n        .hook(Notifications, onNotified, 'notified')\n        .hook(Notifications, onDismissed, 'dismissed')\n        .hook(Notifications, (box, id) => onDismissed(box, id, true), 'closed');\n};\n\n/** @param {import('types/widgets/revealer').RevealerProps['transition']} transition */\nconst PopupList = (transition = 'slide_down') => Widget.Box({\n    css: 'padding: 1px',\n    children: [\n        Widget.Revealer({\n            transition,\n            setup: self => self.child = Popups(self),\n        }),\n    ],\n});\n\n/** @param {number} monitor */\nexport default monitor => Widget.Window({\n    monitor,\n    name: `notifications${monitor}`,\n    class_name: 'notifications',\n    anchor: options.notifications.position.bind('value'),\n    child: PopupList(),\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/options.js",
    "content": "/**\n * An object holding Options that are Variables with cached values.\n *\n * to update an option at runtime simply run\n * ags -r \"options.path.to.option.setValue('value')\"\n *\n * resetting:\n * ags -r \"options.reset()\"\n */\n\nimport {\n  Option,\n  resetOptions,\n  getValues,\n  apply,\n  getOptions,\n} from \"./settings/option.js\";\nimport themes from \"./themes.js\";\nimport { HOME } from \"./settings/theme.js\";\n\nexport default {\n  reset: resetOptions,\n  values: getValues,\n  apply: apply,\n  list: getOptions,\n\n  spacing: Option(2),\n  padding: Option(8),\n  radii: Option(5),\n\n  popover_padding_multiplier: Option(1.4, {\n    category: \"General\",\n    note: \"popover-padding: padding × this\",\n    type: \"float\",\n    unit: \"\",\n  }),\n\n  misc: {\n    gtk: {\n      theme: Option(\"adw-gtk3-dark\", {\n        scss: \"exclude\",\n      }),\n    },\n    gtkIcons: {\n      theme: Option(\"Adwaita\", {\n        scss: \"exclude\",\n      }),\n    },\n  },\n\n  color: {\n    red: Option(\"#c01c28\", { scss: \"red\" }),\n    green: Option(\"#2ec27e\", { scss: \"green\" }),\n    yellow: Option(\"#f5c211\", { scss: \"yellow\" }),\n    blue: Option(\"#3584e4\", { scss: \"blue\" }),\n    magenta: Option(\"#813d9c\", { scss: \"magenta\" }),\n    teal: Option(\"#99c1f1\", { scss: \"teal\" }),\n    orange: Option(\"#e66100\", { scss: \"orange\" }),\n  },\n\n  theme: {\n    name: Option(themes[0].name, {\n      category: \"exclude\",\n      note: \"Name to show as active in quicktoggles\",\n    }),\n\n    icon: Option(themes[0].icon, {\n      category: \"exclude\",\n      note: \"Icon to show as active in quicktoggles\",\n    }),\n\n    scheme: Option(\"dark\", {\n      enums: [\"dark\", \"light\"],\n      type: \"enum\",\n      note: \"Color scheme to set on Gtk apps: 'ligth' or 'dark'\",\n      title: \"Color Scheme\",\n      scss: \"color-scheme\",\n    }),\n    bg: Option(\"#1E1E1E\", {\n      title: \"Background Color\",\n      scss: \"bg-color\",\n    }),\n    fg: Option(\"#deddda\", {\n      title: \"Foreground Color\",\n      scss: \"fg-color\",\n    }),\n\n    accent: {\n      accent: Option(\"$blue\", {\n        category: \"Theme\",\n        title: \"Accent Color\",\n        scss: \"accent\",\n      }),\n      fg: Option(\"#141414\", {\n        category: \"Theme\",\n        title: \"Accent Foreground Color\",\n        scss: \"accent-fg\",\n      }),\n      gradient: Option(\"to right, $accent, lighten($accent, 6%)\", {\n        category: \"Theme\",\n        title: \"Accent Linear Gradient\",\n        scss: \"accent-gradient\",\n      }),\n    },\n\n    widget: {\n      bg: Option(\"$fg-color\", {\n        category: \"Theme\",\n        title: \"Widget Background Color\",\n        scss: \"_widget-bg\",\n      }),\n      opacity: Option(94, {\n        category: \"Theme\",\n        title: \"Widget Background Opacity\",\n        unit: \"\",\n        scss: \"widget-opacity\",\n      }),\n      borderwidth: Option(0, {\n        category: \"Theme\",\n        title: \"Border Width\",\n        scss: \"widget-border-width\",\n      }),\n    },\n  },\n\n  border: {\n    color: Option(\"$fg-color\", {\n      category: \"Border\",\n      title: \"Border Color\",\n      scss: \"_border-color\",\n    }),\n    opacity: Option(97, {\n      category: \"Border\",\n      title: \"Border Opacity\",\n      unit: \"\",\n    }),\n    width: Option(0, {\n      category: \"Border\",\n      title: \"Border Width\",\n    }),\n    barcolor: Option(\"#ffffff\", {\n      category: \"Border\",\n      title: \"Bar Border color\",\n      scss: \"bar-border-color\",\n    }),\n  },\n\n  hypr: {\n    inactive_border: Option(\"rgba(333333ff)\", {\n      category: \"Border\",\n      title: \"Border on Inactive Windows\",\n      scss: \"exclude\",\n    }),\n    wm_gaps: Option(3, {\n      category: \"General\",\n      scss: \"wm-gaps\",\n      note: \"wm-gaps\",\n      type: \"float\",\n      unit: \"\",\n    }),\n  },\n\n  // TODO: use this on revealers\n  transition: Option(100, {\n    category: \"exclude\",\n    note: \"Transition time on aminations in ms, e.g on hover\",\n    unit: \"ms\",\n  }),\n\n  font: {\n    font: Option(\"Ubuntu Nerd Font\", {\n      type: \"font\",\n      title: \"Font\",\n      scss: \"font\",\n    }),\n    mono: Option(\"Mononoki Nerd Font\", {\n      title: \"Monospaced Font\",\n      scss: \"mono-font\",\n    }),\n    size: Option(13, {\n      scss: \"font-size\",\n      unit: \"pt\",\n    }),\n  },\n\n  applauncher: {\n    width: Option(500),\n    height: Option(500),\n    icon_size: Option(42),\n    anchor: Option([\"center\"]),\n  },\n\n  bar: {\n    position: Option(\"top\", {\n      enums: [\"top\", \"bottom\"],\n      type: \"enum\",\n    }),\n    style: Option(\"floating\", {\n      enums: [\"floating\", \"normal\", \"separated\"],\n      type: \"enum\",\n    }),\n    borderwidth: Option(0, {\n      category: \"Bar\",\n      title: \"Border Width\",\n      scss: \"bar-border-width\",\n    }),\n    flat_buttons: Option(true, { scss: \"bar-flat-buttons\" }),\n    separators: Option(true),\n    icon: Option(\"distro-icon\", {\n      note: '\"distro-icon\" or a single font',\n    }),\n  },\n\n  battery: {\n    show_percentage: Option(false, {\n      persist: true,\n      noReload: false,\n      category: \"exclude\",\n    }),\n    bar: {\n      show_icon: Option(false, { category: \"Bar\" }),\n      width: Option(70, { category: \"Bar\" }),\n      height: Option(14, { category: \"Bar\" }),\n      full: Option(false, { category: \"Bar\" }),\n    },\n    low: Option(30, { category: \"Bar\" }),\n    medium: Option(50, { category: \"Bar\" }),\n  },\n\n  desktop: {\n    wallpaper: {\n      fg: Option(\"#fff\", { scss: \"wallpaper-fg\" }),\n      img: Option(themes[0].options[\"desktop.wallpaper.img\"], {\n        scssFormat: (v) => `\"${v}\"`,\n        type: \"img\",\n      }),\n    },\n    avatar: Option(`${HOME}/face.png`, {\n      scssFormat: (v) => `\"${v}\"`,\n      type: \"img\",\n      note: \"displayed in quicksettings and locksreen\",\n    }),\n    screen_corners: Option(true, { scss: \"screen-corners\" }),\n    clock: {\n      enable: Option(true),\n      position: Option(\"center center\", {\n        note: \"halign valign\",\n      }),\n    },\n    drop_shadow: Option(false, { scss: \"drop-shadow\" }),\n    shadow: Option(\"rgba(0, 0, 0, .6)\", { scss: \"shadow\" }),\n    dock: {\n      icon_size: Option(42),\n      pinned_apps: Option(\n        [\n          \"brave\",\n          \"Visual Studio Code\",\n          \"kitty\",\n          \"org.gnome.Nautilus\",\n          \"obsidian\",\n          \"discord\",\n          \"spotify\",\n          \"superslicer\",\n          \"org.gnome.Software\",\n        ],\n        { scss: \"exclude\" },\n      ),\n    },\n  },\n\n  notifications: {\n    black_list: Option([\"Spotify\"], { note: \"app-name | entry\" }),\n    position: Option([\"top\"], { note: \"anchor\" }),\n    width: Option(450),\n  },\n\n  dashboard: {\n    sys_info_size: Option(70, {\n      category: \"Desktop\",\n      scss: \"sys-info-size\",\n    }),\n  },\n\n  mpris: {\n    black_list: Option([\"Caprine\"], {\n      category: \"Bar\",\n      title: \"List of blacklisted mpris players\",\n      note: \"filters for bus-name, name, identity, entry\",\n    }),\n    preferred: Option(\"spotify\", {\n      category: \"Bar\",\n      title: \"Preferred player\",\n    }),\n  },\n\n  workspaces: Option(10, {\n    category: \"Bar\",\n    title: \"No. workspaces on bar and overview\",\n    note: \"Set it to 0 to make it dynamic\",\n  }),\n\n  temperature: \"/sys/class/thermal/thermal_zone6/temp\",\n  systemFetchInterval: 1000,\n  brightnessctlKBD: \"asus::kbd_backlight\",\n  substitutions: {\n    icons: [\n      [\"transmission-gtk\", \"transmission\"],\n      [\"blueberry.py\", \"bluetooth\"],\n      [\"Caprine\", \"facebook-messenger\"],\n      [\"\", \"preferences-desktop-display\"],\n    ],\n    titles: [\n      [\"com.github.Aylur.ags\", \"AGS\"],\n      [\"transmission-gtk\", \"Transmission\"],\n      [\"com.obsproject.Studio\", \"OBS\"],\n      [\"com.usebottles.bottles\", \"Bottles\"],\n      [\"com.github.wwmm.easyeffects\", \"Easy Effects\"],\n      [\"org.gnome.TextEditor\", \"Text Editor\"],\n      [\"org.gnome.design.IconLibrary\", \"Icon Library\"],\n      [\"blueberry.py\", \"Blueberry\"],\n      [\"org.wezfurlong.wezterm\", \"Wezterm\"],\n      [\"com.raggesilver.BlackBox\", \"BlackBox\"],\n      [\"firefox\", \"Firefox\"],\n      [\"org.gnome.Nautilus\", \"Files\"],\n      [\"libreoffice-writer\", \"Writer\"],\n      [\"\", \"Desktop\"],\n    ],\n  },\n};\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/osd/OSD.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport FontIcon from '../misc/FontIcon.js';\nimport Progress from '../misc/Progress.js';\nimport Indicator from '../services/onScreenIndicator.js';\n\nexport const OnScreenIndicator = ({ height = 200, width = 32 } = {}) => Widget.Box({\n    class_name: 'indicator',\n    css: 'padding: 1px;',\n    child: Widget.Revealer({\n        transition: 'slide_left',\n        setup: self => self.hook(Indicator, (_, value) => {\n            self.reveal_child = value > -1;\n        }),\n        child: Progress({\n            width,\n            height,\n            vertical: true,\n            setup: self => self.hook(Indicator, (_, value) => self.attribute(value)),\n            child: Widget.Stack({\n                vpack: 'start',\n                hpack: 'center',\n                hexpand: false,\n                children: {\n                    true: Widget.Icon({\n                        hpack: 'center',\n                        size: width,\n                        setup: w => w.hook(Indicator, (_, _v, name) => w.icon = name || ''),\n                    }),\n                    false: FontIcon({\n                        hpack: 'center',\n                        hexpand: true,\n                        css: `font-size: ${width}px;`,\n                        setup: w => w.hook(Indicator, (_, _v, name) => w.label = name || ''),\n                    }),\n                },\n                setup: self => self.hook(Indicator, (_, _v, name) => {\n                    self.shown = `${!!Utils.lookUpIcon(name)}`;\n                }),\n            }),\n        }),\n    }),\n});\n\n/** @param {number} monitor */\nexport default monitor => Widget.Window({\n    name: `indicator${monitor}`,\n    monitor,\n    class_name: 'indicator',\n    layer: 'overlay',\n    anchor: ['right'],\n    child: OnScreenIndicator(),\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/overview/Client.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport App from 'resource:///com/github/Aylur/ags/app.js';\nimport { createSurfaceFromWidget, substitute } from '../utils.js';\nimport Gdk from 'gi://Gdk';\nimport Gtk from 'gi://Gtk?version=3.0';\nimport options from '../options.js';\nimport Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';\nimport icons from '../icons.js';\n\nconst SCALE = 0.08;\nconst TARGET = [Gtk.TargetEntry.new('text/plain', Gtk.TargetFlags.SAME_APP, 0)];\n\n/** @param {string} args */\nconst dispatch = args => Hyprland.sendMessage(`dispatch ${args}`);\n\n/** @param {string} str */\nconst icon = str => {\n    const icon = substitute(options.substitutions.icons, str);\n    if (Utils.lookUpIcon(icon))\n        return icon;\n\n    console.warn('no icon', icon);\n    return icons.fallback.executable;\n}\n\nexport default ({ address, size: [w, h], class: c, title }) => Widget.Button({\n    class_name: 'client',\n    tooltip_text: `${title}`,\n    child: Widget.Icon({\n        css: `\n            min-width: ${w * SCALE}px;\n            min-height: ${h * SCALE}px;\n        `,\n        icon: icon(c),\n    }),\n    on_secondary_click: () => dispatch(`closewindow address:${address}`),\n    on_clicked: () => dispatch(`focuswindow address:${address}`)\n        .then(() => App.closeWindow('overview')),\n\n    setup: btn => btn\n        .on('drag-data-get', (_w, _c, data) => data.set_text(address, address.length))\n        .on('drag-begin', (_, context) => {\n            Gtk.drag_set_icon_surface(context, createSurfaceFromWidget(btn));\n            btn.toggleClassName('hidden', true);\n        })\n        .on('drag-end', () => btn.toggleClassName('hidden', false))\n        .drag_source_set(Gdk.ModifierType.BUTTON1_MASK, TARGET, Gdk.DragAction.COPY),\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/overview/Overview.js",
    "content": "import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';\nimport PopupWindow from '../misc/PopupWindow.js';\nimport Workspace from './Workspace.js';\nimport options from '../options.js';\nimport { range } from '../utils.js';\n\nconst ws = options.workspaces;\n\nconst Overview = () => Widget.Box({\n    children: [Workspace(0)], // for type infer\n    setup: self => Utils.idle(() => {\n        self.hook(ws, () => {\n            self.children = range(ws.value).map(Workspace);\n            update(self);\n            children(self);\n        });\n        self.hook(Hyprland, update);\n        self.hook(Hyprland, children, 'notify::workspaces');\n        update(self);\n        children(self);\n    }),\n});\n\n/** @param {ReturnType<typeof Overview>} box */\nconst update = box => {\n    if (!box.get_parent()?.visible)\n        return;\n\n    Hyprland.sendMessage('j/clients')\n        .then(clients => {\n            box.children.forEach(ws => {\n                ws.attribute(JSON.parse(clients));\n            });\n        })\n        .catch(console.error);\n};\n\n/** @param {import('types/widgets/box').default} box */\nconst children = box => {\n    if (ws.value === 0) {\n        box.children = Hyprland.workspaces\n            .sort((ws1, ws2) => ws1.id - ws2.id)\n            .map(({ id }) => Workspace(id));\n    }\n};\n\nexport default () => PopupWindow({\n    name: 'overview',\n    child: Overview(),\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/overview/Workspace.js",
    "content": "import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport Gdk from 'gi://Gdk';\nimport Gtk from 'gi://Gtk?version=3.0';\nimport Client from './Client.js';\n\nconst SCALE = 0.08;\nconst TARGET = [Gtk.TargetEntry.new('text/plain', Gtk.TargetFlags.SAME_APP, 0)];\n\n/** @param {string} args */\nconst dispatch = args => Utils.execAsync(`hyprctl dispatch ${args}`);\n\n/** @param {number} index */\nexport default index => {\n    const fixed = Gtk.Fixed.new();\n\n    return Widget.Box({\n        class_name: 'workspace',\n        vpack: 'center',\n        css: `\n            min-width: ${1920 * SCALE}px;\n            min-height: ${1080 * SCALE}px;\n        `,\n        setup: box => box.hook(Hyprland, () => {\n            box.toggleClassName('active', Hyprland.active.workspace.id === index);\n        }),\n        child: Widget.EventBox({\n            hexpand: true,\n            vexpand: true,\n            on_primary_click: () => dispatch(`workspace ${index}`),\n            setup: eventbox => {\n                eventbox.drag_dest_set(Gtk.DestDefaults.ALL, TARGET, Gdk.DragAction.COPY);\n                eventbox.connect('drag-data-received', (_w, _c, _x, _y, data) => {\n                    dispatch(`movetoworkspacesilent ${index},address:${data.get_text()}`);\n                });\n            },\n            child: fixed,\n        }),\n\n        /** @param {Array<import('types/service/hyprland').Client>} clients */\n        attribute: clients => {\n            fixed.get_children().forEach(ch => ch.destroy());\n            clients\n                .filter(({ workspace: { id } }) => id === index)\n                .forEach(c => {\n                    c.at[0] -= Hyprland.getMonitor(c.monitor)?.x || 0;\n                    c.at[1] -= Hyprland.getMonitor(c.monitor)?.y || 0;\n                    c.mapped && fixed.put(Client(c), c.at[0] * SCALE, c.at[1] * SCALE);\n                });\n\n            fixed.show_all();\n        },\n    });\n};\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/powermenu/PowerMenu.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport icons from '../icons.js';\nimport PowerMenu from '../services/powermenu.js';\nimport ShadedPopup from './ShadedPopup.js';\n\n/**\n * @param {'sleep' | 'reboot' | 'logout' | 'shutdown'} action\n * @param {string} label\n */\nconst SysButton = (action, label) => Widget.Button({\n    on_clicked: () => PowerMenu.action(action),\n    child: Widget.Box({\n        vertical: true,\n        children: [\n            Widget.Icon(icons.powermenu[action]),\n            Widget.Label(label),\n        ],\n    }),\n});\n\nexport default () => ShadedPopup({\n    name: 'powermenu',\n    expand: true,\n    child: Widget.Box({\n        children: [\n            SysButton('sleep', 'Sleep'),\n            SysButton('reboot', 'Reboot'),\n            SysButton('logout', 'Log Out'),\n            SysButton('shutdown', 'Shutdown'),\n        ],\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/powermenu/ShadedPopup.js",
    "content": "import App from 'resource:///com/github/Aylur/ags/app.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\n\n/** @param {string} windowName */\nconst Padding = windowName => Widget.EventBox({\n    class_name: 'padding',\n    hexpand: true,\n    vexpand: true,\n    setup: w => w.on('button-press-event', () => App.toggleWindow(windowName)),\n});\n\n/**\n * @template {import('gi://Gtk?version=3.0').default.Widget} T\n * @param {import('types/widgets/window').WindowProps<T> & {\n *      name: string\n *      child: import('types/widgets/box').default\n *  }} o\n */\nexport default ({ name, child, ...rest }) => Widget.Window({\n    ...rest,\n    class_names: ['popup-window', name],\n    name,\n    visible: false,\n    popup: true,\n    keymode: 'on-demand',\n    setup() {\n        child.toggleClassName('window-content');\n    },\n    child: Widget.CenterBox({\n        class_name: 'shader',\n        css: 'min-width: 5000px; min-height: 3000px;',\n        start_widget: Padding(name),\n        end_widget: Padding(name),\n        center_widget: Widget.CenterBox({\n            vertical: true,\n            start_widget: Padding(name),\n            end_widget: Padding(name),\n            center_widget: child,\n        }),\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/powermenu/Verification.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport App from 'resource:///com/github/Aylur/ags/app.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport PowerMenu from '../services/powermenu.js';\nimport ShadedPopup from './ShadedPopup.js';\n\nexport default () => ShadedPopup({\n    name: 'verification',\n    expand: true,\n    child: Widget.Box({\n        vertical: true,\n        children: [\n            Widget.Box({\n                class_name: 'text-box',\n                vertical: true,\n                children: [\n                    Widget.Label({\n                        class_name: 'title',\n                        label: PowerMenu.bind('title'),\n                    }),\n                    Widget.Label({\n                        class_name: 'desc',\n                        label: 'Are you sure?',\n                    }),\n                ],\n            }),\n            Widget.Box({\n                class_name: 'buttons horizontal',\n                vexpand: true,\n                vpack: 'end',\n                homogeneous: true,\n                children: [\n                    Widget.Button({\n                        child: Widget.Label('No'),\n                        on_clicked: () => App.toggleWindow('verification'),\n                    }),\n                    Widget.Button({\n                        child: Widget.Label('Yes'),\n                        on_clicked: () => Utils.exec(PowerMenu.cmd),\n                    }),\n                ],\n            }),\n        ],\n    }),\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/quicksettings/QuickSettings.js",
    "content": "import Widget from \"resource:///com/github/Aylur/ags/widget.js\";\nimport Header from \"./widgets/Header.js\";\nimport PopupWindow from \"../misc/PopupWindow.js\";\nimport { Volume, Microhone, SinkSelector, AppMixer } from \"./widgets/Volume.js\";\nimport { NetworkToggle, WifiSelection } from \"./widgets/Network.js\";\nimport { BluetoothToggle, BluetoothDevices } from \"./widgets/Bluetooth.js\";\nimport { ThemeToggle, ThemeSelector } from \"./widgets/Theme.js\";\nimport Media from \"./widgets/Media.js\";\nimport Brightness from \"./widgets/Brightness.js\";\nimport DND from \"./widgets/DND.js\";\nimport MicMute from \"./widgets/MicMute.js\";\nimport options from \"../options.js\";\n\nconst Row = (toggles = [], menus = []) =>\n  Widget.Box({\n    vertical: true,\n    children: [\n      Widget.Box({\n        class_name: \"row horizontal\",\n        children: toggles,\n      }),\n      ...menus,\n    ],\n  });\n\nconst Homogeneous = (toggles) =>\n  Widget.Box({\n    homogeneous: true,\n    children: toggles,\n  });\n\nexport default () =>\n  PopupWindow({\n    name: \"quicksettings\",\n    setup: (self) =>\n      self.hook(options.bar.position, () => {\n        self.anchor = [\"right\", options.bar.position.value];\n        self.transition = \"crossfade\";\n      }),\n\n    child: Widget.Box({\n      vertical: true,\n      children: [\n        Header(),\n        Widget.Box({\n          class_name: \"sliders-box vertical\",\n          vertical: true,\n          children: [\n            Row([Volume()], [SinkSelector(), AppMixer()]),\n            Microhone(),\n            Brightness(),\n          ],\n        }),\n        Row(\n          [Homogeneous([NetworkToggle(), BluetoothToggle()]), DND()],\n          [WifiSelection(), BluetoothDevices()],\n        ),\n        Row([Homogeneous([ThemeToggle()]), MicMute()], [ThemeSelector()]),\n        Media(),\n      ],\n    }),\n  });\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/quicksettings/ToggleButton.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport App from 'resource:///com/github/Aylur/ags/app.js';\nimport Variable from 'resource:///com/github/Aylur/ags/variable.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport icons from '../icons.js';\n\n/** name of the currently opened menu  */\nexport const opened = Variable('');\nApp.connect('window-toggled', (_, name, visible) => {\n    if (name === 'quicksettings' && !visible)\n        Utils.timeout(500, () => opened.value = '');\n});\n\n/**\n * @param {string} name - menu name\n * @param {(() => void) | false=} activate\n */\nexport const Arrow = (name, activate) => {\n    let deg = 0;\n    let iconOpened = false;\n    const icon = Widget.Icon(icons.ui.arrow.right).hook(opened, () => {\n        if (opened.value === name && !iconOpened || opened.value !== name && iconOpened) {\n            const step = opened.value === name ? 10 : -10;\n            iconOpened = !iconOpened;\n            for (let i = 0; i < 9; ++i) {\n                Utils.timeout(15 * i, () => {\n                    deg += step;\n                    icon.setCss(`-gtk-icon-transform: rotate(${deg}deg);`);\n                });\n            }\n        }\n    });\n    return Widget.Button({\n        child: icon,\n        on_clicked: () => {\n            opened.value = opened.value === name ? '' : name;\n            if (typeof activate === 'function')\n                activate();\n        },\n    });\n};\n\n/**\n * @param {Object} o\n * @param {string} o.name - menu name\n * @param {import('gi://Gtk').Gtk.Widget} o.icon\n * @param {import('gi://Gtk').Gtk.Widget} o.label\n * @param {() => void} o.activate\n * @param {() => void} o.deactivate\n * @param {boolean=} o.activateOnArrow\n * @param {[import('gi://GObject').GObject.Object, () => boolean]} o.connection\n */\nexport const ArrowToggleButton = ({\n    name,\n    icon,\n    label,\n    activate,\n    deactivate,\n    activateOnArrow = true,\n    connection: [service, condition],\n}) => Widget.Box({\n    class_name: 'toggle-button',\n    setup: self => self.hook(service, () => {\n        self.toggleClassName('active', condition());\n    }),\n    children: [\n        Widget.Button({\n            child: Widget.Box({\n                hexpand: true,\n                class_name: 'label-box horizontal',\n                children: [icon, label],\n            }),\n            on_clicked: () => {\n                if (condition()) {\n                    deactivate();\n                    if (opened.value === name)\n                        opened.value = '';\n                } else {\n                    activate();\n                }\n            },\n        }),\n        Arrow(name, activateOnArrow && activate),\n    ],\n});\n\n/**\n * @param {Object} o\n * @param {string} o.name - menu name\n * @param {import('gi://Gtk').Gtk.Widget} o.icon\n * @param {import('gi://Gtk').Gtk.Widget} o.title\n * @param {import('gi://Gtk').Gtk.Widget[]} o.content\n */\nexport const Menu = ({ name, icon, title, content }) => Widget.Revealer({\n    transition: 'slide_down',\n    reveal_child: opened.bind().transform(v => v === name),\n    child: Widget.Box({\n        class_names: ['menu', name],\n        vertical: true,\n        children: [\n            Widget.Box({\n                class_name: 'title horizontal',\n                children: [icon, title],\n            }),\n            Widget.Separator(),\n            ...content,\n        ],\n    }),\n});\n\n/**\n * @param {Object} o\n * @param {import('gi://Gtk').Gtk.Widget} o.icon\n * @param {() => void} o.toggle\n * @param {[import('gi://GObject').GObject.Object, () => boolean]} o.connection\n */\nexport const SimpleToggleButton = ({\n    icon,\n    toggle,\n    connection: [service, condition],\n}) => Widget.Button({\n    class_name: 'simple-toggle',\n    setup: self => self.hook(service, () => {\n        self.toggleClassName('active', condition());\n    }),\n    child: icon,\n    on_clicked: toggle,\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/quicksettings/widgets/AsusProfile.js",
    "content": "import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport icons from '../../icons.js';\nimport Asusctl from '../../services/asusctl.js';\nimport { ArrowToggleButton, Menu } from '../ToggleButton.js';\n\nexport const ProfileToggle = () => ArrowToggleButton({\n    name: 'asusctl-profile',\n    icon: Widget.Icon({\n        binds: [['icon', Asusctl, 'profile', p => icons.asusctl.profile[p]]],\n    }),\n    label: Widget.Label({\n        binds: [['label', Asusctl, 'profile']],\n    }),\n    connection: [Asusctl, () => Asusctl.profile !== 'Balanced'],\n    activate: () => Asusctl.setProfile('Quiet'),\n    deactivate: () => Asusctl.setProfile('Balanced'),\n    activateOnArrow: false,\n});\n\nexport const ProfileSelector = () => Menu({\n    name: 'asusctl-profile',\n    icon: Widget.Icon({\n        binds: [['icon', Asusctl, 'profile', p => icons.asusctl.profile[p]]],\n    }),\n    title: Widget.Label('Profile Selector'),\n    content: [\n        Widget.Box({\n            vertical: true,\n            hexpand: true,\n            children: [\n                Widget.Box({\n                    vertical: true,\n                    children: Asusctl.profiles.map(prof => Widget.Button({\n                        on_clicked: () => Asusctl.setProfile(prof),\n                        child: Widget.Box({\n                            children: [\n                                Widget.Icon(icons.asusctl.profile[prof]),\n                                Widget.Label(prof),\n                            ],\n                        }),\n                    })),\n                }),\n            ],\n        }),\n        Widget.Separator(),\n        Widget.Button({\n            on_clicked: () => Utils.execAsync('rog-control-center'),\n            child: Widget.Box({\n                children: [\n                    Widget.Icon(icons.ui.settings),\n                    Widget.Label('Rog Control Center'),\n                ],\n            }),\n        }),\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/quicksettings/widgets/Bluetooth.js",
    "content": "import Bluetooth from 'resource:///com/github/Aylur/ags/service/bluetooth.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport icons from '../../icons.js';\nimport { Menu, ArrowToggleButton } from '../ToggleButton.js';\n\nexport const BluetoothToggle = () => ArrowToggleButton({\n    name: 'bluetooth',\n    icon: Widget.Icon({\n        icon: Bluetooth.bind('enabled').transform(p => icons.bluetooth[p ? 'enabled' : 'disabled']),\n    }),\n    label: Widget.Label({\n        truncate: 'end',\n        setup: self => self.hook(Bluetooth, () => {\n            if (!Bluetooth.enabled)\n                return self.label = 'Disabled';\n\n            if (Bluetooth.connected_devices.length === 0)\n                return self.label = 'Not Connected';\n\n            if (Bluetooth.connected_devices.length === 1)\n                return self.label = Bluetooth.connected_devices[0].alias;\n\n            self.label = `${Bluetooth.connected_devices.length} Connected`;\n        }),\n    }),\n    connection: [Bluetooth, () => Bluetooth.enabled],\n    deactivate: () => Bluetooth.enabled = false,\n    activate: () => Bluetooth.enabled = true,\n});\n\n/** @param {import('types/service/bluetooth').BluetoothDevice} device */\nconst DeviceItem = device => Widget.Box({\n    children: [\n        Widget.Icon(device.icon_name + '-symbolic'),\n        Widget.Label(device.name),\n        Widget.Label({\n            label: `${device.battery_percentage}%`,\n            visible: device.bind('battery_percentage').transform(p => p > 0),\n        }),\n        Widget.Box({ hexpand: true }),\n        Widget.Spinner({\n            active: device.bind('connecting'),\n            visible: device.bind('connecting'),\n        }),\n        Widget.Switch({\n            active: device.connected,\n            visible: device.bind('connecting').transform(p => !p),\n            setup: self => self.on('notify::active', () => {\n                device.setConnection(self.active);\n            }),\n        }),\n    ],\n});\n\nexport const BluetoothDevices = () => Menu({\n    name: 'bluetooth',\n    icon: Widget.Icon(icons.bluetooth.disabled),\n    title: Widget.Label('Bluetooth'),\n    content: [\n        Widget.Box({\n            hexpand: true,\n            vertical: true,\n            children: Bluetooth.bind('devices').transform(ds => ds\n                .filter(d => d.name)\n                .map(DeviceItem)),\n        }),\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/quicksettings/widgets/Brightness.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport icons from '../../icons.js';\nimport Brightness from '../../services/brightness.js';\n\nconst BrightnessSlider = () => Widget.Slider({\n    draw_value: false,\n    hexpand: true,\n    value: Brightness.bind('screen'),\n    on_change: ({ value }) => Brightness.screen = value,\n});\n\nexport default () => Widget.Box({\n    children: [\n        Widget.Button({\n            child: Widget.Icon(icons.brightness.indicator),\n            tooltip_text: Brightness.bind('screen').transform(v =>\n                `Screen Brightness: ${Math.floor(v * 100)}%`),\n        }),\n        BrightnessSlider(),\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/quicksettings/widgets/DND.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Notifications from 'resource:///com/github/Aylur/ags/service/notifications.js';\nimport icons from '../../icons.js';\nimport { SimpleToggleButton } from '../ToggleButton.js';\n\nexport default () => SimpleToggleButton({\n    icon: Widget.Icon({\n        icon: Notifications.bind('dnd').transform(dnd => icons.notifications[dnd ? 'silent' : 'noisy']),\n    }),\n    toggle: () => Notifications.dnd = !Notifications.dnd,\n    connection: [Notifications, () => Notifications.dnd],\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/quicksettings/widgets/Header.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Battery from 'resource:///com/github/Aylur/ags/service/battery.js';\nimport PowerMenu from '../../services/powermenu.js';\nimport Lockscreen from '../../services/lockscreen.js';\nimport Avatar from '../../misc/Avatar.js';\nimport icons from '../../icons.js';\nimport { openSettings } from '../../settings/theme.js';\nimport { uptime } from '../../variables.js';\n\nexport default () => Widget.Box({\n    class_name: 'header horizontal',\n    children: [\n        Avatar(),\n        Widget.Box({\n            hpack: 'end',\n            vpack: 'center',\n            hexpand: true,\n            children: [\n                Widget.Box({\n                    class_name: 'battery horizontal',\n                    children: [\n                        Widget.Icon({ icon: Battery.bind('icon_name') }),\n                        Widget.Label({ label: Battery.bind('percent').transform(p => `${p}%`) }),\n                    ],\n                }),\n                Widget.Label({\n                    class_name: 'uptime',\n                    label: uptime.bind().transform(v => `up: ${v}`),\n                }),\n                Widget.Button({\n                    on_clicked: openSettings,\n                    child: Widget.Icon(icons.ui.settings),\n                }),\n                Widget.Button({\n                    on_clicked: () => Lockscreen.lockscreen(),\n                    child: Widget.Icon(icons.lock),\n                }),\n                Widget.Button({\n                    on_clicked: () => PowerMenu.action('shutdown'),\n                    child: Widget.Icon(icons.powermenu.shutdown),\n                }),\n            ],\n        }),\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/quicksettings/widgets/Media.js",
    "content": "import Mpris from 'resource:///com/github/Aylur/ags/service/mpris.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport * as mpris from '../../misc/mpris.js';\nimport options from '../../options.js';\n\n/** @param {import('types/service/mpris').MprisPlayer} player */\nconst Footer = player => Widget.CenterBox({\n    class_name: 'footer-box',\n    start_widget: Widget.Box({\n        class_name: 'position',\n        children: [\n            mpris.PositionLabel(player),\n            mpris.Slash(player),\n            mpris.LengthLabel(player),\n        ],\n    }),\n    center_widget: Widget.Box({\n        class_name: 'controls',\n        children: [\n            mpris.ShuffleButton(player),\n            mpris.PreviousButton(player),\n            mpris.PlayPauseButton(player),\n            mpris.NextButton(player),\n            mpris.LoopButton(player),\n        ],\n    }),\n    end_widget: mpris.PlayerIcon(player, {\n        symbolic: false,\n        hexpand: true,\n        hpack: 'end',\n    }),\n});\n\n/** @param {import('types/service/mpris').MprisPlayer} player */\nconst TextBox = player => Widget.Box({\n    children: [\n        mpris.CoverArt(player, {\n            hpack: 'end',\n            hexpand: false,\n        }),\n        Widget.Box({\n            hexpand: true,\n            vertical: true,\n            class_name: 'labels',\n            children: [\n                mpris.TitleLabel(player, {\n                    xalign: 0,\n                    justification: 'left',\n                    wrap: true,\n                }),\n                mpris.ArtistLabel(player, {\n                    xalign: 0,\n                    justification: 'left',\n                    wrap: true,\n                }),\n            ],\n        }),\n    ],\n});\n\n/** @param {import('types/service/mpris').MprisPlayer} player */\nconst PlayerBox = player => Widget.Box({\n    class_name: `player ${player.name}`,\n    child: mpris.BlurredCoverArt(player, {\n        hexpand: true,\n        child: Widget.Box({\n            hexpand: true,\n            vertical: true,\n            children: [\n                TextBox(player),\n                mpris.PositionSlider(player),\n                Footer(player),\n            ],\n        }),\n    }),\n});\n\nexport default () => Widget.Box({\n    vertical: true,\n    class_name: 'media vertical',\n    visible: Mpris.bind('players').transform(p => p.length > 0),\n    children: Mpris.bind('players').transform(ps => ps\n        .filter(p => !options.mpris.black_list.value\n            .includes(p.identity)).map(PlayerBox)),\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/quicksettings/widgets/MicMute.js",
    "content": "import Audio from 'resource:///com/github/Aylur/ags/service/audio.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport icons from '../../icons.js';\nimport { SimpleToggleButton } from '../ToggleButton.js';\n\nexport default () => SimpleToggleButton({\n    icon: Widget.Icon()\n        .hook(Audio, self => {\n            self.icon = Audio.microphone?.is_muted\n                ? icons.audio.mic.muted\n                : icons.audio.mic.high;\n        }, 'microphone-changed'),\n    toggle: () => Audio.microphone.is_muted = !Audio.microphone.is_muted,\n    connection: [Audio, () => Audio.microphone?.is_muted || false],\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/quicksettings/widgets/Network.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Network from 'resource:///com/github/Aylur/ags/service/network.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport icons from '../../icons.js';\nimport { Menu, ArrowToggleButton } from '../ToggleButton.js';\nimport Applications from 'resource:///com/github/Aylur/ags/service/applications.js';\n\nexport const NetworkToggle = () => ArrowToggleButton({\n    name: 'network',\n    icon: Widget.Icon({\n        icon: Network.wifi.bind('icon_name'),\n    }),\n    label: Widget.Label({\n        truncate: 'end',\n        label: Network.wifi.bind('ssid').transform(ssid => ssid || 'Not Connected'),\n    }),\n    connection: [Network, () => Network.wifi.enabled],\n    deactivate: () => Network.wifi.enabled = false,\n    activate: () => {\n        Network.wifi.enabled = true;\n        Network.wifi.scan();\n    },\n});\n\nexport const WifiSelection = () => Menu({\n    name: 'network',\n    icon: Widget.Icon({\n        icon: Network.wifi.bind('icon_name'),\n    }),\n    title: Widget.Label('Wifi Selection'),\n    content: [\n        Widget.Box({\n            vertical: true,\n            setup: self => self.hook(Network, () => self.children =\n                Network.wifi?.access_points.map(ap => Widget.Button({\n                    on_clicked: () => Utils.execAsync(`nmcli device wifi connect ${ap.bssid}`),\n                    child: Widget.Box({\n                        children: [\n                            Widget.Icon(ap.iconName),\n                            Widget.Label(ap.ssid || ''),\n                            ap.active && Widget.Icon({\n                                icon: icons.ui.tick,\n                                hexpand: true,\n                                hpack: 'end',\n                            }),\n                        ],\n                    }),\n                })),\n            ),\n        }),\n        Widget.Separator(),\n        Widget.Button({\n            on_clicked: () => Applications.query('gnome-control-center')?.[0].launch(),\n            child: Widget.Box({\n                children: [\n                    Widget.Icon(icons.ui.settings),\n                    Widget.Label('Network'),\n                ],\n            }),\n        }),\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/quicksettings/widgets/Theme.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport { ArrowToggleButton, Menu, opened } from '../ToggleButton.js';\nimport themes from '../../themes.js';\nimport icons from '../../icons.js';\nimport options from '../../options.js';\nimport { setTheme, openSettings } from '../../settings/theme.js';\n\nexport const ThemeToggle = () => ArrowToggleButton({\n    name: 'theme',\n    icon: Widget.Label().bind('label', options.theme.icon),\n    label: Widget.Label().bind('label', options.theme.name),\n    connection: [opened, () => opened.value === 'theme'],\n    activate: () => opened.setValue('theme'),\n    activateOnArrow: false,\n    deactivate: () => { },\n});\n\nexport const ThemeSelector = () => Menu({\n    name: 'theme',\n    icon: Widget.Label().bind('label', options.theme.icon),\n    title: Widget.Label('Theme Selector'),\n    content: [\n        ...themes.map(({ name, icon }) => Widget.Button({\n            on_clicked: () => setTheme(name),\n            child: Widget.Box({\n                children: [\n                    Widget.Label(icon),\n                    Widget.Label(name),\n                    Widget.Icon({\n                        icon: icons.ui.tick,\n                        hexpand: true,\n                        hpack: 'end',\n                        visible: options.theme.name.bind('value').transform(v => v === name),\n                    }),\n                ],\n            }),\n        })),\n        Widget.Separator(),\n        Widget.Button({\n            on_clicked: openSettings,\n            child: Widget.Box({\n                children: [\n                    Widget.Icon(icons.ui.settings),\n                    Widget.Label('Theme Settings'),\n                ],\n            }),\n        }),\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/quicksettings/widgets/Volume.js",
    "content": "import Audio from 'resource:///com/github/Aylur/ags/service/audio.js';\nimport Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport icons from '../../icons.js';\nimport FontIcon from '../../misc/FontIcon.js';\nimport { getAudioTypeIcon } from '../../utils.js';\nimport { Arrow } from '../ToggleButton.js';\nimport { Menu } from '../ToggleButton.js';\n\n/** @param {'speaker' | 'microphone'=} type */\nconst VolumeIndicator = (type = 'speaker') => Widget.Button({\n    on_clicked: () => Audio[type].is_muted = !Audio[type].is_muted,\n    child: Widget.Icon().hook(Audio[type], icon => {\n        icon.icon = type === 'speaker'\n            ? getAudioTypeIcon(Audio[type].icon_name || '')\n            : icons.audio.mic.high;\n\n        icon.tooltip_text = `Volume ${Math.floor(Audio[type].volume * 100)}%`;\n    }),\n});\n\n/** @param {'speaker' | 'microphone'=} type */\nconst VolumeSlider = (type = 'speaker') => Widget.Slider({\n    hexpand: true,\n    draw_value: false,\n    on_change: ({ value }) => Audio[type].volume = value,\n    setup: self => self.hook(Audio[type], () => {\n        self.value = Audio[type].volume || 0;\n    }),\n});\n\nexport const Volume = () => Widget.Box({\n    children: [\n        VolumeIndicator('speaker'),\n        VolumeSlider('speaker'),\n        Widget.Box({\n            vpack: 'center',\n            child: Arrow('sink-selector'),\n        }),\n        Widget.Box({\n            vpack: 'center',\n            child: Arrow('app-mixer'),\n            visible: Audio.bind('apps').transform(a => a.length > 0),\n        }),\n    ],\n});\n\nexport const Microhone = () => Widget.Box({\n    class_name: 'slider horizontal',\n    visible: Audio.bind('recorders').transform(a => a.length > 0),\n    children: [\n        VolumeIndicator('microphone'),\n        VolumeSlider('microphone'),\n    ],\n});\n\n/** @param {import('types/service/audio').Stream} stream */\nconst MixerItem = stream => Widget.Box({\n    hexpand: true,\n    class_name: 'mixer-item horizontal',\n    children: [\n        Widget.Icon({\n            tooltip_text: stream.bind('name').transform(n => n || ''),\n            icon: stream.bind('name').transform(n => {\n                return Utils.lookUpIcon(n || '')\n                    ? (n || '')\n                    : icons.mpris.fallback;\n            }),\n        }),\n        Widget.Box({\n            vertical: true,\n            children: [\n                Widget.Label({\n                    xalign: 0,\n                    truncate: 'end',\n                    label: stream.bind('description').transform(d => d || ''),\n                }),\n                Widget.Slider({\n                    hexpand: true,\n                    draw_value: false,\n                    value: stream.bind('volume'),\n                    on_change: ({ value }) => stream.volume = value,\n                }),\n            ],\n        }),\n        Widget.Label({\n            xalign: 1,\n            label: stream.bind('volume').transform(v => `${Math.floor(v * 100)}`),\n        }),\n    ],\n});\n\n/** @param {import('types/service/audio').Stream} stream */\nconst SinkItem = stream => Widget.Button({\n    hexpand: true,\n    on_clicked: () => Audio.speaker = stream,\n    child: Widget.Box({\n        children: [\n            Widget.Icon({\n                icon: getAudioTypeIcon(stream.icon_name || ''),\n                tooltip_text: stream.icon_name,\n            }),\n            Widget.Label((stream.description || '').split(' ').slice(0, 4).join(' ')),\n            Widget.Icon({\n                icon: icons.ui.tick,\n                hexpand: true,\n                hpack: 'end',\n                visible: Audio.speaker.bind('stream').transform(s => s === stream.stream),\n            }),\n        ],\n    }),\n});\n\nconst SettingsButton = () => Widget.Button({\n    on_clicked: () => Utils.execAsync('pavucontrol'),\n    hexpand: true,\n    child: Widget.Box({\n        children: [\n            Widget.Icon(icons.ui.settings),\n            Widget.Label('Settings'),\n        ],\n    }),\n});\n\nexport const AppMixer = () => Menu({\n    name: 'app-mixer',\n    icon: FontIcon(icons.audio.mixer),\n    title: Widget.Label('App Mixer'),\n    content: [\n        Widget.Box({\n            vertical: true,\n            children: Audio.bind('apps').transform(a => a.map(MixerItem)),\n        }),\n        Widget.Separator(),\n        SettingsButton(),\n    ],\n});\n\nexport const SinkSelector = () => Menu({\n    name: 'sink-selector',\n    icon: Widget.Icon(icons.audio.type.headset),\n    title: Widget.Label('Sink Selector'),\n    content: [\n        Widget.Box({\n            vertical: true,\n            children: Audio.bind('speakers').transform(a => a.map(SinkItem)),\n        }),\n        Widget.Separator(),\n        SettingsButton(),\n    ],\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/screencorner/ScreenCorners.js",
    "content": "import Widget from 'resource:///com/github/Aylur/ags/widget.js';\nimport Gtk from 'gi://Gtk';\nimport options from '../options.js';\n\n/** @param {'topleft' | 'topright' | 'bottomleft' | 'bottomright'} place  */\nconst Corner = place => Widget.DrawingArea({\n    class_name: 'corner',\n    hexpand: true,\n    vexpand: true,\n    hpack: place.includes('left') ? 'start' : 'end',\n    vpack: place.includes('top') ? 'start' : 'end',\n    setup: self => self\n        .hook(options.radii, () => {\n            const r = options.radii.value * 2;\n            self.set_size_request(r, r);\n        })\n        .connect('draw', (self, cr) => {\n            const context = self.get_style_context();\n            const c = context.get_property('background-color', Gtk.StateFlags.NORMAL);\n            const r = context.get_property('border-radius', Gtk.StateFlags.NORMAL);\n\n            switch (place) {\n                case 'topleft':\n                    cr.arc(r, r, r, Math.PI, 3 * Math.PI / 2);\n                    cr.lineTo(0, 0);\n                    break;\n\n                case 'topright':\n                    cr.arc(0, r, r, 3 * Math.PI / 2, 2 * Math.PI);\n                    cr.lineTo(r, 0);\n                    break;\n\n                case 'bottomleft':\n                    cr.arc(r, 0, r, Math.PI / 2, Math.PI);\n                    cr.lineTo(0, r);\n                    break;\n\n                case 'bottomright':\n                    cr.arc(0, 0, r, 0, Math.PI / 2);\n                    cr.lineTo(r, r);\n                    break;\n            }\n\n            cr.closePath();\n            cr.setSourceRGBA(c.red, c.green, c.blue, c.alpha);\n            cr.fill();\n        }),\n});\n\n/** @type {Array<'topleft' | 'topright' | 'bottomleft' | 'bottomright'>} */\nconst places = ['topleft', 'topright', 'bottomleft', 'bottomright'];\n\n/** @param {number} monitor  */\nexport default monitor => places.map(place => Widget.Window({\n    name: `corner${monitor}${place}`,\n    monitor,\n    class_name: 'corner',\n    anchor: [place.includes('top') ? 'top' : 'bottom', place.includes('right') ? 'right' : 'left'],\n    visible: options.desktop.screen_corners.bind('value'),\n    child: Corner(place),\n}));\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/services/asusctl.js",
    "content": "import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport Service from 'resource:///com/github/Aylur/ags/service.js';\n\nclass Asusctl extends Service {\n    static {\n        Service.register(this, {}, {\n            'profile': ['string', 'r'],\n            'mode': ['string', 'r'],\n        });\n    }\n\n    profiles = Object.freeze(['Performance', 'Balanced', 'Quiet']);\n    #profile = 'Balanced';\n    #mode = 'Hyprid';\n\n    nextProfile() {\n        Utils.execAsync('asusctl profile -n')\n            .then(() => {\n                this.#profile = Utils.exec('asusctl profile -p').split(' ')[3];\n                this.changed('profile');\n            })\n            .catch(console.error);\n    }\n\n    /** @param {'Performance' | 'Balanced' | 'Quiet'} prof */\n    setProfile(prof) {\n        Utils.execAsync(`asusctl profile --profile-set ${prof}`)\n            .then(() => {\n                this.#profile = prof;\n                this.changed('profile');\n            })\n            .catch(console.error);\n    }\n\n    nextMode() {\n        Utils.execAsync(`supergfxctl -m ${this.#mode === 'Hybrid' ? 'Integrated' : 'Hybrid'}`)\n            .then(() => {\n                this.#mode = Utils.exec('supergfxctl -g');\n                this.changed('profile');\n            })\n            .catch(console.error);\n    }\n\n    constructor() {\n        super();\n\n        if (Utils.exec('which asusctl')) {\n            this.available = true;\n            this.#profile = Utils.exec('asusctl profile -p').split(' ')[3];\n            Utils.execAsync('supergfxctl -g').then(mode => this.#mode = mode);\n        }\n        else {\n            this.available = false;\n        }\n    }\n\n    get profile() { return this.#profile; }\n    get mode() { return this.#mode; }\n}\n\nexport default new Asusctl();\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/services/brightness.js",
    "content": "import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport Service from 'resource:///com/github/Aylur/ags/service.js';\nimport options from '../options.js';\nimport { dependencies } from '../utils.js';\n\nconst KBD = options.brightnessctlKBD;\n\nclass Brightness extends Service {\n    static {\n        Service.register(this, {}, {\n            'screen': ['float', 'rw'],\n            'kbd': ['int', 'rw'],\n        });\n    }\n\n    #kbd = 0;\n    #kbdMax = 3;\n    #screen = 0;\n\n    get kbd() { return this.#kbd; }\n    get screen() { return this.#screen; }\n\n    set kbd(value) {\n        if (!dependencies(['brightnessctl']))\n            return;\n\n        if (value < 0 || value > this.#kbdMax)\n            return;\n\n        Utils.execAsync(`brightnessctl -d ${KBD} s ${value} -q`)\n            .then(() => {\n                this.#kbd = value;\n                this.changed('kbd');\n            })\n            .catch(console.error);\n    }\n\n    set screen(percent) {\n        if (!dependencies(['brightnessctl']))\n            return;\n\n        if (percent < 0)\n            percent = 0;\n\n        if (percent > 1)\n            percent = 1;\n\n        Utils.execAsync(`brightnessctl s ${percent * 100}% -q`)\n            .then(() => {\n                this.#screen = percent;\n                this.changed('screen');\n            })\n            .catch(console.error);\n    }\n\n    constructor() {\n        super();\n\n        if (dependencies(['brightnessctl'])) {\n            this.#kbd = Number(Utils.exec(`brightnessctl -d ${KBD} g`));\n            this.#kbdMax = Number(Utils.exec(`brightnessctl -d ${KBD} m`));\n            this.#screen = Number(Utils.exec('brightnessctl g')) / Number(Utils.exec('brightnessctl m'));\n        }\n    }\n}\n\n\nexport default new Brightness();\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/services/colorpicker.js",
    "content": "import { Variable } from 'resource:///com/github/Aylur/ags/variable.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport Service from 'resource:///com/github/Aylur/ags/service.js';\nimport { dependencies } from '../utils.js';\nimport icons from '../icons.js';\n\nconst COLORS_CACHE = Utils.CACHE_DIR + '/colorpicker.json';\n\nclass Colors extends Service {\n    static {\n        Service.register(this, {}, {\n            'colors': ['jsobject'],\n        });\n    }\n\n    /** @type {Variable<string[]>} */\n    #colors = new Variable([]);\n    get colors() { return this.#colors.value; }\n\n    #notifID = 0;\n\n    constructor() {\n        super();\n\n        this.#colors.connect('changed', () => this.changed('colors'));\n\n        Utils.readFileAsync(COLORS_CACHE)\n            .then(out => this.#colors.setValue(JSON.parse(out || '[]')))\n            .catch(() => print('no colorpicker cache found'));\n    }\n\n    /** @param {string} color */\n    wlCopy(color) {\n        Utils.execAsync(['wl-copy', color])\n            .catch(err => console.error(err));\n    }\n\n    async pick() {\n        if (!dependencies(['hyprpicker']))\n            return;\n\n        const color = await Utils.execAsync('hyprpicker');\n        if (!color)\n            return;\n\n        this.wlCopy(color);\n        const list = this.#colors.value;\n        if (!list.includes(color)) {\n            list.push(color);\n            if (list.length > 10)\n                list.shift();\n\n            this.#colors.value = list;\n            Utils.writeFile(JSON.stringify(list, null, 2), COLORS_CACHE)\n                .catch(err => console.error(err));\n        }\n\n        const n = await Utils.notify({\n            id: this.#notifID,\n            iconName: icons.ui.colorpicker,\n            summary: color,\n            actions: {\n                'Copy': () => this.wlCopy(color),\n            },\n        });\n        this.#notifID = n.id;\n    }\n}\n\nexport default new Colors;\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/services/lockscreen.js",
    "content": "import Service from 'resource:///com/github/Aylur/ags/service.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport App from 'resource:///com/github/Aylur/ags/app.js';\nconst authpy = App.configDir + '/js/lockscreen/auth.py';\n\nclass Lockscreen extends Service {\n    static {\n        Service.register(this, {\n            'lock': ['boolean'],\n            'authenticating': ['boolean'],\n        });\n    }\n\n    lockscreen() { this.emit('lock', true); }\n\n    /** @param {string} password */\n    auth(password) {\n        this.emit('authenticating', true);\n        Utils.execAsync([authpy, password])\n            .then(out => {\n                this.emit('lock', out !== 'True');\n                this.emit('authenticating', false);\n            })\n            .catch(err => console.error(err));\n    }\n}\n\nexport default new Lockscreen();\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/services/onScreenIndicator.js",
    "content": "import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport Service from 'resource:///com/github/Aylur/ags/service.js';\nimport Audio from 'resource:///com/github/Aylur/ags/service/audio.js';\nimport icons from '../icons.js';\nimport { getAudioTypeIcon } from '../utils.js';\nimport Brightness from './brightness.js';\n\nclass Indicator extends Service {\n    static {\n        Service.register(this, {\n            'popup': ['double', 'string'],\n        });\n    }\n\n    #delay = 1500;\n    #count = 0;\n\n    /**\n     * @param {number} value - 0 < v < 1\n     * @param {string} icon\n     */\n    popup(value, icon) {\n        this.emit('popup', value, icon);\n        this.#count++;\n        Utils.timeout(this.#delay, () => {\n            this.#count--;\n\n            if (this.#count === 0)\n                this.emit('popup', -1, icon);\n        });\n    }\n\n    speaker() {\n        this.popup(\n            Audio.speaker?.volume || 0,\n            getAudioTypeIcon(Audio.speaker?.icon_name || ''),\n        );\n    }\n\n    display() {\n        // brightness is async, so lets wait a bit\n        Utils.timeout(10, () => this.popup(\n            Brightness.screen,\n            icons.brightness.screen));\n    }\n\n    kbd() {\n        // brightness is async, so lets wait a bit\n        Utils.timeout(10, () => this.popup(\n            (Brightness.kbd * 33 + 1) / 100,\n            icons.brightness.keyboard));\n    }\n\n    connect(event = 'popup', callback) {\n        return super.connect(event, callback);\n    }\n}\n\nexport default new Indicator();\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/services/powermenu.js",
    "content": "import App from 'resource:///com/github/Aylur/ags/app.js';\nimport Service from 'resource:///com/github/Aylur/ags/service.js';\n\nclass PowerMenu extends Service {\n    static {\n        Service.register(this, {}, {\n            'title': ['string'],\n            'cmd': ['string'],\n        });\n    }\n\n    #title = '';\n    #cmd = '';\n\n    get title() { return this.#title; }\n    get cmd() { return this.#cmd; }\n\n    /** @param {'sleep' | 'reboot' | 'logout' | 'shutdown'} action */\n    action(action) {\n        [this.#cmd, this.#title] = {\n            'sleep': ['systemctl suspend', 'Sleep'],\n            'reboot': ['systemctl reboot', 'Reboot'],\n            'logout': ['pkill Hyprland', 'Log Out'],\n            'shutdown': ['shutdown now', 'Shutdown'],\n        }[action];\n\n        this.notify('cmd');\n        this.notify('title');\n        this.emit('changed');\n        App.closeWindow('powermenu');\n        App.openWindow('verification');\n    }\n}\n\nexport default new PowerMenu();\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/services/screenrecord.js",
    "content": "import Service from 'resource:///com/github/Aylur/ags/service.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport App from 'resource:///com/github/Aylur/ags/app.js';\nimport GLib from 'gi://GLib';\nimport { dependencies } from '../utils.js';\n\nconst now = () => GLib.DateTime.new_now_local().format('%Y-%m-%d_%H-%M-%S');\n\nclass Recorder extends Service {\n    static {\n        Service.register(this, {}, {\n            'timer': ['int'],\n            'recording': ['boolean'],\n        });\n    }\n\n    #path = GLib.get_home_dir() + '/Videos/Screencasting';\n    #file = '';\n    #interval = 0;\n\n    recording = false;\n    timer = 0;\n\n    async start() {\n        if (!dependencies(['slurp', 'wf-recorder']))\n            return;\n\n        if (this.recording)\n            return;\n\n        const area = await Utils.execAsync('slurp');\n        Utils.ensureDirectory(this.#path);\n        this.#file = `${this.#path}/${now()}.mp4`;\n        Utils.execAsync(['wf-recorder', '-g', area, '-f', this.#file]);\n        this.recording = true;\n        this.changed('recording');\n\n        this.timer = 0;\n        this.#interval = Utils.interval(1000, () => {\n            this.changed('timer');\n            this.timer++;\n        });\n    }\n\n    async stop() {\n        if (!dependencies(['notify-send']))\n            return;\n\n        if (!this.recording)\n            return;\n\n        Utils.execAsync('killall -INT wf-recorder');\n        this.recording = false;\n        this.changed('recording');\n        GLib.source_remove(this.#interval);\n\n        const res = await Utils.execAsync([\n            'notify-send',\n            '-A', 'files=Show in Files',\n            '-A', 'view=View',\n            '-i', 'video-x-generic-symbolic',\n            'Screenrecord',\n            this.#file,\n        ]);\n\n        if (res === 'files')\n            Utils.execAsync('xdg-open ' + this.#path);\n\n        if (res === 'view')\n            Utils.execAsync('xdg-open ' + this.#file);\n    }\n\n    async screenshot(full = false) {\n        if (!dependencies(['slurp', 'wayshot']))\n            return;\n\n        const path = GLib.get_home_dir() + '/Pictures/Screenshots';\n        const file = `${path}/${now()}.png`;\n        Utils.ensureDirectory(path);\n\n        await Utils.execAsync([\n            'wayshot',\n            '-f', file,\n        ].concat(full ? [] : [\n            '-s', await Utils.execAsync('slurp'),\n        ]));\n\n        Utils.execAsync(['bash', '-c', `wl-copy < ${file}`]);\n\n        const res = await Utils.execAsync([\n            'notify-send',\n            '-A', 'files=Show in Files',\n            '-A', 'view=View',\n            '-A', 'edit=Edit',\n            '-i', file,\n            'Screenshot',\n            file,\n        ]);\n        if (res === 'files')\n            Utils.execAsync('xdg-open ' + path);\n\n        if (res === 'view')\n            Utils.execAsync('xdg-open ' + file);\n\n        if (res === 'edit')\n            Utils.execAsync(['swappy', '-f', file]);\n\n        App.closeWindow('dashboard');\n    }\n}\n\nexport default new Recorder();\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/settings/SettingsDialog.js",
    "content": "import * as Utils from \"resource:///com/github/Aylur/ags/utils.js\";\nimport App from \"resource:///com/github/Aylur/ags/app.js\";\nimport Widget from \"resource:///com/github/Aylur/ags/widget.js\";\nimport RegularWindow from \"../misc/RegularWindow.js\";\nimport Variable from \"resource:///com/github/Aylur/ags/variable.js\";\nimport icons from \"../icons.js\";\nimport { getOptions, getValues } from \"./option.js\";\nimport options from \"../options.js\";\n\nconst optionsList = getOptions();\nconst categories = Array.from(\n  new Set(optionsList.map((opt) => opt.category)),\n).filter((category) => category !== \"exclude\");\n\nconst currentPage = Variable(categories[0]);\nconst search = Variable(\"\");\nconst showSearch = Variable(false);\nshowSearch.connect(\"changed\", ({ value }) => {\n  if (!value) search.value = \"\";\n});\n\n/** @param {import('./option.js').Opt<string>} opt */\nconst EnumSetter = (opt) => {\n  const lbl = Widget.Label().bind(\"label\", opt);\n  const step = (dir = 1) => {\n    const i = opt.enums.findIndex((i) => i === lbl.label);\n    opt.setValue(\n      dir > 0\n        ? i + dir > opt.enums.length - 1\n          ? opt.enums[0]\n          : opt.enums[i + dir]\n        : i + dir < 0\n          ? opt.enums[opt.enums.length - 1]\n          : opt.enums[i + dir],\n      true,\n    );\n  };\n  const next = Widget.Button({\n    child: Widget.Icon(icons.ui.arrow.right),\n    on_clicked: () => step(+1),\n  });\n  const prev = Widget.Button({\n    child: Widget.Icon(icons.ui.arrow.left),\n    on_clicked: () => step(-1),\n  });\n  return Widget.Box({\n    class_name: \"enum-setter\",\n    children: [prev, lbl, next],\n  });\n};\n\n/** @param {import('./option.js').Opt} opt */\nconst Setter = (opt) => {\n  switch (opt.type) {\n    case \"number\":\n      return Widget.SpinButton({\n        setup(self) {\n          self.set_range(0, 1000);\n          self.set_increments(1, 5);\n          self.on(\"value-changed\", () => opt.setValue(self.value, true));\n          self.hook(opt, () => (self.value = opt.value));\n        },\n      });\n    case \"float\":\n    case \"object\":\n      return Widget.Entry({\n        on_accept: (self) => opt.setValue(JSON.parse(self.text || \"\"), true),\n        setup: (self) =>\n          self.hook(opt, () => (self.text = JSON.stringify(opt.value))),\n      });\n    case \"string\":\n      return Widget.Entry({\n        on_accept: (self) => opt.setValue(self.text, true),\n        setup: (self) => self.hook(opt, () => (self.text = opt.value)),\n      });\n    case \"enum\":\n      return EnumSetter(opt);\n    case \"boolean\":\n      return Widget.Switch()\n        .on(\"notify::active\", (self) => opt.setValue(self.active, true))\n        .hook(opt, (self) => (self.active = opt.value));\n\n    case \"img\":\n      return Widget.FileChooserButton().on(\"selection-changed\", (self) => {\n        opt.setValue(self.get_uri()?.replace(\"file://\", \"\"), true);\n      });\n\n    case \"font\":\n      return Widget.FontButton({\n        show_size: false,\n        use_size: false,\n        setup: (self) =>\n          self\n            .on(\"notify::font\", ({ font }) => opt.setValue(font, true))\n            .hook(opt, () => (self.font = opt.value)),\n      });\n    default:\n      return Widget.Label({\n        label: \"no setter with type \" + opt.type,\n      });\n  }\n};\n\n/** @param {import('./option.js').Opt} opt */\nconst Row = (opt) =>\n  Widget.Box({\n    class_name: \"row\",\n    attribute: opt,\n    children: [\n      Widget.Box({\n        vertical: true,\n        vpack: \"center\",\n        children: [\n          opt.title &&\n            Widget.Label({\n              xalign: 0,\n              class_name: \"summary\",\n              label: opt.title,\n            }),\n          Widget.Label({\n            xalign: 0,\n            class_name: \"id\",\n            label: `id: \"${opt.id}\"`,\n          }),\n        ],\n      }),\n      Widget.Box({ hexpand: true }),\n      Widget.Box({\n        vpack: \"center\",\n        vertical: true,\n        children: [\n          Widget.Box({\n            hpack: \"end\",\n            child: Setter(opt),\n          }),\n          opt.note &&\n            Widget.Label({\n              xalign: 1,\n              class_name: \"note\",\n              label: opt.note,\n            }),\n        ],\n      }),\n    ],\n  });\n\n/** @param {string} category */\nconst Page = (category) =>\n  Widget.Scrollable({\n    vexpand: true,\n    class_name: \"page\",\n    child: Widget.Box({\n      class_name: \"page-content vertical\",\n      vertical: true,\n      setup: (self) =>\n        self.hook(search, () => {\n          for (const child of self.children) {\n            child.visible =\n              child.attribute.id.includes(search.value) ||\n              child.attribute.title.includes(search.value) ||\n              child.attribute.note.includes(search.value);\n          }\n        }),\n      children: optionsList\n        .filter((opt) => opt.category.includes(category))\n        .map(Row),\n    }),\n  });\n\nconst sidebar = Widget.Revealer({\n  reveal_child: search.bind().transform((v) => !v),\n  transition: \"slide_right\",\n  child: Widget.Box({\n    hexpand: false,\n    vertical: true,\n    children: [\n      Widget.Box({\n        class_name: \"sidebar-header\",\n        children: [\n          Widget.Button({\n            hexpand: true,\n            label: icons.dialog.Search + \" Search\",\n            on_clicked: () => (showSearch.value = !showSearch.value),\n          }),\n          Widget.Button({\n            hpack: \"end\",\n            child: Widget.Icon(icons.ui.info),\n            on_clicked: () => App.toggleWindow(\"about\"),\n          }),\n        ],\n      }),\n      Widget.Scrollable({\n        vexpand: true,\n        hscroll: \"never\",\n        child: Widget.Box({\n          class_name: \"sidebar-box vertical\",\n          vertical: true,\n          children: [\n            ...categories.map((name) =>\n              Widget.Button({\n                label: (icons.dialog[name] || \"\") + \" \" + name,\n                xalign: 0,\n                class_name: currentPage\n                  .bind()\n                  .transform((v) => `${v === name ? \"active\" : \"\"}`),\n                on_clicked: () => currentPage.setValue(name),\n              }),\n            ),\n          ],\n        }),\n      }),\n      Widget.Box({\n        class_name: \"sidebar-footer\",\n        child: Widget.Button({\n          class_name: \"copy\",\n          child: Widget.Label({\n            label: \" Save\",\n            xalign: 0,\n          }),\n          hexpand: true,\n          on_clicked: () => {\n            Utils.execAsync([\"wl-copy\", getValues()]);\n            Utils.execAsync([\n              \"notify-send\",\n              \"-i\",\n              \"preferences-desktop-theme-symbolic\",\n              \"Theme copied to clipboard\",\n              'To save it permanently, make a new theme in <span weight=\"bold\">themes.js</span>',\n            ]);\n          },\n        }),\n      }),\n    ],\n  }),\n});\n\nconst searchEntry = Widget.Revealer({\n  transition: \"slide_down\",\n  reveal_child: showSearch.bind(),\n  transition_duration: options.transition.bind(\"value\"),\n  child: Widget.Entry({\n    setup: (self) =>\n      self.hook(showSearch, () => {\n        if (!showSearch.value) self.text = \"\";\n\n        if (showSearch.value) self.grab_focus();\n      }),\n    hexpand: true,\n    class_name: \"search\",\n    placeholder_text: \"Search Options\",\n    secondary_icon_name: icons.apps.search,\n    on_change: ({ text }) => (search.value = text || \"\"),\n  }),\n});\n\nconst categoriesStack = Widget.Stack({\n  transition: \"slide_left_right\",\n  children: categories.reduce((obj, name) => {\n    obj[name] = Page(name);\n    return obj;\n  }, {}),\n  shown: currentPage.bind(),\n  visible: search.bind().transform((v) => !v),\n});\n\nconst searchPage = Widget.Box({\n  visible: search.bind().transform((v) => !!v),\n  child: Page(\"\"),\n});\n\nexport default RegularWindow({\n  name: \"settings-dialog\",\n  title: \"Settings\",\n  setup: (win) =>\n    win\n      .on(\"delete-event\", () => {\n        win.hide();\n        return true;\n      })\n      .on(\"key-press-event\", (_, event) => {\n        if (event.get_keyval()[1] === imports.gi.Gdk.KEY_Escape) {\n          showSearch.setValue(false);\n          search.setValue(\"\");\n        }\n      })\n      .set_default_size(800, 500),\n\n  child: Widget.Box({\n    children: [\n      sidebar,\n      Widget.Box({\n        vertical: true,\n        children: [searchEntry, categoriesStack, searchPage],\n      }),\n    ],\n  }),\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/settings/globals.js",
    "content": "import Mpris from 'resource:///com/github/Aylur/ags/service/mpris.js';\n\nexport async function globals() {\n    try {\n        globalThis.options = (await import('../options.js')).default;\n        globalThis.iconBrowser = (await import('../misc/IconBrowser.js')).default;\n        globalThis.app = (await import('resource:///com/github/Aylur/ags/app.js')).default;\n        globalThis.audio = (await import('resource:///com/github/Aylur/ags/service/audio.js')).default;\n        globalThis.recorder = (await import('../services/screenrecord.js')).default;\n        globalThis.brightness = (await import('../services/brightness.js')).default;\n        globalThis.indicator = (await import('../services/onScreenIndicator.js')).default;\n        globalThis.app = (await import('resource:///com/github/Aylur/ags/app.js')).default;\n\n        Mpris.players.forEach(player => {\n            player.connect('changed', player => {\n                globalThis.mpris = player || Mpris.players[0];\n            });\n        });\n\n        Mpris.connect('player-added', (mpris, bus) => {\n            mpris.getPlayer(bus)?.connect('changed', player => {\n                globalThis.mpris = player || Mpris.players[0];\n            });\n        });\n\n        Mpris.connect('player-closed', () => {\n            globalThis.mpris = Mpris.players[0];\n        });\n    } catch (error) {\n        logError(error);\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/settings/hyprland.js",
    "content": "import App from 'resource:///com/github/Aylur/ags/app.js';\nimport Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';\nimport options from '../options.js';\nimport { readFile, writeFile } from 'resource:///com/github/Aylur/ags/utils.js';\n\nconst noIgnorealpha = ['verification', 'powermenu', 'lockscreen'];\n\n/** @param {Array<string>} batch */\nfunction sendBatch(batch) {\n    const cmd = batch\n        .filter(x => !!x)\n        .map(x => `keyword ${x}`)\n        .join('; ');\n\n    Hyprland.sendMessage(`[[BATCH]]/${cmd}`);\n}\n\n/** @param {string} scss */\nfunction getColor(scss) {\n    if (scss.includes('#'))\n        return scss.replace('#', '');\n\n    if (scss.includes('$')) {\n        const opt = options.list().find(opt => opt.scss === scss.replace('$', ''));\n        return opt?.value.replace('#', '') || 'ff0000';\n    }\n}\n\nexport function hyprlandInit() {\n    if (readFile('/tmp/ags/hyprland-init'))\n        return;\n\n    sendBatch(App.windows.flatMap(({ name }) => [\n        `layerrule blur, ${name}`,\n        noIgnorealpha.some(skip => name?.includes(skip))\n            ? '' : `layerrule ignorealpha 0.6, ${name}`,\n    ]));\n\n    writeFile('init', '/tmp/ags/hyprland-init');\n}\n\nexport async function setupHyprland() {\n    const wm_gaps = Math.floor(options.hypr.wm_gaps_multiplier.value * options.spacing.value);\n    const border_width = options.border.width.value;\n    const radii = options.radii.value;\n    const drop_shadow = options.desktop.drop_shadow.value;\n    const bar_style = options.bar.style.value;\n    const bar_pos = options.bar.position.value;\n    const inactive_border = options.hypr.inactive_border.value;\n    const accent = getColor(options.theme.accent.accent.value);\n\n    const batch = [];\n\n    JSON.parse(await Hyprland.sendMessage('j/monitors')).forEach(({ name }) => {\n        const v = bar_pos === 'top' ? `-${wm_gaps},0,0,0` : `0,-${wm_gaps},0,0`;\n        if (bar_style !== 'normal')\n            batch.push(`monitor ${name},addreserved,${v}`);\n        else\n            batch.push(`monitor ${name},addreserved,0,0,0,0`);\n    });\n\n    batch.push(\n        `general:border_size ${border_width}`,\n        `general:gaps_out ${wm_gaps}`,\n        `general:gaps_in ${Math.floor(wm_gaps / 2)}`,\n        `general:col.active_border rgba(${accent}ff)`,\n        `general:col.inactive_border ${inactive_border}`,\n        `decoration:rounding ${radii}`,\n        `decoration:drop_shadow ${drop_shadow ? 'yes' : 'no'}`,\n    );\n\n    sendBatch(batch);\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/settings/option.js",
    "content": "import { CACHE_DIR, readFile, writeFile } from 'resource:///com/github/Aylur/ags/utils.js';\nimport { exec } from 'resource:///com/github/Aylur/ags/utils.js';\nimport options from '../options.js';\nimport Service from 'resource:///com/github/Aylur/ags/service.js';\nimport { reloadScss } from './scss.js';\nimport { setupHyprland } from './hyprland.js';\nconst CACHE_FILE = CACHE_DIR + '/options.json';\n\n/** object that holds the overriedden values */\nlet cacheObj = JSON.parse(readFile(CACHE_FILE) || '{}');\n\n/**\n * @template T\n * @typedef {Object} OptionConfig\n * @property {string=} scss - name of scss variable set to \"exclude\" to not include it in the generated scss file\n * @property {string=} unit - scss unit on numbers, default is \"px\"\n * @property {string=} title\n * @property {string=} note\n * @property {string=} category\n * @property {boolean=} noReload - don't reload css & hyprland on change\n * @property {boolean=} persist - ignore reset call\n * @property {'object' | 'string' | 'img' | 'number' | 'float' | 'font' | 'enum' =} type\n * @property {Array<string> =} enums\n * @property {(value: T) => any=} format\n * @property {(value: T) => any=} scssFormat\n */\n\n/** @template T */\nexport class Opt extends Service {\n    static {\n        Service.register(this, {}, {\n            'value': ['jsobject'],\n        });\n    }\n\n    #value;\n    #scss = '';\n    unit = 'px';\n    noReload = false;\n    persist = false;\n    id = '';\n    title = '';\n    note = '';\n    type = '';\n    category = '';\n\n    /** @type {Array<string>} */\n    enums = [];\n\n    /** @type {(v: T) => any} */\n    format = v => v;\n\n    /** @type {(v: T) => any} */\n    scssFormat = v => v;\n\n\n    /**\n     * @param {T} value\n     * @param {OptionConfig<T> =} config\n     */\n    constructor(value, config) {\n        super();\n        this.#value = value;\n        this.defaultValue = value;\n        this.type = typeof value;\n\n        if (config)\n            Object.keys(config).forEach(c => this[c] = config[c]);\n\n        import('../options.js').then(this.#init.bind(this));\n    }\n\n    set scss(scss) { this.#scss = scss; }\n    get scss() {\n        return this.#scss || this.id\n            .split('.')\n            .join('-')\n            .split('_')\n            .join('-');\n    }\n\n    #init() {\n        getOptions(); // sets the ids as a side effect\n\n        if (cacheObj[this.id] !== undefined)\n            this.setValue(cacheObj[this.id]);\n\n        const words = this.id\n            .split('.')\n            .flatMap(w => w.split('_'))\n            .map(word => word.charAt(0).toUpperCase() + word.slice(1));\n\n        this.title ||= words.join(' ');\n        this.category ||= words.length === 1\n            ? 'General'\n            : words.at(0) || 'General';\n\n        this.connect('changed', () => {\n            cacheObj[this.id] = this.value;\n            writeFile(\n                JSON.stringify(cacheObj, null, 2),\n                CACHE_FILE,\n            );\n        });\n    }\n\n    get value() { return this.#value; }\n    set value(value) { this.setValue(value); }\n\n    /** @param {T} value  */\n    setValue(value, reload = false) {\n        if (typeof value !== typeof this.defaultValue) {\n            console.error(Error(`WrongType: Option \"${this.id}\" can't be set to ${value}, ` +\n                `expected \"${typeof this.defaultValue}\", but got \"${typeof value}\"`));\n\n            return;\n        }\n\n        if (this.value !== value) {\n            this.#value = this.format(value);\n            this.changed('value');\n\n            if (reload && !this.noReload) {\n                reloadScss();\n                setupHyprland();\n            }\n        }\n    }\n\n    reset(reload = false) {\n        if (!this.persist)\n            this.setValue(this.defaultValue, reload);\n    }\n}\n\n/**\n * @template T\n * @param {T} value\n * @param {OptionConfig<T> =} config\n * @returns {Opt<T>}\n */\nexport function Option(value, config) {\n    return new Opt(value, config);\n}\n\n/** @returns {Array<Opt<any>>} */\nexport function getOptions(object = options, path = '') {\n    return Object.keys(object).flatMap(key => {\n        /** @type Option<any> */\n        const obj = object[key];\n        const id = path ? path + '.' + key : key;\n\n        if (obj instanceof Opt) {\n            obj.id = id;\n            return obj;\n        }\n\n        if (typeof obj === 'object')\n            return getOptions(obj, id);\n\n        return [];\n    });\n}\n\nexport function resetOptions() {\n    exec(`rm -rf ${CACHE_FILE}`);\n    cacheObj = {};\n    getOptions().forEach(opt => opt.reset());\n}\n\nexport function getValues() {\n    const obj = {};\n    for (const opt of getOptions()) {\n        if (opt.category !== 'exclude')\n            obj[opt.id] = opt.value;\n    }\n\n    return JSON.stringify(obj, null, 2);\n}\n\n/** @param {string | object} config */\nexport function apply(config) {\n    const options = getOptions();\n    const settings = typeof config === 'string'\n        ? JSON.parse(config) : config;\n\n    for (const id of Object.keys(settings)) {\n        const opt = options.find(opt => opt.id === id);\n        if (!opt) {\n            print(`No option with id: \"${id}\"`);\n            continue;\n        }\n\n        opt.setValue(settings[id]);\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/settings/scss.js",
    "content": "import App from 'resource:///com/github/Aylur/ags/app.js';\nimport * as Utils from 'resource:///com/github/Aylur/ags/utils.js';\nimport { getOptions } from './option.js';\nimport { dependencies } from '../utils.js';\n\nexport function scssWatcher() {\n    return Utils.subprocess(\n        [\n            'inotifywait',\n            '--recursive',\n            '--event', 'create,modify',\n            '-m', App.configDir + '/scss',\n        ],\n        reloadScss,\n        () => print('missing dependancy for css hotreload: inotify-tools'),\n    );\n}\n\n/**\n * generate an scss file that makes every option available as a variable\n * based on the passed scss parameter or the path in the object\n *\n * e.g\n * options.bar.style.value => $bar-style\n */\nexport async function reloadScss() {\n    if (!dependencies(['sassc']))\n        return;\n\n    const opts = getOptions();\n    const vars = opts.map(opt => {\n        if (opt.scss === 'exclude')\n            return '';\n\n        const unit = typeof opt.value === 'number' ? opt.unit : '';\n        const value = opt.scssFormat ? opt.scssFormat(opt.value) : opt.value;\n        return `$${opt.scss}: ${value}${unit};`;\n    });\n\n    const bar_style = opts.find(opt => opt.id === 'bar.style')?.value || '';\n    const additional = bar_style === 'normal' ? '//' : `\n        window#quicksettings .window-content {\n            margin-right: $wm-gaps;\n        }\n    `;\n\n    try {\n        const tmp = '/tmp/ags/scss';\n        Utils.ensureDirectory(tmp);\n        await Utils.writeFile(vars.join('\\n'), `${tmp}/options.scss`);\n        await Utils.writeFile(additional, `${tmp}/additional.scss`);\n        await Utils.execAsync(`sassc ${App.configDir}/scss/main.scss ${tmp}/style.css`);\n        App.resetCss();\n        App.applyCss(`${tmp}/style.css`);\n    } catch (error) {\n        if (error instanceof Error)\n            console.error(error.message);\n\n        if (typeof error === 'string')\n            console.error(error);\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/settings/setup.js",
    "content": "import App from \"resource:///com/github/Aylur/ags/app.js\";\nimport Battery from \"resource:///com/github/Aylur/ags/service/battery.js\";\nimport Notifications from \"resource:///com/github/Aylur/ags/service/notifications.js\";\nimport Audio from \"resource:///com/github/Aylur/ags/service/audio.js\";\nimport options from \"../options.js\";\nimport icons from \"../icons.js\";\nimport { reloadScss, scssWatcher } from \"./scss.js\";\nimport { initWallpaper, wallpaper } from \"./wallpaper.js\";\nimport { hyprlandInit } from \"./hyprland.js\";\nimport { globals } from \"./globals.js\";\nimport Gtk from \"gi://Gtk?version=3.0\";\nimport { exec, execAsync } from \"resource:///com/github/Aylur/ags/utils.js\";\n\nexport function init() {\n  initWallpaper();\n  notificationBlacklist();\n  warnOnLowBattery();\n  globals();\n  tmux();\n  gsettigsColorScheme();\n  gtkFontSettings();\n  scssWatcher();\n  dependandOptions();\n\n  reloadScss();\n  hyprlandInit();\n  wallpaper();\n  //pywal();\n  //gtkTheme();\n  //gtkIcons();\n\n  Audio.maxStreamVolume = 1.05;\n}\n\nfunction dependandOptions() {\n  options.bar.style.connect(\"changed\", ({ value }) => {\n    if (value !== \"normal\")\n      options.desktop.screen_corners.setValue(false, true);\n  });\n}\n\nfunction tmux() {\n  if (!Utils.exec(\"which tmux\")) return;\n\n  /** @param {string} scss */\n  function getColor(scss) {\n    if (scss.includes(\"#\")) return scss;\n\n    if (scss.includes(\"$\")) {\n      const opt = options\n        .list()\n        .find((opt) => opt.scss === scss.replace(\"$\", \"\"));\n      return opt?.value;\n    }\n  }\n\n  options.theme.accent.accent.connect(\"changed\", ({ value }) =>\n    Utils.execAsync(`tmux set @main_accent ${getColor(value)}`).catch((err) =>\n      console.error(err.message),\n    ),\n  );\n}\n\nfunction gsettigsColorScheme() {\n  if (!Utils.exec(\"which gsettings\")) return;\n\n  options.theme.scheme.connect(\"changed\", ({ value }) => {\n    const gsettings = \"gsettings set org.gnome.desktop.interface color-scheme\";\n    Utils.execAsync(`${gsettings} \"prefer-${value}\"`).catch((err) =>\n      console.error(err.message),\n    );\n  });\n}\n\nfunction gtkFontSettings() {\n  const settings = Gtk.Settings.get_default();\n  if (!settings) {\n    console.error(Error(\"Gtk.Settings unavailable\"));\n    return;\n  }\n\n  const callback = () => {\n    const { size, font } = options.font;\n    settings.gtk_font_name = `${font.value} ${size.value}`;\n  };\n\n  options.font.font.connect(\"notify::value\", callback);\n  options.font.size.connect(\"notify::value\", callback);\n}\n\nfunction notificationBlacklist() {\n  Notifications.connect(\"notified\", (_, id) => {\n    const n = Notifications.getNotification(id);\n    options.notifications.black_list.value.forEach((item) => {\n      if (n?.app_name.includes(item) || n?.app_entry?.includes(item)) n.close();\n    });\n  });\n}\n\nfunction warnOnLowBattery() {\n  Battery.connect(\"notify::percent\", () => {\n    const low = options.battery.low.value;\n    if (\n      Battery.percent !== low ||\n      Battery.percent !== low / 2 ||\n      !Battery.charging\n    )\n      return;\n\n    Utils.execAsync([\n      \"notify-send\",\n      `${Battery.percent}% Battery Percentage`,\n      \"-i\",\n      icons.battery.warning,\n      \"-u\",\n      \"critical\",\n    ]);\n  });\n}\n\nexport function pywal() {\n  if (!exec(\"which wal\")) return print(\"missing dependancy: pywal\");\n\n  execAsync([\"wal\", \"--theme\", options.misc.pywal.theme.value]).catch((err) =>\n    console.error(err),\n  );\n}\n\nexport function gtkTheme() {\n  if (!exec(\"which gsettings\"))\n    return print(\"missing dependancy: Gnome-Settings\");\n\n  execAsync([\n    \"gsettings\",\n    \"set\",\n    \"org.gnome.desktop.interface\",\n    \"gtk-theme\",\n    options.misc.gtk.theme.value,\n  ]).catch((err) => console.error(err));\n}\n\nexport function gtkIcons() {\n  if (!exec(\"which gsettings\"))\n    return print(\"missing dependancy: Gnome-Settings\");\n\n  execAsync([\n    \"gsettings\",\n    \"set\",\n    \"org.gnome.desktop.interface\",\n    \"icon-theme\",\n    options.misc.gtkIcons.theme.value,\n  ]).catch((err) => console.error(err));\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/settings/theme.js",
    "content": "import options from '../options.js';\nimport themes from '../themes.js';\nimport { reloadScss } from './scss.js';\nimport { setupHyprland } from './hyprland.js';\nimport { wallpaper } from './wallpaper.js';\nimport { gtkIcons, gtkTheme, pywal } from './setup.js';\nimport GLib from 'gi://GLib';\n\n\n/** @param {string} name */\nexport function setTheme(name) {\n    options.reset();\n    const theme = themes.find(t => t.name === name);\n    if (!theme)\n        return print('No theme named ' + name);\n\n    options.apply(theme.options);\n    reloadScss();\n    setupHyprland();\n    wallpaper();\n//    gtkIcons();\n//    gtkTheme();\n}\n\nexport const WP = GLib.get_home_dir() + '/.config/backgrounds/';\nexport const HOME = GLib.get_home_dir() + '/';\n\nexport const lightColors = {\n    'theme.scheme': 'light',\n    'color.red': '#e55f86',\n    'color.green': '#00D787',\n    'color.yellow': '#EBFF71',\n    'color.blue': '#51a4e7',\n    'color.magenta': '#9077e7',\n    'color.teal': '#51e6e6',\n    'color.orange': '#E79E64',\n    'theme.bg': '#fffffa',\n    'theme.fg': '#141414',\n};\n\nexport const Theme = ({ name, icon = ' ', ...options }) => ({\n    name,\n    icon,\n    options: {\n        'theme.name': name,\n        'theme.icon': icon,\n        ...options,\n    },\n});\n\nlet settingsDialog;\nexport async function openSettings() {\n    if (settingsDialog)\n        return settingsDialog.present();\n\n    try {\n        settingsDialog = (await import('./SettingsDialog.js')).default;\n        settingsDialog.present();\n    } catch (error) {\n        if (error instanceof Error)\n            console.error(error.message);\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/settings/wallpaper.js",
    "content": "import options from '../options.js';\nimport { exec, execAsync } from 'resource:///com/github/Aylur/ags/utils.js';\nimport { dependencies } from '../utils.js';\nimport GLib from 'gi://GLib';\n\nexport function initWallpaper() {\n    if (dependencies(['swww'])) {\n        exec('swww init');\n\n        options.desktop.wallpaper.img.connect('changed', wallpaper);\n    }\n}\n\nexport function wallpaper() {\n    const backgrounds = GLib.get_home_dir() + '/.config/backgrounds';\n    if (!dependencies(['swww']))\n        return;\n\n    execAsync([\n        'swww', 'img',\n        '--transition-step', '4',\n        '-f',\n        'CatmullRom', '--transition-fps', '120',\n        options.desktop.wallpaper.img.value,\n    ]).catch(err => console.error(err));\n    execAsync([\n        'cp', options.desktop.wallpaper.img.value, `${backgrounds}/last/image.png`\n    ]);\n    execAsync(`sh -c ~/.config/ags/prepare_background.sh`)\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/themes.js",
    "content": "/**\n * A Theme is a set of options that will be applied\n * ontop of the default values. see options.js for possible options\n */\nimport { Theme, WP, HOME } from \"./settings/theme.js\";\n\nexport default [\n  Theme({\n    name: \"Adwaita Dark\",\n    icon: \"󰊬 \",\n\n    workspaces: 10,\n\n    //\"misc.gtk.theme\": \"adw-gtk3-dark\",\n    //\"misc.gtkIcons.theme\": \"Adwaita\",\n\n    \"desktop.wallpaper.img\": WP + \"hypr-marble.png\",\n    \"desktop.avatar\": HOME + \"face.png\",\n\n    spacing: 2,\n    padding: 8,\n    radii: 5,\n    popover_padding_multiplier: 1.4,\n\n    \"color.red\": \"#c01c28\",\n    \"color.green\": \"#2ec27e\",\n    \"color.yellow\": \"#f5c211\",\n    \"color.blue\": \"#3584e4\",\n    \"color.magenta\": \"#813d9c\",\n    \"color.teal\": \"#99c1f1\",\n    \"color.orange\": \"#e66100\",\n\n    \"theme.scheme\": \"dark\",\n    \"theme.bg\": \"#1E1E1E\",\n    \"theme.fg\": \"#deddda\",\n    \"theme.accent.accent\": \"$blue\",\n    \"theme.accent.fg\": \"$bg-color\",\n    \"theme.accent.gradient\": \"to right, $accent, lighten($accent, 14%)\",\n    \"theme.widget.bg\": \"$fg-color\",\n    \"theme.widget.opacity\": 94,\n    \"theme.widget.borderwidth\": 1,\n\n    \"border.color\": \"$fg-color\",\n    \"border.opacity\": 0,\n    \"border.width\": 0,\n    \"border.barcolor\": \"$accent\",\n\n    \"hypr.inactive_border\": \"rgba(333333ff)\",\n    \"hypr.wm_gaps\": 5,\n\n    \"font.font\": \"Ubuntu Nerd Font\",\n    \"font.mono\": \"Mononoki Nerd Font\",\n    \"font.size\": 13,\n\n    \"applauncher.width\": 500,\n    \"applauncher.height\": 400,\n    \"applauncher.icon_size\": 42,\n    \"applauncher.anchor\": \"center\",\n\n    \"bar.position\": \"top\",\n    \"bar.style\": \"floating\",\n    \"bar.flat_buttons\": true,\n    \"bar.separators\": true,\n    \"bar.icon\": \"distro-icon\",\n\n    \"battery.bar.width\": 70,\n    \"battery.bar.height\": 14,\n    \"battery.low\": 15,\n    \"battery.medium\": 35,\n\n    \"desktop.wallpaper.fg\": \"#fff\",\n    \"desktop.drop_shadow\": false,\n    \"desktop.shadow\": \"rgba(0, 0, 0, .6)\",\n    \"desktop.dock.icon_size\": 42,\n    \"desktop.dock.pinned_apps\": [\n      \"firefox\",\n      \"neovide\",\n      \"kitty\",\n      \"org.gnome.Nautilus\",\n      \"obsidian\",\n      \"discord\",\n      \"spotify\",\n      \"superslicer\",\n      \"org.gnome.Software\",\n    ],\n\n    \"notifications.black_list\": [\"Spotify\"],\n    \"notifications.position\": [\"top\"],\n    \"notifications.width\": 450,\n    \"dashboard.sys_info_size\": 70,\n    \"mpris.black_list\": [\"firefox\"],\n    \"mpris.preferred\": \"spotify\",\n  }),\n\n  Theme({\n    name: \"Gruvbox Dark\",\n    icon: \" \",\n\n    workspaces: 10,\n\n    //\"misc.gtk.theme\": \"Gruvbox-Dark-B\",\n    //\"misc.gtkIcons.theme\": \"gruvbox_icons\",\n\n    \"desktop.wallpaper.img\": WP + \"stairs.png\",\n    \"desktop.avatar\": HOME + \"face.png\",\n\n    spacing: 2,\n    padding: 8,\n    radii: 5,\n    popover_padding_multiplier: 1.4,\n\n    \"color.red\": \"#CC241D\",\n    \"color.green\": \"#476C43\",\n    \"color.yellow\": \"#D79921\",\n    \"color.blue\": \"#458588\",\n    \"color.magenta\": \"#B16286\",\n    \"color.teal\": \"#689D6A\",\n    \"color.orange\": \"#D65D0E\",\n\n    \"theme.scheme\": \"dark\",\n    \"theme.bg\": \"#1D2021\",\n    \"theme.fg\": \"#FBF1C7\",\n    \"theme.accent.accent\": \"$blue\",\n    \"theme.accent.fg\": \"$bg-color\",\n    \"theme.accent.gradient\": \"to right, $accent, lighten($accent, 14%)\",\n    \"theme.widget.bg\": \"$fg-color\",\n    \"theme.widget.opacity\": 94,\n\n    \"border.color\": \"$fg-color\",\n    \"border.opacity\": 100,\n    \"border.width\": 0,\n    \"border.barcolor\": \"$green\",\n\n    \"hypr.inactive_border\": \"rgba(333333ff)\",\n    \"hypr.wm_gaps\": 3,\n\n    \"font.font\": \"Ubuntu Nerd Font\",\n    \"font.mono\": \"Mononoki Nerd Font\",\n    \"font.size\": 13,\n\n    \"applauncher.width\": 500,\n    \"applauncher.height\": 400,\n    \"applauncher.icon_size\": 32,\n    \"applauncher.anchor\": \"center\",\n\n    \"bar.position\": \"top\",\n    \"bar.style\": \"floating\",\n    \"bar.flat_buttons\": true,\n    \"bar.separators\": true,\n    \"bar.icon\": \"distro-icon\",\n\n    \"battery.bar.width\": 70,\n    \"battery.bar.height\": 14,\n    \"battery.low\": 15,\n    \"battery.medium\": 35,\n\n    \"desktop.wallpaper.fg\": \"#fff\",\n    \"desktop.drop_shadow\": false,\n    \"desktop.shadow\": \"rgba(0, 0, 0, .6)\",\n    \"desktop.dock.icon_size\": 42,\n    \"desktop.dock.pinned_apps\": [\n      \"firefox\",\n      \"neovide\",\n      \"kitty\",\n      \"org.gnome.Nautilus\",\n      \"obsidian\",\n      \"discord\",\n      \"spotify\",\n      \"superslicer\",\n      \"org.gnome.Software\",\n    ],\n\n    \"notifications.black_list\": [\"Spotify\"],\n    \"notifications.position\": [\"top\"],\n    \"notifications.width\": 450,\n    \"dashboard.sys_info_size\": 70,\n    \"mpris.black_list\": [\"Caprine\"],\n    \"mpris.preferred\": \"spotify\",\n  }),\n\n  Theme({\n    name: \"Catppuccin Frappé\",\n    icon: \"󰄛 \",\n\n    workspaces: 10,\n\n    //\"misc.gtk.theme\": \"Catppuccin-Frappe\",\n    //\"misc.gtkIcons.theme\": \"Adwaita\",\n\n    \"desktop.wallpaper.img\": WP + \"mocha-mountains.png\",\n    \"desktop.avatar\": HOME + \"face.png\",\n\n    spacing: 2,\n    padding: 8,\n    radii: 5,\n    popover_padding_multiplier: 1.4,\n\n    \"color.red\": \"#e78284\",\n    \"color.green\": \"#a6d189\",\n    \"color.yellow\": \"#e5c890\",\n    \"color.blue\": \"#8caaee\",\n    \"color.magenta\": \"#ca9ee6\",\n    \"color.teal\": \"#81c8be\",\n    \"color.orange\": \"#ef9f76\",\n\n    \"theme.scheme\": \"dark\",\n    \"theme.bg\": \"#181926\",\n    \"theme.fg\": \"#c6d0f5\",\n    \"theme.accent.accent\": \"$blue\",\n    \"theme.accent.fg\": \"$bg-color\",\n    \"theme.accent.gradient\": \"to right, $accent, lighten($accent, 8%)\",\n    \"theme.widget.bg\": \"$fg-color\",\n    \"theme.widget.opacity\": 94,\n\n    \"border.color\": \"$fg-color\",\n    \"border.opacity\": 100,\n    \"border.width\": 0,\n    \"border.barcolor\": \"$accent\",\n\n    \"hypr.inactive_border\": \"rgba(333333ff)\",\n    \"hypr.wm_gaps\": 5,\n\n    \"font.font\": \"Ubuntu Nerd Font\",\n    \"font.mono\": \"Mononoki Nerd Font\",\n    \"font.size\": 13,\n\n    \"applauncher.width\": 500,\n    \"applauncher.height\": 400,\n    \"applauncher.icon_size\": 32,\n    \"applauncher.anchor\": \"center\",\n\n    \"bar.position\": \"top\",\n    \"bar.style\": \"floating\",\n    \"bar.flat_buttons\": true,\n    \"bar.separators\": true,\n    \"bar.icon\": \"distro-icon\",\n\n    \"battery.bar.width\": 70,\n    \"battery.bar.height\": 14,\n    \"battery.low\": 15,\n    \"battery.medium\": 35,\n\n    \"desktop.wallpaper.fg\": \"#fff\",\n    \"desktop.drop_shadow\": false,\n    \"desktop.shadow\": \"rgba(0, 0, 0, .6)\",\n    \"desktop.dock.icon_size\": 42,\n    \"desktop.dock.pinned_apps\": [\n      \"firefox\",\n      \"neovide\",\n      \"kitty\",\n      \"org.gnome.Nautilus\",\n      \"obsidian\",\n      \"discord\",\n      \"spotify\",\n      \"superslicer\",\n      \"org.gnome.Software\",\n    ],\n\n    \"notifications.black_list\": [\"Spotify\"],\n    \"notifications.position\": [\"top\"],\n    \"notifications.width\": 450,\n    \"dashboard.sys_info_size\": 70,\n    \"mpris.black_list\": [\"Caprine\"],\n    \"mpris.preferred\": \"spotify\",\n  }),\n\n  Theme({\n    name: \"Rosé Pine\",\n    icon: \"󰐅 \",\n\n    workspaces: 10,\n\n    //\"misc.gtk.theme\": \"rose-pine-gtk\",\n    //\"misc.gtkIcons.theme\": \"rose-pine-icons\",\n\n    \"desktop.wallpaper.img\": WP + \"leafy-moon.png\",\n    \"desktop.avatar\": HOME + \"face.png\",\n\n    spacing: 2,\n    padding: 8,\n    radii: 5,\n    popover_padding_multiplier: 1.4,\n\n    \"color.red\": \"#eb6f92\",\n    \"color.green\": \"#9ccfd8\",\n    \"color.yellow\": \"#f6c177\",\n    \"color.blue\": \"#3e8fb0\",\n    \"color.magenta\": \"#c4a7e7\",\n    \"color.teal\": \"#31748f\",\n    \"color.orange\": \"#ebbcba\",\n\n    \"theme.scheme\": \"dark\",\n    \"theme.bg\": \"#191724\",\n    \"theme.fg\": \"#e0def4\",\n    \"theme.accent.accent\": \"$teal\",\n    \"theme.accent.fg\": \"$bg-color\",\n    \"theme.accent.gradient\": \"to right, $accent, lighten($accent, 14%)\",\n    \"theme.widget.bg\": \"$fg-color\",\n    \"theme.widget.opacity\": 94,\n\n    \"border.color\": \"$fg-color\",\n    \"border.opacity\": 100,\n    \"border.width\": 0,\n    \"border.barcolor\": \"$accent\",\n\n    \"hypr.inactive_border\": \"rgba(333333ff)\",\n    \"hypr.wm_gaps\": 3,\n\n    \"font.font\": \"Ubuntu Nerd Font\",\n    \"font.mono\": \"Mononoki Nerd Font\",\n    \"font.size\": 13,\n\n    \"applauncher.width\": 500,\n    \"applauncher.height\": 400,\n    \"applauncher.icon_size\": 32,\n    \"applauncher.anchor\": \"center\",\n\n    \"bar.position\": \"top\",\n    \"bar.style\": \"floating\",\n    \"bar.flat_buttons\": true,\n    \"bar.separators\": true,\n    \"bar.icon\": \"distro-icon\",\n\n    \"battery.bar.width\": 70,\n    \"battery.bar.height\": 14,\n    \"battery.low\": 15,\n    \"battery.medium\": 35,\n\n    \"desktop.wallpaper.fg\": \"#fff\",\n    \"desktop.drop_shadow\": false,\n    \"desktop.shadow\": \"rgba(0, 0, 0, .6)\",\n    \"desktop.dock.icon_size\": 42,\n    \"desktop.dock.pinned_apps\": [\n      \"firefox\",\n      \"neovide\",\n      \"kitty\",\n      \"org.gnome.Nautilus\",\n      \"obsidian\",\n      \"discord\",\n      \"spotify\",\n      \"superslicer\",\n      \"org.gnome.Software\",\n    ],\n\n    \"notifications.black_list\": [\"Spotify\"],\n    \"notifications.position\": [\"top\"],\n    \"notifications.width\": 450,\n    \"dashboard.sys_info_size\": 70,\n    \"mpris.black_list\": [\"Caprine\"],\n    \"mpris.preferred\": \"spotify\",\n  }),\n];\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/utils.js",
    "content": "import * as Utils from \"resource:///com/github/Aylur/ags/utils.js\";\nimport cairo from \"cairo\";\nimport icons from \"./icons.js\";\nimport Gdk from \"gi://Gdk\";\nimport GLib from \"gi://GLib\";\n\n/**\n * @param {number} length\n * @param {number=} start\n * @returns {Array<number>}\n */\nexport function range(length, start = 1) {\n  return Array.from({ length }, (_, i) => i + start);\n}\n\n/**\n * @param {Array<[string, string] | string[]>} collection\n * @param {string} item\n * @returns {string}\n */\nexport function substitute(collection, item) {\n  return collection.find(([from]) => from === item)?.[1] || item;\n}\n\n/**\n * @param {(monitor: number) => any} widget\n * @returns {Array<import('types/widgets/window').default>}\n */\nexport function forMonitors(widget) {\n  const n = Gdk.Display.get_default()?.get_n_monitors() || 1;\n  return range(n, 0).map(widget).flat(1);\n}\n\n/**\n * @param {import('gi://Gtk?version=3.0').default.Widget} widget*\n * @returns {any} - missing cairo type\n */\nexport function createSurfaceFromWidget(widget) {\n  const alloc = widget.get_allocation();\n  const surface = new cairo.ImageSurface(\n    cairo.Format.ARGB32,\n    alloc.width,\n    alloc.height,\n  );\n  const cr = new cairo.Context(surface);\n  cr.setSourceRGBA(255, 255, 255, 0);\n  cr.rectangle(0, 0, alloc.width, alloc.height);\n  cr.fill();\n  widget.draw(cr);\n\n  return surface;\n}\n\n/** @param {string} icon */\nexport function getAudioTypeIcon(icon) {\n  const substitues = [\n    [\"audio-headset-bluetooth\", icons.audio.type.headset],\n    [\"audio-card-analog-usb\", icons.audio.type.speaker],\n    [\"audio-card-analog-pci\", icons.audio.type.card],\n  ];\n\n  return substitute(substitues, icon);\n}\n\n/** @param {import('types/service/applications').Application} app */\nexport function launchApp(app) {\n  Utils.execAsync([\"hyprctl\", \"dispatch\", \"exec\", `sh -c ${app.executable}`]);\n  app.frequency += 1;\n}\n\n/** @param {Array<string>} bins */\nexport function dependencies(bins) {\n  const deps = bins.map((bin) => {\n    const has = Utils.exec(`which ${bin}`);\n    if (!has) print(`missing dependency: ${bin}`);\n\n    return !!has;\n  });\n\n  return deps.every((has) => has);\n}\n\n/** @param {string} img - path to an img file */\nexport function blurImg(img) {\n  const cache = Utils.CACHE_DIR + \"/media\";\n  return new Promise((resolve) => {\n    if (!img) resolve(\"\");\n\n    const dir = cache + \"/blurred\";\n    const blurred = dir + img.substring(cache.length);\n\n    if (GLib.file_test(blurred, GLib.FileTest.EXISTS)) return resolve(blurred);\n\n    Utils.ensureDirectory(dir);\n    Utils.execAsync([\"convert\", img, \"-blur\", \"0x22\", blurred])\n      .then(() => resolve(blurred))\n      .catch(() => resolve(\"\"));\n  });\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/js/variables.js",
    "content": "import Variable from 'resource:///com/github/Aylur/ags/variable.js';\nimport GLib from 'gi://GLib';\nimport options from './options.js';\n\nconst intval = options.systemFetchInterval;\n\nexport const clock = Variable(GLib.DateTime.new_now_local(), {\n    poll: [1000, () => GLib.DateTime.new_now_local()],\n});\n\nexport const uptime = Variable('', {\n    poll: [60_000, 'cat /proc/uptime', line => {\n        const uptime = Number.parseInt(line.split('.')[0]) / 60;\n        if (uptime > 18 * 60)\n            return 'Go Sleep';\n\n        const h = Math.floor(uptime / 60);\n        const s = Math.floor(uptime % 60);\n        return `${h}:${s < 10 ? '0' + s : s}`;\n    }],\n});\n\nexport const distro = GLib.get_os_info('ID');\n\nexport const distroIcon = (() => {\n    switch (distro) {\n        case 'fedora': return '';\n        case 'arch': return '';\n        case 'nixos': return '';\n        case 'debian': return '';\n        case 'opensuse-tumbleweed': return '';\n        case 'ubuntu': return '';\n        case 'endeavouros': return '';\n        default: return '';\n    }\n})();\n\n/** @type {function([string, string] | string[]): number} */\nconst divide = ([total, free]) => Number.parseInt(free) / Number.parseInt(total);\n\nexport const cpu = Variable(0, {\n    poll: [intval, 'top -b -n 1', out => divide(['100', out.split('\\n')\n        .find(line => line.includes('Cpu(s)'))\n        ?.split(/\\s+/)[1]\n        .replace(',', '.') || '0'])],\n});\n\nexport const ram = Variable(0, {\n    poll: [intval, 'free', out => divide(out.split('\\n')\n        .find(line => line.includes('Mem:'))\n        ?.split(/\\s+/)\n        .splice(1, 2) || ['1', '1'])],\n});\n\nexport const temp = Variable(0, {\n    poll: [intval, 'cat ' + options.temperature, n => {\n        return Number.parseInt(n) / 100_000;\n    }],\n});\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/package.json",
    "content": "{\n\t\"name\": \"ags-dotfiles\",\n\t\"version\": \"1.7.6\",\n\t\"description\": \"An extensible GTK-Shell\",\n\t\"main\": \"config.js\",\n\t\"scripts\": {\n\t\t\"lint\": \"eslint . --fix\",\n\t\t\"stylelint\": \"stylelint ./scss --fix\"\n\t},\n\t\"repository\": {\n\t\t\"type\": \"git\",\n\t\t\"url\": \"git+https://github.com/RoccoRakete/hyprland-dots.git\"\n\t},\n\t\"author\": \"RoccoRakete\",\n\t\"bugs\": {\n\t\t\"url\": \"https://github.com/RoccoRakete/hyprland-dots/issues\"\n\t},\n\t\"homepage\": \"https://github.com/RoccoRakete/hyprland-dots/blob/main/README.md\",\n\t\"kofi\": \"https://ko-fi.com/roccorakete\",\n\t\"devDependencies\": {\n\t\t\"@girs/dbusmenugtk3-0.4\": \"^0.4.0-3.2.0\",\n\t\t\"@girs/gobject-2.0\": \"^2.76.1-3.2.3\",\n\t\t\"@girs/gtk-3.0\": \"^3.24.39-3.2.2\",\n\t\t\"@girs/gvc-1.0\": \"^1.0.0-3.1.0\",\n\t\t\"@girs/nm-1.0\": \"^1.43.1-3.1.0\",\n\t\t\"stylelint-config-standard-scss\": \"^10.0.0\",\n\t\t\"@typescript-eslint/eslint-plugin\": \"^5.33.0\",\n\t\t\"@typescript-eslint/parser\": \"^5.33.0\",\n\t\t\"eslint\": \"^8.44.0\"\n\t}\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/prepare_background.sh",
    "content": "#!/usr/bin/env sh\nsleep 5\nconvert -scale 1920x1080 -blur 0x5 ~/.config/backgrounds/last/image.png ~/.config/backgrounds/last/image_blurred.png\n            \n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/common/a11y-button.scss",
    "content": "@import './button';\n\n@mixin accs-button($flat: false, $reactive: true){\n    @include button($flat: true, $reactive: false, $focusable: false);\n    color: $fg-color;\n\n    > * {\n        border-radius: $radii;\n        transition: $transition;\n\n        @if $flat{\n            background-color: transparent;\n            box-shadow: none;\n        } @else{\n            background-color: $widget-bg;\n            box-shadow: inset 0 0 0 $border-width $border-color;\n        }\n    }\n\n\n    @if $reactive{\n        &:focus > *, &.focused > * {\n            @include button-focus;\n        }\n\n        &:hover > * {\n            @include button-hover;\n        }\n\n        &:active, &.active, &.on, &:checked {\n            > * {\n                @include button-active;\n            }\n\n            &:hover > * {\n                box-shadow: inset 0 0 0 $border-width $border-color,\n                            inset 0 0 0 99px $hover;\n            }\n        }\n    }\n}\n\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/common/button-workspaces.scss",
    "content": "@mixin button-focus() {\n    box-shadow: inset 0 0 0 $border-width $accent;\n    background-color: $hover;\n    color: $hover-fg;\n}\n\n@mixin button-hover() {\n    box-shadow: inset 0 0 0 $border-width $border-color;\n    background-color: $bg-color;\n    color: $hover-fg;\n}\n\n@mixin button-active() {\n    box-shadow: inset 0 0 0 $border-width $border-color;\n    background-image: $active-gradient;\n    background-color: $accent;\n    color: $accent-fg;\n}\n\n@mixin button-disabled() {\n    box-shadow: none;\n    background-color: transparent;\n    color: transparentize($fg-color, 0.7);\n}\n\n@mixin button-workspaces($flat: false, $reactive: true, $radii: $radii, $focusable: true){\n    all: unset;\n    transition: $transition;\n    border-radius: $radii;\n    color: $fg-color;\n\n    @if $flat{\n        background-color: transparent;\n        background-image: none;\n        box-shadow: none;\n    } @else{\n        background-color: $widget-bg;\n        box-shadow: inset 0 0 0 $border-width $border-color;\n    }\n\n    @if $reactive{\n        @if $focusable {\n            &:focus{\n                @include button-focus;\n            }\n        }\n\n        &:hover{\n            @include button-hover;\n        }\n\n        &:active, &.on, &.active, &:checked {\n            @include button-active;\n\n            &:hover {\n                box-shadow: inset 0 0 0 $border-width $border-color,\n                            inset 0 0 0 99px $hover;\n            }\n        }\n    }\n\n    &:disabled {\n        @include button-disabled;\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/common/button.scss",
    "content": "@mixin button-focus() {\n    box-shadow: inset 0 0 0 $border-width $accent;\n    background-color: $hover;\n    color: $hover-fg;\n}\n\n@mixin button-hover() {\n    box-shadow: inset 0 0 0 $border-width $border-color;\n    background-color: $hover;\n    color: $hover-fg;\n}\n\n@mixin button-active() {\n    box-shadow: inset 0 0 0 $border-width $border-color;\n    background-image: $active-gradient;\n    background-color: $accent;\n    color: $accent-fg;\n}\n\n@mixin button-disabled() {\n    box-shadow: none;\n    background-color: transparent;\n    color: transparentize($fg-color, 0.7);\n}\n\n@mixin button($flat: false, $reactive: true, $radii: $radii, $focusable: true){\n    all: unset;\n    transition: $transition;\n    border-radius: $radii;\n    color: $fg-color;\n\n    @if $flat{\n        background-color: transparent;\n        background-image: none;\n        box-shadow: none;\n    } @else{\n        background-color: $widget-bg;\n        box-shadow: inset 0 0 0 $border-width $border-color;\n    }\n\n    @if $reactive{\n        @if $focusable {\n            &:focus{\n                @include button-focus;\n            }\n        }\n\n        &:hover{\n            @include button-hover;\n        }\n\n        &:active, &.on, &.active, &:checked {\n            @include button-active;\n\n            &:hover {\n                box-shadow: inset 0 0 0 $border-width $border-color,\n                            inset 0 0 0 99px $hover;\n            }\n        }\n    }\n\n    &:disabled {\n        @include button-disabled;\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/common/floating-widget.scss",
    "content": "@mixin floating-widget {\n    @if $drop-shadow {\n        box-shadow: 0 0 5px 0 $shadow;\n    }\n\n    margin: max($spacing, 8px);\n    border: $widget-border-width solid $popover-border-color;\n    background-color: $bg-color;\n    color: $fg-color;\n    border-radius: $popover-radius;\n    padding: $popover-padding;\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/common/hidden.scss",
    "content": "@mixin hidden {\n    background-color: transparent;\n    background-image: none;\n    border-color: transparent;\n    box-shadow: none;\n    -gtk-icon-transform: scale(0);\n\n    * {\n        background-color: transparent;\n        background-image: none;\n        border-color: transparent;\n        box-shadow: none;\n        -gtk-icon-transform: scale(0);\n    }\n}\n\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/common/menu.scss",
    "content": "window.popup {\n\t>* {\n\t\tborder: none;\n\t\tbox-shadow: none;\n\t}\n\n\tmenu {\n\t\tborder-radius: $popover-radius;\n\t\tbackground-color: $bg-color;\n\t\tpadding: $popover-padding;\n\t\tborder: $border-width solid $popover-border-color;\n\n\t\tseparator {\n\t\t\tbackground-color: $border-color;\n\t\t}\n\n\t\tmenuitem {\n\t\t\t@include button;\n\t\t\tpadding: $spacing/2;\n\t\t\tmargin: $spacing/2 0;\n\n\t\t\t&:first-child {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\n\t\t\t&:last-child {\n\t\t\t\tmargin-bottom: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/common/scrollable.scss",
    "content": "@mixin scrollable {\n    scrollbar, scrollbar * {\n        all: unset;\n    }\n\n    scrollbar.vertical {\n        transition: $transition;\n        background-color: transparentize($bg-color, 0.7);\n\n        &:hover {\n            background-color: transparentize($bg-color, 0.3);\n\n            slider {\n                background-color: transparentize($fg-color, 0.3);\n                min-width: .6em;\n            }\n        }\n    }\n\n\n    scrollbar.vertical slider {\n        background-color: transparentize($fg-color, 0.5);\n        border-radius: $radii;\n        min-width: .4em;\n        min-height: 2em;\n        transition: $transition;\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/common/slider.scss",
    "content": "@import './unset';\n\n@mixin slider($width: 0.7em, $slider-width: .5em, $gradient: $active-gradient, $slider: true, $focusable: true, $radii: $radii){\n    @include unset($rec: true);\n\n    trough{\n        transition: $transition;\n        border-radius: $radii;\n        border: $border;\n        background-color: $widget-bg;\n        min-height: $width;\n        min-width:  $width;\n\n        highlight, progress{\n            border-radius: max($radii - $border-width, 0);\n            background-image: $gradient;\n            min-height: $width;\n            min-width:  $width;\n        }\n    }\n\n    slider {\n        box-shadow: none;\n        background-color: transparent;\n        border: $border-width solid transparent;\n        transition: $transition;\n        border-radius: $radii;\n        min-height: $width;\n        min-width:  $width;\n        margin: -$slider-width;\n    }\n\n    &:hover {\n        trough {\n            background-color: $hover;\n        }\n\n        slider {\n            @if $slider{\n                background-color: $fg-color;\n                border-color: $border-color;\n\n                @if $drop-shadow {\n                    box-shadow: 0 0 3px 0 $shadow;\n                }\n            }\n        }\n    }\n\n    &:disabled {\n        highlight, progress{\n            background-color: transparentize($fg-color, 0.4);\n            background-image: none;\n        }\n    }\n\n    @if $focusable {\n        trough:focus{\n            background-color: $hover;\n            box-shadow: inset 0 0 0 $border-width $accent;\n\n            slider {\n                @if $slider {\n                    background-color: $fg-color;\n                    box-shadow: inset 0 0 0 $border-width $accent;\n                }\n            }\n        }\n\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/common/spacing.scss",
    "content": "@mixin spacing($multiplier: 6, $spacing: $spacing, $rec: false) {\n\t&.horizontal>* {\n\t\tmargin: 0 $spacing * $multiplier / 2;\n\n\t\t&:first-child {\n\t\t\tmargin-left: 0;\n\t\t}\n\n\t\t&:last-child {\n\t\t\tmargin-right: 0;\n\t\t}\n\t}\n\n\t&.vertical>* {\n\t\tmargin: $spacing * $multiplier / 2 0;\n\n\t\t&:first-child {\n\t\t\tmargin-top: 0;\n\t\t}\n\n\t\t&:last-child {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\t}\n\n\t@if $rec {\n\t\tbox {\n\t\t\t&.horizontal>* {\n\t\t\t\tmargin: 0 $spacing * $multiplier / 2;\n\n\t\t\t\t&:first-child {\n\t\t\t\t\tmargin-left: 0;\n\t\t\t\t}\n\n\t\t\t\t&:last-child {\n\t\t\t\t\tmargin-right: 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&.vertical>* {\n\t\t\t\tmargin: $spacing * $multiplier / 2 0;\n\n\t\t\t\t&:first-child {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t&:last-child {\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/common/switch.scss",
    "content": "@import './button';\n\n@mixin switch {\n    @include button;\n\n    slider {\n        background-color: $accent-fg;\n        border-radius: $radii;\n        min-width: 24px;\n        min-height: 24px;\n    }\n\n    image { color: transparent; }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/common/text-border.scss",
    "content": "@mixin text-border{\n    text-shadow:\n        -1 * $border-width -1 * $border-width 0 $border-color,\n        $border-width $border-width 0 $border-color,\n        -1 * $border-width $border-width 0 $border-color,\n        $border-width -1 * $border-width 0 $border-color;\n\n    -gtk-icon-shadow:\n        -1 * $border-width -1 * $border-width 0 $border-color,\n        $border-width $border-width 0 $border-color,\n        -1 * $border-width $border-width 0 $border-color,\n        $border-width -1 * $border-width 0 $border-color;\n}\n\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/common/tooltip.scss",
    "content": "tooltip {\n    * { all: unset; }\n\n    background-color: transparent;\n    border: none;\n\n    > * > *{\n        background-color: $bg-color;\n        border-radius: $radii;\n        border: $border-width solid $popover-border-color;\n        color: $fg-color;\n        padding: 8px;\n        margin: 4px;\n        box-shadow: 0 0 3px 0 $shadow;\n    }\n}\n\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/common/unset.scss",
    "content": "@mixin unset($rec: false){\n    all: unset;\n\n    @if $rec {\n        * { all: unset };\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/common/widget.scss",
    "content": "@mixin widget{\n    transition: $transition;\n    border-radius: $radii;\n    color: $fg-color;\n    background-color: $widget-bg;\n    border: $border;\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/main.scss",
    "content": "@import '/tmp/ags/scss/options';\n@import './variables';\n\n// common\n@import './common/unset';\n@import './common/widget';\n@import './common/button';\n@import './common/button-workspaces.scss';\n@import './common/a11y-button';\n@import './common/floating-widget';\n@import './common/slider';\n@import './common/scrollable';\n@import './common/switch';\n@import './common/hidden';\n@import './common/text-border';\n@import './common/tooltip';\n@import './common/menu';\n@import './common/spacing';\n\n// widgets\n@import './widgets/about';\n@import './widgets/applauncher';\n@import './widgets/bar';\n@import './widgets/desktop';\n@import './widgets/notifications';\n@import './widgets/overview';\n@import './widgets/osd';\n@import './widgets/dashboard';\n@import './widgets/dock';\n@import './widgets/powermenu';\n@import './widgets/lockscreen';\n@import './widgets/media';\n@import './widgets/quicksettings';\n@import './widgets/settings';\n\n// additional overrides\n@import '/tmp/ags/scss/additional';\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/variables.scss",
    "content": "// variables are defined in options.js\n// these ones are derived from those\n\n$hover: transparentize($_widget-bg, ($widget-opacity * 0.9) / 100);\n$widget-bg: transparentize($_widget-bg, $widget-opacity / 100);\n$active-gradient: linear-gradient($accent-gradient);\n\n$hover-fg: if($color-scheme == 'dark', lighten($fg-color, 10%), darken($fg-color, 8%));\n\n$border-color: transparentize($_border-color, $border-opacity / 100);\n$border: $border-width solid $border-color;\n\n$text-shadow: 2px 2px 2px $shadow;\n\n$popover-border-color: transparentize($_border-color, max(($border-opacity - 1) / 100, 0));\n$popover-padding: $padding * $popover-padding-multiplier;\n$popover-radius: if($radii == 0, 0, $radii + $popover-padding);\n\n$bar-border: $border-width solid $bar-border-color;\n\n\n$shader-fg: #fff;\n\n* { font-size: $font-size; }\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/widgets/about.scss",
    "content": "window#about {\n    @include unset;\n\n    .window-content {\n        @include floating-widget;\n        min-width: 300px;\n    }\n\n    .avatar {\n        min-width: 200px;\n        min-height: 200px;\n        background-size: cover;\n        border: $border;\n        margin: $spacing 0;\n    }\n\n    .labels {\n        .title {\n            font-size: 1.2em;\n        }\n\n        .author {\n            color: transparentize($fg-color, 0.2)\n        }\n\n        .version {\n            margin-top: $spacing;\n            margin-bottom: $spacing * 2;\n            border-radius: $radii;\n            background-color: $widget-bg;\n            color: $accent;\n            padding: $padding;\n        }\n    }\n\n    .buttons {\n        padding-bottom: $popover-padding;\n\n        button {\n            @include button;\n            padding: $padding;\n\n            &:first-child {\n                border-radius: $radii $radii 0 0;\n            }\n\n            &:last-child {\n                border-radius: 0 0 $radii $radii;\n            }\n        }\n    }\n\n    .dont-show {\n        @include button;\n        padding: $padding;\n\n        image {\n            font-size: 1.4em;\n            color: $red;\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/widgets/applauncher.scss",
    "content": "window#applauncher .window-content {\n  @include floating_widget;\n\n  entry {\n    @include button;\n    padding: $padding;\n    margin-bottom: $spacing;\n\n    label,\n    image {\n      color: $fg-color;\n    }\n  }\n\n  separator {\n    min-height: 1px;\n    background-color: $hover;\n  }\n\n  scrolledwindow {\n    @include scrollable;\n    min-width: $applauncher-width;\n    min-height: $applauncher-height;\n  }\n\n  button.app-item {\n    @include button($flat: true, $reactive: false);\n    > box {\n      @include spacing(0.5);\n    }\n    transition: $transition;\n    padding: $padding;\n\n    label {\n      transition: $transition;\n\n      &.title {\n        color: $fg-color;\n      }\n\n      &.description {\n        color: transparentize($fg-color, 0.3);\n      }\n    }\n\n    image {\n      transition: $transition;\n    }\n\n    &:hover,\n    &:focus {\n      .title {\n        color: $accent;\n      }\n\n      image {\n        -gtk-icon-shadow: 2px 2px $accent;\n      }\n    }\n\n    &:active {\n      background-color: transparentize($accent, 0.5);\n      border-radius: $radii;\n      box-shadow: inset 0 0 0 $border-width $border-color;\n\n      .title {\n        color: $fg-color;\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/widgets/bar.scss",
    "content": "$bar-spacing: $spacing / 2;\n$button-radius: if(\n  $bar-style == \"floating\",\n  max(0, $radii - $bar-spacing),\n  $radii\n);\n\n@mixin panel-button($flat: $bar-flat-buttons, $reactive: true) {\n  @include unset;\n\n  @if $bar-style == \"separated\" {\n    transition: $transition;\n\n    > * {\n      @include floating-widget;\n      border-radius: $radii;\n      margin: $wm-gaps $bar-spacing;\n      transition: $transition;\n    }\n\n    &:hover > * {\n      color: $hover-fg;\n\n      @if $drop-shadow {\n        box-shadow:\n          0 0 min(6px, $spacing/2) 0 $shadow,\n          inset 0 0 0 99px $hover;\n      } @else {\n        box-shadow: inset 0 0 0 99px $hover;\n      }\n    }\n\n    &:active > *,\n    &.active > * {\n      label,\n      image {\n        color: $accent-fg;\n      }\n\n      background-image: $active-gradient;\n      background-color: $accent;\n    }\n  } @else {\n    @include accs-button($flat, $reactive);\n\n    > * {\n      border-radius: $button-radius;\n      margin: $bar-spacing;\n    }\n  }\n\n  label,\n  image {\n    font-weight: bold;\n  }\n\n  > * {\n    padding: $padding * 0.4 $padding * 0.8;\n  }\n}\n\n.panel {\n  .cpu {\n    padding-left: $spacing/2;\n    color: $accent;\n    font-size: $font_size/5;\n    border-radius: max($radii - $border_width, 0);\n    margin: $spacing;\n    min-height: $font_size * 1.25;\n    min-width: $font_size * 1.25;\n\n    @if $bar_style == \"separated\" {\n      border-top-right-radius: 0;\n      border-bottom-right-radius: 0;\n      margin-left: $spacing/4;\n      margin-right: 0;\n      padding: $spacing;\n      padding-left: $spacing * 3;\n      background-color: $bg-color;\n    }\n  }\n\n  .ram {\n    color: $yellow;\n    font-size: $font_size/5;\n    border-radius: max($radii - $border_width, 0);\n    margin: $spacing;\n    min-height: $font_size * 1.25;\n    min-width: $font_size * 1.25;\n\n    @if $bar_style == \"separated\" {\n      border-radius: 0;\n      margin-left: 0;\n      margin-right: 0;\n      padding: $spacing;\n      background-color: $bg-color;\n    }\n  }\n\n  .temp {\n    padding-right: $spacing * 2;\n    color: $magenta;\n    font-size: $font_size/5;\n    border-radius: max($radii - $border_width, 0);\n    margin: $spacing;\n    min-height: $font_size * 1.25;\n    min-width: $font_size * 1.25;\n\n    @if $bar_style == \"separated\" {\n      border-top-left-radius: 0;\n      border-bottom-left-radius: 0;\n      margin-right: $spacing/4;\n      margin-left: 0;\n      padding: $spacing;\n      padding-right: $spacing * 3;\n      background-color: $bg-color;\n    }\n  }\n\n  .circular-progress-box {\n    .circular-progress {\n      margin: $spacing/2.5;\n      background-color: $widget-bg;\n      font-size: 1em;\n\n      @if $bar_style == \"separated\" {\n        padding: $wm_gaps $wm_gaps + 5px $wm_gaps $wm_gaps + 5px;\n        border-radius: max($radii - $border_width, 0);\n        margin-left: $spacing/4;\n        margin-right: $spacing/4;\n      }\n    }\n  }\n\n  @if $bar-style == \"normal\" {\n    background-color: $bg-color;\n  }\n\n  @if not $screen-corners and $bar-style == \"normal\" {\n    @if $bar-position == \"bottom\" {\n      border-top: $border;\n    } @else {\n      border-bottom: $border;\n    }\n  }\n\n  @if $bar-style == \"floating\" {\n    @include floating-widget;\n    border: $bar-border-width solid $popover-border-color;\n    border-radius: $radii;\n    margin-top: $wm-gaps;\n    margin-left: $wm-gaps;\n    margin-right: $wm-gaps;\n    margin-bottom: 0;\n    padding: 0;\n  }\n\n  @if $bar-style == \"separated\" {\n    > .end > button:last-child > * {\n      margin-right: $wm-gaps;\n    }\n\n    > .start > button:first-child > * {\n      margin-left: $wm-gaps;\n    }\n\n    margin-bottom: 0;\n  }\n\n  .panel-button {\n    @include panel-button;\n  }\n\n  .battery_percentage {\n    padding-bottom: 2px;\n  }\n\n  .tray-item,\n  .color-picker {\n    @include panel-button($flat: true);\n  }\n\n  separator {\n    background-color: transparentize($fg-color, 0.86);\n    border-radius: $radii;\n    min-height: 5px;\n    min-width: 5px;\n  }\n\n  .overview {\n    label {\n      color: transparentize($accent, 0.2);\n    }\n\n    &:hover label {\n      color: $accent;\n    }\n\n    &:active label,\n    &.active label {\n      color: $accent-fg;\n    }\n  }\n\n  .powermenu,\n  .recorder {\n    image {\n      color: transparentize($red, 0.3);\n    }\n\n    &:hover image {\n      color: transparentize($red, 0.15);\n    }\n\n    &:active image {\n      color: $red;\n    }\n  }\n\n  .focused-client > box > box,\n  .quicksettings > box > box {\n    @include spacing(\n      $spacing: if($bar-spacing ==0, $padding / 2, $bar-spacing)\n    );\n  }\n\n  /* stylelint-disable-next-line selector-not-notation */\n  .quicksettings:not(.active):not(:active) {\n    .bluetooth {\n      color: $blue;\n    }\n\n    .battery {\n      &.low {\n        color: $red;\n      }\n\n      &.charged,\n      &.charging {\n        color: $green;\n      }\n    }\n  }\n\n  .media {\n    &.spotify image {\n      color: $green;\n    }\n\n    &.firefox image {\n      color: $orange;\n    }\n\n    &.mpv image {\n      color: $magenta;\n    }\n  }\n\n  .notifications {\n    image {\n      color: $yellow;\n    }\n  }\n\n  .battery-bar {\n    label {\n      margin-right: $bar-spacing * 3;\n    }\n\n    .font-icon {\n      font-size: 1.15em;\n    }\n\n    @if $battery-bar-full {\n      > box {\n        padding: 0;\n      }\n    }\n\n    image,\n    .font-icon {\n      margin-right: $bar-spacing * 0.5;\n    }\n\n    levelbar {\n      margin: $padding;\n      padding: $padding;\n\n      trough {\n        @include widget;\n        min-width: $battery-bar-width;\n        min-height: $battery-bar-height;\n\n        block.filled {\n          border-radius: max($radii - $border-width, 0);\n          background-image: $active-gradient;\n        }\n\n        block.empty {\n          border-radius: max($radii - $border-width, 0);\n        }\n      }\n    }\n\n    @mixin color($color) {\n      image,\n      label {\n        color: $fg_color;\n      }\n\n      block.filled {\n        background-image: linear-gradient(\n          to right,\n          $color,\n          lighten($color, 6%)\n        );\n      }\n    }\n\n    .medium {\n      @include color($yellow);\n    }\n\n    .low {\n      @include color($red);\n    }\n\n    .charging {\n      @include color($green);\n    }\n\n    &:active {\n      @include color($accent-fg);\n    }\n\n    .whole-button {\n      label {\n        color: $fg-color;\n        text-shadow: $text-shadow;\n      }\n\n      trough,\n      block.filled {\n        border-radius: $button-radius;\n      }\n\n      @if $bar-style == \"separated\" {\n        trough {\n          border: none;\n        }\n      }\n    }\n  }\n\n  .workspaces {\n    .horizontal {\n      background-color: $bg-color;\n    }\n\n    > * {\n      padding: 0;\n    }\n\n    .eventbox {\n      transition: $transition;\n\n      @if $bar-style == \"separated\" {\n        border-radius: max($radii - $border-width, 0);\n      } @else {\n        @include button($flat: true);\n      }\n    }\n\n    button {\n      all: unset;\n      background-color: $bg-color;\n      border-radius: $radii;\n\n      .indicator {\n        font-size: 0;\n        min-width: $font_size * 0.9;\n        min-height: $font_size * 0.9;\n        border-radius: $font_size;\n        box-shadow: inset 0 0 0 $border-width $border-color;\n        margin: 0 $padding/2;\n        transition: $transition/2;\n        background-color: transparentize($fg-color, 0.8);\n      }\n\n      &:last-child .indicator {\n        margin-right: $padding;\n      }\n\n      &:first-child .indicator {\n        margin-left: $padding;\n      }\n\n      &.occupied .indicator {\n        background-color: transparentize($fg-color, 0.2);\n      }\n\n      &:hover .indicator {\n        box-shadow: inset 0 0 0 10px transparentize($fg-color, 0.8);\n      }\n\n      &.active .indicator,\n      &:active .indicator {\n        background-color: $accent;\n      }\n\n      &.active .indicator {\n        min-width: $font_size * 2.5;\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/widgets/dashboard.scss",
    "content": "@mixin calendar {\n    @include widget;\n    padding: $padding*2 $padding*2 0;\n\n    calendar{\n        all: unset;\n\n        &.button{\n            @include button($flat: true);\n        }\n\n        &:selected{\n            box-shadow: inset 0 -8px 0 0 transparentize($accent, 0.5),\n            inset 0 0 0 1px $accent;\n            border-radius: $radii*0.6;\n        }\n\n        &.header{\n            background-color: transparent;\n            border: none;\n            color: transparentize($fg-color, 0.5);\n        }\n\n        &.highlight{\n            background-color: transparent;\n            color: transparentize($accent, 0.5);\n        }\n\n        &:indeterminate {\n            color: transparentize($fg-color, 0.9);\n        }\n        font-size: 1.1em;\n        padding: .2em;\n    }\n}\n\nwindow#dashboard .window-content {\n    @include floating-widget;\n\n    .notifications {\n        min-width: $notifications-width;\n\n        .header {\n            margin-bottom: $spacing;\n            margin-right: $spacing;\n\n            > label { margin-left: $radii / 2; }\n\n            button {\n                @include button;\n                padding: $padding/2 $padding;\n            }\n        }\n\n        .notification-scrollable {\n            @include scrollable;\n        }\n\n        .notification-list {\n            margin-right: $spacing;\n        }\n\n        .notification {\n            @include notification;\n\n            > box {\n                @include widget;\n                padding: $padding;\n                margin-bottom: $spacing;\n            }\n        }\n\n        .placeholder {\n            image {  font-size: 7em; }\n            label {  font-size: 1.2em; }\n        }\n    }\n\n    separator {\n        background-color: $popover-border-color;\n        min-width: 2px;\n        border-radius: $radii;\n        margin-right: $spacing;\n    }\n\n    .datemenu, .system-info {\n        @include spacing;\n    }\n\n    .clock-box {\n        padding: $padding;\n\n        .clock {\n            font-size: 5em;\n        }\n\n        .uptime {\n            color: transparentize($fg-color, 0.2);\n        }\n    }\n\n    .calendar {\n        @include calendar;\n    }\n\n    .circular-progress-box {\n        @include widget;\n        padding: $padding;\n\n        .circular-progress {\n            min-height: $sys-info-size;\n            min-width: $sys-info-size;\n            margin: $padding/2;\n            font-size: $padding;\n            background-color: $bg-color;\n            color: $accent;\n\n            image {\n                font-size: 1.8em;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/widgets/desktop.scss",
    "content": "window.corner .corner {\n    background-color: $bg-color;\n    border-radius: $radii * 2;\n    min-width: 2px;\n    min-height: 2px;\n}\n\nwindow.desktop {\n    @if $bar-style == 'normal' {\n        border-radius: if($screen-corners, $radii * 2, 0);\n        box-shadow: inset 0 0 $wm-gaps / 2 0 $shadow;\n    }\n\n    .clock-box-shadow {\n        border: 5px solid $wallpaper-fg;\n        border-radius: $radii;\n\n        .clock-box {\n            border-radius: max($radii - 5px, 0);\n            padding: 0 14px;\n\n            .clock {\n                color: $wallpaper-fg;\n                font-size: 140px;\n                font-family: $mono-font;\n            }\n\n            .separator-box {\n                padding: 24px 12px;\n\n                separator {\n                    border-radius: $radii;\n                    min-width: 16px;\n                    min-height: 16px;\n                    background-color: $wallpaper-fg;\n                }\n            }\n        }\n    }\n\n    .date {\n        color: $wallpaper-fg;\n        font-size: 48px;\n    }\n\n    @if $drop-shadow {\n        .clock-box-shadow, separator {\n            box-shadow: 2px 2px 2px 0 $shadow;\n        }\n\n        .clock-box {\n            box-shadow: inset 2px 2px 2px 0 $shadow;\n        }\n\n        label {\n            text-shadow: $text-shadow;\n        }\n    } @else {\n        .clock-box-shadow{\n            box-shadow: 0 0 0 $border-width $border-color,\n                        inset 0 0 0 $border-width $border-color;\n        }\n\n        separator {\n            border: $border;\n        }\n\n        label {\n            @include text-border;\n        }\n    }\n}\n\n.desktop-menu {\n    image {\n        margin-left: -14px;\n        margin-right: 6px;\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/widgets/dock.scss",
    "content": "@mixin dock($spacing: $spacing * 0.7) {\n    separator {\n        border-radius: $radii;\n        background-color: transparentize($fg-color, 0.8);\n        margin: 0 $spacing;\n        min-width: 2px;\n        min-height: 2em;\n    }\n\n    button {\n        @include accs-button($flat: true);\n\n        .box {\n            margin: $spacing / 2;\n        }\n\n        image {\n            margin: $padding;\n            margin-bottom: $padding * 1.5;\n\n            @if $color-scheme == 'light' {\n                -gtk-icon-shadow: $text-shadow;\n            }\n        }\n\n        .indicator {\n            min-width: 6px;\n            min-height: 6px;\n            background-color: $fg-color;\n            border-radius: $radii;\n            margin-bottom: $padding/4;\n\n            &.focused {\n                background-image: $active-gradient;\n            }\n        }\n    }\n}\n\nwindow.floating-dock .dock {\n    @include dock;\n    @include floating-widget;\n    border-radius: if($radii == 0, 0, $radii + $spacing / 2);\n    border: $border-width solid $popover-border-color;\n    padding: $spacing / 2;\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/widgets/lockscreen.scss",
    "content": "window.lockscreen {\n    background-color: rgba(0, 0, 0, 0.25);\n\n    .avatar {\n        @include widget;\n        border-radius: $radii * 2;\n        min-height: 200px;\n        min-width: 200px;\n    }\n\n    .content {\n        @include floating-widget;\n        padding: $spacing * 4;\n    }\n\n    spinner {\n        margin-top: $spacing * 2;\n    }\n\n    entry {\n        @include button;\n        margin-top: $spacing * 2;\n        padding: $spacing;\n        min-height: 20px;\n    }\n} \n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/widgets/media.scss",
    "content": "@mixin player-color($color) {\n    button {\n        .shuffle.enabled {\n            color: $color;\n        }\n\n        .loop {\n            &.playlist, &.track {\n                color: $color;\n            }\n        }\n\n        &:active label {\n            color: $color;\n        }\n    }\n\n    .position-slider:hover trough {\n        background-color: transparentize($color, 0.5);\n    }\n\n    .player-icon {\n        color: $color;\n    }\n}\n\n@mixin media() {\n    @include widget;\n\n    label {\n        color: $shader-fg;\n        text-shadow: $text-shadow;\n    }\n\n    .blurred-cover, .cover {\n        background-size: cover;\n        background-position: center;\n        border-radius: $radii*0.8;\n        opacity: 0.8;\n    }\n\n    .cover {\n        min-height: 100px;\n        min-width: 100px;\n        box-shadow: 2px 2px 2px 0 $shadow;\n        margin: $padding;\n        opacity: 0.9;\n    }\n\n    .labels {\n        margin-top: $padding;\n\n        label {\n            font-size: 1.1em;\n            text-shadow: $text-shadow;\n\n            &.title {\n                font-weight: bold;\n            }\n        }\n    }\n\n    .position-slider {\n        @include slider($width: .4em, $slider: false, $gradient: linear-gradient($shader-fg, $shader-fg), $radii: 0);\n        margin-bottom: $padding/2;\n\n        trough {\n            border: none;\n            background-color: transparentize($shader-fg, 0.7);\n        }\n    }\n\n    .footer-box {\n        margin: -$padding/2 $padding $padding/2;\n\n        image {\n            -gtk-icon-shadow: $text-shadow;\n        }\n    }\n\n    .controls button {\n        @include unset;\n\n        label {\n            font-size: 2em;\n            color: transparentize($shader-fg, 0.2);\n            transition: $transition;\n\n            &.shuffle, &.loop {\n                font-size: 1.4em;\n\n            }\n        }\n\n        &:hover label {\n            color: transparentize($shader-fg, 0.1);\n        }\n\n        &:active label {\n            color: $shader-fg;\n        }\n    }\n\n    &.spotify { @include player-color($green); }\n    &.firefox { @include player-color($orange); }\n    &.mpv { @include player-color($magenta); }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/widgets/notifications.scss",
    "content": "@mixin notification() {\n    &.critical > box {\n        box-shadow: inset 0 0 .5em 0 $red;\n    }\n\n    &:hover button.close-button{\n        @include button-hover;\n        background-color: transparentize($red, .5);\n    }\n\n    .content {\n        .title {\n            margin-right: $spacing;\n            color: $fg-color;\n            font-size: 1.1em;\n        }\n\n        .time {\n            color: transparentize($fg-color, .2);\n        }\n\n        .description {\n            font-size: .9em;\n            color: transparentize($fg-color, .2);\n        }\n\n        .icon {\n            border-radius: $radii*0.8;\n            margin-right: $spacing;\n\n            &.img {\n                border: $border;\n            }\n        }\n    }\n\n    box.actions {\n        @include spacing(0.5);\n        margin-top: $spacing;\n\n        button {\n            @include button;\n            border-radius: $radii*0.8;\n            font-size: 1.2em;\n            padding: $padding * 0.7;\n        }\n    }\n\n    button.close-button {\n        @include button($flat: true);\n        margin-left: $spacing / 2;\n        border-radius: $radii*0.8;\n        min-width: 1.2em;\n        min-height: 1.2em;\n\n        &:hover {\n            background-color: transparentize($red, .2);\n        }\n\n        &:active {\n            background-image: linear-gradient($red, $red);\n        }\n    }\n}\n\nwindow.notifications {\n    @include unset;\n\n    .notification {\n        @include notification;\n\n        > box {\n            @include floating-widget;\n            border-radius: $radii;\n        }\n\n        .description {\n            min-width: 350px;\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/widgets/osd.scss",
    "content": "window.indicator .progress {\n    @include floating-widget;\n    padding: $padding / 2;\n    border-radius: if($radii == 0, 0, $radii + $padding / 2);\n    border: $border-width solid $popover-border-color;\n\n    .fill {\n        border-radius: $radii;\n        background-color: $accent;\n        color: $accent-fg;\n\n        image {\n            -gtk-icon-transform: scale(0.7);\n        }\n\n        .font-icon {\n            font-size: 34px;\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/widgets/overview.scss",
    "content": "window#overview .window-content {\n    @include floating-widget;\n    @include spacing;\n\n    .workspace {\n        &.active > widget {\n            border-color: $accent\n        }\n\n        > widget {\n            @include widget;\n            border-radius: if($radii == 0, 0, $radii + $padding);\n\n            &:drop(active) {\n                border-color: $accent;\n            }\n        }\n    }\n\n    .client {\n        @include button;\n        border-radius: $radii;\n        margin: $padding;\n\n        &.hidden {\n            @include hidden;\n            transition: 0;\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/widgets/powermenu.scss",
    "content": "window#powermenu, window#verification {\n    .shader {\n        background-color: rgba(0, 0, 0, 0.05);\n    }\n}\n\nwindow#verification .window-content {\n    @include floating-widget;\n    min-width: 300px;\n    min-height: 100px;\n\n    .text-box {\n        .title {\n            font-size: 1.6em;\n        }\n\n        .desc {\n            color: transparentize($fg-color, 0.1);\n            font-size: 1.1em;\n        }\n    }\n\n    .buttons {\n        @include spacing;\n        margin-top: $padding;\n\n        button {\n            @include button;\n            font-size: 1.5em;\n            padding: $padding;\n        }\n    }\n}\n\nwindow#powermenu .window-content {\n    @include floating-widget;\n    @include spacing(2);\n    padding: $popover-padding + $spacing * 1.5;\n    border-radius: if($radii == 0, 0, $popover-radius + ($popover-padding + $spacing * 1.5));\n\n    button {\n        @include unset;\n\n        image {\n            @include button;\n            border-radius: $popover-radius;\n            min-width: 1.7em;\n            min-height: 1.7em;\n            font-size: 4em;\n        }\n\n        label, image {\n            color: transparentize($fg-color, 0.1);\n        }\n\n        &:hover {\n            image{ @include button-hover; }\n            label{ color: $fg-color; }\n        }\n        &:focus image { @include button-focus; }\n        &:active image { @include button-active; }\n\n        &:focus, &:active {\n            label{ color: $accent; }\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/widgets/quicksettings.scss",
    "content": "window#quicksettings .window-content {\n\t@include floating-widget;\n\t@include spacing;\n\n\t.avatar {\n\t\t@include widget;\n\t\topacity: 0.9;\n\t\tborder-radius: $popover-radius;\n\t}\n\n\t.header {\n\t\t@include spacing($rec: true);\n\n\t\tbutton,\n\t\t.uptime,\n\t\t.battery {\n\t\t\t@include button;\n\t\t\tpadding: $padding;\n\t\t\tfont-weight: bold;\n\t\t\tmin-height: 20px;\n\t\t\tmin-width: 20px;\n\t\t\tborder-radius: $popover-radius;\n\n\n\t\t\timage {\n\t\t\t\tfont-size: 1.2em;\n\t\t\t}\n\t\t}\n\n\t\t.battery {\n\t\t\t@include spacing($multiplier: 0.5);\n\t\t}\n\n\t}\n\n\t.battery-progress {\n\t\tlabel {\n\t\t\tcolor: $accent-fg;\n\t\t\tfont-weight: bold;\n\t\t}\n\n\t\t&.charging label {\n\t\t\tfont-size: $padding*2;\n\t\t}\n\n\t\t&.half label {\n\t\t\tcolor: $fg-color;\n\t\t}\n\n\t\tprogressbar {\n\t\t\t@include slider($width: $padding*3.6);\n\t\t}\n\n\t\t&.low progressbar {\n\t\t\t@include slider($width: $padding*3.6, $gradient: linear-gradient(to right, $red, $red));\n\t\t}\n\t}\n\n\t.sliders-box {\n\t\t@include widget;\n\t\t@include spacing($rec: true);\n\t\t@include spacing(0);\n\t\tpadding: $padding;\n\t\tborder-radius: $popover-radius;\n\n\t\tbutton {\n\t\t\t@include button($flat: true);\n\t\t\tpadding: $padding / 2;\n\t\t}\n\n\t\tscale {\n\t\t\t@include slider;\n\t\t\tmargin-left: $spacing * -0.5;\n\t\t}\n\n\t\t.menu {\n\t\t\tmargin: $spacing 0;\n\t\t\tbackground-color: $bg-color;\n\t\t\tborder: $border-width solid $popover-border-color;\n\t\t\tborder-radius: $radii;\n\t\t}\n\t}\n\n\t.mixer-item {\n\t\tscale {\n\t\t\t@include slider($width: 7px);\n\t\t}\n\n\t\timage {\n\t\t\tfont-size: 1.2em;\n\t\t}\n\t}\n\n\t.row {\n\t\t@include spacing($rec: true);\n\t\tborder-radius: $popover-radius;\n\t}\n\n\t.menu {\n\t\t@include unset;\n\t\t@include widget;\n\t\t@include spacing($rec: true);\n\t\tpadding: $padding;\n\t\tmargin-top: $spacing * 5;\n\t\tborder-radius: $popover-radius;\n\n\t\t.title {\n\t\t\t@include spacing(.5);\n\t\t}\n\n\t\tseparator {\n\t\t\tmargin: 0 $radii / 2;\n\t\t}\n\n\t\tbutton {\n\t\t\t@include button($flat: true);\n\t\t\tpadding: $padding / 2;\n\t\t}\n\n\t\tswitch {\n\t\t\t@include switch;\n\t\t}\n\t}\n\n\t.toggle-button {\n\t\t@include button;\n\t\tfont-weight: bold;\n\t\tborder-radius: $popover-radius;\n\n\t\t.label-box {\n\t\t\t@include spacing(.5);\n\t\t}\n\n\t\tbutton {\n\t\t\t@include button($flat: true);\n\t\t\tpadding: $padding;\n\t\t\tborder-radius: $popover-radius;\n\n\t\t\t&:first-child {\n\t\t\t\tborder-top-right-radius: 0;\n\t\t\t\tborder-bottom-right-radius: 0;\n\t\t\t}\n\n\t\t\t&:last-child {\n\t\t\t\tborder-top-left-radius: 0;\n\t\t\t\tborder-bottom-left-radius: 0;\n\t\t\t}\n\t\t}\n\n\t\t&.active {\n\t\t\tbackground-color: $accent;\n\n\t\t\tlabel,\n\t\t\timage {\n\t\t\t\tcolor: $accent-fg;\n\t\t\t}\n\t\t}\n\t}\n\n\t.simple-toggle {\n\t\t@include button;\n\t\tpadding: $padding $padding * 1.1;\n\t\tborder-radius: $popover-radius;\n\t}\n\n\t.media {\n\t\t@include spacing;\n\n\t\t.player {\n\t\t\t@include media;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/scss/widgets/settings.scss",
    "content": "window#settings-dialog {\n    background-color: $bg-color;\n\n    .page {\n        @include scrollable;\n    }\n\n    .page-content {\n        margin: $spacing;\n    }\n\n    .sidebar-box {\n        @include spacing($rec: true);\n        background-color: $widget-bg;\n        border-right: $border;\n        padding: $spacing / 2;\n\n        button {\n            @include button($flat: true);\n            padding: $padding / 2 $padding * 2;\n        }\n\n        scrolledwindow {\n            @include scrollable;\n        }\n\n    }\n\n    .sidebar-header  {\n        background-color: $widget-bg;\n        border-right: $border;\n        border-bottom: $border;\n        padding: $spacing / 2;\n\n        button {\n            @include button($flat: true);\n            padding: $padding / 2 $padding;\n        }\n\n        button:last-child {\n            margin-left: $spacing / 2;\n        }\n    }\n\n    .sidebar-footer {\n        background-color: $widget-bg;\n        border-right: $border;\n        border-top: $border;\n        padding: $spacing / 2;\n\n        button {\n            @include button($flat: true);\n            padding: $padding / 2 $padding;\n        }\n    }\n\n    entry.search {\n        @include button;\n        border-radius: 0;\n        padding: $padding;\n    }\n\n    .row {\n        @include widget;\n        border-radius: 0;\n        border-bottom-width: 0;\n        padding: $padding;\n        transition: border-radius 0;\n\n        &:last-child {\n            border-radius: 0 0 $radii $radii;\n            border-bottom-width: $border-width;\n        }\n\n        &:first-child {\n            border-radius: $radii $radii 0 0;\n        }\n\n        &:first-child:last-child {\n            border-radius: $radii;\n        }\n\n        .overlay-padding {\n            min-height: $font-size * 3;\n        }\n\n        &:hover {\n            background-color: $hover;\n        }\n\n        entry, button {\n            @include button;\n            padding: $padding;\n        }\n\n        switch {\n            @include switch;\n        }\n\n        spinbutton {\n            @include unset;\n\n            entry {\n                border-radius: $radii 0 0 $radii;\n            }\n\n            button {\n                border-radius: 0;\n            }\n\n            button:last-child {\n                border-radius: 0 $radii $radii 0;\n            }\n        }\n\n        .enum-setter {\n            label {\n                background-color: $widget-bg;\n                border-top: $border;\n                border-bottom: $border;\n                padding: 0 $padding;\n            }\n\n            button:first-child {\n                border-radius: $radii 0 0 $radii;\n            }\n\n            button:last-child {\n                border-radius: 0 $radii $radii 0;\n            }\n        }\n    }\n\n    .id, .note {\n        font-size: .8em;\n        color: transparentize($fg-color, $amount: 0.5);\n    }\n\n    .id {\n        font-family: $mono-font;\n    }\n\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_js/tsconfig.json",
    "content": "{\n\t\"compilerOptions\": {\n\t\t\"target\": \"ES2022\",\n\t\t\"module\": \"ES2022\",\n\t\t\"lib\": [\n\t\t\t\"ES2022\"\n\t\t],\n\t\t\"allowJs\": true,\n\t\t\"checkJs\": false,\n\t\t\"strict\": true,\n\t\t\"noImplicitAny\": false,\n\t\t\"baseUrl\": \".\",\n\t\t\"typeRoots\": [\n\t\t\t\"./types/ags.d.ts\",\n\t\t\t\"./node_modules/@girs\"\n\t\t],\n\t\t\"skipLibCheck\": true,\n\t\t\"forceConsistentCasingInFileNames\": true\n\t}\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/.eslintrc.yml",
    "content": "env:\n  es2022: true\nextends:\n  - \"eslint:recommended\"\n  - \"plugin:@typescript-eslint/recommended\"\nparser: \"@typescript-eslint/parser\"\nparserOptions:\n  ecmaVersion: 2022\n  sourceType: \"module\"\n  project: \"./tsconfig.json\"\n  warnOnUnsupportedTypeScriptVersion: false\nroot: true\nignorePatterns:\n  - types/\nplugins:\n  - \"@typescript-eslint\"\nrules:\n  \"@typescript-eslint/ban-ts-comment\":\n    - \"off\"\n  \"@typescript-eslint/no-non-null-assertion\":\n    - \"off\"\n  # \"@typescript-eslint/no-explicit-any\":\n  #   - \"off\"\n  \"@typescript-eslint/no-unused-vars\":\n    - error\n    - varsIgnorePattern: (^unused|_$)\n      argsIgnorePattern: ^(unused|_)\n  \"@typescript-eslint/no-empty-interface\":\n    - \"off\"\n\n  arrow-parens:\n    - error\n    - as-needed\n  comma-dangle:\n    - error\n    - always-multiline\n  comma-spacing:\n    - error\n    - before: false\n      after: true\n  comma-style:\n    - error\n    - last\n  curly:\n    - error\n    - multi-or-nest\n    - consistent\n  dot-location:\n    - error\n    - property\n  eol-last:\n    - error\n  eqeqeq:\n    - error\n    - always\n  indent:\n    - error\n    - 4\n    - SwitchCase: 1\n  keyword-spacing:\n    - error\n    - before: true\n  lines-between-class-members:\n    - error\n    - always\n    - exceptAfterSingleLine: true\n  padded-blocks:\n    - error\n    - never\n    - allowSingleLineBlocks: false\n  prefer-const:\n    - error\n  quotes:\n    - error\n    - double\n    - avoidEscape: true\n  semi:\n    - error\n    - never\n  nonblock-statement-body-position:\n    - error\n    - below\n  no-trailing-spaces:\n    - error\n  no-useless-escape:\n    - off\n  max-len:\n    - error\n    - code: 100\n\n  func-call-spacing:\n    - error\n  array-bracket-spacing:\n    - error\n  space-before-function-paren:\n    - error\n    - never\n  space-before-blocks:\n    - error\n  key-spacing:\n    - error\n  object-curly-spacing:\n    - error\n    - always\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/.gitignore",
    "content": "node_modules\ntypes\npackage-lock.json\nbun.lockb\nflake.lock\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/config.js",
    "content": "const main = \"/tmp/ags/main.js\"\nconst outdir = `${App.configDir}/main.ts`\n\ntry {\n    await Utils.execAsync([\n        \"bun\", \"build\", outdir,\n        \"--outfile\", main,\n        \"--external\", \"resource://*\",\n        \"--external\", \"gi://*\",\n        \"--external\", \"file://*\",\n    ])\n} catch (error) {\n    console.error(error)\n    App.quit()\n}\n\nconst { default: config } = await import(`file://${main}`)\nexport default config\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/default.nix",
    "content": "{ inputs\n, system\n, stdenv\n, writeShellScriptBin\n, swww\n, bun\n, dart-sass\n, brightnessctl\n}:\nlet\n  ags = inputs.ags.packages.${system}.default;\n  pname = \"asztal\";\n  config = stdenv.mkDerivation {\n    inherit pname;\n    version = \"1.7.6\";\n    src = ./.;\n\n    buildPhase = ''\n      ${bun}/bin/bun build ./main.ts \\\n        --outfile main.js \\\n        --external \"resource://*\" \\\n        --external \"gi://*\"\n    '';\n\n    installPhase = ''\n      mkdir $out\n      cp -r assets $out\n      cp -r style $out\n      cp -f main.js $out/config.js\n    '';\n  };\nin {\n  inherit config;\n  script = writeShellScriptBin pname ''\n    export PATH=$PATH:${dart-sass}/bin\n    export PATH=$PATH:${brightnessctl}/bin\n    export PATH=$PATH:${swww}/bin\n    ${ags}/bin/ags -b ${pname} -c ${config}/config.js $@\n  '';\n}\n\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/lib/battery.ts",
    "content": "import icons from \"./icons\"\n\nexport default async function init() {\n    const bat = await Service.import(\"battery\")\n    bat.connect(\"notify::percent\", ({ percent, charging }) => {\n        const low = 30\n        if (percent !== low || percent !== low / 2 || !charging)\n            return\n\n        Utils.notify({\n            summary: `${percent}% Battery Percentage`,\n            iconName: icons.battery.warning,\n            urgency: \"critical\",\n        })\n    })\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/lib/experiments.ts",
    "content": "// these are functionalities that I might include in ags\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable max-len */\nimport { Binding } from \"types/service\"\nimport { Variable } from \"resource:///com/github/Aylur/ags/variable.js\"\nimport { App } from \"resource:///com/github/Aylur/ags/app.js\"\nimport GObject from \"gi://GObject?version=2.0\"\n\ntype GObj = GObject.Object | App\n\nexport function watch<T>(init: T, objs: Array<[GObj, signal?: string]>, signal: string, callback: (v: Variable<T>) => T): Binding<Variable<T>, any, T>\nexport function watch<T>(init: T, obj: GObj, signal: string, callback: (v: Variable<T>) => T): Binding<Variable<T>, any, T>\nexport function watch<T>(init: T, obj: GObj, callback: (v: Variable<T>) => T): Binding<Variable<T>, any, T>\nexport function watch<T>(\n    init: T,\n    objs: GObj | Array<[GObj, signal?: string]>,\n    sigOrFn: string | ((v: Variable<T>) => T),\n    callback?: (v: Variable<T>) => T,\n) {\n    const v = new Variable(init)\n    const fn = typeof sigOrFn === \"function\" ? sigOrFn : callback ?? (() => v.value)\n    if (Array.isArray(objs)) {\n        objs.map(([o, s = \"changed\"]) => [o, o.connect(s, () => fn(v))] as const)\n        return v.bind()\n    }\n\n    const signal = typeof sigOrFn === \"string\" ? sigOrFn : \"changed\"\n    objs.connect(signal, () => fn(v))\n    return v.bind()\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/lib/gtk.ts",
    "content": "import Gio from \"gi://Gio\"\nimport options from \"options\"\n\nconst settings = new Gio.Settings({\n    schema: \"org.gnome.desktop.interface\",\n})\n\nfunction gtk() {\n    const scheme = options.theme.scheme.value\n    settings.set_string(\"color-scheme\", `prefer-${scheme}`)\n}\n\nexport default function init() {\n    options.theme.scheme.connect(\"changed\", gtk)\n    gtk()\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/lib/hyprland.ts",
    "content": "import options from \"options\"\nconst { messageAsync } = await Service.import(\"hyprland\")\n\nconst { hyprland } = options\nconst {\n    spacing,\n    radius,\n    border: { width },\n    shadows,\n    dark: { primary: { bg: darkActive } },\n    light: { primary: { bg: lightActive } },\n    scheme,\n} = options.theme\n\nconst deps = [\n    \"hyprland\",\n    spacing.id,\n    radius.id,\n    width.id,\n    shadows.id,\n    darkActive.id,\n    lightActive.id,\n    scheme.id,\n]\n\nexport default function init() {\n    options.handler(deps, setupHyprland)\n    setupHyprland()\n}\n\nfunction activeBorder() {\n    const color = scheme.value === \"dark\"\n        ? darkActive.value\n        : lightActive.value\n\n    return color.replace(\"#\", \"\")\n}\n\nfunction sendBatch(batch: string[]) {\n    const cmd = batch\n        .filter(x => !!x)\n        .map(x => `keyword ${x}`)\n        .join(\"; \")\n\n    messageAsync(`[[BATCH]]/${cmd}`)\n}\n\nfunction blur(name: string) {\n    const blur = hyprland.blur.value\n    const alpha = hyprland.alpha.value\n    const rule = [\n        `layerrule unset, ${name}`,\n        `layerrule blur, ${name}`,\n    ]\n\n    if (blur === \"*\")\n        return [...rule, `layerrule ignorealpha ${alpha}, ${name}`]\n\n    if (blur.some(b => name.includes(b)))\n        return [...rule, `layerrule ignorealpha ${alpha}, ${name}`]\n\n    return []\n}\n\nfunction setupHyprland() {\n    const wm_gaps = Math.floor(hyprland.gaps.value * spacing.value)\n\n    sendBatch([\n        `general:border_size ${width.value}`,\n        `general:gaps_out ${wm_gaps}`,\n        `general:gaps_in ${Math.floor(wm_gaps / 2)}`,\n        `general:col.active_border rgba(${activeBorder()}ff)`,\n        `general:col.inactive_border rgba(${hyprland.inactiveBorder.value})`,\n        `decoration:rounding ${radius.value}`,\n        `decoration:drop_shadow ${shadows.value ? \"yes\" : \"no\"}`,\n    ])\n\n    sendBatch(App.windows.flatMap(({ name }) => blur(name!)))\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/lib/icons.ts",
    "content": "export const substitutes = {\n    \"transmission-gtk\": \"transmission\",\n    \"blueberry.py\": \"blueberry\",\n    \"Caprine\": \"facebook-messenger\",\n    \"com.raggesilver.BlackBox-symbolic\": \"terminal-symbolic\",\n    \"audio-headset-bluetooth\": \"audio-headphones-symbolic\",\n    \"audio-card-analog-usb\": \"audio-speakers-symbolic\",\n    \"audio-card-analog-pci\": \"audio-card-symbolic\",\n    \"preferences-system\": \"emblem-system-symbolic\",\n    \"com.github.Aylur.ags-symbolic\": \"controls-symbolic\",\n    \"com.github.Aylur.ags\": \"controls-symbolic\",\n}\n\nexport default {\n    fallback: {\n        executable: \"application-x-executable-symbolic\",\n        notification: \"dialog-information-symbolic\",\n        video: \"video-x-generic-symbolic\",\n        audio: \"audio-x-generic-symbolic\",\n    },\n    ui: {\n        close: \"window-close-symbolic\",\n        colorpicker: \"color-select-symbolic\",\n        info: \"info-symbolic\",\n        link: \"external-link-symbolic\",\n        lock: \"system-lock-screen-symbolic\",\n        menu: \"open-menu-symbolic\",\n        refresh: \"view-refresh-symbolic\",\n        search: \"system-search-symbolic\",\n        settings: \"emblem-system-symbolic\",\n        themes: \"preferences-desktop-theme-symbolic\",\n        tick: \"object-select-symbolic\",\n        time: \"hourglass-symbolic\",\n        toolbars: \"toolbars-symbolic\",\n        warning: \"dialog-warning-symbolic\",\n        arrow: {\n            right: \"pan-end-symbolic\",\n            left: \"pan-start-symbolic\",\n            down: \"pan-down-symbolic\",\n            up: \"pan-up-symbolic\",\n        },\n    },\n    audio: {\n        mic: {\n            muted: \"microphone-disabled-symbolic\",\n            low: \"microphone-sensitivity-low-symbolic\",\n            medium: \"microphone-sensitivity-medium-symbolic\",\n            high: \"microphone-sensitivity-high-symbolic\",\n        },\n        volume: {\n            muted: \"audio-volume-muted-symbolic\",\n            low: \"audio-volume-low-symbolic\",\n            medium: \"audio-volume-medium-symbolic\",\n            high: \"audio-volume-high-symbolic\",\n            overamplified: \"audio-volume-overamplified-symbolic\",\n        },\n        type: {\n            headset: \"audio-headphones-symbolic\",\n            speaker: \"audio-speakers-symbolic\",\n            card: \"audio-card-symbolic\",\n        },\n        mixer: \"mixer-symbolic\",\n    },\n    asusctl: {\n        profile: {\n            Balanced: \"power-profile-balanced-symbolic\",\n            Quiet: \"power-profile-power-saver-symbolic\",\n            Performance: \"power-profile-performance-symbolic\",\n        },\n        mode: {\n            Integrated: \"processor-symbolic\",\n            Hybrid: \"controller-symbolic\",\n        },\n    },\n    battery: {\n        charging: \"flash-symbolic\",\n        warning: \"battery-empty-symbolic\",\n    },\n    bluetooth: {\n        enabled: \"bluetooth-active-symbolic\",\n        disabled: \"bluetooth-disabled-symbolic\",\n    },\n    brightness: {\n        indicator: \"display-brightness-symbolic\",\n        keyboard: \"keyboard-brightness-symbolic\",\n        screen: \"display-brightness-symbolic\",\n    },\n    powermenu: {\n        sleep: \"weather-clear-night-symbolic\",\n        reboot: \"system-reboot-symbolic\",\n        logout: \"system-log-out-symbolic\",\n        shutdown: \"system-shutdown-symbolic\",\n    },\n    recorder: {\n        recording: \"media-record-symbolic\",\n    },\n    notifications: {\n        noisy: \"org.gnome.Settings-notifications-symbolic\",\n        silent: \"notifications-disabled-symbolic\",\n        message: \"chat-bubbles-symbolic\",\n    },\n    trash: {\n        full: \"user-trash-full-symbolic\",\n        empty: \"user-trash-symbolic\",\n    },\n    mpris: {\n        shuffle: {\n            enabled: \"media-playlist-shuffle-symbolic\",\n            disabled: \"media-playlist-consecutive-symbolic\",\n        },\n        loop: {\n            none: \"media-playlist-repeat-symbolic\",\n            track: \"media-playlist-repeat-song-symbolic\",\n            playlist: \"media-playlist-repeat-symbolic\",\n        },\n        playing: \"media-playback-pause-symbolic\",\n        paused: \"media-playback-start-symbolic\",\n        stopped: \"media-playback-start-symbolic\",\n        prev: \"media-skip-backward-symbolic\",\n        next: \"media-skip-forward-symbolic\",\n    },\n    system: {\n        cpu: \"org.gnome.SystemMonitor-symbolic\",\n        ram: \"drive-harddisk-solidstate-symbolic\",\n        temp: \"temperature-symbolic\",\n    },\n    color: {\n        dark: \"dark-mode-symbolic\",\n        light: \"light-mode-symbolic\",\n    },\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/lib/init.ts",
    "content": "import css from \"style/style\"\nimport matugen from \"./matugen\"\nimport hyprland from \"./hyprland\"\nimport tmux from \"./tmux\"\nimport gtk from \"./gtk\"\nimport lowBattery from \"./battery\"\nimport swww from \"./swww\"\n\nexport async function init() {\n    try {\n        gtk()\n        css()\n        tmux()\n        matugen()\n        lowBattery()\n        hyprland()\n        css()\n        swww()\n    } catch (error) {\n        logError(error)\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/lib/matugen.ts",
    "content": "import options from \"options\"\nimport { sh, dependencies } from \"./utils\"\n\nexport default function init() {\n    options.wallpaper.connect(\"changed\", () => matugen())\n    options.autotheme.connect(\"changed\", () => matugen())\n}\n\nfunction animate(...setters: Array<() => void>) {\n    const delay = options.transition.value / 2\n    setters.forEach((fn, i) => Utils.timeout(delay * i, fn))\n}\n\nexport async function matugen(\n    type: \"image\" | \"color\" = \"image\",\n    arg = options.wallpaper.value,\n) {\n    if (!options.autotheme.value || !dependencies(\"matugen\"))\n        return\n\n    const colors = await sh(`matugen --dry-run -j hex ${type} ${arg}`)\n    const c = JSON.parse(colors).colors as { light: Colors, dark: Colors }\n    const { dark, light } = options.theme\n\n    animate(\n        () => {\n            dark.widget.value = c.dark.on_surface\n            light.widget.value = c.light.on_surface\n        },\n        () => {\n            dark.border.value = c.dark.outline\n            light.border.value = c.light.outline\n        },\n        () => {\n            dark.bg.value = c.dark.surface\n            light.bg.value = c.light.surface\n        },\n        () => {\n            dark.fg.value = c.dark.on_surface\n            light.fg.value = c.light.on_surface\n        },\n        () => {\n            dark.primary.bg.value = c.dark.primary\n            light.primary.bg.value = c.light.primary\n        },\n        () => {\n            dark.primary.fg.value = c.dark.on_primary\n            light.primary.fg.value = c.light.on_primary\n        },\n        () => {\n            dark.error.bg.value = c.dark.error\n            light.error.bg.value = c.light.error\n        },\n        () => {\n            dark.error.fg.value = c.dark.on_error\n            light.error.fg.value = c.light.on_error\n        },\n    )\n}\n\ntype Colors = {\n    background: string\n    error: string\n    error_container: string\n    inverse_on_surface: string\n    inverse_primary: string\n    inverse_surface: string\n    on_background: string\n    on_error: string\n    on_error_container: string\n    on_primary: string\n    on_primary_container: string\n    on_primary_fixed: string\n    on_primary_fixed_variant: string\n    on_secondary: string\n    on_secondary_container: string\n    on_secondary_fixed: string\n    on_secondary_fixed_variant: string\n    on_surface: string\n    on_surface_variant: string\n    on_tertiary: string\n    on_tertiary_container: string\n    on_tertiary_fixed: string\n    on_tertiary_fixed_variant: string\n    outline: string\n    outline_variant: string\n    primary: string\n    primary_container: string\n    primary_fixed: string\n    primary_fixed_dim: string\n    scrim: string\n    secondary: string\n    secondary_container: string\n    secondary_fixed: string\n    secondary_fixed_dim: string\n    shadow: string\n    surface: string\n    surface_bright: string\n    surface_container: string\n    surface_container_high: string\n    surface_container_highest: string\n    surface_container_low: string\n    surface_container_lowest: string\n    surface_dim: string\n    surface_variant: string\n    tertiary: string\n    tertiary_container: string\n    tertiary_fixed: string\n    tertiary_fixed_dim: string\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/lib/option.ts",
    "content": "import { Variable } from \"resource:///com/github/Aylur/ags/variable.js\"\nimport { wait } from \"./utils\"\nimport options from \"options\"\n\nexport class Opt<T = unknown> extends Variable<T> {\n    static { Service.register(this) }\n\n    constructor(initial: T) {\n        super(initial)\n        this.initial = initial\n    }\n\n    initial: T\n    id = \"\"\n    toString() {\n        return `${this.value}`\n    }\n\n    init(cacheFile: string) {\n        const cacheV = JSON.parse(Utils.readFile(cacheFile) || \"{}\")[this.id]\n        if (cacheV !== undefined)\n            this.value = cacheV\n\n        this.connect(\"changed\", () => {\n            const cache = JSON.parse(Utils.readFile(cacheFile) || \"{}\")\n            cache[this.id] = this.value\n            Utils.writeFileSync(JSON.stringify(cache, null, 2), cacheFile)\n        })\n    }\n\n    reset() {\n        if (JSON.stringify(this.value) !== JSON.stringify(this.initial)) {\n            this.value = this.initial\n            return this.id\n        }\n    }\n}\n\nexport const opt = <T>(initial: T) => new Opt(initial)\n\nfunction getOptions(object: object, path = \"\"): Opt[] {\n    return Object.keys(object).flatMap(key => {\n        const obj: Opt = object[key]\n        const id = path ? path + \".\" + key : key\n\n        if (obj instanceof Variable) {\n            obj.id = id\n            return obj\n        }\n\n        if (typeof obj === \"object\")\n            return getOptions(obj, id)\n\n        return []\n    })\n}\n\nexport function mkOptions<T extends object>(cacheFile: string, object: T) {\n    for (const opt of getOptions(object))\n        opt.init(cacheFile)\n\n    // ---  FIXME: remove after gui\n    const configFile = `/tmp/ags/config-${Date.now()}.json`\n    const values = getOptions(object).reduce((obj, { id, value }) => ({ [id]: value, ...obj }), {})\n    Utils.writeFileSync(JSON.stringify(values, null, 2), configFile)\n    Utils.monitorFile(configFile, () => {\n        const cache = JSON.parse(Utils.readFile(configFile) || \"{}\")\n        for (const opt of getOptions(object)) {\n            if (JSON.stringify(cache[opt.id]) !== JSON.stringify(opt.value))\n                opt.value = cache[opt.id]\n        }\n    })\n    // ---\n\n    async function reset(\n        [opt, ...list] = getOptions(object),\n        id = opt?.reset(),\n    ): Promise<Array<string>> {\n        if (!opt)\n            return wait(0, () => [])\n\n        return id\n            ? [id, ...(await wait(50, () => reset(list)))]\n            : await wait(0, () => reset(list))\n    }\n\n    return Object.assign(object, {\n        configFile,\n        array: () => getOptions(object),\n        async reset() {\n            return (await reset()).join(\"\\n\")\n        },\n        handler(deps: string[], callback: () => void) {\n            for (const opt of getOptions(options)) {\n                if (deps.some(i => opt.id.startsWith(i)))\n                    opt.connect(\"changed\", callback)\n            }\n        },\n    })\n}\n\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/lib/swww.ts",
    "content": "import options from \"options\"\nimport { dependencies, sh } from \"./utils\"\nimport GLib from \"gi://GLib?version=2.0\"\n\nasync function wallpaper() {\n    print(\"hello?\")\n    const pos = await sh(\"hyprctl cursorpos\")\n\n    await sh([\n        \"swww\", \"img\",\n        \"--transition-type\", \"grow\",\n        \"--transition-pos\", pos.replace(\" \", \"\"),\n        options.wallpaper.value,\n    ])\n}\n\nexport default async function init() {\n    if (!dependencies(\"swww\"))\n        return\n\n    // gtk portal\n    const wp = `${GLib.get_user_config_dir()}/background`\n    Utils.monitorFile(wp, () => options.wallpaper.value = wp)\n\n    options.wallpaper.connect(\"changed\", wallpaper)\n\n    await sh(\"swww init\")\n    wallpaper()\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/lib/tmux.ts",
    "content": "import options from \"options\"\nimport { sh } from \"./utils\"\n\nexport async function tmux() {\n    const { scheme, dark, light } = options.theme\n    const hex = scheme.value === \"dark\" ? dark.primary.bg.value : light.primary.bg.value\n    if (await sh(\"which tmux\"))\n        sh(`tmux set @main_accent \"${hex}\"`)\n}\n\nexport default function init() {\n    options.wallpaper.connect(\"changed\", tmux)\n    options.autotheme.connect(\"changed\", tmux)\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/lib/utils.ts",
    "content": "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { type Config } from \"types/app\"\nimport { type Application } from \"types/service/applications\"\nimport { substitutes } from \"./icons\"\nimport Gtk from \"gi://Gtk?version=3.0\"\nimport Gdk from \"gi://Gdk\"\nimport GLib from \"gi://GLib?version=2.0\"\n\nexport function config<T extends Gtk.Window>(config: Config<T>) {\n    return config\n}\n\n/**\n  * @returns substitute icon || name || fallback icon\n  */\nexport function icon(name: string | null, fallback = name) {\n    if (!name)\n        return fallback || \"\"\n\n    if (GLib.file_test(name, GLib.FileTest.EXISTS))\n        return name\n\n    const icon = (substitutes[name] || name)\n    if (Utils.lookUpIcon(icon))\n        return icon\n\n    print(`no icon substitute \"${icon}\" for \"${name}\", fallback: \"${fallback}\"`)\n    return fallback\n}\n\n/**\n * @returns execAsync([\"bash\", \"-c\", cmd])\n */\nexport async function bash(strings: TemplateStringsArray | string, ...values: unknown[]) {\n    const cmd = typeof strings === \"string\" ? strings : strings\n        .flatMap((str, i) => str + `${values[i] ?? \"\"}`)\n        .join(\"\")\n\n    return Utils.execAsync([\"bash\", \"-c\", cmd]).catch(err => {\n        console.error(cmd, err)\n        return \"\"\n    })\n}\n\n/**\n * @returns execAsync(cmd)\n */\nexport async function sh(cmd: string | string[]) {\n    return Utils.execAsync(cmd).catch(err => {\n        console.error(typeof cmd === \"string\" ? cmd : cmd.join(\" \"), err)\n        return \"\"\n    })\n}\n\nexport function forMonitors(widget: (monitor: number) => Gtk.Window) {\n    const n = Gdk.Display.get_default()?.get_n_monitors() || 1\n    return range(n, 0).map(widget).flat(1)\n}\n\n/**\n * @returns [start...length]\n */\nexport function range(length: number, start = 1) {\n    return Array.from({ length }, (_, i) => i + start)\n}\n\n/**\n * promisified timeout\n */\nexport function wait<T>(ms: number, callback: () => T): Promise<T> {\n    return new Promise(resolve => Utils.timeout(ms, () => {\n        resolve(callback())\n    }))\n}\n\n/**\n * @returns true if all of the `bins` are found\n */\nexport function dependencies(...bins: string[]) {\n    const missing = bins.filter(bin => {\n        return !Utils.exec(`which ${bin}`)\n    })\n\n    if (missing.length > 0)\n        console.warn(\"missing dependencies:\", missing.join(\", \"))\n\n    return missing.length === 0\n}\n\n/**\n * run app detached\n */\nexport function launchApp(app: Application) {\n    print(`launching ${app.name}, ${app.desktop}`)\n    sh(`gtk-launch ${app.desktop} &`)\n    app.frequency += 1\n}\n\n/**\n * to use with drag and drop\n */\nexport function createSurfaceFromWidget(widget: Gtk.Widget) {\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    const cairo = imports.gi.cairo as any\n    const alloc = widget.get_allocation()\n    const surface = new cairo.ImageSurface(\n        cairo.Format.ARGB32,\n        alloc.width,\n        alloc.height,\n    )\n    const cr = new cairo.Context(surface)\n    cr.setSourceRGBA(255, 255, 255, 0)\n    cr.rectangle(0, 0, alloc.width, alloc.height)\n    cr.fill()\n    widget.draw(cr)\n    return surface\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/lib/variables.ts",
    "content": "import GLib from \"gi://GLib\"\n// import options from \"options\"\n//\n// const intval = options.system.fetchInterval.value\n// const tempPath = options.system.temperature.value\n\nexport const clock = Variable(GLib.DateTime.new_now_local(), {\n    poll: [1000, () => GLib.DateTime.new_now_local()],\n})\n\nexport const uptime = Variable(0, {\n    poll: [60_000, \"cat /proc/uptime\", line =>\n        Number.parseInt(line.split(\".\")[0]) / 60,\n    ],\n})\n\n// export const distro = GLib.get_os_info(\"ID\")\n\n// const divide = ([total, free]: string[]) => Number.parseInt(free) / Number.parseInt(total)\n//\n// export const cpu = Variable(0, {\n//     poll: [intval, \"top -b -n 1\", out => divide([\"100\", out.split(\"\\n\")\n//         .find(line => line.includes(\"Cpu(s)\"))\n//         ?.split(/\\s+/)[1]\n//         .replace(\",\", \".\") || \"0\"])],\n// })\n//\n// export const ram = Variable(0, {\n//     poll: [intval, \"free\", out => divide(out.split(\"\\n\")\n//         .find(line => line.includes(\"Mem:\"))\n//         ?.split(/\\s+/)\n//         .splice(1, 2) || [\"1\", \"1\"])],\n// })\n//\n// export const temperature = Variable(0, {\n//     poll: [intval, `cat ${tempPath}`, n => {\n//         return Number.parseInt(n) / 100_000\n//     }],\n// })\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/main.ts",
    "content": "import \"lib/init\"\nimport options from \"options\"\nimport Bar from \"widget/bar/Bar\"\nimport Applauncher from \"widget/applauncher/Applauncher\"\nimport Overview from \"widget/overview/Overview\"\nimport PowerMenu from \"widget/powermenu/PowerMenu\"\nimport Verification from \"widget/powermenu/Verification\"\nimport NotificationPopups from \"widget/notifications/NotificationPopups\"\nimport ScreenCorners from \"widget/bar/ScreenCorners\"\nimport OSD from \"widget/osd/OSD\"\nimport SettingsDialog from \"widget/settings/SettingsDialog\"\nimport { dependencies, config, forMonitors } from \"lib/utils\"\nimport { setupQuickSettings } from \"widget/quicksettings/QuickSettings\"\nimport { setupDateMenu } from \"widget/datemenu/DateMenu\"\nimport { init } from \"lib/init\"\n\nUtils.ensureDirectory(\"/tmp/ags\")\nif (!dependencies(\"dart-sass\", \"brightnessctl\"))\n    App.quit()\n\nexport default config({\n    icons: \"./assets\",\n    onConfigParsed: () => {\n        setupQuickSettings()\n        setupDateMenu()\n        init()\n    },\n    closeWindowDelay: {\n        \"applauncher\": options.transition.value,\n        \"overview\": options.transition.value,\n        \"quicksettings\": options.transition.value,\n        \"datemenu\": options.transition.value,\n    },\n    windows: [\n        ...forMonitors(Bar),\n        ...forMonitors(NotificationPopups),\n        ...forMonitors(ScreenCorners),\n        ...forMonitors(OSD),\n        Applauncher(),\n        Overview(),\n        PowerMenu(),\n        Verification(),\n        SettingsDialog(),\n    ],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/options.ts",
    "content": "import { type BarWidget } from \"widget/bar/Bar\"\nimport { opt, mkOptions } from \"lib/option\"\n\nconst options = mkOptions(Utils.CACHE_DIR + \"/options2.json\", {\n    autotheme: opt(false),\n\n    wallpaper: opt(`/home/${Utils.USER}/.config/background`),\n\n    theme: {\n        dark: {\n            primary: {\n                bg: opt(\"#51a4e7\"),\n                fg: opt(\"#141414\"),\n            },\n            error: {\n                bg: opt(\"#e55f86\"),\n                fg: opt(\"#141414\"),\n            },\n            bg: opt(\"#171717\"),\n            fg: opt(\"#eeeeee\"),\n            widget: opt(\"#eeeeee\"),\n            border: opt(\"#eeeeee\"),\n        },\n        light: {\n            primary: {\n                bg: opt(\"#426ede\"),\n                fg: opt(\"#eeeeee\"),\n            },\n            error: {\n                bg: opt(\"#b13558\"),\n                fg: opt(\"#eeeeee\"),\n            },\n            bg: opt(\"#fffffa\"),\n            fg: opt(\"#080808\"),\n            widget: opt(\"#080808\"),\n            border: opt(\"#080808\"),\n        },\n\n        scheme: opt<\"dark\" | \"light\">(\"dark\"),\n        widget: { opacity: opt(94) },\n        border: {\n            width: opt(0),\n            opacity: opt(96),\n        },\n\n        shadows: opt(true),\n        padding: opt(7),\n        spacing: opt(5),\n        radius: opt(15),\n    },\n\n    transition: opt(200),\n\n    font: {\n        size: opt(13),\n        name: opt(\"Ubuntu Nerd Font\"),\n    },\n\n    bar: {\n        flatButtons: opt(true),\n        position: opt<\"top\" | \"bottom\">(\"top\"),\n        corners: opt(false),\n        layout: {\n            start: opt<BarWidget[]>([\n                \"launcher\",\n                \"workspaces\",\n                //\"taskbar\",\n                \"expander\",\n                //\"messages\",\n            ]),\n            center: opt<BarWidget[]>([\n                \"date\",\n            ]),\n            end: opt<BarWidget[]>([\n                //\"media\",\n                \"expander\",\n                \"systray\",\n                \"colorpicker\",\n                \"screenrecord\",\n                \"battery\",\n                \"system\",\n                \"powermenu\",\n            ]),\n        },\n        launcher: {\n            icon: {\n                colored: opt(true),\n                icon: opt(\"system-search-symbolic\"),\n            },\n            label: {\n                colored: opt(false),\n                label: opt(\" Applications\"),\n            },\n            action: opt(() => App.toggleWindow(\"applauncher\")),\n        },\n        date: {\n            format: opt(\"%d.%m.%y - %H:%M\"),\n            action: opt(() => App.toggleWindow(\"datemenu\")),\n        },\n        battery: {\n            bar: opt<\"hidden\" | \"regular\" | \"whole\">(\"hidden\"),\n            percentage: opt(true),\n            blocks: opt(10),\n            width: opt(70),\n            low: opt(30),\n        },\n        workspaces: {\n            workspaces: opt(10),\n        },\n        taskbar: {\n            monochrome: opt(true),\n            exclusive: opt(false),\n        },\n        messages: {\n            action: opt(() => App.toggleWindow(\"datemenu\")),\n        },\n        systray: {\n            ignore: opt([\n                \"KDE Connect Indicator\",\n                \"spotify-client\",\n            ]),\n        },\n        media: {\n            monochrome: opt(true),\n            preferred: opt(\"spotify\"),\n            direction: opt<\"left\" | \"right\">(\"right\"),\n            length: opt(40),\n        },\n        powermenu: {\n            monochrome: opt(false),\n            action: opt(() => App.toggleWindow(\"powermenu\")),\n        },\n    },\n\n    applauncher: {\n        iconSize: opt(62),\n        width: opt(400),\n        margin: opt(80),\n        maxItem: opt(10),\n        favorites: opt([\n            \"firefox\",\n            \"blackbox\",\n            \"org.gnome.Calendar\",\n            \"obsidian\",\n            \"discord\",\n            \"spotify\",\n        ]),\n    },\n\n    overview: {\n        scale: opt(9),\n        workspaces: opt(10),\n        monochromeIcon: opt(true),\n    },\n\n    powermenu: {\n        sleep: opt(\"systemctl suspend\"),\n        reboot: opt(\"systemctl reboot\"),\n        logout: opt(\"pkill Hyprland\"),\n        shutdown: opt(\"shutdown now\"),\n        layout: opt<\"line\" | \"box\">(\"line\"),\n        labels: opt(true),\n    },\n\n    quicksettings: {\n        avatar: {\n            image: opt(`/var/lib/AccountsService/icons/${Utils.USER}`),\n            size: opt(70),\n        },\n        width: opt(380),\n        position: opt<\"left\" | \"center\" | \"right\">(\"right\"),\n        networkSettings: opt(\"gtk-launch gnome-control-center\"),\n        media: {\n            monochromeIcon: opt(false),\n            coverSize: opt(100),\n        },\n    },\n\n    datemenu: {\n        position: opt<\"left\" | \"center\" | \"right\">(\"center\"),\n    },\n\n    osd: {\n        progress: {\n            vertical: opt(false),\n            pack: {\n                h: opt<\"start\" | \"center\" | \"end\">(\"center\"),\n                v: opt<\"start\" | \"center\" | \"end\">(\"end\"),\n            },\n        },\n        microphone: {\n            pack: {\n                h: opt<\"start\" | \"center\" | \"end\">(\"center\"),\n                v: opt<\"start\" | \"center\" | \"end\">(\"end\"),\n            },\n        },\n    },\n\n    notifications: {\n        position: opt<Array<\"top\" | \"bottom\" | \"left\" | \"right\">>([\"top\", \"right\"]),\n        blacklist: opt([\"Spotify\"]),\n        width: opt(440),\n    },\n\n    hyprland: {\n        blur: opt<\"*\" | Array<string>>([\n            \"powermenu\",\n            \"verification\",\n        ]),\n        alpha: opt(.3),\n        gaps: opt(2.4),\n        inactiveBorder: opt(\"333333ff\"),\n    },\n})\n\nglobalThis[\"options\"] = options\nexport default options\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/package.json",
    "content": "{\n    \"name\": \"Rocket-dotfiles\",\n    \"author\": \"RoccoRakete\",\n    \"kofi\": \"https://ko-fi.com/roccorakete\",\n    \"repository\": {\n        \"type\": \"git\",\n        \"url\": \"github.com/RoccoRakete/hyprland-dots.git\"\n    },\n    \"devDependencies\": {\n        \"@typescript-eslint/eslint-plugin\": \"^6.20.0\",\n        \"eslint\": \"^8.56.0\",\n        \"eslint-config-standard-with-typescript\": \"^43.0.1\",\n        \"eslint-plugin-import\": \"^2.29.1\",\n        \"eslint-plugin-n\": \"^16.6.2\",\n        \"eslint-plugin-promise\": \"^6.1.1\",\n        \"typescript\": \"^5.3.3\"\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/service/asusctl.ts",
    "content": "import { sh } from \"lib/utils\"\n\ntype Profile = \"Performance\" | \"Balanced\" | \"Quiet\"\ntype Mode = \"Hybrid\" | \"Integrated\"\n\nclass Asusctl extends Service {\n    static {\n        Service.register(this, {}, {\n            \"profile\": [\"string\", \"r\"],\n            \"mode\": [\"string\", \"r\"],\n        })\n    }\n\n    available = !!Utils.exec(\"which asusctl\")\n    #profile: Profile = \"Balanced\"\n    #mode: Mode = \"Hybrid\"\n\n    async nextProfile() {\n        await sh(\"asusctl profile -n\")\n        const profile = await sh(\"asusctl profile -p\")\n        const p = profile.split(\" \")[3] as Profile\n        this.#profile = p\n        this.changed(\"profile\")\n    }\n\n    async setProfile(prof: Profile) {\n        await sh(`asusctl profile --profile-set ${prof}`)\n        this.#profile = prof\n        this.changed(\"profile\")\n    }\n\n    async nextMode() {\n        await sh(`supergfxctl -m ${this.#mode === \"Hybrid\" ? \"Integrated\" : \"Hybrid\"}`)\n        this.#mode = await sh(\"supergfxctl -g\") as Mode\n        this.changed(\"profile\")\n    }\n\n    constructor() {\n        super()\n\n        if (this.available) {\n            sh(\"asusctl profile -p\").then(p => this.#profile = p.split(\" \")[3] as Profile)\n            sh(\"supergfxctl -g\").then(m => this.#mode = m as Mode)\n        }\n    }\n\n    get profiles(): Profile[] { return [\"Performance\", \"Balanced\", \"Quiet\"] }\n    get profile() { return this.#profile }\n    get mode() { return this.#mode }\n}\n\nexport default new Asusctl()\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/service/brightness.ts",
    "content": "import { bash, sh } from \"lib/utils\"\n\nconst get = (args: string) => Number(Utils.exec(`brightnessctl ${args}`))\nconst screen = await bash`ls -w1 /sys/class/backlight | head -1`\nconst kbd = await bash`ls -w1 /sys/class/leds | head -1`\n\nclass Brightness extends Service {\n    static {\n        Service.register(this, {}, {\n            \"screen\": [\"float\", \"rw\"],\n            \"kbd\": [\"int\", \"rw\"],\n        })\n    }\n\n    #kbdMax = get(`--device ${kbd} max`)\n    #kbd = get(`--device ${kbd} get`)\n    #screenMax = get(\"max\")\n    #screen = get(\"get\") / get(\"max\")\n\n    get kbd() { return this.#kbd }\n    get screen() { return this.#screen }\n\n    set kbd(value) {\n        if (value < 0 || value > this.#kbdMax)\n            return\n\n        sh(`brightnessctl -d ${kbd} s ${value} -q`).then(() => {\n            this.#kbd = value\n            this.changed(\"kbd\")\n        })\n    }\n\n    set screen(percent) {\n        if (percent < 0)\n            percent = 0\n\n        if (percent > 1)\n            percent = 1\n\n        sh(`brightnessctl set ${Math.floor(percent * 100)}% -q`).then(() => {\n            this.#screen = percent\n            this.changed(\"screen\")\n        })\n    }\n\n    constructor() {\n        super()\n\n        const screenPath = `/sys/class/backlight/${screen}/brightness`\n        const kbdPath = `/sys/class/leds/${kbd}/brightness`\n\n        Utils.monitorFile(screenPath, async f => {\n            const v = await Utils.readFileAsync(f)\n            this.#screen = Number(v) / this.#screenMax\n            this.changed(\"screen\")\n        })\n\n        Utils.monitorFile(kbdPath, async f => {\n            const v = await Utils.readFileAsync(f)\n            this.#kbd = Number(v) / this.#kbdMax\n            this.changed(\"kbd\")\n        })\n    }\n}\n\nexport default new Brightness()\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/service/colorpicker.ts",
    "content": "import icons from \"lib/icons\"\nimport { bash, dependencies } from \"lib/utils\"\n\nconst COLORS_CACHE = Utils.CACHE_DIR + \"/colorpicker.json\"\nconst MAX_NUM_COLORS = 10\n\nclass ColorPicker extends Service {\n    static {\n        Service.register(this, {}, {\n            \"colors\": [\"jsobject\"],\n        })\n    }\n\n    notifID = 0\n    #colors = JSON.parse(Utils.readFile(COLORS_CACHE) || \"[]\") as string[]\n\n    get colors() { return [...this.#colors] }\n    set colors(colors) {\n        this.#colors = colors\n        this.changed(\"colors\")\n    }\n\n    // TODO: doesn't work?\n    async wlCopy(color: string) {\n        if (dependencies(\"wl-copy\"))\n            bash(`wl-copy ${color}`)\n    }\n\n    async pick() {\n        if (!dependencies(\"hyprpicker\"))\n            return\n\n        const color = await bash(\"hyprpicker -a -r\")\n        if (!color)\n            return\n\n        colorpicker.wlCopy(color)\n        const list = colorpicker.colors\n        if (!list.includes(color)) {\n            list.push(color)\n            if (list.length > MAX_NUM_COLORS)\n                list.shift()\n\n            colorpicker.colors = list\n            Utils.writeFile(JSON.stringify(list, null, 2), COLORS_CACHE)\n        }\n\n        colorpicker.notifID = await Utils.notify({\n            id: colorpicker.notifID,\n            iconName: icons.ui.colorpicker,\n            summary: color,\n        })\n    }\n}\n\nconst colorpicker = new ColorPicker\nexport default colorpicker\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/service/powermenu.ts",
    "content": "import options from \"options\"\n\nconst { sleep, reboot, logout, shutdown } = options.powermenu\n\nexport type Action = \"sleep\" | \"reboot\" | \"logout\" | \"shutdown\"\n\nclass PowerMenu extends Service {\n    static {\n        Service.register(this, {}, {\n            \"title\": [\"string\"],\n            \"cmd\": [\"string\"],\n        })\n    }\n\n    #title = \"\"\n    #cmd = \"\"\n\n    get title() { return this.#title }\n    get cmd() { return this.#cmd }\n\n    action(action: Action) {\n        [this.#cmd, this.#title] = {\n            sleep: [sleep.value, \"Sleep\"],\n            reboot: [reboot.value, \"Reboot\"],\n            logout: [logout.value, \"Log Out\"],\n            shutdown: [shutdown.value, \"Shutdown\"],\n        }[action]\n\n        this.notify(\"cmd\")\n        this.notify(\"title\")\n        this.emit(\"changed\")\n        App.closeWindow(\"powermenu\")\n        App.openWindow(\"verification\")\n    }\n\n    readonly shutdown = () => {\n        this.action(\"shutdown\")\n    }\n}\n\nconst powermenu = new PowerMenu\nglobalThis[\"powermenu\"] = powermenu\nexport default powermenu\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/service/screenrecord.ts",
    "content": "import GLib from \"gi://GLib\"\nimport icons from \"lib/icons\"\nimport { dependencies, sh, bash } from \"lib/utils\"\n\nconst now = () => GLib.DateTime.new_now_local().format(\"%Y-%m-%d_%H-%M-%S\")\n\nclass Recorder extends Service {\n    static {\n        Service.register(this, {}, {\n            \"timer\": [\"int\"],\n            \"recording\": [\"boolean\"],\n        })\n    }\n\n    #recordings = Utils.HOME + \"/Videos/Screencasting\"\n    #screenshots = Utils.HOME + \"/Pictures/Screenshots\"\n    #file = \"\"\n    #interval = 0\n\n    recording = false\n    timer = 0\n\n    async start() {\n        if (!dependencies(\"slurp\", \"wf-recorder\"))\n            return\n\n        if (this.recording)\n            return\n\n        const area = await sh(\"slurp\")\n        Utils.ensureDirectory(this.#recordings)\n        this.#file = `${this.#recordings}/${now()}.mp4`\n        sh(`wf-recorder -g ${area} -f ${this.#file} --pixel-format yuv420p`)\n\n        this.recording = true\n        this.changed(\"recording\")\n\n        this.timer = 0\n        this.#interval = Utils.interval(1000, () => {\n            this.changed(\"timer\")\n            this.timer++\n        })\n    }\n\n    async stop() {\n        if (!this.recording)\n            return\n\n        bash(\"killall -INT wf-recorder\")\n        this.recording = false\n        this.changed(\"recording\")\n        GLib.source_remove(this.#interval)\n\n        Utils.notify({\n            iconName: icons.fallback.video,\n            summary: \"Screenrecord\",\n            body: this.#file,\n            actions: {\n                \"Show in Files\": () => sh(`xdg-open ${this.#recordings}`),\n                \"View\": () => sh(`xdg-open ${this.#file}`),\n            },\n        })\n    }\n\n    async screenshot(full = false) {\n        if (!dependencies(\"slurp\", \"wayshot\"))\n            return\n\n        const file = `${this.#screenshots}/${now()}.png`\n        Utils.ensureDirectory(this.#screenshots)\n\n        const wayshot = `wayshot -f ${file} ${full ? \"\" : `-s \"${await sh(\"slurp\")}\"`}`\n        await sh(wayshot)\n        bash(`wl-copy < ${file}`)\n\n        Utils.notify({\n            image: file,\n            summary: \"Screenshot\",\n            body: this.#file,\n            actions: {\n                \"Show in Files\": () => sh(`xdg-open ${this.#screenshots}`),\n                \"View\": () => sh(`xdg-open ${file}`),\n                \"Edit\": () => {\n                    if (!dependencies(\"swappy\"))\n                        sh(`swappy, -f ${file}`)\n                },\n            },\n        })\n    }\n}\n\nconst recorder = new Recorder\nglobalThis[\"recorder\"] = recorder\nexport default recorder\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/style/mixins/a11y-button.scss",
    "content": "@import './button';\n\n@mixin accs-button($flat: false, $reactive: true) {\n    @include unset;\n    color: $fg;\n\n    >* {\n        border-radius: $radius;\n        transition: $transition;\n\n        @if $flat {\n            background-color: transparent;\n            box-shadow: none;\n        }\n\n        @else {\n            background-color: $widget-bg;\n            box-shadow: inset 0 0 0 $border-width $border-color;\n        }\n    }\n\n\n    @if $reactive {\n\n        &:focus>*,\n        &.focused>* {\n            @include button-focus;\n        }\n\n        &:hover>* {\n            @include button-hover;\n        }\n\n        &:active,\n        &.active,\n        &.on,\n        &:checked {\n            >* {\n                @include button-active;\n            }\n\n            &:hover>* {\n                box-shadow: inset 0 0 0 $border-width $border-color,\n                    inset 0 0 0 99px $hover-bg;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/style/mixins/button.scss",
    "content": "@mixin button-focus() {\n    box-shadow: inset 0 0 0 $border-width $primary-bg;\n    background-color: $hover-bg;\n    color: $hover-fg;\n}\n\n@mixin button-hover() {\n    box-shadow: inset 0 0 0 $border-width $border-color;\n    background-color: $hover-bg;\n    color: $hover-fg;\n}\n\n@mixin button-active() {\n    box-shadow: inset 0 0 0 $border-width $border-color;\n    background-image: $active-gradient;\n    background-color: $primary-bg;\n    color: $primary-fg;\n}\n\n@mixin button-disabled() {\n    box-shadow: none;\n    background-color: transparent;\n    color: transparentize($fg, 0.7);\n}\n\n@mixin button($flat: false, $reactive: true, $radius: $radius, $focusable: true) {\n    all: unset;\n    transition: $transition;\n    border-radius: $radius;\n    color: $fg;\n\n    @if $flat {\n        background-color: transparent;\n        background-image: none;\n        box-shadow: none;\n    }\n\n    @else {\n        background-color: $widget-bg;\n        box-shadow: inset 0 0 0 $border-width $border-color;\n    }\n\n    @if $reactive {\n        @if $focusable {\n            &:focus {\n                @include button-focus;\n            }\n        }\n\n        &:hover {\n            @include button-hover;\n        }\n\n        &:active,\n        &.on,\n        &.active,\n        &:checked {\n            @include button-active;\n\n            &:hover {\n                box-shadow: inset 0 0 0 $border-width $border-color,\n                    inset 0 0 0 99px $hover-bg;\n            }\n        }\n    }\n\n    &:disabled {\n        @include button-disabled;\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/style/mixins/floating-widget.scss",
    "content": "@mixin floating-widget {\n    @if $shadows {\n        box-shadow: 0 0 5px 0 $shadow-color;\n    }\n\n    margin: max($spacing, 8px);\n    border: $border-width solid $popover-border-color;\n    background-color: $bg;\n    color: $fg;\n    border-radius: $popover-radius;\n    padding: $popover-padding;\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/style/mixins/hidden.scss",
    "content": "@mixin hidden {\n    background-color: transparent;\n    background-image: none;\n    border-color: transparent;\n    box-shadow: none;\n    -gtk-icon-transform: scale(0);\n\n    * {\n        background-color: transparent;\n        background-image: none;\n        border-color: transparent;\n        box-shadow: none;\n        -gtk-icon-transform: scale(0);\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/style/mixins/media.scss",
    "content": "@mixin media() {\n    @include widget;\n    padding: $padding;\n\n    .cover {\n        box-shadow: 2px 2px 2px 0 $shadow-color;\n        background-size: cover;\n        background-position: center;\n        border-radius: $radius*0.8;\n        margin-right: $spacing;\n    }\n\n    button {\n        @include button($flat: true);\n        padding: $padding * .5;\n\n        &.play-pause {\n            margin: 0 ($spacing * .5);\n        }\n\n        image {\n            font-size: 1.2em;\n        }\n    }\n\n    .artist {\n        color: transparentize($fg, .2);\n        font-size: .9em;\n    }\n\n    scale {\n        @include slider($width: .5em, $slider: false, $gradient: linear-gradient($fg, $fg));\n        margin-bottom: $padding * .5;\n\n        trough {\n            border: none;\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/style/mixins/scrollable.scss",
    "content": "@mixin scrollable {\n\n    scrollbar,\n    scrollbar * {\n        all: unset;\n    }\n\n    scrollbar.vertical {\n        transition: $transition;\n        background-color: transparentize($bg, 0.7);\n\n        &:hover {\n            background-color: transparentize($bg, 0.3);\n\n            slider {\n                background-color: transparentize($fg, 0.3);\n                min-width: .6em;\n            }\n        }\n    }\n\n\n    scrollbar.vertical slider {\n        background-color: transparentize($fg, 0.5);\n        border-radius: $radius;\n        min-width: .4em;\n        min-height: 2em;\n        transition: $transition;\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/style/mixins/slider.scss",
    "content": "@import './unset';\n\n@mixin slider($width: 0.7em, $slider-width: .5em, $gradient: $active-gradient, $slider: true, $focusable: true, $radius: $radius) {\n    @include unset($rec: true);\n\n    trough {\n        transition: $transition;\n        border-radius: $radius;\n        border: $border;\n        background-color: $widget-bg;\n        min-height: $width;\n        min-width: $width;\n\n        highlight,\n        progress {\n            border-radius: max($radius - $border-width, 0);\n            background-image: $gradient;\n            min-height: $width;\n            min-width: $width;\n        }\n    }\n\n    slider {\n        box-shadow: none;\n        background-color: transparent;\n        border: $border-width solid transparent;\n        transition: $transition;\n        border-radius: $radius;\n        min-height: $width;\n        min-width: $width;\n        margin: -$slider-width;\n    }\n\n    &:hover {\n        trough {\n            background-color: $hover-bg;\n        }\n\n        slider {\n            @if $slider {\n                background-color: $fg;\n                border-color: $border-color;\n\n                @if $shadows {\n                    box-shadow: 0 0 3px 0 $shadow-color;\n                }\n            }\n        }\n    }\n\n    &:disabled {\n\n        highlight,\n        progress {\n            background-color: transparentize($fg, 0.4);\n            background-image: none;\n        }\n    }\n\n    @if $focusable {\n        trough:focus {\n            background-color: $hover-bg;\n            box-shadow: inset 0 0 0 $border-width $primary-bg;\n\n            slider {\n                @if $slider {\n                    background-color: $fg;\n                    box-shadow: inset 0 0 0 $border-width $primary-bg;\n                }\n            }\n        }\n\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/style/mixins/spacing.scss",
    "content": "@mixin spacing($multiplier: 1, $spacing: $spacing, $rec: false) {\n    &.horizontal>* {\n        margin: 0 calc($spacing * $multiplier / 2);\n\n        &:first-child {\n            margin-left: 0;\n        }\n\n        &:last-child {\n            margin-right: 0;\n\t    margin-left: 0;\n        }\n    }\n\n    &.vertical>* {\n        margin: calc($spacing * $multiplier / 2) 0;\n\n        &:first-child {\n            margin-top: 0;\n        }\n\n        &:last-child {\n            margin-bottom: 0;\n        }\n    }\n\n    @if $rec {\n        box {\n            &.horizontal>* {\n                margin: 0 $spacing * $multiplier / 2;\n\n                &:first-child {\n                    margin-left: 0;\n                }\n\n                &:last-child {\n                    margin-right: 0;\n                }\n            }\n\n            &.vertical>* {\n                margin: $spacing * $multiplier / 2 0;\n\n                &:first-child {\n                    margin-top: 0;\n                }\n\n                &:last-child {\n                    margin-bottom: 0;\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/style/mixins/switch.scss",
    "content": "@import './button';\n\n@mixin switch {\n    @include button;\n\n    slider {\n        background-color: $primary-fg;\n        border-radius: $radius;\n        min-width: 24px;\n        min-height: 24px;\n    }\n\n    image {\n        color: transparent;\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/style/mixins/unset.scss",
    "content": "@mixin unset($rec: false) {\n    all: unset;\n\n    @if $rec {\n        * {\n            all: unset\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/style/mixins/widget.scss",
    "content": "@mixin widget {\n    transition: $transition;\n    border-radius: $radius;\n    color: $fg;\n    background-color: $widget-bg;\n    border: $border;\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/style/style.ts",
    "content": "/* eslint-disable max-len */\nimport { type Opt } from \"lib/option\"\nimport options from \"options\"\nimport { bash } from \"lib/utils\"\n\nconst deps = [\"font\", \"theme\", \"bar.flatButtons\", \"bar.position\"]\n\nconst dirs = [\n    `${App.configDir}/style/mixins`,\n    `${App.configDir}/style/widget`,\n]\n\nconst {\n    dark,\n    light,\n    scheme,\n    padding,\n    spacing,\n    radius,\n    shadows,\n    widget,\n    border,\n} = options.theme\n\nconst popoverPaddingMultiplier = 1.6\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst t = (dark: Opt<any> | string, light: Opt<any> | string) => scheme.value === \"dark\"\n    ? `${dark}` : `${light}`\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst $ = (name: string, value: string | Opt<any>) => `$${name}: ${value};`\n\nconst variables = () => [\n    $(\"bg\", t(dark.bg, light.bg)),\n    $(\"fg\", t(dark.fg, light.fg)),\n\n    $(\"primary-bg\", t(dark.primary.bg, light.primary.bg)),\n    $(\"primary-fg\", t(dark.primary.fg, light.primary.fg)),\n\n    $(\"error-bg\", t(dark.error.bg, light.error.bg)),\n    $(\"error-fg\", t(dark.error.fg, light.error.fg)),\n\n    $(\"padding\", `${padding}pt`),\n    $(\"spacing\", `${spacing}pt`),\n    $(\"radius\", `${radius}px`),\n    $(\"transition\", `${options.transition}ms`),\n\n    $(\"shadows\", `${shadows}`),\n\n    $(\"widget-bg\", `transparentize(${t(dark.widget, light.widget)}, ${widget.opacity.value / 100})`),\n\n    $(\"hover-bg\", `transparentize(${t(dark.widget, light.widget)}, ${(widget.opacity.value * .9) / 100})`),\n    $(\"hover-fg\", `lighten(${t(dark.fg, light.fg)}, 8%)`),\n\n    $(\"border-width\", `${border.width}px`),\n    $(\"border-color\", `transparentize(${t(dark.border, light.border)}, ${border.opacity.value / 100})`),\n    $(\"border\", \"$border-width solid $border-color\"),\n\n    $(\"active-gradient\", `linear-gradient(to right, ${t(dark.primary.bg, light.primary.bg)}, darken(${t(dark.primary.bg, light.primary.bg)}, 4%))`),\n    $(\"shadow-color\", t(\"rgba(0,0,0,.6)\", \"rgba(0,0,0,.4)\")),\n    $(\"text-shadow\", t(\"2pt 2pt 2pt $shadow-color\", \"none\")),\n\n    $(\"popover-border-color\", `transparentize(${t(dark.border, light.border)}, ${Math.max(((border.opacity.value - 1) / 100), 0)})`),\n    $(\"popover-padding\", `$padding * ${popoverPaddingMultiplier}`),\n    $(\"popover-radius\", radius.value === 0 ? \"0\" : \"$radius + $popover-padding\"),\n\n    $(\"font-size\", `${options.font.size}pt`),\n    $(\"font-name\", options.font.name),\n\n    // etc\n    $(\"charging-bg\", \"#00D787\"),\n    $(\"charging-fg\", \"#141414\"),\n    $(\"bar-battery-blocks\", options.bar.battery.blocks),\n    $(\"bar-position\", options.bar.position),\n    $(\"hyprland-gaps-multiplier\", options.hyprland.gaps),\n]\n\nasync function resetCss() {\n    const vars = \"/tmp/ags/variables.scss\"\n    await Utils.writeFile(variables().join(\"\\n\"), vars)\n\n    const files = dirs.flatMap(dir => Utils.exec(`ls ${dir}`)\n        .split(/\\s+/)\n        .map(file => `@import '${dir}/${file}';`))\n\n    const scss = [`@import '${vars}';`, ...files].join(\"\\n\")\n    const css = await bash`echo \"${scss}\" | sass --stdin`\n    const file = \"/tmp/ags/style.css\"\n\n    await Utils.writeFile(css, file)\n    App.resetCss()\n    App.applyCss(file)\n}\n\nexport default function init() {\n    dirs.forEach(dir => Utils.monitorFile(dir, resetCss))\n    options.handler(deps, resetCss)\n    resetCss()\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/style/widget/applauncher.scss",
    "content": "@use \"sass:math\";\n@use \"sass:color\";\n\nwindow#applauncher .applauncher {\n    @include floating_widget;\n\n    .quicklaunch {\n        @include spacing;\n\n        button {\n            @include button($flat: true);\n            padding: $padding;\n        }\n    }\n\n    entry {\n        @include button;\n        padding: $padding;\n        margin: $spacing;\n\n        selection {\n            color: color.mix($fg, $bg, 50%);\n            background-color: transparent;\n        }\n\n        label,\n        image {\n            color: $fg;\n        }\n    }\n\n    separator {\n        margin: 4pt 0;\n        min-height: 1px;\n        background-color: $popover-border-color;\n    }\n\n    button.app-item {\n        @include button($flat: true, $reactive: false);\n\n        >box {\n            @include spacing(0.5);\n        }\n\n        transition: $transition;\n        padding: $padding;\n\n        label {\n            transition: $transition;\n\n            &.title {\n                color: $fg;\n            }\n\n            &.description {\n                color: transparentize($fg, 0.3);\n            }\n        }\n\n        image {\n            transition: $transition;\n        }\n\n        &:hover,\n        &:focus {\n            .title {\n                color: $primary-bg;\n            }\n\n            .description {\n\n                color: transparentize($primary-bg, .4);\n            }\n\n            image {\n                -gtk-icon-shadow: 2px 2px $primary-bg;\n            }\n        }\n\n        &:active {\n            background-color: transparentize($primary-bg, 0.5);\n            border-radius: $radius;\n            box-shadow: inset 0 0 0 $border-width $border-color;\n\n            .title {\n                color: $fg;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/style/widget/bar.scss",
    "content": "@use \"sass:color\";\n\n$bar-spacing: $spacing * 0.3;\n$button-radius: $radius;\n\n@mixin panel-button($flat: true, $reactive: true) {\n  @include accs-button($flat, $reactive);\n\n  > * {\n    border-radius: $button-radius;\n    margin: $bar-spacing;\n  }\n\n  label,\n  image {\n    font-weight: bold;\n  }\n\n  > * {\n    padding: $padding * 0.4 $padding * 0.8;\n  }\n}\n\n.bar {\n  background-color: $bg;\n\n  .panel-button {\n    @include panel-button;\n\n    &:not(.flat) {\n      @include accs-button($flat: false);\n    }\n  }\n\n  .launcher {\n    .colored {\n      color: transparentize($primary-bg, 0.2);\n    }\n\n    &:hover .colored {\n      color: $primary-bg;\n    }\n\n    &:active .colored,\n    &.active .colored {\n      color: $primary-fg;\n    }\n  }\n\n  .workspaces {\n    label {\n      font-size: 0;\n      min-width: 12pt;\n      min-height: 12pt;\n      border-radius: $radius * 2;\n      box-shadow: inset 0 0 0 $border-width $border-color;\n      margin: 0 $padding * 0.5;\n      transition: $transition * 0.5;\n      background-color: transparentize($fg, 0.8);\n\n      &.occupied {\n        background-color: transparentize($fg, 0.2);\n        min-width: 12pt;\n        min-height: 12pt;\n      }\n\n      &.active {\n        // background-color: $primary-bg;\n        background-image: $active-gradient;\n        min-width: 25pt;\n        min-height: 12pt;\n      }\n    }\n\n    &.active,\n    &:active {\n      label {\n        background-color: transparentize($primary-fg, 0.3);\n\n        &.occupied {\n          background-color: transparentize($primary-fg, 0.15);\n        }\n\n        &.active {\n          background-color: $primary-fg;\n        }\n      }\n    }\n  }\n\n  .media label {\n    margin: 0 ($spacing * 0.5);\n  }\n\n  .taskbar .indicator.active {\n    background-color: $primary-bg;\n    border-radius: $radius;\n    min-height: 4pt;\n    min-width: 6pt;\n    margin: 2pt;\n  }\n\n  .powermenu.colored,\n  .recorder {\n    image {\n      color: transparentize($error-bg, 0.3);\n    }\n\n    &:hover image {\n      color: transparentize($error-bg, 0.15);\n    }\n\n    &:active image {\n      color: $primary-fg;\n    }\n  }\n\n  .quicksettings > box > box {\n    @include spacing($spacing: if($bar-spacing==0, $padding / 2, $bar-spacing * 7));\n  }\n\n  .quicksettings:not(.active):not(:active) {\n    .bluetooth {\n      color: $primary-bg;\n\n      label {\n        font-size: $font-size * 0.7;\n        color: $fg;\n        text-shadow: $text-shadow;\n      }\n    }\n  }\n\n  .battery-bar {\n    > * {\n      padding: 0;\n    }\n\n    &.bar-hidden > box {\n      padding: 0 $spacing * 0.5;\n\n      image {\n        margin: 0;\n      }\n    }\n\n    levelbar * {\n      all: unset;\n      transition: $transition;\n    }\n\n    .whole {\n      @if $shadows {\n        image {\n          -gtk-icon-shadow: $text-shadow;\n        }\n\n        label {\n          text-shadow: $text-shadow;\n        }\n      }\n    }\n\n    .regular image {\n      margin-left: $spacing * 0.5;\n    }\n\n    trough {\n      @include widget;\n      min-height: 12pt;\n      min-width: 12pt;\n    }\n\n    .regular trough {\n      margin-right: $spacing * 0.5;\n    }\n\n    block {\n      margin: 0;\n\n      &:last-child {\n        border-radius: 0 $button-radius $button-radius 0;\n      }\n\n      &:first-child {\n        border-radius: $button-radius 0 0 $button-radius;\n      }\n    }\n\n    .vertical {\n      block {\n        &:last-child {\n          border-radius: 0 0 $button-radius $button-radius;\n        }\n\n        &:first-child {\n          border-radius: $button-radius $button-radius 0 0;\n        }\n      }\n    }\n\n    @for $i from 1 through $bar-battery-blocks {\n      block:nth-child(#{$i}).filled {\n        background-color: color.mix($bg, $primary-bg, $i * 3);\n      }\n\n      &.low block:nth-child(#{$i}).filled {\n        background-color: color.mix($bg, $error-bg, $i * 3);\n      }\n\n      &.charging block:nth-child(#{$i}).filled {\n        background-color: color.mix($bg, $charging-bg, $i * 3);\n      }\n\n      &:active .regular block:nth-child(#{$i}).filled {\n        background-color: color.mix($bg, $primary-fg, $i * 3);\n      }\n    }\n\n    &.low image {\n      color: $error-bg;\n    }\n\n    &.charging image {\n      color: $charging-bg;\n    }\n\n    &:active image {\n      color: $primary-fg;\n    }\n  }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/style/widget/datemenu.scss",
    "content": "@import \"./notifications.scss\";\n\n@mixin calendar {\n    @include widget;\n    padding: $padding*2 $padding*2 0;\n\n    calendar {\n        all: unset;\n\n        &.button {\n            @include button($flat: true);\n        }\n\n        &:selected {\n            box-shadow: inset 0 -8px 0 0 transparentize($primary-bg, 0.5),\n                inset 0 0 0 1px $primary-bg;\n            border-radius: $radius*0.6;\n        }\n\n        &.header {\n            background-color: transparent;\n            border: none;\n            color: transparentize($fg, 0.5);\n        }\n\n        &.highlight {\n            background-color: transparent;\n            color: transparentize($primary-bg, 0.5);\n        }\n\n        &:indeterminate {\n            color: transparentize($fg, 0.9);\n        }\n\n        font-size: 1.1em;\n        padding: .2em;\n    }\n}\n\nwindow#datemenu .datemenu {\n    @include floating-widget;\n\n    .notifications {\n        .header {\n            margin-bottom: $spacing;\n            margin-right: $spacing;\n\n            >label {\n                margin-left: $radius * .5;\n            }\n\n            button {\n                @include button;\n                padding: $padding*.7 $padding;\n            }\n        }\n\n        .notification-scrollable {\n            @include scrollable;\n        }\n\n        .notification-list {\n            margin-right: $spacing;\n        }\n\n        .notification {\n            @include notification;\n            @include widget;\n            padding: $padding;\n            margin-bottom: $spacing;\n        }\n\n        .placeholder {\n            image {\n                font-size: 7em;\n            }\n\n            label {\n                font-size: 1.2em;\n            }\n        }\n    }\n\n\n    separator {\n        background-color: $popover-border-color;\n        min-width: 2px;\n        border-radius: $radius;\n        margin-right: $spacing;\n    }\n\n    .datemenu {\n        @include spacing;\n    }\n\n    .clock-box {\n        padding: $padding;\n\n        .clock {\n            font-size: 5em;\n        }\n\n        .uptime {\n            color: transparentize($fg, 0.2);\n        }\n    }\n\n    .calendar {\n        @include calendar;\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/style/widget/extra.scss",
    "content": "* {\n    font-size: $font-size;\n    font-family: $font-name;\n}\n\nwindow.popup {\n    >* {\n        border: none;\n        box-shadow: none;\n    }\n\n    menu {\n        border-radius: $popover-radius;\n        background-color: $bg;\n        padding: $popover-padding;\n        border: $border-width solid $popover-border-color;\n\n        separator {\n            background-color: $border-color;\n        }\n\n        menuitem {\n            @include button;\n            padding: $spacing * .5;\n            margin: ($spacing * .5) 0;\n\n            &:first-child {\n                margin-top: 0;\n            }\n\n            &:last-child {\n                margin-bottom: 0;\n            }\n        }\n    }\n}\n\ntooltip {\n    * {\n        all: unset;\n    }\n\n    background-color: transparent;\n    border: none;\n\n    >*>* {\n        background-color: $bg;\n        border-radius: $radius;\n        border: $border-width solid $popover-border-color;\n        color: $fg;\n        padding: 8px;\n        margin: 4px;\n        box-shadow: 0 0 3px 0 $shadow-color;\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/style/widget/notifications.scss",
    "content": "@mixin notification() {\n    &.critical {\n        box-shadow: inset 0 0 .5em 0 $error-bg;\n    }\n\n    &:hover button.close-button {\n        @include button-hover;\n        background-color: transparentize($error-bg, .5);\n    }\n\n    .content {\n        .title {\n            margin-right: $spacing;\n            color: $fg;\n            font-size: 1.1em;\n        }\n\n        .time {\n            color: transparentize($fg, .2);\n        }\n\n        .description {\n            font-size: .9em;\n            color: transparentize($fg, .2);\n        }\n\n        .icon {\n            border-radius: $radius*0.8;\n            margin-right: $spacing;\n\n            &.img {\n                border: $border;\n            }\n        }\n    }\n\n    box.actions {\n        @include spacing(0.5);\n        margin-top: $spacing;\n\n        button {\n            @include button;\n            border-radius: $radius*0.8;\n            font-size: 1.2em;\n            padding: $padding * 0.7;\n        }\n    }\n\n    button.close-button {\n        @include button($flat: true);\n        margin-left: $spacing / 2;\n        border-radius: $radius*0.8;\n        min-width: 1.2em;\n        min-height: 1.2em;\n\n        &:hover {\n            background-color: transparentize($error-bg, .2);\n        }\n\n        &:active {\n            background-image: none;\n            background-color: $error-bg;\n        }\n    }\n}\n\nwindow.notifications {\n    @include unset;\n\n    .notification {\n        @include notification;\n        @include floating-widget;\n        border-radius: $radius;\n\n        .description {\n            min-width: 350px;\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/style/widget/osd.scss",
    "content": "window.indicator {\n  .progress {\n    @include floating-widget;\n    margin: max($spacing * 15, 8px);\n    padding: $padding * 0.5;\n    border-radius: if($radius >0, calc($radius + $padding * 0.5), 0);\n    @debug $radius;\n\n    .fill {\n      border-radius: $radius;\n      background-color: $primary-bg;\n      color: $primary-fg;\n\n      image {\n        -gtk-icon-transform: scale(0.7);\n      }\n    }\n  }\n\n  .microphone {\n    @include floating-widget;\n    margin: $spacing * 2;\n    padding: $popover-padding * 2;\n    font-size: 58px;\n    color: transparentize($fg, 0.1);\n  }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/style/widget/overview.scss",
    "content": "window#overview .overview {\n    @include floating-widget;\n    @include spacing;\n\n    .workspace {\n        &.active>widget {\n            border-color: $primary-bg\n        }\n\n        >widget {\n            @include widget;\n            border-radius: if($radius ==0, 0, $radius + $padding);\n\n            &:hover {\n                background-color: $hover-bg;\n            }\n\n            &:drop(active) {\n                border-color: $primary-bg;\n            }\n        }\n    }\n\n    .client {\n        @include button;\n        border-radius: $radius;\n        margin: $padding;\n\n        &.hidden {\n            @include hidden;\n            transition: 0;\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/style/widget/powermenu.scss",
    "content": "window#powermenu,\nwindow#verification {\n    // the fraction has to be more than hyprland ignorealpha\n    background-color: rgba(0, 0, 0, .4);\n}\n\nwindow#verification .verification {\n    @include floating-widget;\n    padding: $popover-padding * 1.5;\n    min-width: 300px;\n    min-height: 100px;\n\n    .text-box {\n        margin-bottom: $spacing;\n\n        .title {\n            font-size: 1.6em;\n        }\n\n        .desc {\n            color: transparentize($fg, 0.1);\n            font-size: 1.1em;\n        }\n    }\n\n    .buttons {\n        @include spacing;\n        margin-top: $padding;\n\n        button {\n            @include button;\n            font-size: 1.5em;\n            padding: $padding;\n        }\n    }\n}\n\nwindow#powermenu .powermenu {\n    @include floating-widget;\n\n    &.line {\n        padding: $popover-padding * 1.5;\n\n        button {\n            padding: $popover-padding;\n        }\n\n        label {\n            margin-bottom: $spacing * -.5;\n        }\n    }\n\n    &.box {\n        padding: $popover-padding * 2;\n\n        button {\n            padding: $popover-padding * 1.5;\n        }\n\n        label {\n            margin-bottom: $spacing * -1;\n        }\n    }\n\n    button {\n        @include unset;\n\n        image {\n            @include button;\n            border-radius: $radius + ($popover-padding * 1.4);\n            min-width: 1.7em;\n            min-height: 1.7em;\n            font-size: 4em;\n        }\n\n        label,\n        image {\n            color: transparentize($fg, 0.1);\n        }\n\n        label {\n            margin-top: $spacing * .3;\n        }\n\n        &:hover {\n            image {\n                @include button-hover;\n            }\n\n            label {\n                color: $fg;\n            }\n        }\n\n        &:focus image {\n            @include button-focus;\n        }\n\n        &:active image {\n            @include button-active;\n        }\n\n        &:focus,\n        &:active {\n            label {\n                color: $primary-bg;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/style/widget/quicksettings.scss",
    "content": "window#quicksettings .quicksettings {\n    @include floating-widget;\n    @include spacing;\n\n    padding: $popover-padding * 1.4;\n\n    .avatar {\n        @include widget;\n        border-radius: $radius * 3;\n    }\n\n    .header {\n        @include spacing(.5);\n        color: transparentize($fg, .15);\n\n        button {\n            @include button;\n            padding: $padding;\n\n            image {\n                font-size: 1.4em;\n            }\n        }\n    }\n\n    .sliders-box {\n        @include widget;\n        padding: $padding;\n\n        button {\n            @include button($flat: true);\n            padding: $padding * .5;\n        }\n\n        .volume button.arrow:last-child {\n            margin-left: $spacing * .4;\n        }\n\n        .volume,\n        .brightness {\n            padding: $padding * .5;\n        }\n\n        scale {\n            @include slider;\n            margin: 0 ($spacing * .5);\n        }\n    }\n\n    .row {\n        @include spacing;\n    }\n\n    .menu {\n        @include unset;\n        @include widget;\n        padding: $padding;\n        margin-top: $spacing;\n\n        .icon {\n            margin: 0 ($spacing * .5);\n            margin-left: $spacing * .2;\n        }\n\n        .title {\n            font-weight: bold;\n        }\n\n        separator {\n            margin: ($radius * .5);\n            background-color: $border-color;\n        }\n\n        button {\n            @include button($flat: true);\n            padding: ($padding * .5);\n\n            image:first-child {\n                margin-right: $spacing * .5;\n            }\n        }\n\n        .bluetooth-devices {\n            @include spacing(.5);\n        }\n\n        switch {\n            @include switch;\n        }\n    }\n\n    .sliders-box .menu {\n        margin: ($spacing * .5) 0;\n\n        &.app-mixer {\n            .mixer-item {\n                padding: $padding * .5;\n                padding-left: 0;\n                padding-right: $padding * 2;\n\n                scale {\n                    @include slider($width: .5em);\n                }\n\n                image {\n                    font-size: 1.2em;\n                    margin: 0 $padding;\n                }\n            }\n        }\n    }\n\n    .toggle-button {\n        @include button;\n        font-weight: bold;\n\n        image {\n            font-size: 1.3em;\n        }\n\n        label {\n            margin-left: $spacing * .3;\n        }\n\n        button {\n            @include button($flat: true);\n\n            &:first-child {\n                padding: $padding * 1.2;\n                border-top-right-radius: 0;\n                border-bottom-right-radius: 0;\n            }\n\n            &:last-child {\n                padding: $padding * .5;\n                border-top-left-radius: 0;\n                border-bottom-left-radius: 0;\n            }\n        }\n\n        &.active {\n            background-color: $primary-bg;\n\n            label,\n            image {\n                color: $primary-fg;\n            }\n        }\n    }\n\n    .simple-toggle {\n        @include button;\n        font-weight: bold;\n        padding: $padding * 1.2;\n\n        label {\n            margin-left: $spacing * .3;\n        }\n\n        image {\n            font-size: 1.3em;\n        }\n    }\n\n    .media {\n        @include spacing;\n\n        .player {\n            @include media;\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/style/widget/screencorner.scss",
    "content": "$_shadow-size: $padding;\n$_radius: $radius * $hyprland-gaps-multiplier;\n$_margin: 99px;\n\nwindow.screen-corner {\n    box.shadow {\n        margin-right: $_margin * -1;\n        margin-left: $_margin * -1;\n\n        @if $shadows {\n            box-shadow: inset 0 0 $_shadow-size 0 $shadow-color;\n        }\n\n        @if $bar-position ==\"top\" {\n            margin-bottom: $_margin * -1;\n        }\n\n        @if $bar-position ==\"bottom\" {\n            margin-top: $_margin * -1;\n        }\n    }\n\n    box.border {\n        @if $bar-position ==\"top\" {\n            border-top: $border-width solid $bg;\n        }\n\n        @if $bar-position ==\"bottom\" {\n            border-bottom: $border-width solid $bg;\n        }\n\n        margin-right: $_margin;\n        margin-left: $_margin;\n    }\n\n    box.corner {\n        box-shadow: 0 0 0 $border-width $border-color;\n    }\n\n    &.corners {\n        box.border {\n            border-radius: if($radius>0, $radius * $hyprland-gaps-multiplier, 0);\n            box-shadow: 0 0 0 $_radius $bg;\n        }\n\n        box.corner {\n            border-radius: if($radius>0, $radius * $hyprland-gaps-multiplier, 0);\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/style/widget/settingsdialog.scss",
    "content": "window.settings-dialog {\n    background-color: $bg;\n    color: $fg;\n\n    .header {\n        .pager {\n            @include spacing(.5);\n        }\n\n        padding: $padding;\n\n        button {\n            @include button;\n            font-weight: bold;\n            padding: $padding*.5 $padding;\n\n            box {\n                @include spacing($spacing: .3em);\n            }\n        }\n\n        button.close {\n            padding: $padding * .4;\n        }\n\n        button.reset {\n            @include button($flat: true);\n            padding: $padding*.5;\n        }\n    }\n\n    .page {\n        padding: $padding*2;\n        padding-top: 0;\n    }\n\n    .group {\n        .group-title {\n            color: $primary-bg;\n            margin-bottom: $spacing*.5;\n        }\n\n        &:not(:first-child) {\n            margin-top: $spacing;\n        }\n    }\n\n    .row {\n        background-color: $widget-bg;\n        padding: $padding;\n        border: $border;\n        border-top: none;\n\n        &:first-child {\n            border-radius: $radius $radius 0 0;\n            border: $border;\n        }\n\n        &:last-child {\n            border-radius: 0 0 $radius $radius;\n        }\n\n        label.id,\n        label.note {\n            color: transparentize($fg, .4)\n        }\n\n        entry,\n        button {\n            @include button;\n            padding: $padding;\n        }\n\n        switch {\n            @include switch;\n        }\n\n        spinbutton {\n            @include unset;\n\n            entry {\n                border-radius: $radius 0 0 $radius;\n            }\n\n            button {\n                border-radius: 0;\n            }\n\n            button:last-child {\n                border-radius: 0 $radius $radius 0;\n            }\n        }\n\n        .enum-setter {\n            label {\n                background-color: $widget-bg;\n                border: $border;\n                padding: 0 $padding;\n                border-radius: $radius 0 0 $radius;\n            }\n\n            button {\n                border-radius: 0;\n            }\n\n            button:last-child {\n                border-radius: 0 $radius $radius 0;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/tsconfig.json",
    "content": "{\n    \"compilerOptions\": {\n        \"target\": \"ES2022\",\n        \"module\": \"ES2022\",\n        \"lib\": [\n            \"ES2022\"\n        ],\n        \"allowJs\": true,\n        \"checkJs\": true,\n        \"strict\": true,\n        \"noImplicitAny\": false,\n        \"baseUrl\": \".\",\n        \"typeRoots\": [\n            \"./types\"\n        ],\n        \"skipLibCheck\": true\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/PopupWindow.ts",
    "content": "import { type WindowProps } from \"types/widgets/window\"\nimport { type RevealerProps } from \"types/widgets/revealer\"\nimport { type EventBoxProps } from \"types/widgets/eventbox\"\nimport type Gtk from \"gi://Gtk?version=3.0\"\nimport options from \"options\"\n\ntype Transition = RevealerProps[\"transition\"]\ntype Child = WindowProps[\"child\"]\n\ntype PopupWindowProps = WindowProps & {\n    name: string\n    layout?: keyof ReturnType<typeof Layout>\n    transition?: Transition,\n}\n\nexport const Padding = (name: string, {\n    css = \"\",\n    hexpand = true,\n    vexpand = true,\n}: EventBoxProps = {}) => Widget.EventBox({\n    hexpand,\n    vexpand,\n    can_focus: false,\n    child: Widget.Box({ css }),\n    setup: w => w.on(\"button-press-event\", () => App.toggleWindow(name)),\n})\n\nconst PopupRevealer = (\n    name: string,\n    child: Child,\n    transition: Transition = \"slide_down\",\n) => Widget.Box(\n    { css: \"padding: 1px;\" },\n    Widget.Revealer({\n        transition,\n        child: Widget.Box({\n            class_name: \"window-content\",\n            child,\n        }),\n        transitionDuration: options.transition.bind(),\n        setup: self => self.hook(App, (_, wname, visible) => {\n            if (wname === name)\n                self.reveal_child = visible\n        }),\n    }),\n)\n\nconst Layout = (name: string, child: Child, transition?: Transition) => ({\n    \"center\": () => Widget.CenterBox({},\n        Padding(name),\n        Widget.CenterBox(\n            { vertical: true },\n            Padding(name),\n            PopupRevealer(name, child, transition),\n            Padding(name),\n        ),\n        Padding(name),\n    ),\n    \"top\": () => Widget.CenterBox({},\n        Padding(name),\n        Widget.Box<Gtk.Widget>(\n            { vertical: true },\n            PopupRevealer(name, child, transition),\n            Padding(name),\n        ),\n        Padding(name),\n    ),\n    \"top-right\": () => Widget.Box<Gtk.Widget>({},\n        Padding(name),\n        Widget.Box<Gtk.Widget>(\n            {\n                hexpand: false,\n                vertical: true,\n            },\n            PopupRevealer(name, child, transition),\n            Padding(name),\n        ),\n    ),\n    \"top-center\": () => Widget.Box<Gtk.Widget>({},\n        Padding(name),\n        Widget.Box<Gtk.Widget>(\n            {\n                hexpand: false,\n                vertical: true,\n            },\n            PopupRevealer(name, child, transition),\n            Padding(name),\n        ),\n        Padding(name),\n    ),\n    \"top-left\": () => Widget.Box<Gtk.Widget>({},\n        Widget.Box<Gtk.Widget>(\n            {\n                hexpand: false,\n                vertical: true,\n            },\n            PopupRevealer(name, child, transition),\n            Padding(name),\n        ),\n        Padding(name),\n    ),\n    \"bottom-left\": () => Widget.Box<Gtk.Widget>({},\n        Widget.Box<Gtk.Widget>(\n            {\n                hexpand: false,\n                vertical: true,\n            },\n            Padding(name),\n            PopupRevealer(name, child, transition),\n        ),\n        Padding(name),\n    ),\n    \"bottom-center\": () => Widget.Box<Gtk.Widget>({},\n        Padding(name),\n        Widget.Box<Gtk.Widget>(\n            {\n                hexpand: false,\n                vertical: true,\n            },\n            Padding(name),\n            PopupRevealer(name, child, transition),\n        ),\n        Padding(name),\n    ),\n    \"bottom-right\": () => Widget.Box<Gtk.Widget>({},\n        Padding(name),\n        Widget.Box<Gtk.Widget>(\n            {\n                hexpand: false,\n                vertical: true,\n            },\n            Padding(name),\n            PopupRevealer(name, child, transition),\n        ),\n    ),\n})\n\nexport default ({\n    name,\n    child,\n    layout = \"center\",\n    transition,\n    exclusivity = \"ignore\",\n    ...props\n}: PopupWindowProps) => Widget.Window({\n    name,\n    class_names: [name, \"popup-window\"],\n    popup: true,\n    visible: false,\n    keymode: \"on-demand\",\n    exclusivity,\n    layer: \"top\",\n    anchor: [\"top\", \"bottom\", \"right\", \"left\"],\n    child: Layout(name, child, transition)[layout](),\n    ...props,\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/applauncher/AppItem.ts",
    "content": "import { type Application } from \"types/service/applications\"\nimport options from \"options\"\nimport { launchApp, icon } from \"lib/utils\"\nimport icons from \"lib/icons\"\n\nconst { iconSize } = options.applauncher\n\nexport const QuickButton = (app: Application) => Widget.Button({\n    hexpand: true,\n    on_clicked: () => {\n        App.closeWindow(\"applauncher\")\n        launchApp(app)\n    },\n    child: Widget.Icon({\n        size: iconSize.bind(),\n        icon: icon(app.icon_name, icons.fallback.executable),\n    }),\n})\n\nexport const AppItem = (app: Application) => {\n    const title = Widget.Label({\n        class_name: \"title\",\n        label: app.name,\n        hexpand: true,\n        xalign: 0,\n        vpack: \"center\",\n        truncate: \"end\",\n    })\n\n    const description = Widget.Label({\n        class_name: \"description\",\n        label: app.description || \"\",\n        hexpand: true,\n        wrap: true,\n        max_width_chars: 30,\n        xalign: 0,\n        justification: \"left\",\n        vpack: \"center\",\n    })\n\n    const appicon = Widget.Icon({\n        icon: icon(app.icon_name, icons.fallback.executable),\n        size: iconSize.bind(),\n    })\n\n    const textBox = Widget.Box({\n        vertical: true,\n        vpack: \"center\",\n        children: app.description ? [title, description] : [title],\n    })\n\n    return Widget.Button({\n        class_name: \"app-item\",\n        attribute: { app },\n        child: Widget.Box({\n            children: [appicon, textBox],\n        }),\n        on_clicked: () => {\n            App.closeWindow(\"applauncher\")\n            launchApp(app)\n        },\n    })\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/applauncher/Applauncher.ts",
    "content": "import PopupWindow, { Padding } from \"widget/PopupWindow\"\nimport { AppItem, QuickButton } from \"./AppItem\"\nimport icons from \"lib/icons\"\nimport options from \"options\"\nimport type Gtk from \"gi://Gtk?version=3.0\"\n\nconst apps = await Service.import(\"applications\")\nconst { query } = apps\nconst { width, margin, maxItem, favorites } = options.applauncher\n\nconst SeparatedAppItem = (app: Parameters<typeof AppItem>[0]) => Widget.Revealer(\n    { attribute: { app } },\n    Widget.Box<Gtk.Widget>(\n        { vertical: true },\n        Widget.Separator(),\n        AppItem(app),\n    ),\n)\n\nconst Applauncher = () => {\n    const applist = Variable(query(\"\"))\n    let first = applist.value[0]\n\n    const list = Widget.Box({\n        vertical: true,\n        children: applist.bind().as(list => list.map(SeparatedAppItem)),\n    })\n\n    list.hook(apps, () => applist.value = query(\"\"), \"notify::frequents\")\n\n    const entry = Widget.Entry({\n        hexpand: true,\n        primary_icon_name: icons.ui.search,\n        on_accept: () => {\n            entry.text !== \"\" && first?.launch()\n            App.toggleWindow(\"applauncher\")\n        },\n        on_change: ({ text }) => {\n            first = query(text || \"\")[0]\n            list.children.reduce((i, item) => {\n                if (!text || i >= maxItem.value) {\n                    item.reveal_child = false\n                    return i\n                }\n                if (item.attribute.app.match(text)) {\n                    item.reveal_child = true\n                    return ++i\n                }\n                item.reveal_child = false\n                return i\n            }, 0)\n        },\n    })\n\n    const quicklaunch = Widget.Revealer({\n        setup: self => self.hook(entry, () => self.reveal_child = !entry.text, \"notify::text\"),\n        visible: favorites.bind().as(f => f.length > 0),\n        child: Widget.Box({\n            vertical: true,\n            children: [\n                Widget.Separator(),\n                Widget.Box({\n                    class_name: \"quicklaunch horizontal\",\n                    children: favorites.bind().as(f => f\n                        .map(f => query(f)?.[0])\n                        .filter(f => f)\n                        .map(QuickButton),\n                    ),\n                }),\n            ],\n        }),\n    })\n\n    function focus() {\n        entry.text = \"Search\"\n        entry.set_position(-1)\n        entry.select_region(0, -1)\n        entry.grab_focus()\n        quicklaunch.reveal_child = true\n    }\n\n    const layout = Widget.Box({\n        css: width.bind().as(v => `min-width: ${v}pt;`),\n        class_name: \"applauncher\",\n        vertical: true,\n        vpack: \"start\",\n        setup: self => self.hook(App, (_, win, visible) => {\n            if (win !== \"applauncher\")\n                return\n\n            entry.text = \"\"\n            if (visible)\n                focus()\n        }),\n        children: [\n            entry,\n            quicklaunch,\n            list,\n        ],\n    })\n\n    return Widget.Box<Gtk.Widget>(\n        { vertical: true, css: \"padding: 1px\" },\n        Padding(\"applauncher\", {\n            css: margin.bind().as(v => `min-height: ${v}pt;`),\n            vexpand: false,\n        }),\n        layout,\n    )\n}\n\nexport default () => PopupWindow({\n    name: \"applauncher\",\n    layout: \"top\",\n    child: Applauncher(),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/bar/Bar.ts",
    "content": "import BatteryBar from \"./buttons/BatteryBar\";\nimport ColorPicker from \"./buttons/ColorPicker\";\nimport Date from \"./buttons/Date\";\nimport Launcher from \"./buttons/Launcher\";\nimport Media from \"./buttons/Media\";\nimport PowerMenu from \"./buttons/PowerMenu\";\nimport SysTray from \"./buttons/SysTray\";\nimport SystemIndicators from \"./buttons/SystemIndicators\";\nimport Taskbar from \"./buttons/Taskbar\";\nimport Workspaces from \"./buttons/Workspaces\";\nimport ScreenRecord from \"./buttons/ScreenRecord\";\nimport Messages from \"./buttons/Messages\";\nimport options from \"options\";\n\nconst { start, center, end } = options.bar.layout;\nconst pos = options.bar.position.bind();\n\nexport type BarWidget = keyof typeof widget;\n\nconst widget = {\n  battery: BatteryBar,\n  colorpicker: ColorPicker,\n  date: Date,\n  launcher: Launcher,\n  media: Media,\n  powermenu: PowerMenu,\n  systray: SysTray,\n  system: SystemIndicators,\n  taskbar: Taskbar,\n  workspaces: Workspaces,\n  screenrecord: ScreenRecord,\n  messages: Messages,\n  expander: () => Widget.Box({ expand: true }),\n};\n\nexport default (monitor: number) =>\n  Widget.Window({\n    monitor,\n    class_name: \"bar\",\n    name: `bar${monitor}`,\n    exclusivity: \"exclusive\",\n    anchor: pos.as((pos) => [pos, \"right\", \"left\"]),\n    child: Widget.CenterBox({\n      css: \"min-width: 2px; min-height: 2px;\",\n      startWidget: Widget.Box({\n        hexpand: false,\n        children: start.bind().as((s) => s.map((w) => widget[w]())),\n      }),\n      centerWidget: Widget.Box({\n        hpack: \"center\",\n        children: center.bind().as((c) => c.map((w) => widget[w]())),\n      }),\n      endWidget: Widget.Box({\n        hexpand: true,\n        children: end.bind().as((e) => e.map((w) => widget[w]())),\n      }),\n    }),\n  });\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/bar/PanelButton.ts",
    "content": "import options from \"options\"\nimport { ButtonProps } from \"types/widgets/button\"\n\ntype PanelButtonProps = ButtonProps & {\n    window?: string,\n    flat?: boolean\n}\n\nexport default ({\n    window = \"\",\n    flat,\n    child,\n    setup,\n    ...rest\n}: PanelButtonProps) => Widget.Button({\n    child: Widget.Box({ child }),\n    setup: self => {\n        let open = false\n\n        self.toggleClassName(\"panel-button\")\n        self.toggleClassName(window)\n\n        self.hook(options.bar.flatButtons, () => {\n            self.toggleClassName(\"flat\", flat ?? options.bar.flatButtons.value)\n        })\n\n        self.hook(App, (_, win, visible) => {\n            if (win !== window)\n                return\n\n            if (open && !visible) {\n                open = false\n                self.toggleClassName(\"active\", false)\n            }\n\n            if (visible) {\n                open = true\n                self.toggleClassName(\"active\")\n            }\n        })\n\n        if (setup)\n            setup(self)\n    },\n    ...rest,\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/bar/ScreenCorners.ts",
    "content": "import options from \"options\"\n\nconst { corners } = options.bar\n\nexport default (monitor: number) => Widget.Window({\n    monitor,\n    name: `corner${monitor}`,\n    class_name: \"screen-corner\",\n    anchor: [\"top\", \"bottom\", \"right\", \"left\"],\n    click_through: true,\n    child: Widget.Box({\n        class_name: \"shadow\",\n        child: Widget.Box({\n            class_name: \"border\",\n            expand: true,\n            child: Widget.Box({\n                class_name: \"corner\",\n                expand: true,\n            }),\n        }),\n    }),\n    setup: self => self.hook(corners, () => {\n        self.toggleClassName(\"corners\", corners.value)\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/bar/buttons/BatteryBar.ts",
    "content": "import icons from \"lib/icons\"\nimport options from \"options\"\nimport PanelButton from \"../PanelButton\"\n\nconst battery = await Service.import(\"battery\")\nconst { bar, percentage, blocks, width, low } = options.bar.battery\n\nconst Indicator = () => Widget.Icon({\n    setup: self => self.hook(battery, () => {\n        self.icon = battery.charging || battery.charged\n            ? icons.battery.charging\n            : battery.icon_name\n    }),\n})\n\nconst PercentLabel = () => Widget.Revealer({\n    transition: \"slide_right\",\n    click_through: true,\n    reveal_child: percentage.bind(),\n    child: Widget.Label({\n        label: battery.bind(\"percent\").as(p => `${p}%`),\n    }),\n})\n\nconst LevelBar = () => {\n    const level = Widget.LevelBar({\n        mode: 1,\n        max_value: blocks.bind(),\n        visible: bar.bind().as(b => b !== \"hidden\"),\n        value: battery.bind(\"percent\").as(p => (p / 100) * blocks.value),\n    })\n    const update = () => {\n        level.value = (battery.percent / 100) * blocks.value\n        level.css = `block { min-width: ${width.value / blocks.value}pt; }`\n    }\n    return level\n        .hook(width, update)\n        .hook(blocks, update)\n        .hook(bar, () => {\n            level.vpack = bar.value === \"whole\" ? \"fill\" : \"center\"\n            level.hpack = bar.value === \"whole\" ? \"fill\" : \"center\"\n        })\n}\n\nconst WholeButton = () => Widget.Overlay({\n    vexpand: true,\n    child: LevelBar(),\n    class_name: \"whole\",\n    pass_through: true,\n    overlay: Widget.Box({\n        hpack: \"center\",\n        children: [\n            Widget.Icon({\n                icon: icons.battery.charging,\n                visible: Utils.merge([\n                    battery.bind(\"charging\"),\n                    battery.bind(\"charged\"),\n                ], (ing, ed) => ing || ed),\n            }),\n            Widget.Box({\n                hpack: \"center\",\n                vpack: \"center\",\n                child: PercentLabel(),\n            }),\n        ],\n    }),\n})\n\nconst Regular = () => Widget.Box({\n    class_name: \"regular\",\n    children: [\n        Indicator(),\n        PercentLabel(),\n        LevelBar(),\n    ],\n})\n\nexport default () => PanelButton({\n    class_name: \"battery-bar\",\n    hexpand: false,\n    on_clicked: () => { percentage.value = !percentage.value },\n    child: Widget.Box({\n        expand: true,\n        visible: battery.bind(\"available\"),\n        child: bar.bind().as(b => b === \"whole\" ? WholeButton() : Regular()),\n    }),\n    setup: self => self\n        .hook(bar, w => w.toggleClassName(\"bar-hidden\", bar.value === \"hidden\"))\n        .hook(battery, w => {\n            w.toggleClassName(\"charging\", battery.charging || battery.charged)\n            w.toggleClassName(\"low\", battery.percent < low.value)\n        }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/bar/buttons/ColorPicker.ts",
    "content": "import PanelButton from \"../PanelButton\"\nimport colorpicker from \"service/colorpicker\"\nimport Gdk from \"gi://Gdk\"\n\nconst css = (color: string) => `\n* {\n    background-color: ${color};\n    color: transparent;\n}\n*:hover {\n    color: white;\n    text-shadow: 2px 2px 3px rgba(0,0,0,.8);\n}`\n\nexport default () => {\n    const menu = Widget.Menu({\n        class_name: \"colorpicker\",\n        children: colorpicker.bind(\"colors\").as(c => c.map(color => Widget.MenuItem({\n            child: Widget.Label(color),\n            css: css(color),\n            on_activate: () => colorpicker.wlCopy(color),\n        }))),\n    })\n\n    return PanelButton({\n        class_name: \"color-picker\",\n        child: Widget.Icon(\"color-select-symbolic\"),\n        tooltip_text: colorpicker.bind(\"colors\").as(v => `${v.length} colors`),\n        on_clicked: colorpicker.pick,\n        on_secondary_click: self => {\n            if (colorpicker.colors.length === 0)\n                return\n\n            menu.popup_at_widget(self, Gdk.Gravity.SOUTH, Gdk.Gravity.NORTH, null)\n        },\n    })\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/bar/buttons/Date.ts",
    "content": "import { clock } from \"lib/variables\"\nimport PanelButton from \"../PanelButton\"\nimport options from \"options\"\n\nconst { format, action } = options.bar.date\nconst time = Utils.derive([clock, format], (c, f) => c.format(f) || \"\")\n\nexport default () => PanelButton({\n    window: \"dashboard\",\n    on_clicked: action.bind(),\n    child: Widget.Label({ label: time.bind() }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/bar/buttons/Launcher.ts",
    "content": "import PanelButton from \"../PanelButton\"\nimport options from \"options\"\n\nconst { icon, label, action } = options.bar.launcher\n\nexport default () => PanelButton({\n    window: \"launcher\",\n    on_clicked: action.bind(),\n    child: Widget.Box([\n        Widget.Icon({\n            class_name: icon.colored.bind().as(c => c ? \"colored\" : \"\"),\n            visible: icon.icon.bind().as(v => !!v),\n            icon: icon.icon.bind(),\n        }),\n        Widget.Label({\n            class_name: label.colored.bind().as(c => c ? \"colored\" : \"\"),\n            visible: label.label.bind().as(v => !!v),\n            label: label.label.bind(),\n        }),\n    ]),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/bar/buttons/Media.ts",
    "content": "import { type MprisPlayer } from \"types/service/mpris\"\nimport PanelButton from \"../PanelButton\"\nimport options from \"options\"\nimport icons from \"lib/icons\"\nimport { icon } from \"lib/utils\"\n\nconst mpris = await Service.import(\"mpris\")\nconst { length, direction, preferred, monochrome } = options.bar.media\n\nconst getPlayer = (name = preferred.value) =>\n    mpris.getPlayer(name) || mpris.players[0] || null\n\nconst Content = (player: MprisPlayer) => {\n    const revealer = Widget.Revealer({\n        click_through: true,\n        visible: length.bind().as(l => l > 0),\n        transition: direction.bind().as(d => `slide_${d}` as const),\n        setup: self => {\n            let current = \"\"\n            self.hook(player, () => {\n                if (current === player.track_title)\n                    return\n\n                current = player.track_title\n                self.reveal_child = true\n                Utils.timeout(3000, () => {\n                    !self.is_destroyed && (self.reveal_child = false)\n                })\n            })\n        },\n        child: Widget.Label({\n            truncate: \"end\",\n            max_width_chars: length.bind(),\n            label: player.bind(\"track_title\").as(() =>\n                `${player.track_artists.join(\", \")} - ${player.track_title}`),\n        }),\n    })\n\n    const playericon = Widget.Icon({\n        icon: player.bind(\"entry\").as(entry => {\n            const name = `${entry}${monochrome.value ? \"-symbolic\" : \"\"}`\n            return icon(name, icons.fallback.audio)\n        }),\n    })\n\n    return Widget.Box({\n        attribute: { revealer },\n        children: direction.bind().as(d => d === \"right\"\n            ? [playericon, revealer] : [revealer, playericon]),\n    })\n}\n\nexport default () => {\n    let player = getPlayer()\n\n    const btn = PanelButton({\n        class_name: \"media\",\n        child: Widget.Icon(icons.fallback.audio),\n    })\n\n    const update = () => {\n        player = getPlayer()\n        btn.visible = !!player\n\n        if (!player)\n            return\n\n        const content = Content(player)\n        const { revealer } = content.attribute\n        btn.child = content\n        btn.on_primary_click = () => { player.playPause() }\n        btn.on_secondary_click = () => { player.playPause() }\n        btn.on_scroll_up = () => { player.next() }\n        btn.on_scroll_down = () => { player.previous() }\n        btn.on_hover = () => { revealer.reveal_child = true }\n        btn.on_hover_lost = () => { revealer.reveal_child = false }\n    }\n\n    return btn\n        .hook(preferred, update)\n        .hook(mpris, update, \"notify::players\")\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/bar/buttons/Messages.ts",
    "content": "import icons from \"lib/icons\"\nimport PanelButton from \"../PanelButton\"\nimport options from \"options\"\n\nconst n = await Service.import(\"notifications\")\nconst notifs = n.bind(\"notifications\")\nconst action = options.bar.messages.action.bind()\n\nexport default () => PanelButton({\n    class_name: \"messages\",\n    on_clicked: action,\n    visible: notifs.as(n => n.length > 0),\n    child: Widget.Box([\n        Widget.Icon(icons.notifications.message),\n    ]),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/bar/buttons/PowerMenu.ts",
    "content": "import icons from \"lib/icons\"\nimport PanelButton from \"../PanelButton\"\nimport options from \"options\"\n\nconst { monochrome, action } = options.bar.powermenu\n\nexport default () => PanelButton({\n    window: \"powermenu\",\n    on_clicked: action.bind(),\n    child: Widget.Icon(icons.powermenu.shutdown),\n    setup: self => self.hook(monochrome, () => {\n        self.toggleClassName(\"colored\", !monochrome.value)\n        self.toggleClassName(\"box\")\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/bar/buttons/ScreenRecord.ts",
    "content": "import PanelButton from \"../PanelButton\"\nimport screenrecord from \"service/screenrecord\"\nimport icons from \"lib/icons\"\n\nexport default () => PanelButton({\n    class_name: \"recorder\",\n    on_clicked: () => screenrecord.stop(),\n    visible: screenrecord.bind(\"recording\"),\n    child: Widget.Box({\n        children: [\n            Widget.Icon(icons.recorder.recording),\n            Widget.Label({\n                label: screenrecord.bind(\"timer\").as(time => {\n                    const sec = time % 60\n                    const min = Math.floor(time / 60)\n                    return `${min}:${sec < 10 ? \"0\" + sec : sec}`\n                }),\n            }),\n        ],\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/bar/buttons/SysTray.ts",
    "content": "import { type TrayItem } from \"types/service/systemtray\"\nimport PanelButton from \"../PanelButton\"\nimport Gdk from \"gi://Gdk\"\nimport options from \"options\"\n\nconst systemtray = await Service.import(\"systemtray\")\nconst { ignore } = options.bar.systray\n\nconst SysTrayItem = (item: TrayItem) => PanelButton({\n    class_name: \"tray-item\",\n    child: Widget.Icon({ icon: item.bind(\"icon\") }),\n    tooltip_markup: item.bind(\"tooltip_markup\"),\n    setup: self => {\n        const menu = item.menu\n        if (!menu)\n            return\n\n        const id = item.menu?.connect(\"popped-up\", () => {\n            self.toggleClassName(\"active\")\n            menu.connect(\"notify::visible\", () => {\n                self.toggleClassName(\"active\", menu.visible)\n            })\n            menu.disconnect(id!)\n        })\n\n        if (id)\n            self.connect(\"destroy\", () => item.menu?.disconnect(id))\n    },\n\n    on_primary_click: btn => item.menu?.popup_at_widget(\n        btn, Gdk.Gravity.SOUTH, Gdk.Gravity.NORTH, null),\n\n    on_secondary_click: btn => item.menu?.popup_at_widget(\n        btn, Gdk.Gravity.SOUTH, Gdk.Gravity.NORTH, null),\n})\n\nexport default () => Widget.Box()\n    .bind(\"children\", systemtray, \"items\", i => i\n        .filter(({ id }) => !ignore.value.includes(id))\n        .map(SysTrayItem))\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/bar/buttons/SystemIndicators.ts",
    "content": "import PanelButton from \"../PanelButton\"\nimport icons from \"lib/icons\"\nimport asusctl from \"service/asusctl\"\n\nconst notifications = await Service.import(\"notifications\")\nconst bluetooth = await Service.import(\"bluetooth\")\nconst audio = await Service.import(\"audio\")\nconst network = await Service.import(\"network\")\n\nconst ProfileIndicator = () => Widget.Icon()\n    .bind(\"visible\", asusctl, \"profile\", p => p !== \"Balanced\")\n    .bind(\"icon\", asusctl, \"profile\", p => icons.asusctl.profile[p])\n\nconst ModeIndicator = () => Widget.Icon()\n    .bind(\"visible\", asusctl, \"mode\", m => m !== \"Hybrid\")\n    .bind(\"icon\", asusctl, \"mode\", m => icons.asusctl.mode[m])\n\nconst MicrophoneIndicator = () => Widget.Icon()\n    .hook(audio, self => self.visible =\n        audio.recorders.length > 0\n        || audio.microphone.stream?.is_muted\n        || audio.microphone.is_muted)\n    .hook(audio.microphone, self => {\n        const vol = audio.microphone.stream!.is_muted ? 0 : audio.microphone.volume\n        const { muted, low, medium, high } = icons.audio.mic\n        const cons = [[67, high], [34, medium], [1, low], [0, muted]] as const\n        self.icon = cons.find(([n]) => n <= vol * 100)?.[1] || \"\"\n    })\n\nconst DNDIndicator = () => Widget.Icon({\n    visible: notifications.bind(\"dnd\"),\n    icon: icons.notifications.silent,\n})\n\nconst BluetoothIndicator = () => Widget.Overlay({\n    class_name: \"bluetooth\",\n    passThrough: true,\n    child: Widget.Icon({\n        icon: icons.bluetooth.enabled,\n        visible: bluetooth.bind(\"enabled\"),\n    }),\n    overlay: Widget.Label({\n        hpack: \"end\",\n        vpack: \"start\",\n        label: bluetooth.bind(\"connected_devices\").as(c => `${c.length}`),\n        visible: bluetooth.bind(\"connected_devices\").as(c => c.length > 0),\n    }),\n})\n\nconst NetworkIndicator = () => Widget.Icon().hook(network, self => {\n    const icon = network[network.primary || \"wifi\"]?.icon_name\n    self.icon = icon || \"\"\n    self.visible = !!icon\n})\n\nconst AudioIndicator = () => Widget.Icon({\n    icon: audio.speaker.bind(\"volume\").as(vol => {\n        const { muted, low, medium, high, overamplified } = icons.audio.volume\n        const cons = [[101, overamplified], [67, high], [34, medium], [1, low], [0, muted]] as const\n        const icon = cons.find(([n]) => n <= vol * 100)?.[1] || \"\"\n        return audio.speaker.is_muted ? muted : icon\n    }),\n})\n\nexport default () => PanelButton({\n    class_name: \"quicksettings panel-button\",\n    on_clicked: () => App.toggleWindow(\"quicksettings\"),\n    on_scroll_up: () => audio.speaker.volume += 0.02,\n    on_scroll_down: () => audio.speaker.volume -= 0.02,\n    child: Widget.Box([\n        // @ts-expect-error\n        asusctl?.available && ProfileIndicator(),\n        // @ts-expect-error\n        asusctl?.available && ModeIndicator(),\n        DNDIndicator(),\n        BluetoothIndicator(),\n        NetworkIndicator(),\n        AudioIndicator(),\n        MicrophoneIndicator(),\n    ]),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/bar/buttons/Taskbar.ts",
    "content": "import { launchApp, icon } from \"lib/utils\"\nimport icons from \"lib/icons\"\nimport options from \"options\"\nimport PanelButton from \"../PanelButton\"\n\nconst hyprland = await Service.import(\"hyprland\")\nconst apps = await Service.import(\"applications\")\nconst { monochrome, exclusive } = options.bar.taskbar\nconst { position } = options.bar\n\nconst focus = (address: string) => hyprland.messageAsync(\n    `dispatch focuswindow address:${address}`)\n\nconst DummyItem = (address: string) => Widget.Box({\n    attribute: { address },\n    visible: false,\n})\n\nconst AppItem = (address: string) => {\n    const client = hyprland.getClient(address)\n    if (!client || client.class === \"\")\n        return DummyItem(address)\n\n    const app = apps.list.find(app => app.match(client.class))\n\n    const btn = PanelButton({\n        class_name: \"panel-button\",\n        tooltip_text: client.title,\n        on_primary_click: () => focus(address),\n        on_middle_click: () => app && launchApp(app),\n        setup: w => w.hook(hyprland, () => {\n            const { workspace } = hyprland.getClient(address)!\n            w.visible = exclusive.value\n                ? hyprland.active.workspace.id === workspace.id\n                : true\n        }),\n        child: Widget.Icon({\n            icon: monochrome.bind().as(m => {\n                return icon(\n                    (app?.icon_name || client.class) + (m ? \"-symbolic\" : \"\"),\n                    icons.fallback.executable,\n                )\n            }),\n        }),\n    })\n\n    return Widget.Box(\n        { attribute: { address } },\n        Widget.Overlay({\n            child: btn,\n            pass_through: true,\n            overlay: Widget.Box({\n                className: \"indicator\",\n                hpack: \"center\",\n                vpack: position.bind().as(p => p === \"top\" ? \"start\" : \"end\"),\n                setup: w => w.hook(hyprland, () => {\n                    w.toggleClassName(\"active\", hyprland.active.client.address === address)\n                }, \"event\"),\n            }),\n        }),\n    )\n}\n\nfunction sortItems<T extends { attribute: { address: string } }>(arr: T[]) {\n    return arr.sort(({ attribute: a }, { attribute: b }) => {\n        const aclient = hyprland.getClient(a.address)!\n        const bclient = hyprland.getClient(b.address)!\n        return aclient.workspace.id - bclient.workspace.id\n    })\n}\n\nexport default () => Widget.Box({\n    class_name: \"taskbar\",\n    children: sortItems(hyprland.clients.map(c => AppItem(c.address))),\n    setup: w => w\n        .hook(hyprland, (w, address?: string) => {\n            if (typeof address === \"string\")\n                w.children = w.children.filter(ch => ch.attribute.address !== address)\n        }, \"client-removed\")\n        .hook(hyprland, (w, address?: string) => {\n            if (typeof address === \"string\")\n                w.children = sortItems([...w.children, AppItem(address)])\n        }, \"client-added\")\n        .hook(hyprland, (w, event?: string) => {\n            if (event === \"movewindow\")\n                w.children = sortItems(w.children)\n        }, \"event\"),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/bar/buttons/Workspaces.ts",
    "content": "import PanelButton from \"../PanelButton\"\nimport options from \"options\"\nimport { sh, range } from \"lib/utils\"\n\nconst hyprland = await Service.import(\"hyprland\")\nconst { workspaces } = options.bar.workspaces\n\nconst dispatch = (arg: string | number) => {\n    sh(`hyprctl dispatch workspace ${arg}`)\n}\n\nconst Workspaces = (ws: number) => Widget.Box({\n    children: range(ws || 20).map(i => Widget.Label({\n        attribute: i,\n        vpack: \"center\",\n        label: `${i}`,\n        setup: self => self.hook(hyprland, () => {\n            self.toggleClassName(\"active\", hyprland.active.workspace.id === i)\n            self.toggleClassName(\"occupied\", (hyprland.getWorkspace(i)?.windows || 0) > 0)\n        }),\n    })),\n    setup: box => {\n        if (ws === 0) {\n            box.hook(hyprland.active.workspace, () => box.children.map(btn => {\n                btn.visible = hyprland.workspaces.some(ws => ws.id === btn.attribute)\n            }))\n        }\n    },\n})\n\nexport default () => PanelButton({\n    window: \"overview\",\n    class_name: \"workspaces\",\n    on_scroll_up: () => dispatch(\"m+1\"),\n    on_scroll_down: () => dispatch(\"m-1\"),\n    on_clicked: () => App.toggleWindow(\"overview\"),\n    child: workspaces.bind().as(Workspaces),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/datemenu/DateColumn.ts",
    "content": "import { clock, uptime } from \"lib/variables\"\n\nfunction up(up: number) {\n    const h = Math.floor(up / 60)\n    const m = Math.floor(up % 60)\n    return `uptime: ${h}:${m < 10 ? \"0\" + m : m}`\n}\n\nexport default () => Widget.Box({\n    vertical: true,\n    class_name: \"date-column vertical\",\n    children: [\n        Widget.Box({\n            class_name: \"clock-box\",\n            vertical: true,\n            children: [\n                Widget.Label({\n                    class_name: \"clock\",\n                    label: clock.bind().as(t => t.format(\"%H:%M\")!),\n                }),\n                Widget.Label({\n                    class_name: \"uptime\",\n                    label: uptime.bind().as(up),\n                }),\n            ],\n        }),\n        Widget.Box({\n            class_name: \"calendar\",\n            children: [\n                Widget.Calendar({\n                    hexpand: true,\n                    hpack: \"center\",\n                }),\n            ],\n        }),\n    ],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/datemenu/DateMenu.ts",
    "content": "import PopupWindow from \"widget/PopupWindow\"\nimport NotificationColumn from \"./NotificationColumn\"\nimport DateColumn from \"./DateColumn\"\nimport options from \"options\"\n\nconst { bar, datemenu } = options\nconst pos = bar.position.bind()\nconst layout = Utils.derive([bar.position, datemenu.position], (bar, qs) =>\n    `${bar}-${qs}` as const,\n)\n\nconst Settings = () => Widget.Box({\n    class_name: \"datemenu horizontal\",\n    vexpand: false,\n    children: [\n        NotificationColumn(),\n        Widget.Separator({ orientation: 1 }),\n        DateColumn(),\n    ],\n})\n\nconst DateMenu = () => PopupWindow({\n    name: \"datemenu\",\n    exclusivity: \"exclusive\",\n    transition: pos.as(pos => pos === \"top\" ? \"crossfade\" : \"crossfade\"),\n    layout: layout.value,\n    child: Settings(),\n})\n\nexport function setupDateMenu() {\n    App.addWindow(DateMenu())\n    layout.connect(\"changed\", () => {\n        App.removeWindow(\"datemenu\")\n        App.addWindow(DateMenu())\n    })\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/datemenu/NotificationColumn.ts",
    "content": "import Notification from \"widget/notifications/Notification\"\nimport options from \"options\"\nimport icons from \"lib/icons\"\n\nconst notifications = await Service.import(\"notifications\")\nconst notifs = notifications.bind(\"notifications\")\n\nconst ClearButton = () => Widget.Button({\n    on_clicked: () => {\n        const n = notifications.notifications\n        const t = options.transition.value / 2\n        for (let i = 0; i < n.length; i++)\n            Utils.timeout(t * i, () => n[i]?.close())\n    },\n    sensitive: notifs.as(n => n.length > 0),\n    child: Widget.Box({\n        children: [\n            Widget.Label(\"Clear \"),\n            Widget.Icon({\n                icon: notifs.as(n => icons.trash[n.length > 0 ? \"full\" : \"empty\"]),\n            }),\n        ],\n    }),\n})\n\nconst Header = () => Widget.Box({\n    class_name: \"header\",\n    children: [\n        Widget.Label({ label: \"Notifications\", hexpand: true, xalign: 0 }),\n        ClearButton(),\n    ],\n})\n\nconst NotificationList = () => {\n    const map: Map<number, ReturnType<typeof Widget.Box>> = new Map\n    const box = Widget.Box({\n        vertical: true,\n        children: notifications.notifications.map(Notification),\n        visible: notifs.as(n => n.length > 0),\n    })\n\n    function remove(_: unknown, id: number) {\n        map.get(id)?.destroy()\n        map.delete(id)\n    }\n\n    return box\n        .hook(notifications, remove, \"closed\")\n        .hook(notifications, (_, id: number) => {\n            if (id !== undefined) {\n                if (map.has(id))\n                    remove(null, id)\n\n                const n = notifications.getNotification(id)!\n                const w = Notification(n)\n                map.set(id, w)\n                box.children = [w, ...box.children]\n            }\n        }, \"notified\")\n}\n\nconst Placeholder = () => Widget.Box({\n    class_name: \"placeholder\",\n    vertical: true,\n    vpack: \"center\",\n    hpack: \"center\",\n    vexpand: true,\n    hexpand: true,\n    visible: notifs.as(n => n.length === 0),\n    children: [\n        Widget.Icon(icons.notifications.silent),\n        Widget.Label(\"Your inbox is empty\"),\n    ],\n})\n\nexport default () => Widget.Box({\n    class_name: \"notifications\",\n    css: options.notifications.width.bind().as(w => `min-width: ${w}px`),\n    vertical: true,\n    children: [\n        Header(),\n        Widget.Scrollable({\n            vexpand: true,\n            hscroll: \"never\",\n            class_name: \"notification-scrollable\",\n            child: Widget.Box({\n                class_name: \"notification-list vertical\",\n                vertical: true,\n                children: [\n                    NotificationList(),\n                    Placeholder(),\n                ],\n            }),\n        }),\n    ],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/desktop/Desktop.ts",
    "content": "import options from \"options\"\nconst mpris = await Service.import(\"mpris\")\n\nconst pref = () => options.bar.media.preferred.value\n\nexport default (monitor: number) => Widget.Window({\n    layer: \"bottom\",\n    name: `desktop${monitor}`,\n    class_name: \"desktop\",\n    anchor: [\"top\", \"bottom\", \"left\", \"right\"],\n    child: Widget.Box({\n        expand: true,\n        child: Widget.Box({\n            class_name: \"wallpaper\",\n            expand: true,\n            vpack: \"center\",\n            hpack: \"center\",\n            setup: self => self\n                .hook(mpris, () => {\n                    self.css = `\n                        background-image: url('${mpris.getPlayer(pref())!.cover_path}');\n                        background-size: contain;\n                        background-repeat: no-repeat;\n                        transition: 200ms;\n                        min-width: 700px;\n                        min-height: 700px;\n                        border-radius: 30px;\n                        box-shadow: 25px 25px 30px 0 rgba(0,0,0,0.5);`\n                }),\n        }),\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/notifications/Notification.ts",
    "content": "import { type Notification } from \"types/service/notifications\"\nimport GLib from \"gi://GLib\"\nimport icons from \"lib/icons\"\n\nconst time = (time: number, format = \"%H:%M\") => GLib.DateTime\n    .new_from_unix_local(time)\n    .format(format)\n\nconst NotificationIcon = ({ app_entry, app_icon, image }: Notification) => {\n    if (image) {\n        return Widget.Box({\n            vpack: \"start\",\n            hexpand: false,\n            class_name: \"icon img\",\n            css: `\n                background-image: url(\"${image}\");\n                background-size: cover;\n                background-repeat: no-repeat;\n                background-position: center;\n                min-width: 78px;\n                min-height: 78px;\n            `,\n        })\n    }\n\n    let icon = icons.fallback.notification\n    if (Utils.lookUpIcon(app_icon))\n        icon = app_icon\n\n    if (Utils.lookUpIcon(app_entry || \"\"))\n        icon = app_entry || \"\"\n\n    return Widget.Box({\n        vpack: \"start\",\n        hexpand: false,\n        class_name: \"icon\",\n        css: `\n            min-width: 78px;\n            min-height: 78px;\n        `,\n        child: Widget.Icon({\n            icon,\n            size: 58,\n            hpack: \"center\", hexpand: true,\n            vpack: \"center\", vexpand: true,\n        }),\n    })\n}\n\nexport default (notification: Notification) => {\n    const content = Widget.Box({\n        class_name: \"content\",\n        children: [\n            NotificationIcon(notification),\n            Widget.Box({\n                hexpand: true,\n                vertical: true,\n                children: [\n                    Widget.Box({\n                        children: [\n                            Widget.Label({\n                                class_name: \"title\",\n                                xalign: 0,\n                                justification: \"left\",\n                                hexpand: true,\n                                max_width_chars: 24,\n                                truncate: \"end\",\n                                wrap: true,\n                                label: notification.summary.trim(),\n                                use_markup: true,\n                            }),\n                            Widget.Label({\n                                class_name: \"time\",\n                                vpack: \"start\",\n                                label: time(notification.time),\n                            }),\n                            Widget.Button({\n                                class_name: \"close-button\",\n                                vpack: \"start\",\n                                child: Widget.Icon(\"window-close-symbolic\"),\n                                on_clicked: notification.close,\n                            }),\n                        ],\n                    }),\n                    Widget.Label({\n                        class_name: \"description\",\n                        hexpand: true,\n                        use_markup: true,\n                        xalign: 0,\n                        justification: \"left\",\n                        label: notification.body.trim(),\n                        max_width_chars: 24,\n                        wrap: true,\n                    }),\n                ],\n            }),\n        ],\n    })\n\n    const actionsbox = notification.actions.length > 0 ? Widget.Revealer({\n        transition: \"slide_down\",\n        child: Widget.EventBox({\n            child: Widget.Box({\n                class_name: \"actions horizontal\",\n                children: notification.actions.map(action => Widget.Button({\n                    class_name: \"action-button\",\n                    on_clicked: () => notification.invoke(action.id),\n                    hexpand: true,\n                    child: Widget.Label(action.label),\n                })),\n            }),\n        }),\n    }) : null\n\n    const eventbox = Widget.EventBox({\n        vexpand: false,\n        on_primary_click: notification.dismiss,\n        on_hover() {\n            if (actionsbox)\n                actionsbox.reveal_child = true\n        },\n        on_hover_lost() {\n            if (actionsbox)\n                actionsbox.reveal_child = true\n\n            notification.dismiss()\n        },\n        child: Widget.Box({\n            vertical: true,\n            children: actionsbox ? [content, actionsbox] : [content],\n        }),\n    })\n\n    return Widget.Box({\n        class_name: `notification ${notification.urgency}`,\n        child: eventbox,\n    })\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/notifications/NotificationPopups.ts",
    "content": "import Notification from \"./Notification\"\nimport options from \"options\"\n\nconst notifications = await Service.import(\"notifications\")\nconst { transition } = options\nconst { position, blacklist } = options.notifications\nconst { timeout, idle } = Utils\n\nfunction Animated(id: number) {\n    const n = notifications.getNotification(id)!\n    const widget = Notification(n)\n\n    const inner = Widget.Revealer({\n        css: \"border: 1px solid magenta;\",\n        transition: \"slide_left\",\n        transition_duration: transition.value,\n        child: widget,\n    })\n\n    const outer = Widget.Revealer({\n        css: \"border: 1px solid yellow;\",\n        transition: \"slide_down\",\n        transition_duration: transition.value,\n        child: inner,\n    })\n\n    const box = Widget.Box({\n        hpack: \"end\",\n        child: outer,\n    })\n\n    idle(() => {\n        outer.reveal_child = true\n        timeout(transition.value, () => {\n            inner.reveal_child = true\n        })\n    })\n\n    return Object.assign(box, {\n        dismiss() {\n            inner.reveal_child = false\n            timeout(transition.value, () => {\n                outer.reveal_child = false\n                timeout(transition.value, () => {\n                    box.destroy()\n                })\n            })\n        },\n    })\n}\n\nfunction PopupList() {\n    const map: Map<number, ReturnType<typeof Animated>> = new Map\n    const box = Widget.Box({\n        hpack: \"end\",\n        vertical: true,\n        css: options.notifications.width.bind().as(w => `min-width: ${w}px;`),\n    })\n\n    function remove(_: unknown, id: number) {\n        map.get(id)?.dismiss()\n        map.delete(id)\n    }\n\n    return box\n        .hook(notifications, (_, id: number) => {\n            if (id !== undefined) {\n                if (map.has(id))\n                    remove(null, id)\n\n                if (blacklist.value.includes(notifications.getNotification(id)!.app_name))\n                    return\n\n                if (notifications.dnd)\n                    return\n\n                const w = Animated(id)\n                map.set(id, w)\n                box.children = [w, ...box.children]\n            }\n        }, \"notified\")\n        .hook(notifications, remove, \"dismissed\")\n        .hook(notifications, remove, \"closed\")\n}\n\nexport default (monitor: number) => Widget.Window({\n    monitor,\n    name: `notifications${monitor}`,\n    anchor: position.bind(),\n    class_name: \"notifications\",\n    child: Widget.Box({\n        css: \"padding: 2px;\",\n        child: PopupList(),\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/osd/OSD.ts",
    "content": "import { icon } from \"lib/utils\"\nimport icons from \"lib/icons\"\nimport Progress from \"./Progress\"\nimport brightness from \"service/brightness\"\nimport type Gtk from \"gi://Gtk?version=3.0\"\nimport options from \"options\"\n\nconst audio = await Service.import(\"audio\")\nconst { progress, microphone } = options.osd\n\nconst DELAY = 2500\n\nfunction OnScreenProgress(vertical: boolean) {\n    const indicator = Widget.Icon({\n        size: 32,\n        vpack: \"start\",\n    })\n    const progress = Progress({\n        vertical,\n        width: vertical ? 42 : 200,\n        height: vertical ? 300 : 32,\n        child: indicator,\n    })\n\n    const revealer = Widget.Revealer({\n        transition: \"slide_left\",\n        child: progress,\n    })\n\n    let count = 0\n    function show(value: number, icon: string) {\n        revealer.reveal_child = true\n        indicator.icon = icon\n        progress.setValue(value)\n        count++\n        Utils.timeout(DELAY, () => {\n            count--\n\n            if (count === 0)\n                revealer.reveal_child = false\n        })\n    }\n\n    return revealer\n        .hook(brightness, () => show(\n            brightness.screen,\n            icons.brightness.screen,\n        ), \"notify::screen\")\n        .hook(brightness, () => show(\n            brightness.kbd,\n            icons.brightness.keyboard,\n        ), \"notify::kbd\")\n        .hook(audio.speaker, () => show(\n            audio.speaker.volume,\n            icon(audio.speaker.icon_name || \"\", icons.audio.type.speaker),\n        ), \"notify::volume\")\n}\n\nfunction MicrophoneMute() {\n    const icon = Widget.Icon({\n        class_name: \"microphone\",\n    })\n\n    const revealer = Widget.Revealer({\n        transition: \"slide_up\",\n        child: icon,\n    })\n\n    let count = 0\n    let mute = audio.microphone.stream?.is_muted ?? false\n\n    return revealer.hook(audio.microphone, () => Utils.idle(() => {\n        if (mute !== audio.microphone.stream?.is_muted) {\n            mute = audio.microphone.stream!.is_muted\n            icon.icon = icons.audio.mic[mute ? \"muted\" : \"high\"]\n            revealer.reveal_child = true\n            count++\n\n            Utils.timeout(DELAY, () => {\n                count--\n                if (count === 0)\n                    revealer.reveal_child = false\n            })\n        }\n    }))\n}\n\nexport default (monitor: number) => Widget.Window({\n    monitor,\n    name: `indicator${monitor}`,\n    class_name: \"indicator\",\n    layer: \"overlay\",\n    click_through: true,\n    anchor: [\"right\", \"left\", \"top\", \"bottom\"],\n    child: Widget.Box({\n        css: \"padding: 2px;\",\n        expand: true,\n        child: Widget.Overlay<Gtk.Widget>(\n            { child: Widget.Box({ expand: true }) },\n            Widget.Box({\n                hpack: progress.pack.h.bind(),\n                vpack: progress.pack.v.bind(),\n                child: progress.vertical.bind().as(OnScreenProgress),\n            }),\n            Widget.Box({\n                hpack: microphone.pack.h.bind(),\n                vpack: microphone.pack.v.bind(),\n                child: MicrophoneMute(),\n            }),\n        ),\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/osd/Progress.ts",
    "content": "import type Gtk from \"gi://Gtk?version=3.0\"\nimport GLib from \"gi://GLib?version=2.0\"\nimport { range } from \"lib/utils\"\nimport options from \"options\"\n\ntype ProgressProps = {\n    height?: number\n    width?: number\n    vertical?: boolean\n    child: Gtk.Widget\n}\n\nexport default ({\n    height = 18,\n    width = 180,\n    vertical = false,\n    child,\n}: ProgressProps) => {\n    const fill = Widget.Box({\n        class_name: \"fill\",\n        hexpand: vertical,\n        vexpand: !vertical,\n        hpack: vertical ? \"fill\" : \"start\",\n        vpack: vertical ? \"end\" : \"fill\",\n        child,\n    })\n\n    const container = Widget.Box({\n        class_name: \"progress\",\n        child: fill,\n        css: `\n            min-width: ${width}px;\n            min-height: ${height}px;\n        `,\n    })\n\n    let fill_size = 0\n    let animations: number[] = []\n\n    return Object.assign(container, {\n        setValue(value: number) {\n            if (value < 0)\n                return\n\n            if (animations.length > 0) {\n                for (const id of animations)\n                    GLib.source_remove(id)\n\n                animations = []\n            }\n\n            const axis = vertical ? \"height\" : \"width\"\n            const axisv = vertical ? height : width\n            const min = vertical ? width : height\n            const preferred = (axisv - min) * value + min\n\n            if (!fill_size) {\n                fill_size = preferred\n                fill.css = `min-${axis}: ${preferred}px;`\n                return\n            }\n\n            const frames = options.transition.value / 10\n            const goal = preferred - fill_size\n            const step = goal / frames\n\n            animations = range(frames, 0).map(i => Utils.timeout(5 * i, () => {\n                fill_size += step\n                fill.css = `min-${axis}: ${fill_size}px`\n                animations.shift()\n            }))\n        },\n    })\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/overview/Overview.ts",
    "content": "import PopupWindow from \"widget/PopupWindow\"\nimport Workspace from \"./Workspace\"\nimport options from \"options\"\nimport { range } from \"lib/utils\"\n\nconst hyprland = await Service.import(\"hyprland\")\n\nconst Overview = (ws: number) => Widget.Box({\n    class_name: \"overview horizontal\",\n    children: ws > 0\n        ? range(ws).map(Workspace)\n        : hyprland.workspaces\n            .map(({ id }) => Workspace(id))\n            .sort((a, b) => a.attribute.id - b.attribute.id),\n\n    setup: w => {\n        if (ws > 0)\n            return\n\n        w.hook(hyprland, (w, id?: number) => {\n            if (id === undefined)\n                return\n\n            w.children = w.children\n                .filter(ch => ch.attribute.id !== Number(id))\n        }, \"workspace-removed\")\n        w.hook(hyprland, (w, id?: number) => {\n            if (id === undefined)\n                return\n\n            w.children = [...w.children, Workspace(Number(id))]\n                .sort((a, b) => a.attribute.id - b.attribute.id)\n        }, \"workspace-added\")\n    },\n})\n\nexport default () => PopupWindow({\n    name: \"overview\",\n    layout: \"center\",\n    child: options.overview.workspaces.bind().as(Overview),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/overview/Window.ts",
    "content": "import { type Client } from \"types/service/hyprland\"\nimport { createSurfaceFromWidget, icon } from \"lib/utils\"\nimport Gdk from \"gi://Gdk\"\nimport Gtk from \"gi://Gtk?version=3.0\"\nimport options from \"options\"\nimport icons from \"lib/icons\"\n\nconst monochrome = options.overview.monochromeIcon\nconst TARGET = [Gtk.TargetEntry.new(\"text/plain\", Gtk.TargetFlags.SAME_APP, 0)]\nconst scale = (size: number) => (options.overview.scale.value / 100) * size\nconst hyprland = await Service.import(\"hyprland\")\nconst apps = await Service.import(\"applications\")\nconst dispatch = (args: string) => hyprland.messageAsync(`dispatch ${args}`)\n\nexport default ({ address, size: [w, h], class: c, title }: Client) => Widget.Button({\n    class_name: \"client\",\n    attribute: { address },\n    tooltip_text: `${title}`,\n    child: Widget.Icon({\n        css: `\n            min-width: ${scale(w)}px;\n            min-height: ${scale(h)}px;\n        `,\n        icon: monochrome.bind().as(m => {\n            const app = apps.list.find(app => app.match(c))\n            if (!app)\n                return icons.fallback.executable\n\n            return icon(\n                app.icon_name + (m ? \"-symbolic\" : \"\"),\n                icons.fallback.executable,\n            )\n        }),\n    }),\n    on_secondary_click: () => dispatch(`closewindow address:${address}`),\n    on_clicked: () => {\n        dispatch(`focuswindow address:${address}`)\n        App.closeWindow(\"overview\")\n    },\n    setup: btn => btn\n        .on(\"drag-data-get\", (_w, _c, data) => data.set_text(address, address.length))\n        .on(\"drag-begin\", (_, context) => {\n            Gtk.drag_set_icon_surface(context, createSurfaceFromWidget(btn))\n            btn.toggleClassName(\"hidden\", true)\n        })\n        .on(\"drag-end\", () => btn.toggleClassName(\"hidden\", false))\n        .drag_source_set(Gdk.ModifierType.BUTTON1_MASK, TARGET, Gdk.DragAction.COPY),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/overview/Workspace.ts",
    "content": "import Window from \"./Window\"\nimport Gdk from \"gi://Gdk\"\nimport Gtk from \"gi://Gtk?version=3.0\"\nimport options from \"options\"\n\nconst TARGET = [Gtk.TargetEntry.new(\"text/plain\", Gtk.TargetFlags.SAME_APP, 0)]\nconst scale = (size: number) => (options.overview.scale.value / 100) * size\nconst hyprland = await Service.import(\"hyprland\")\n\nconst dispatch = (args: string) => hyprland.messageAsync(`dispatch ${args}`)\n\nconst size = (id: number) => {\n    const def = { h: 1080, w: 1920 }\n    const ws = hyprland.getWorkspace(id)\n    if (!ws)\n        return def\n\n    const mon = hyprland.getMonitor(ws.monitorID)\n    return mon ? { h: mon.height, w: mon.width } : def\n}\n\nexport default (id: number) => Widget.Box({\n    attribute: { id },\n    tooltipText: `${id}`,\n    class_name: \"workspace\",\n    vpack: \"center\",\n    css: `\n        min-width: ${scale(size(id).w)}px;\n        min-height: ${scale(size(id).h)}px;\n    `,\n    setup: box => box.hook(hyprland, () => {\n        box.toggleClassName(\"active\", hyprland.active.workspace.id === id)\n    }),\n    child: Widget.EventBox({\n        expand: true,\n        on_primary_click: () => {\n            App.closeWindow(\"overview\")\n            dispatch(`workspace ${id}`)\n        },\n        setup: eventbox => {\n            eventbox.drag_dest_set(Gtk.DestDefaults.ALL, TARGET, Gdk.DragAction.COPY)\n            eventbox.connect(\"drag-data-received\", (_w, _c, _x, _y, data) => {\n                const address = new TextDecoder().decode(data.get_data())\n                dispatch(`movetoworkspacesilent ${id},address:${address}`)\n            })\n        },\n        child: Widget.Fixed().hook(hyprland, fixed => {\n            fixed.get_children().forEach(ch => ch.destroy())\n            hyprland.clients\n                .filter(({ workspace }) => workspace.id === id)\n                .forEach(c => {\n                    const x = c.at[0] - (hyprland.getMonitor(c.monitor)?.x || 0)\n                    const y = c.at[1] - (hyprland.getMonitor(c.monitor)?.y || 0)\n                    c.mapped && fixed.put(Window(c), scale(x), scale(y))\n                })\n            fixed.show_all()\n        }, \"notify::clients\"),\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/powermenu/PowerMenu.ts",
    "content": "import PopupWindow from \"widget/PopupWindow\"\nimport powermenu, { type Action } from \"service/powermenu\"\nimport icons from \"lib/icons\"\nimport options from \"options\"\nimport type Gtk from \"gi://Gtk?version=3.0\"\n\nconst { layout, labels } = options.powermenu\n\nconst SysButton = (action: Action, label: string) => Widget.Button({\n    on_clicked: () => powermenu.action(action),\n    child: Widget.Box({\n        vertical: true,\n        class_name: \"system-button\",\n        children: [\n            Widget.Icon(icons.powermenu[action]),\n            Widget.Label({\n                label,\n                visible: labels.bind(),\n            }),\n        ],\n    }),\n})\n\nexport default () => PopupWindow({\n    name: \"powermenu\",\n    transition: \"crossfade\",\n    child: Widget.Box<Gtk.Widget>({\n        class_name: \"powermenu horizontal\",\n        setup: self => self.hook(layout, () => {\n            self.toggleClassName(\"box\", layout.value === \"box\")\n            self.toggleClassName(\"line\", layout.value === \"line\")\n        }),\n        children: layout.bind().as(layout => {\n            switch (layout) {\n                case \"line\": return [\n                    SysButton(\"shutdown\", \"Shutdown\"),\n                    SysButton(\"logout\", \"Log Out\"),\n                    SysButton(\"reboot\", \"Reboot\"),\n                    SysButton(\"sleep\", \"Sleep\"),\n                ]\n                case \"box\": return [\n                    Widget.Box(\n                        { vertical: true },\n                        SysButton(\"shutdown\", \"Shutdown\"),\n                        SysButton(\"logout\", \"Log Out\"),\n                    ),\n                    Widget.Box(\n                        { vertical: true },\n                        SysButton(\"reboot\", \"Reboot\"),\n                        SysButton(\"sleep\", \"Sleep\"),\n                    ),\n                ]\n            }\n        }),\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/powermenu/Verification.ts",
    "content": "import PopupWindow from \"widget/PopupWindow\"\nimport powermenu from \"service/powermenu\"\n\nexport default () => PopupWindow({\n    name: \"verification\",\n    transition: \"crossfade\",\n    child: Widget.Box({\n        class_name: \"verification\",\n        vertical: true,\n        children: [\n            Widget.Box({\n                class_name: \"text-box\",\n                vertical: true,\n                children: [\n                    Widget.Label({\n                        class_name: \"title\",\n                        label: powermenu.bind(\"title\"),\n                    }),\n                    Widget.Label({\n                        class_name: \"desc\",\n                        label: \"Are you sure?\",\n                    }),\n                ],\n            }),\n            Widget.Box({\n                class_name: \"buttons horizontal\",\n                vexpand: true,\n                vpack: \"end\",\n                homogeneous: true,\n                children: [\n                    Widget.Button({\n                        child: Widget.Label(\"No\"),\n                        on_clicked: () => App.toggleWindow(\"verification\"),\n                        setup: self => self.hook(App, (_, name: string, visible: boolean) => {\n                            if (name === \"verification\" && visible)\n                                self.grab_focus()\n                        }),\n                    }),\n                    Widget.Button({\n                        child: Widget.Label(\"Yes\"),\n                        on_clicked: () => Utils.exec(powermenu.cmd),\n                    }),\n                ],\n            }),\n        ],\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/quicksettings/QuickSettings.ts",
    "content": "import type Gtk from \"gi://Gtk?version=3.0\"\nimport { ProfileSelector, ProfileToggle } from \"./widgets/AsusProfile\"\nimport { Header } from \"./widgets/Header\"\nimport { Volume, Microhone, SinkSelector, AppMixer } from \"./widgets/Volume\"\nimport { Brightness } from \"./widgets/Brightness\"\nimport { NetworkToggle, WifiSelection } from \"./widgets/Network\"\nimport { BluetoothToggle, BluetoothDevices } from \"./widgets/Bluetooth\"\nimport { DND } from \"./widgets/DND\"\nimport { DarkModeToggle } from \"./widgets/DarkMode\"\nimport { MicMute } from \"./widgets/MicMute\"\nimport { Media } from \"./widgets/Media\"\nimport PopupWindow from \"widget/PopupWindow\"\nimport options from \"options\"\n\nconst { bar, quicksettings } = options\nconst media = (await Service.import(\"mpris\")).bind(\"players\")\nconst layout = Utils.derive([bar.position, quicksettings.position], (bar, qs) =>\n    `${bar}-${qs}` as const,\n)\n\nconst Row = (\n    toggles: Array<() => Gtk.Widget> = [],\n    menus: Array<() => Gtk.Widget> = [],\n) => Widget.Box({\n    vertical: true,\n    children: [\n        Widget.Box({\n            homogeneous: true,\n            class_name: \"row horizontal\",\n            children: toggles.map(w => w()),\n        }),\n        ...menus.map(w => w()),\n    ],\n})\n\nconst Settings = () => Widget.Box({\n    vertical: true,\n    class_name: \"quicksettings vertical\",\n    css: quicksettings.width.bind().as(w => `min-width: ${w}px;`),\n    children: [\n        Header(),\n        Widget.Box({\n            class_name: \"sliders-box vertical\",\n            vertical: true,\n            children: [\n                Row(\n                    [Volume],\n                    [SinkSelector, AppMixer],\n                ),\n                Microhone(),\n                Brightness(),\n            ],\n        }),\n        Row(\n            [NetworkToggle, BluetoothToggle],\n            [WifiSelection, BluetoothDevices],\n        ),\n        Row(\n            [ProfileToggle, DarkModeToggle],\n            [ProfileSelector],\n        ),\n        Row([MicMute, DND]),\n        Widget.Box({\n            visible: media.as(l => l.length > 0),\n            child: Media(),\n        }),\n    ],\n})\n\nconst QuickSettings = () => PopupWindow({\n    name: \"quicksettings\",\n    exclusivity: \"exclusive\",\n    transition: bar.position.bind().as(pos => pos === \"top\" ? \"crossfade\" : \"crossfade\"),\n    layout: layout.value,\n    child: Settings(),\n})\n\nexport function setupQuickSettings() {\n    App.addWindow(QuickSettings())\n    layout.connect(\"changed\", () => {\n        App.removeWindow(\"quicksettings\")\n        App.addWindow(QuickSettings())\n    })\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/quicksettings/ToggleButton.ts",
    "content": "import { type Props as IconProps } from \"types/widgets/icon\"\nimport { type Props as LabelProps } from \"types/widgets/label\"\nimport type GObject from \"gi://GObject?version=2.0\"\nimport type Gtk from \"gi://Gtk?version=3.0\"\nimport icons from \"lib/icons\"\n\nexport const opened = Variable(\"\")\nApp.connect(\"window-toggled\", (_, name: string, visible: boolean) => {\n    if (name === \"quicksettings\" && !visible)\n        Utils.timeout(500, () => opened.value = \"\")\n})\n\nexport const Arrow = (name: string, activate?: false | (() => void)) => {\n    let deg = 0\n    let iconOpened = false\n    const icon = Widget.Icon(icons.ui.arrow.right).hook(opened, () => {\n        if (opened.value === name && !iconOpened || opened.value !== name && iconOpened) {\n            const step = opened.value === name ? 10 : -10\n            iconOpened = !iconOpened\n            for (let i = 0; i < 9; ++i) {\n                Utils.timeout(15 * i, () => {\n                    deg += step\n                    icon.setCss(`-gtk-icon-transform: rotate(${deg}deg);`)\n                })\n            }\n        }\n    })\n    return Widget.Button({\n        child: icon,\n        class_name: \"arrow\",\n        on_clicked: () => {\n            opened.value = opened.value === name ? \"\" : name\n            if (typeof activate === \"function\")\n                activate()\n        },\n    })\n}\n\ntype ArrowToggleButtonProps = {\n    name: string\n    icon: IconProps[\"icon\"]\n    label: LabelProps[\"label\"]\n    activate: () => void\n    deactivate: () => void\n    activateOnArrow?: boolean\n    connection: [GObject.Object, () => boolean]\n}\nexport const ArrowToggleButton = ({\n    name,\n    icon,\n    label,\n    activate,\n    deactivate,\n    activateOnArrow = true,\n    connection: [service, condition],\n}: ArrowToggleButtonProps) => Widget.Box({\n    class_name: \"toggle-button\",\n    setup: self => self.hook(service, () => {\n        self.toggleClassName(\"active\", condition())\n    }),\n    children: [\n        Widget.Button({\n            child: Widget.Box({\n                hexpand: true,\n                children: [\n                    Widget.Icon({\n                        class_name: \"icon\",\n                        icon,\n                    }),\n                    Widget.Label({\n                        class_name: \"label\",\n                        max_width_chars: 10,\n                        truncate: \"end\",\n                        label,\n                    }),\n                ],\n            }),\n            on_clicked: () => {\n                if (condition()) {\n                    deactivate()\n                    if (opened.value === name)\n                        opened.value = \"\"\n                } else {\n                    activate()\n                }\n            },\n        }),\n        Arrow(name, activateOnArrow && activate),\n    ],\n})\n\ntype MenuProps = {\n    name: string\n    icon: IconProps[\"icon\"]\n    title: LabelProps[\"label\"]\n    content: Gtk.Widget[]\n}\nexport const Menu = ({ name, icon, title, content }: MenuProps) => Widget.Revealer({\n    transition: \"slide_down\",\n    reveal_child: opened.bind().as(v => v === name),\n    child: Widget.Box({\n        class_names: [\"menu\", name],\n        vertical: true,\n        children: [\n            Widget.Box({\n                class_name: \"title-box\",\n                children: [\n                    Widget.Icon({\n                        class_name: \"icon\",\n                        icon,\n                    }),\n                    Widget.Label({\n                        class_name: \"title\",\n                        truncate: \"end\",\n                        label: title,\n                    }),\n                ],\n            }),\n            Widget.Separator(),\n            Widget.Box({\n                vertical: true,\n                class_name: \"content vertical\",\n                children: content,\n            }),\n        ],\n    }),\n})\n\ntype SimpleToggleButtonProps = {\n    icon: IconProps[\"icon\"]\n    label: LabelProps[\"label\"]\n    toggle: () => void\n    connection: [GObject.Object, () => boolean]\n}\nexport const SimpleToggleButton = ({\n    icon,\n    label,\n    toggle,\n    connection: [service, condition],\n}: SimpleToggleButtonProps) => Widget.Button({\n    on_clicked: toggle,\n    class_name: \"simple-toggle\",\n    setup: self => self.hook(service, () => {\n        self.toggleClassName(\"active\", condition())\n    }),\n    child: Widget.Box([\n        Widget.Icon({ icon }),\n        Widget.Label({\n            max_width_chars: 10,\n            truncate: \"end\",\n            label,\n        }),\n    ]),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/quicksettings/widgets/AsusProfile.ts",
    "content": "import { ArrowToggleButton, Menu } from \"../ToggleButton\"\nimport icons from \"lib/icons\"\nimport asusctl from \"service/asusctl\"\n\nconst profile = asusctl.bind(\"profile\")\n\nexport const ProfileToggle = () => ArrowToggleButton({\n    name: \"asusctl-profile\",\n    icon: profile.as(p => icons.asusctl.profile[p]),\n    label: profile,\n    connection: [asusctl, () => asusctl.profile !== \"Balanced\"],\n    activate: () => asusctl.setProfile(\"Quiet\"),\n    deactivate: () => asusctl.setProfile(\"Balanced\"),\n    activateOnArrow: false,\n})\n\nexport const ProfileSelector = () => Menu({\n    name: \"asusctl-profile\",\n    icon: profile.as(p => icons.asusctl.profile[p]),\n    title: \"Profile Selector\",\n    content: [\n        Widget.Box({\n            vertical: true,\n            hexpand: true,\n            children: [\n                Widget.Box({\n                    vertical: true,\n                    children: asusctl.profiles.map(prof => Widget.Button({\n                        on_clicked: () => asusctl.setProfile(prof),\n                        child: Widget.Box({\n                            children: [\n                                Widget.Icon(icons.asusctl.profile[prof]),\n                                Widget.Label(prof),\n                            ],\n                        }),\n                    })),\n                }),\n            ],\n        }),\n        Widget.Separator(),\n        Widget.Button({\n            on_clicked: () => Utils.execAsync(\"rog-control-center\"),\n            child: Widget.Box({\n                children: [\n                    Widget.Icon(icons.ui.settings),\n                    Widget.Label(\"Rog Control Center\"),\n                ],\n            }),\n        }),\n    ],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/quicksettings/widgets/Bluetooth.ts",
    "content": "import { type BluetoothDevice } from \"types/service/bluetooth\"\nimport { Menu, ArrowToggleButton } from \"../ToggleButton\"\nimport icons from \"lib/icons\"\nimport { watch } from \"lib/experiments\"\n\nconst bluetooth = await Service.import(\"bluetooth\")\nconst title = watch(\"Disabled\", bluetooth, () => {\n    if (!bluetooth.enabled)\n        return \"Disabled\"\n\n    if (bluetooth.connected_devices.length === 1)\n        return bluetooth.connected_devices[0].alias\n\n    return `${bluetooth.connected_devices.length} Connected`\n})\n\nexport const BluetoothToggle = () => ArrowToggleButton({\n    name: \"bluetooth\",\n    icon: bluetooth.bind(\"enabled\").as(p => icons.bluetooth[p ? \"enabled\" : \"disabled\"]),\n    label: title,\n    connection: [bluetooth, () => bluetooth.enabled],\n    deactivate: () => bluetooth.enabled = false,\n    activate: () => bluetooth.enabled = true,\n})\n\nconst DeviceItem = (device: BluetoothDevice) => Widget.Box({\n    children: [\n        Widget.Icon(device.icon_name + \"-symbolic\"),\n        Widget.Label(device.name),\n        Widget.Label({\n            label: `${device.battery_percentage}%`,\n            visible: device.bind(\"battery_percentage\").as(p => p > 0),\n        }),\n        Widget.Box({ hexpand: true }),\n        Widget.Spinner({\n            active: device.bind(\"connecting\"),\n            visible: device.bind(\"connecting\"),\n        }),\n        Widget.Switch({\n            active: device.connected,\n            visible: device.bind(\"connecting\").as(p => !p),\n            setup: self => self.on(\"notify::active\", () => {\n                device.setConnection(self.active)\n            }),\n        }),\n    ],\n})\n\nexport const BluetoothDevices = () => Menu({\n    name: \"bluetooth\",\n    icon: icons.bluetooth.disabled,\n    title: \"Bluetooth\",\n    content: [\n        Widget.Box({\n            class_name: \"bluetooth-devices\",\n            hexpand: true,\n            vertical: true,\n            children: bluetooth.bind(\"devices\").as(ds => ds\n                .filter(d => d.name)\n                .map(DeviceItem)),\n        }),\n    ],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/quicksettings/widgets/Brightness.ts",
    "content": "import icons from \"lib/icons\"\nimport brightness from \"service/brightness\"\n\nconst BrightnessSlider = () => Widget.Slider({\n    draw_value: false,\n    hexpand: true,\n    value: brightness.bind(\"screen\"),\n    on_change: ({ value }) => brightness.screen = value,\n})\n\nexport const Brightness = () => Widget.Box({\n    class_name: \"brightness\",\n    children: [\n        Widget.Button({\n            vpack: \"center\",\n            child: Widget.Icon(icons.brightness.indicator),\n            on_clicked: () => brightness.screen = 0,\n            tooltip_text: brightness.bind(\"screen\").as(v =>\n                `Screen Brightness: ${Math.floor(v * 100)}%`),\n        }),\n        BrightnessSlider(),\n    ],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/quicksettings/widgets/DND.ts",
    "content": "import { SimpleToggleButton } from \"../ToggleButton\"\nimport icons from \"lib/icons\"\n\nconst n = await Service.import(\"notifications\")\nconst dnd = n.bind(\"dnd\")\n\nexport const DND = () => SimpleToggleButton({\n    icon: dnd.as(dnd => icons.notifications[dnd ? \"silent\" : \"noisy\"]),\n    label: dnd.as(dnd => dnd ? \"Silent\" : \"Noisy\"),\n    toggle: () => n.dnd = !n.dnd,\n    connection: [n, () => n.dnd],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/quicksettings/widgets/DarkMode.ts",
    "content": "import { SimpleToggleButton } from \"../ToggleButton\"\nimport icons from \"lib/icons\"\nimport options from \"options\"\n\nconst { scheme } = options.theme\n\nexport const DarkModeToggle = () => SimpleToggleButton({\n    icon: scheme.bind().as(s => icons.color[s]),\n    label: scheme.bind().as(s => s === \"dark\" ? \"Dark\" : \"Light\"),\n    toggle: () => scheme.value = scheme.value === \"dark\" ? \"light\" : \"dark\",\n    connection: [scheme, () => scheme.value === \"dark\"],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/quicksettings/widgets/Header.ts",
    "content": "import type Gtk from \"gi://Gtk?version=3.0\"\nimport icons from \"lib/icons\"\nimport { uptime } from \"lib/variables\"\nimport options from \"options\"\nimport powermenu, { Action } from \"service/powermenu\"\n\nconst battery = await Service.import(\"battery\")\nconst { image, size } = options.quicksettings.avatar\n\nfunction up(up: number) {\n    const h = Math.floor(up / 60)\n    const m = Math.floor(up % 60)\n    return `${h}h ${m < 10 ? \"0\" + m : m}m`\n}\n\nconst Avatar = () => Widget.Box({\n    class_name: \"avatar\",\n    css: Utils.merge([image.bind(), size.bind()], (img, size) => `\n        min-width: ${size}px;\n        min-height: ${size}px;\n        background-image: url('${img}');\n        background-size: cover;\n    `),\n})\n\nconst SysButton = (action: Action) => Widget.Button({\n    vpack: \"center\",\n    child: Widget.Icon(icons.powermenu[action]),\n    on_clicked: () => powermenu.action(action),\n})\n\nexport const Header = () => Widget.Box<Gtk.Widget>(\n    { class_name: \"header horizontal\" },\n    Avatar(),\n    Widget.Box({\n        vertical: true,\n        vpack: \"center\",\n        children: [\n            Widget.Box([\n                Widget.Icon({ icon: battery.bind(\"icon_name\") }),\n                Widget.Label({ label: battery.bind(\"percent\").as(p => `${p}%`) }),\n            ]),\n            Widget.Box([\n                Widget.Icon({ icon: icons.ui.time }),\n                Widget.Label({ label: uptime.bind().as(up) }),\n            ]),\n        ],\n    }),\n    Widget.Box({ hexpand: true }),\n    Widget.Button({\n        vpack: \"center\",\n        child: Widget.Icon(icons.ui.settings),\n        on_clicked: () => {\n            App.closeWindow(\"settings-dialog\")\n            App.openWindow(\"settings-dialog\")\n        },\n    }),\n    SysButton(\"logout\"),\n    SysButton(\"shutdown\"),\n)\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/quicksettings/widgets/Media.ts",
    "content": "import { type MprisPlayer } from \"types/service/mpris\"\nimport icons from \"lib/icons\"\nimport type Gtk from \"gi://Gtk?version=3.0\"\nimport options from \"options\"\nimport { icon } from \"lib/utils\"\n\nconst mpris = await Service.import(\"mpris\")\nconst players = mpris.bind(\"players\")\nconst { media } = options.quicksettings\n\nfunction lengthStr(length: number) {\n    const min = Math.floor(length / 60)\n    const sec = Math.floor(length % 60)\n    const sec0 = sec < 10 ? \"0\" : \"\"\n    return `${min}:${sec0}${sec}`\n}\n\nconst Player = (player: MprisPlayer) => {\n    const cover = Widget.Box({\n        class_name: \"cover\",\n        vpack: \"start\",\n        css: Utils.merge([player.bind(\"cover_path\"), media.coverSize.bind()], (path, size) => `\n            min-width: ${size}px;\n            min-height: ${size}px;\n            background-image: url('${path}');\n        `),\n    })\n\n    const title = Widget.Label({\n        class_name: \"title\",\n        max_width_chars: 20,\n        truncate: \"end\",\n        hpack: \"start\",\n        label: player.bind(\"track_title\"),\n    })\n\n    const artist = Widget.Label({\n        class_name: \"artist\",\n        max_width_chars: 20,\n        truncate: \"end\",\n        hpack: \"start\",\n        label: player.bind(\"track_artists\").as(a => a.join(\", \")),\n    })\n\n    const positionSlider = Widget.Slider({\n        class_name: \"position\",\n        draw_value: false,\n        on_change: ({ value }) => player.position = value * player.length,\n        setup: self => {\n            const update = () => {\n                const { length, position } = player\n                self.visible = length > 0\n                self.value = length > 0 ? position / length : 0\n            }\n            self.hook(player, update)\n            self.hook(player, update, \"position\")\n            self.poll(1000, update)\n        },\n    })\n\n    const positionLabel = Widget.Label({\n        class_name: \"position\",\n        hpack: \"start\",\n        setup: self => {\n            const update = (_: unknown, time?: number) => {\n                self.label = lengthStr(time || player.position)\n                self.visible = player.length > 0\n            }\n            self.hook(player, update, \"position\")\n            self.poll(1000, update)\n        },\n    })\n\n    const lengthLabel = Widget.Label({\n        class_name: \"length\",\n        hpack: \"end\",\n        visible: player.bind(\"length\").as(l => l > 0),\n        label: player.bind(\"length\").as(lengthStr),\n    })\n\n    const playericon = Widget.Icon({\n        class_name: \"icon\",\n        hexpand: true,\n        hpack: \"end\",\n        vpack: \"start\",\n        tooltip_text: player.identity || \"\",\n        icon: Utils.merge([player.bind(\"entry\"), media.monochromeIcon.bind()], (e, s) => {\n            const name = `${e}${s ? \"-symbolic\" : \"\"}`\n            return icon(name, icons.fallback.audio)\n        }),\n    })\n\n    const playPause = Widget.Button({\n        class_name: \"play-pause\",\n        on_clicked: () => player.playPause(),\n        visible: player.bind(\"can_play\"),\n        child: Widget.Icon({\n            icon: player.bind(\"play_back_status\").as(s => {\n                switch (s) {\n                    case \"Playing\": return icons.mpris.playing\n                    case \"Paused\":\n                    case \"Stopped\": return icons.mpris.stopped\n                }\n            }),\n        }),\n    })\n\n    const prev = Widget.Button({\n        on_clicked: () => player.previous(),\n        visible: player.bind(\"can_go_prev\"),\n        child: Widget.Icon(icons.mpris.prev),\n    })\n\n    const next = Widget.Button({\n        on_clicked: () => player.next(),\n        visible: player.bind(\"can_go_next\"),\n        child: Widget.Icon(icons.mpris.next),\n    })\n\n    return Widget.Box(\n        { class_name: \"player\", vexpand: false },\n        cover,\n        Widget.Box<Gtk.Widget>(\n            { vertical: true },\n            Widget.Box([\n                title,\n                playericon,\n            ]),\n            artist,\n            Widget.Box({ vexpand: true }),\n            positionSlider,\n            Widget.CenterBox({\n                class_name: \"footer horizontal\",\n                start_widget: positionLabel,\n                center_widget: Widget.Box([\n                    prev,\n                    playPause,\n                    next,\n                ]),\n                end_widget: lengthLabel,\n            }),\n        ),\n    )\n}\n\nexport const Media = () => Widget.Box({\n    vertical: true,\n    class_name: \"media vertical\",\n    children: players.as(p => p.map(Player)),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/quicksettings/widgets/MicMute.ts",
    "content": "import { SimpleToggleButton } from \"../ToggleButton\"\nimport icons from \"lib/icons\"\nconst { microphone } = await Service.import(\"audio\")\n\nconst icon = () => microphone.is_muted || microphone.stream?.is_muted\n    ? icons.audio.mic.muted\n    : icons.audio.mic.high\n\nconst label = () => microphone.is_muted || microphone.stream?.is_muted\n    ? \"Muted\"\n    : \"Unmuted\"\n\n// TODO: Variable watch option\nconst ico = Variable(icon())\nmicrophone.connect(\"changed\", () => ico.value = icon())\n\n// TODO: Variable watch option\nconst lbl = Variable(label())\nmicrophone.connect(\"changed\", () => lbl.value = label())\n\nexport const MicMute = () => SimpleToggleButton({\n    icon: ico.bind(),\n    label: lbl.bind(),\n    toggle: () => microphone.is_muted = !microphone.is_muted,\n    connection: [microphone, () => microphone?.is_muted || false],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/quicksettings/widgets/Network.ts",
    "content": "import { Menu, ArrowToggleButton } from \"../ToggleButton\"\nimport icons from \"lib/icons.js\"\nimport { dependencies, sh } from \"lib/utils\"\nimport options from \"options\"\nconst { wifi } = await Service.import(\"network\")\n\nexport const NetworkToggle = () => ArrowToggleButton({\n    name: \"network\",\n    icon: wifi.bind(\"icon_name\"),\n    label: wifi.bind(\"ssid\").as(ssid => ssid || \"Not Connected\"),\n    connection: [wifi, () => wifi.enabled],\n    deactivate: () => wifi.enabled = false,\n    activate: () => {\n        wifi.enabled = true\n        wifi.scan()\n    },\n})\n\nexport const WifiSelection = () => Menu({\n    name: \"network\",\n    icon: wifi.bind(\"icon_name\"),\n    title: \"Wifi Selection\",\n    content: [\n        Widget.Box({\n            vertical: true,\n            setup: self => self.hook(wifi, () => self.children =\n                wifi.access_points.map(ap => Widget.Button({\n                    on_clicked: () => {\n                        if (dependencies(\"nmcli\"))\n                            Utils.execAsync(`nmcli device wifi connect ${ap.bssid}`)\n                    },\n                    child: Widget.Box({\n                        children: [\n                            Widget.Icon(ap.iconName),\n                            Widget.Label(ap.ssid || \"\"),\n                            Widget.Icon({\n                                icon: icons.ui.tick,\n                                hexpand: true,\n                                hpack: \"end\",\n                                setup: self => Utils.idle(() => {\n                                    if (!self.is_destroyed)\n                                        self.visible = ap.active\n                                }),\n                            }),\n                        ],\n                    }),\n                })),\n            ),\n        }),\n        Widget.Separator(),\n        Widget.Button({\n            on_clicked: () => sh(options.quicksettings.networkSettings.value),\n            child: Widget.Box({\n                children: [\n                    Widget.Icon(icons.ui.settings),\n                    Widget.Label(\"Network\"),\n                ],\n            }),\n        }),\n    ],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/quicksettings/widgets/Volume.ts",
    "content": "import type Gtk from \"gi://Gtk?version=3.0\"\nimport { type Stream } from \"types/service/audio\"\nimport { Arrow, Menu } from \"../ToggleButton\"\nimport { dependencies, icon, sh } from \"lib/utils\"\nimport icons from \"lib/icons.js\"\nconst audio = await Service.import(\"audio\")\n\ntype Type = \"microphone\" | \"speaker\"\n\nconst VolumeIndicator = (type: Type = \"speaker\") => Widget.Button({\n    vpack: \"center\",\n    on_clicked: () => audio[type].is_muted = !audio[type].is_muted,\n    child: Widget.Icon({\n        icon: audio[type].bind(\"icon_name\")\n            .as(i => icon(i || \"\", icons.audio.mic.high)),\n        tooltipText: audio[type].bind(\"volume\")\n            .as(vol => `Volume: ${Math.floor(vol * 100)}%`),\n    }),\n})\n\nconst VolumeSlider = (type: Type = \"speaker\") => Widget.Slider({\n    hexpand: true,\n    draw_value: false,\n    on_change: ({ value, dragging }) => dragging && (audio[type].volume = value),\n    value: audio[type].bind(\"volume\"),\n})\n\nexport const Volume = () => Widget.Box({\n    class_name: \"volume\",\n    children: [\n        VolumeIndicator(\"speaker\"),\n        VolumeSlider(\"speaker\"),\n        Widget.Box({\n            vpack: \"center\",\n            child: Arrow(\"sink-selector\"),\n        }),\n        Widget.Box({\n            vpack: \"center\",\n            child: Arrow(\"app-mixer\"),\n            visible: audio.bind(\"apps\").as(a => a.length > 0),\n        }),\n    ],\n})\n\nexport const Microhone = () => Widget.Box({\n    class_name: \"slider horizontal\",\n    visible: audio.bind(\"recorders\").as(a => a.length > 0),\n    children: [\n        VolumeIndicator(\"microphone\"),\n        VolumeSlider(\"microphone\"),\n    ],\n})\n\nconst MixerItem = (stream: Stream) => Widget.Box<Gtk.Widget>(\n    {\n        hexpand: true,\n        class_name: \"mixer-item horizontal\",\n    },\n    Widget.Icon({\n        tooltip_text: stream.bind(\"name\").as(n => n || \"\"),\n        icon: stream.bind(\"name\").as(n => {\n            return Utils.lookUpIcon(n || \"\")\n                ? (n || \"\")\n                : icons.fallback.audio\n        }),\n    }),\n    Widget.Box<Gtk.Widget>(\n        { vertical: true },\n        Widget.Label({\n            xalign: 0,\n            truncate: \"end\",\n            max_width_chars: 28,\n            label: stream.bind(\"description\").as(d => d || \"\"),\n        }),\n        Widget.Slider({\n            hexpand: true,\n            draw_value: false,\n            value: stream.bind(\"volume\"),\n            on_change: ({ value }) => stream.volume = value,\n        }),\n    ),\n)\n\nconst SinkItem = (stream: Stream) => Widget.Button({\n    hexpand: true,\n    on_clicked: () => audio.speaker = stream,\n    child: Widget.Box({\n        children: [\n            Widget.Icon({\n                icon: icon(stream.icon_name || \"\", icons.fallback.audio),\n                tooltip_text: stream.icon_name || \"\",\n            }),\n            Widget.Label((stream.description || \"\").split(\" \").slice(0, 4).join(\" \")),\n            Widget.Icon({\n                icon: icons.ui.tick,\n                hexpand: true,\n                hpack: \"end\",\n                visible: audio.speaker.bind(\"stream\").as(s => s === stream.stream),\n            }),\n        ],\n    }),\n})\n\nconst SettingsButton = () => Widget.Button({\n    on_clicked: () => {\n        if (dependencies(\"pavucontrol\"))\n            sh(\"pavucontrol\")\n    },\n    hexpand: true,\n    child: Widget.Box({\n        children: [\n            Widget.Icon(icons.ui.settings),\n            Widget.Label(\"Settings\"),\n        ],\n    }),\n})\n\nexport const AppMixer = () => Menu({\n    name: \"app-mixer\",\n    icon: icons.audio.mixer,\n    title: \"App Mixer\",\n    content: [\n        Widget.Box({\n            vertical: true,\n            class_name: \"vertical mixer-item-box\",\n            children: audio.bind(\"apps\").as(a => a.map(MixerItem)),\n        }),\n        Widget.Separator(),\n        SettingsButton(),\n    ],\n})\n\nexport const SinkSelector = () => Menu({\n    name: \"sink-selector\",\n    icon: icons.audio.type.headset,\n    title: \"Sink Selector\",\n    content: [\n        Widget.Box({\n            vertical: true,\n            children: audio.bind(\"speakers\").as(a => a.map(SinkItem)),\n        }),\n        Widget.Separator(),\n        SettingsButton(),\n    ],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/settings/Group.ts",
    "content": "import Row from \"./Row\"\n\nexport default <T>(title: string, ...rows: ReturnType<typeof Row<T>>[]) => Widget.Box({\n    class_name: \"group\",\n    vertical: true,\n    children: [\n        Widget.Label({\n            hpack: \"start\",\n            class_name: \"group-title\",\n            label: title,\n            setup: w => Utils.idle(() => w.visible = !!title),\n        }),\n        Widget.Box({\n            vertical: true,\n            children: rows,\n        }),\n    ],\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/settings/Page.ts",
    "content": "import Group from \"./Group\"\n\nexport default <T>(\n    name: string,\n    icon: string,\n    ...groups: ReturnType<typeof Group<T>>[]\n) => Widget.Box({\n    class_name: \"page\",\n    attribute: { name, icon },\n    child: Widget.Scrollable({\n        css: \"min-height: 300px;\",\n        child: Widget.Box({\n            vexpand: true,\n            vertical: true,\n            children: groups,\n        }),\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/settings/Row.ts",
    "content": "import { Opt } from \"lib/option\"\nimport icons from \"lib/icons\"\nimport Gtk from \"types/@girs/gtk-3.0/gtk-3.0\"\nimport Gdk from \"gi://Gdk\"\n\nfunction EnumSetter(opt: Opt<string>, values: string[]) {\n    const lbl = Widget.Label({ label: opt.bind().as(v => `${v}`) })\n    const step = (dir: 1 | -1) => {\n        const i = values.findIndex(i => i === lbl.label)\n        opt.setValue(dir > 0\n            ? i + dir > values.length - 1 ? values[0] : values[i + dir]\n            : i + dir < 0 ? values[values.length - 1] : values[i + dir],\n        )\n    }\n    const next = Widget.Button({\n        child: Widget.Icon(icons.ui.arrow.right),\n        on_clicked: () => step(+1),\n    })\n    const prev = Widget.Button({\n        child: Widget.Icon(icons.ui.arrow.left),\n        on_clicked: () => step(-1),\n    })\n    return Widget.Box({\n        class_name: \"enum-setter\",\n        children: [lbl, prev, next],\n    })\n}\n\ntype RowProps<T> = {\n    opt: Opt<T>\n    title: string\n    note?: string\n    type?:\n    | \"number\"\n    | \"color\"\n    | \"float\"\n    | \"object\"\n    | \"string\"\n    | \"enum\"\n    | \"boolean\"\n    | \"img\"\n    | \"font\"\n    enums?: string[]\n    max?: number\n    min?: number\n}\n\nfunction Setter<T>({\n    opt,\n    type = typeof opt.value as RowProps<T>[\"type\"],\n    enums,\n    max = 1000,\n    min = 0,\n}: RowProps<T>) {\n    switch (type) {\n        case \"number\": return Widget.SpinButton({\n            setup(self) {\n                self.set_range(min, max)\n                self.set_increments(1, 5)\n                self.on(\"value-changed\", () => opt.value = self.value as T)\n                self.hook(opt, () => self.value = opt.value as number)\n            },\n        })\n        case \"float\":\n        case \"object\": return Widget.Entry({\n            on_accept: self => opt.value = JSON.parse(self.text || \"\"),\n            setup: self => self.hook(opt, () => self.text = JSON.stringify(opt.value)),\n        })\n        case \"string\": return Widget.Entry({\n            on_accept: self => opt.value = self.text as T,\n            setup: self => self.hook(opt, () => self.text = opt.value as string),\n        })\n        case \"enum\": return EnumSetter(opt as unknown as Opt<string>, enums!)\n        case \"boolean\": return Widget.Switch()\n            .on(\"notify::active\", self => opt.value = self.active as T)\n            .hook(opt, self => self.active = opt.value as boolean)\n\n        case \"img\": return Widget.FileChooserButton()\n            .on(\"selection-changed\", self => {\n                opt.value = self.get_uri()?.replace(\"file://\", \"\") as T\n            })\n\n        case \"font\": return Widget.FontButton({\n            show_size: false,\n            use_size: false,\n            setup: self => self\n                .on(\"notify::font\", ({ font }) => opt.value = font as T)\n                .hook(opt, () => self.font = opt.value as string),\n        })\n        case \"color\": return Widget.ColorButton({\n            setup: self => self\n                .hook(opt, () => {\n                    const rgba = new Gdk.RGBA()\n                    rgba.parse(opt.value as string)\n                    self.rgba = rgba\n                })\n                .on(\"color-set\", ({ rgba: { red, green, blue } }) => {\n                    const hex = (n: number) => {\n                        const c = Math.floor(255 * n).toString(16)\n                        return c.length === 1 ? `0${c}` : c\n                    }\n                    opt.value = `#${hex(red)}${hex(green)}${hex(blue)}` as T\n                }),\n        })\n        default: return Widget.Label({\n            label: `no setter with type ${type}`,\n        })\n    }\n}\n\nexport default <T>(props: RowProps<T>) => Widget.Box<Gtk.Widget>(\n    { class_name: \"row\" },\n    Widget.Box<Gtk.Widget>(\n        { vertical: true, vpack: \"center\" },\n        Widget.Label({\n            xalign: 0,\n            class_name: \"row-title\",\n            label: props.title,\n        }),\n        Widget.Label({\n            xalign: 0,\n            class_name: \"id\",\n            label: props.opt.id,\n        }),\n    ),\n    Widget.Box({ hexpand: true }),\n    Widget.Box(\n        { vpack: \"center\" },\n        Setter(props),\n    ),\n)\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/settings/SettingsDialog.ts",
    "content": "import Gtk from \"gi://Gtk?version=3.0\"\nimport layout from \"./layout\"\nimport icons from \"lib/icons\"\nimport options from \"options\"\n\nconst current = Variable(layout[0].attribute.name)\n\nconst Header = () => Widget.CenterBox({\n    class_name: \"header\",\n    start_widget: Widget.Button({\n        class_name: \"reset\",\n        on_clicked: options.reset,\n        hpack: \"start\",\n        vpack: \"start\",\n        child: Widget.Icon(icons.ui.refresh),\n        tooltip_text: \"Reset\",\n    }),\n    center_widget: Widget.Box({\n        class_name: \"pager horizontal\",\n        children: layout.map(({ attribute: { name, icon } }) => Widget.Button({\n            xalign: 0,\n            class_name: current.bind().as(v => `${v === name ? \"active\" : \"\"}`),\n            on_clicked: () => current.value = name,\n            child: Widget.Box([\n                Widget.Icon(icon),\n                Widget.Label(name),\n            ]),\n        })),\n    }),\n    end_widget: Widget.Button({\n        class_name: \"close\",\n        hpack: \"end\",\n        vpack: \"start\",\n        child: Widget.Icon(icons.ui.close),\n        on_clicked: () => App.closeWindow(\"settings-dialog\"),\n    }),\n})\n\nconst PagesStack = () => Widget.Stack({\n    transition: \"slide_left_right\",\n    children: layout.reduce((obj, page) => ({ ...obj, [page.attribute.name]: page }), {}),\n    shown: current.bind() as never,\n})\n\n// eslint-disable-next-line max-len\nconst RegularWindow = Widget.subclass<typeof Gtk.Window, Gtk.Window.ConstructorProperties>(Gtk.Window)\n\nexport default () => RegularWindow({\n    name: \"settings-dialog\",\n    class_name: \"settings-dialog\",\n    title: \"Settings\",\n    setup(win) {\n        win.on(\"delete-event\", () => {\n            win.hide()\n            return true\n        })\n        win.set_default_size(600, 500)\n    },\n    child: Widget.Box({\n        vertical: true,\n        children: [\n            Header(),\n            PagesStack(),\n        ],\n    }),\n})\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/ags_ts_old/widget/settings/layout.ts",
    "content": "/* eslint-disable max-len */\nimport Row from \"./Row\"\nimport Group from \"./Group\"\nimport Page from \"./Page\"\nimport options from \"options\"\nimport icons from \"lib/icons\"\n\nconst {\n    wallpaper: wp,\n    autotheme: at,\n    font,\n    theme,\n    bar: b,\n    applauncher: al,\n    overview: ov,\n    powermenu: pm,\n    quicksettings: qs,\n    osd,\n} = options\n\nconst {\n    dark,\n    light,\n    scheme,\n    padding,\n    spacing,\n    radius,\n    shadows,\n    widget,\n    border,\n} = theme\n\nexport default [\n    Page(\"Theme\", icons.ui.themes,\n        Group(\"\",\n            Row({ opt: wp, title: \"Wallpaper\", type: \"img\" }),\n            Row({ opt: at, title: \"Auto Generate Color Scheme\" }),\n            Row({ opt: scheme, title: \"Color Scheme\", type: \"enum\", enums: [\"dark\", \"light\"] }),\n        ),\n        Group(\"Dark Colors\",\n            Row({ opt: dark.bg, title: \"Background\", type: \"color\" }),\n            Row({ opt: dark.fg, title: \"Foreground\", type: \"color\" }),\n            Row({ opt: dark.primary.bg, title: \"Primary\", type: \"color\" }),\n            Row({ opt: dark.primary.fg, title: \"On Primary\", type: \"color\" }),\n            Row({ opt: dark.error.bg, title: \"Error\", type: \"color\" }),\n            Row({ opt: dark.error.fg, title: \"On Error\", type: \"color\" }),\n            Row({ opt: dark.widget, title: \"Widget\", type: \"color\" }),\n            Row({ opt: dark.border, title: \"Border\", type: \"color\" }),\n        ),\n        Group(\"Light Colors\",\n            Row({ opt: light.bg, title: \"Background\", type: \"color\" }),\n            Row({ opt: light.fg, title: \"Foreground\", type: \"color\" }),\n            Row({ opt: light.primary.bg, title: \"Primary\", type: \"color\" }),\n            Row({ opt: light.primary.fg, title: \"On Primary\", type: \"color\" }),\n            Row({ opt: light.error.bg, title: \"Error\", type: \"color\" }),\n            Row({ opt: light.error.fg, title: \"On Error\", type: \"color\" }),\n            Row({ opt: light.widget, title: \"Widget\", type: \"color\" }),\n            Row({ opt: light.border, title: \"Border\", type: \"color\" }),\n        ),\n        Group(\"Theme\",\n            Row({ opt: shadows, title: \"Shadows\" }),\n            Row({ opt: widget.opacity, title: \"Widget Opacity\" }),\n            Row({ opt: border.opacity, title: \"Border Opacity\" }),\n            Row({ opt: border.width, title: \"Border Width\" }),\n        ),\n        Group(\"UI\",\n            Row({ opt: padding, title: \"Padding\" }),\n            Row({ opt: spacing, title: \"Spacing\" }),\n            Row({ opt: radius, title: \"Roundness\" }),\n            Row({ opt: font.size, title: \"Font Size\" }),\n            Row({ opt: font.name, title: \"Font Name\", type: \"font\" }),\n        ),\n    ),\n    Page(\"Bar\", icons.ui.toolbars,\n        Group(\"General\",\n            Row({ opt: b.flatButtons, title: \"Flat Buttons\" }),\n            Row({ opt: b.position, title: \"Position\", type: \"enum\", enums: [\"top\", \"bottom\"] }),\n            Row({ opt: b.corners, title: \"Corners\" }),\n            Row({ opt: b.date.format, title: \"Date Format\" }),\n            Row({ opt: b.workspaces.workspaces, title: \"Number of Workspaces\", note: \"0 to make it dynamic\" }),\n        ),\n        Group(\"Launcher\",\n            Row({ opt: b.launcher.icon.icon, title: \"Icon\" }),\n            Row({ opt: b.launcher.icon.colored, title: \"Colored Icon\" }),\n            Row({ opt: b.launcher.label.label, title: \"Label\" }),\n            Row({ opt: b.launcher.label.colored, title: \"Colored Label\" }),\n        ),\n        Group(\"Battery\",\n            Row({ opt: b.battery.bar, title: \"Style\", type: \"enum\", enums: [\"hidden\", \"regular\", \"whole\"] }),\n            Row({ opt: b.battery.blocks, title: \"Number of Blocks\" }),\n            Row({ opt: b.battery.width, title: \"Width of Bar\" }),\n        ),\n        Group(\"Taskbar\",\n            Row({ opt: b.taskbar.monochrome, title: \"Monochrome Icons\" }),\n            Row({ opt: b.taskbar.exclusive, title: \"Exclusive to workspaces\" }),\n        ),\n        Group(\"Media\",\n            Row({ opt: b.media.monochrome, title: \"Monochrome Icons\" }),\n            Row({ opt: b.media.preferred, title: \"Preferred Player\" }),\n            Row({ opt: b.media.direction, title: \"Slide Direction\" }),\n            Row({ opt: b.media.length, title: \"Max Length of Label\" }),\n        ),\n    ),\n    Page(\"General\", icons.ui.settings,\n        Group(\"Applauncher\",\n            Row({ opt: al.iconSize, title: \"Icon Size\" }),\n            Row({ opt: al.width, title: \"Width\" }),\n            Row({ opt: al.maxItem, title: \"Max Items\" }),\n        ),\n        Group(\"Overview\",\n            Row({ opt: ov.scale, title: \"Scale\", max: 100 }),\n            Row({ opt: ov.workspaces, title: \"workspaces\", max: 11, note: \"set this to 0 to make it dynamic\" }),\n            Row({ opt: ov.monochromeIcon, title: \"Monochrome Icons\" }),\n        ),\n        Group(\"Powermenu\",\n            Row({ opt: pm.layout, title: \"Layout\", type: \"enum\", enums: [\"box\", \"line\"] }),\n            Row({ opt: pm.labels, title: \"Show Labels\" }),\n        ),\n        Group(\"Quicksettings\",\n            Row({ opt: qs.avatar.image, title: \"Avatar\", type: \"img\" }),\n            Row({ opt: qs.avatar.size, title: \"Avatar Size\" }),\n            Row({ opt: qs.media.monochromeIcon, title: \"Media Monochrome Icons\" }),\n            Row({ opt: qs.media.coverSize, title: \"Media Cover Art Size\" }),\n        ),\n        Group(\"On Screen Indicator\",\n            Row({ opt: osd.progress.vertical, title: \"Vertical\" }),\n            Row({ opt: osd.progress.pack.h, title: \"Horizontal Alignment\", type: \"enum\", enums: [\"start\", \"center\", \"end\"] }),\n            Row({ opt: osd.progress.pack.v, title: \"Vertical Alignment\", type: \"enum\", enums: [\"start\", \"center\", \"end\"] }),\n        ),\n    ),\n] as const\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/anyrun/stylesheet.css",
    "content": "* {\n   }\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/hypr/Autostart.conf",
    "content": "#   _   _                  _                 _    ____             __ _         #      \n#  | | | |_   _ _ __  _ __| | __ _ _ __   __| |  / ___|___  _ __  / _(_) __ _   #\n#  | |_| | | | | '_ \\| '__| |/ _` | '_ \\ / _` | | |   / _ \\| '_ \\| |_| |/ _` |  #\n#  |  _  | |_| | |_) | |  | | (_| | | | | (_| | | |__| (_) | | | |  _| | (_| |  #\n#  |_| |_|\\__, | .__/|_|  |_|\\__,_|_| |_|\\__,_|  \\____\\___/|_| |_|_| |_|\\__, |  #\n#        |___/|_|                                                      |___/    # \n#                                                                               #\n\n\n\n# See https://wiki.hyprland.org/Configuring/Keywords/ for more\n# exec      = ~/.config/hypr/scripts/launch_ags.sh\nexec      = ~/.config/waybar/launch.sh\nexec      = walker --gapplication-service\nexec-once = dbus-update-activation-environment --all\n\nexec      = swayosd-libinput-backend\n# exec      = swww-daemon\nexec      = swayosd-server \nexec      = sway-audio-idle-inhibit\nexec      = ~/.config/screenlock/lock.sh\nexec      = clipse -listen  \nexec-once = nextcloud --background  \n\nexec = /nix/store/$(ls -la /nix/store | grep 'mate-polkit' | grep '4096' | awk '{print $9}' | sed -n '$p')/libexec/polkit-mate-authentication-agent-1 & \nexec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1\n\nexec-once = nm-applet \n\nexec-once = wl-paste -p --watch clipman store -P --histpath=\"~/.local/share/clipman-primary.json\"\nexec-once = wl-clip-persist --clipboard regular --read-timeout 50 --write-timeout 1000\n\nexec-once = hyprctl setcursor Bibata-Modern-Classic 24\nexec      = hypridle \n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/hypr/KeyBinds.conf",
    "content": "#   _   _                  _                 _    ____             __ _         #      \n#  | | | |_   _ _ __  _ __| | __ _ _ __   __| |  / ___|___  _ __  / _(_) __ _   #\n#  | |_| | | | | '_ \\| '__| |/ _` | '_ \\ / _` | | |   / _ \\| '_ \\| |_| |/ _` |  #\n#  |  _  | |_| | |_) | |  | | (_| | | | | (_| | | |__| (_) | | | |  _| | (_| |  #\n#  |_| |_|\\__, | .__/|_|  |_|\\__,_|_| |_|\\__,_|  \\____\\___/|_| |_|_| |_|\\__, |  #\n#        |___/|_|                                                      |___/    # \n#                                                                               #\n\n\n\n# See https://wiki.hyprland.org/Configuring/Keywords/ for more\n$mainMod = SUPER\n\n# KeyBinds\n\n# Apps\nbind = $mainMod         , return            , exec             , kitty\nbind = $mainMod SHIFT   , return            , exec             , kitty --title kitty_float\nbind = $mainMod         , F                 , exec             , nautilus\n#bind= $mainMod         , B                 , exec             , brave \nbind = $mainMod         , B                 , exec             , firefox \nbind = $mainMod         , C                 , exec             , neovide\nbind = CONTROL SHIFT    , Escape            , exec             , missioncenter\nbind =                  , XF86Keyboard      , exec             , gnome-calculator\nbind = $mainMod         , D                 , exec             , vesktop\nbind = $mainMod         , O                 , exec             , obsidian\n\n# Shell\nbind = $mainMod         , SPACE             , exec             , ~/.config/anyrun/launch.sh\n#bind = $mainMod         , SPACE             , exec             , ~/.config/walker/launch.sh\nbind = $mainMod CONTROL , P                 , exec             , wlogout -b 5 -c 0 -r 0 -T 0 -B 0 \nbind = $mainMod         , R                 , exec             , ~/.config/waybar/launch.sh\nbind = $mainMod Alt_L   , N                 , exec             , ~/.config/swaync/launch.sh\nbind = SUPER            , V                 , exec, kitty --class floating -e zsh -c 'clipse'\n\n# NixOS\nbind = $mainMod Alt_L   , R                 , exec             , hyprctl reload\n\n# System\nbind = $mainMod         , L                 , exec             , hyprlock \nbind = $mainMod SHIFT   , S                 , exec             , grimblast --notify copysave area   ~/Bilder/Screenshots/$(date +'Screenshot_%d-%m-%y_%H-%M.png')\nbind =                  , Print             , exec             , grimblast --notify copysave output ~/Bilder/Screenshots/$(date +'Screenshot_%d-%m-%y_%H-%M.png')\nbind = $mainMod Alt_L   , M                 , exec             , ~/.config/hypr/scripts/w2m.sh\n\n# Window management\nbind = $mainMod         , Q                 , killactive       ,\nbind = $mainMod         , T                 , togglefloating   ,\nbind = $mainMod         , P                 , pseudo           , # dwindle\nbind = $mainMod         , J                 , togglesplit      , # dwindle\nbind = ALT              , Tab               , cyclenext        ,\nbind = $mainMod         , Tab               , bringactivetotop ,\n\n# Move focus with mainMod + arrow keys\nbind = $mainMod , left  , movefocus, l\nbind = $mainMod , right , movefocus, r\nbind = $mainMod , up    , movefocus, u\nbind = $mainMod , down  , movefocus, d\n\n# Switch workspaces with mainMod + [0-9]\nbind = $mainMod , 1     , workspace , 1\nbind = $mainMod , 2     , workspace , 2\nbind = $mainMod , 3     , workspace , 3\nbind = $mainMod , 4     , workspace , 4\nbind = $mainMod , 5     , workspace , 5\nbind = $mainMod , 6     , workspace , 6\nbind = $mainMod , 7     , workspace , 7\nbind = $mainMod , 8     , workspace , 8\nbind = $mainMod , 9     , workspace , 9\nbind = $mainMod , 0     , workspace , 10\n\n# Move active window to a workspace with mainMod + SHIFT + [0-9]\nbind = $mainMod SHIFT , 1 , movetoworkspace , 1\nbind = $mainMod SHIFT , 2 , movetoworkspace , 2\nbind = $mainMod SHIFT , 3 , movetoworkspace , 3\nbind = $mainMod SHIFT , 4 , movetoworkspace , 4\nbind = $mainMod SHIFT , 5 , movetoworkspace , 5\nbind = $mainMod SHIFT , 6 , movetoworkspace , 6\nbind = $mainMod SHIFT , 7 , movetoworkspace , 7\nbind = $mainMod SHIFT , 8 , movetoworkspace , 8\nbind = $mainMod SHIFT , 9 , movetoworkspace , 9\nbind = $mainMod SHIFT , 0 , movetoworkspace , 10\n\n# Move active window in workspace\nbind = $mainMod ALT , left  , movewindow, l\nbind = $mainMod ALT , right , movewindow, r\nbind = $mainMod ALT , up    , movewindow, u\nbind = $mainMod ALT , down  , movewindow, d\n\n# Mediacontrol with mediakeys\nbind = , XF86AudioPrev , exec , playerctl previous\nbind = , XF86AudioPlay , exec , playerctl play-pause\nbind = , XF86AudioNext , exec , playerctl next\n\nbindle = , XF86MonBrightnessUp   , exec , swayosd-client --brightness=raise 5 \nbindle = , XF86MonBrightnessDown , exec , swayosd-client --brightness=lower 5 \nbindle = , XF86AudioRaiseVolume  , exec , swayosd-client --output-volume 5 \nbindle = , XF86AudioLowerVolume  , exec , swayosd-client --output-volume -5 \nbindle = , XF86AudioMicMute      , exec , swayosd-client --input-volume mute-toggle \nbindle = , XF86AudioMute         , exec , swayosd-client --output-volume mute-toggle \n\n# bindle = , XF86MonBrightnessUp   , exec , brightnessctl set +5%\n# bindle = , XF86MonBrightnessDown , exec , brightnessctl set  5%-\n# bindle = , XF86AudioRaiseVolume  , exec , pactl set-sink-volume @DEFAULT_SINK@ +5%\n# bindle = , XF86AudioLowerVolume  , exec , pactl set-sink-volume @DEFAULT_SINK@ -5%\n# bindle = , XF86AudioMicMute      , exec , pactl set-source-mute 70 toggle\n# bindle = , XF86AudioMute      , exec , pactl  set-sink-mute @DEFAULT_SINK@ toggle \n\nbind   = , XF86Favorites         , exec , brightnessctl -s && brightnessctl s 1\nbind   = , XF86Go                , exec , brightnessctl -s && brightnessctl s 0 \nbind   = , Cancel                , exec , brightnessctl -r \n\n# Resize windows with mainMod CTRL + arrowkeys\nbind = $mainMod CONTROL , Right , resizeactive , 30  0\nbind = $mainMod CONTROL , Left  , resizeactive , -30 0\nbind = $mainMod CONTROL , Up    , resizeactive , 0   -30\nbind = $mainMod CONTROL , Down  , resizeactive , 0   30\n\n# Move/resize windows with mainMod + LMB/RMB and dragging\nbindm = $mainMod , mouse:272 , movewindow\nbindm = $mainMod , mouse:273 , resizewindow\n\n\n# AGS\n# bind = $mainMod         , SPACE             , exec             , ags toggle-window applauncher\n# bind = $mainMod SHIFT   , S                 , exec             , ags -r  \"recorder.start()\"\n# bind = $mainMod CONTROL , P                 , exec             , ags toggle-window powermenu\n# bind = $mainMod CONTROL , A                 , exec             , ags toggle-window about\n# bind = $mainMod         , R                 , exec             , ~/.config/hypr/scripts/launch_ags.sh\n\n\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/hypr/Misc.conf",
    "content": "#   _   _                  _                 _    ____             __ _         #\n#  | | | |_   _ _ __  _ __| | __ _ _ __   __| |  / ___|___  _ __  / _(_) __ _   #\n#  | |_| | | | | '_ \\| '__| |/ _` | '_ \\ / _` | | |   / _ \\| '_ \\| |_| |/ _` |  #\n#  |  _  | |_| | |_) | |  | | (_| | | | | (_| | | |__| (_) | | | |  _| | (_| |  #\n#  |_| |_|\\__, | .__/|_|  |_|\\__,_|_| |_|\\__,_|  \\____\\___/|_| |_|_| |_|\\__, |  #\n#        |___/|_|                                                      |___/    #\n#                                                                               #\n\n\n\n# For all categories, see https://wiki.hyprland.org/Configuring/Variables/\ngeneral {\n    allow_tearing  = false \n}\n\ninput {\n    kb_layout      = de\n    kb_variant     =\n    kb_model       =\n    kb_options     =\n    kb_rules       =\n    follow_mouse   = 1\n    natural_scroll = false\n\n    touchpad {\n            natural_scroll       = true\n            scroll_factor        = 0.15\n            tap-to-click         = false\n            tap_button_map       = l\n            clickfinger_behavior = true\n    }\n}\n\ngestures {\n    workspace_swipe                    = true\n    workspace_swipe_fingers            = 3\n    workspace_swipe_distance           = 1000\n    workspace_swipe_min_speed_to_force = 5\n    workspace_swipe_use_r              = true\n}\n\n\n# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more\nmaster {\n    new_is_master = true\n}\n\n# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more\n\nmisc {\n    vfr                      = true\n    #vrr                      = 1\n    animate_manual_resizes   = false\n    focus_on_activate        = false\n    render_ahead_of_time     = false\n    disable_hyprland_logo    = true\n    focus_on_activate        = true\n    key_press_enables_dpms   = true\n}\n\ndebug {\n    overlay = false\n}\n\n# Variables\nenv = XCURSOR_THEME, Bibata-Modern-Classic\nenv = XCURSOR_SIZE, 24\nenv = export TERM=kitty\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/hypr/WindowRules.conf",
    "content": "#   _   _                  _                 _    ____             __ _         #      \n#  | | | |_   _ _ __  _ __| | __ _ _ __   __| |  / ___|___  _ __  / _(_) __ _   #\n#  | |_| | | | | '_ \\| '__| |/ _` | '_ \\ / _` | | |   / _ \\| '_ \\| |_| |/ _` |  #\n#  |  _  | |_| | |_) | |  | | (_| | | | | (_| | | |__| (_) | | | |  _| | (_| |  #\n#  |_| |_|\\__, | .__/|_|  |_|\\__,_|_| |_|\\__,_|  \\____\\___/|_| |_|_| |_|\\__, |  #\n#        |___/|_|                                                      |___/    # \n#                                                                               #\n\n\n\nwindowrulev2 = float        , class:(floating)\nwindowrulev2 = size 60% 60% , class:(floating)\n\nwindowrulev2 = float        , title:(Preferences)\nwindowrulev2 = center       , title:(Preferences)\n\nwindowrulev2 = float        , title:(About)\nwindowrulev2 = center       , title:(About)\n\nwindowrulev2 = float        , class:(BLHeliSuite32xl)\nwindowrulev2 = center       , class:(BLHeliSuite32xl)\n\nwindowrulev2 = float        , class:(nm-connection-editor)\nwindowrulev2 = center       , class:(nm-connection-editor)\n\nwindowrulev2 = float        , class:(ExpressLRS Configurator)\nwindowrulev2 = center       , class:(ExpressLRS Configurator)\n\nwindowrulev2 = float        , class:(betaflight-configurator)\nwindowrulev2 = center       , class:(betaflight-configurator)\nwindowrulev2 = size 80% 80% , class:(betaflight-configurator)\n\nwindowrulev2 = float        , class:(pavucontrol)\n\nwindowrulev2 = float        , class:(com.RoccoRakete.ThemeSwitcher)\nwindowrulev2 = center       , class:(com.RoccoRakete.ThemeSwitcher)\n\nwindowrulev2 = float        , class:(solaar)\n\nwindowrulev2 = float        , class:(org.gnome.World.PikaBackup)\n\nwindowrulev2 = float        , class:(missioncenter)\nwindowrulev2 = size 70% 70% , class:(missioncenter)\nwindowrulev2 = center       , class:(missioncenter)\n\nwindowrulev2 = float        , class:(.blueman-manager-wrapped)\nwindowrulev2 = size 70% 70% , class:(.blueman-manager-wrapped)\nwindowrulev2 = center       , class:(.blueman-manager-wrapped)\n\nwindowrulev2 = float        , class:(ags)\nwindowrulev2 = size 70% 70% , class:(ags)\nwindowrulev2 = center       , class:(ags)\n\nwindowrulev2 = float        , class:(thunar)\nwindowrulev2 = size 70% 70% , class:(thunar)\nwindowrulev2 = center       , class:(thunar)\n\nwindowrulev2 = float        , title:(kitty_float)\nwindowrulev2 = size 70% 70% , title:(kitty_float)\nwindowrulev2 = center       , title:(kitty_float)\n\nwindowrulev2 = float        , class:(org.gnome.Nautilus)\nwindowrulev2 = size 70% 70% , class:(org.gnome.Nautilus)\nwindowrulev2 = center       , class:(org.gnome.Nautilus)\n\nwindowrulev2 = float        , title:(Raspberry Pi Imager)\nwindowrulev2 = size 70% 70% , title:(Raspberry Pi Imager)\nwindowrulev2 = center       , title:(Raspberry Pi Imager)\n\nwindowrulev2 = float        , title:(Open Folder)\nwindowrulev2 = float        , title:(Open File)\nwindowrulev2 = center       , class:(Open Folder)\nwindowrulev2 = center       , class:(Open File)\n\nwindowrulev2 = float        , class:(com.nextcloud.desktopclient.nextcloud)\nwindowrulev2 = center       , class:(com.nextcloud.desktopclient.nextcloud)\n\nwindowrulev2 = float        , class:(gthumb)\nwindowrulev2 = size 70% 80% , class:(gthumb)\nwindowrulev2 = center       , class:(gthumb)\n\nwindowrulev2 = float        , class:(org.gnome.Loupe)\nwindowrulev2 = size 70% 80% , class:(org.gnome.Loupe)\nwindowrulev2 = center       , class:(org.gnome.Loupe)\n\nwindowrulev2 = float        , class:(obsidian)\nwindowrulev2 = size 70% 80% , class:(obsidian)\nwindowrulev2 = center       , class:(obsidian)\n\nwindowrulev2 = float        , class:(Bitwarden)\nwindowrulev2 = size 70% 80% , class:(Bitwarden)\nwindowrulev2 = center       , class:(Bitwarden)\n\nwindowrulev2 = float        , class:(com.hunterwittenborn.Celeste)\nwindowrulev2 = size 60% 70% , class:(com.hunterwittenborn.Celeste)\nwindowrulev2 = center       , class:(com.hunterwittenborn.Celeste)\n\nwindowrulev2 = float        , class:(celeste)\nwindowrulev2 = size 50% 60% , class:(celeste)\nwindowrulev2 = center       , class:(celeste)\n\nwindowrulev2 = float        , class:(io.github.kaii_lb.Overskride)\nwindowrulev2 = size 50% 60% , class:(io.github.kaii_lb.Overskride)\nwindowrulev2 = center       , class:(io.github.kaii_lb.Overskride)\n\nwindowrulev2 = float        , class:(org.gnome.Calculator)\nwindowrulev2 = size 25% 60% , class:(org.gnome.Calculator)\nwindowrulev2 = center       , class:(org.gnome.Calculator)\n\nwindowrulev2 = float        , class:(rustdesk)\n\n# Games\n\n\nwindowrulev2 = fakefullscreen , title:(NFS Underground 2)\nwindowrulev2 = noborder       , title:(NFS Underground 2)\nwindowrulev2 = rounding 0     , title:(NFS Underground 2)\n\nwindowrulev2 = fakefullscreen , title:(DIE SIEDLER - Das Erbe der Könige)\nwindowrulev2 = center         , title:(DIE SIEDLER - Das Erbe der Könige)\nwindowrulev2 = noborder       , title:(DIE SIEDLER - Das Erbe der Könige)\nwindowrulev2 = rounding 0     , title:(DIE SIEDLER - Das Erbe der Könige)\n\nwindowrulev2 = fakefullscreen , title:(Manor Lords)\nwindowrulev2 = noborder       , title:(Manor Lords)\nwindowrulev2 = rounding 0     , title:(Manor Lords)\n\nwindowrulev2 = fakefullscreen , title:(GTA: San Andreas)\nwindowrulev2 = noborder       , title:(GTA: San Andreas)\nwindowrulev2 = rounding 0     , title:(GTA: San Andreas)\n\nwindowrulev2 = fakefullscreen , title:(Fallout: New Vegas)\nwindowrulev2 = noborder       , title:(Fallout: New Vegas)\nwindowrulev2 = rounding 0     , title:(Fallout: New Vegas)\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/hypr/hypridle.conf",
    "content": "general {\n    ignore_dbus_inhibit = false             # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam)\n}\n\nlistener {\n    timeout = 300\n    on-timeout = ~/.config/hypr/scripts/brightness off\n    on-resume = ~/.config/hypr/scripts/brightness on\n}\n\nlistener {\n    timeout = 600\n    on-timeout = hyprlock\n}\n\nlistener {\n    timeout = 900\n    on-timeout = systemctl suspend\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/hypr/hyprland.conf",
    "content": "#   _   _                  _                 _    ____             __ _       \n#  | | | |_   _ _ __  _ __| | __ _ _ __   __| |  / ___|___  _ __  / _(_) __ _ \n#  | |_| | | | | '_ \\| '__| |/ _` | '_ \\ / _` | | |   / _ \\| '_ \\| |_| |/ _` |\n#  |  _  | |_| | |_) | |  | | (_| | | | | (_| | | |__| (_) | | | |  _| | (_| |\n#  |_| |_|\\__, | .__/|_|  |_|\\__,_|_| |_|\\__,_|  \\____\\___/|_| |_|_| |_|\\__, |\n#        |___/|_|                                                      |___/ \n#\n#\n\n# Source files\nsource = ~/.config/hypr/monitors.conf\nsource = ~/.config/hypr/Autostart.conf\nsource = ~/.config/hypr/Misc.conf\nsource = ~/.config/hypr/KeyBinds.conf\nsource = ~/.config/hypr/Decoration.conf\nsource = ~/.config/hypr/WindowRules.conf\n\n\nplugin {\n    hyprexpo {\n        columns = 3\n        gap_size = 5\n        bg_col = rgb(111111)\n        workspace_method = center current # [center/first] [workspace] e.g. first 1 or center m+1\n        enable_gesture = true # laptop touchpad, 4 fingers\n    }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/hypr/hyprlock.conf",
    "content": "general {\n    disable_loading_bar = true\n    hide_cursor         = true\n}\n\nbackground {\n#    path        = screenshot\n    blur_passes = 3\n    blur_size   = 3\n    brightness  = 0.3\n}\n\nlabel {\n    monitor =\n    text = cmd[update:1000] echo \"<span>$(date '+%A, %d. %B')</span>\"\n    # text = cmd[update:1000] echo \"<span foreground='##eeeeee'>$(date '+%A, %d %B')</span>\"\n    color = rgba(250, 250, 250, 0.8)\n    font_size = 16\n    font_family = Ubuntu Nerd Font Medium\n    shadow_passes = 3\n\n    position = 0, -120\n    halign = center\n    valign = top\n}\n\nlabel {\n    monitor =\n    text = cmd[update:1000] echo \"<span>$(date '+%H:%M')</span>\"\n    font_size = 75\n    font_family = Ubuntu Nerd Font Bold\n    shadow_passes = 3\n\n    position = 0, -135\n    halign = center\n    valign = top\n}\n\nimage {\n    monitor =\n    path = ~/face.png\n    size = 130 # lesser side if not 1:1 ratio\n    rounding = -1 # negative values mean circle\n    border_size = 0\n    # border_color = rgb(221, 221, 221)\n    rotate = 0 # degrees, counter-clockwise\n    reload_time = -1 # seconds between reloading, 0 to reload with SIGUSR2\n    reload_cmd =\n\n    position = 0, -50\n    halign = center\n    valign = center\n}\n\nlabel {\n    monitor =\n    text = $USER\n    font_size = 18\n    font_family = Ubuntu Nerd Font Medium\n    shadow_passes = 3\n\n    position = 0, -150\n    halign = center\n    valign = center\n}\n\ninput-field {\n    monitor =\n    size = 260, 40\n    outline_thickness = 3\n    dots_size = 0.33\n    dots_spacing = 0.15\n    dots_center = true\n    outer_color = rgba(000000)\n    inner_color = rgba(200, 200, 200, 0.8)\n    fade_on_empty = false\n    placeholder_text = <span foreground='##000000'>Enter Password</span>\n    hide_input = false\n    shadow_passes = 3\n    rounding = 10\n    fail_color = rgb(FF0000)\n    fail_transition = 300\n\n    position = 0, -210\n    halign = center\n    valign = center\n}\n\nimage {\n    monitor =\n    path = ~/Dokumente/Backgrounds/nixos.png\n    size = 50 # lesser side if not 1:1 ratio\n    rounding = -1 # negative values mean circle\n    border_size = 0\n    # border_color = rgb(221, 221, 221)\n    rotate = 0 # degrees, counter-clockwise\n    reload_time = -1 # seconds between reloading, 0 to reload with SIGUSR2\n    reload_cmd =\n\n    position = 0, 20\n    halign = center\n    valign = bottom\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/hypr/monitors.conf",
    "content": "#   _   _                  _                 _    ____             __ _         #      \n#  | | | |_   _ _ __  _ __| | __ _ _ __   __| |  / ___|___  _ __  / _(_) __ _   #\n#  | |_| | | | | '_ \\| '__| |/ _` | '_ \\ / _` | | |   / _ \\| '_ \\| |_| |/ _` |  #\n#  |  _  | |_| | |_) | |  | | (_| | | | | (_| | | |__| (_) | | | |  _| | (_| |  #\n#  |_| |_|\\__, | .__/|_|  |_|\\__,_|_| |_|\\__,_|  \\____\\___/|_| |_|_| |_|\\__, |  #\n#        |___/|_|                                                      |___/    # \n#                                                                               #\n\n\n\nmonitor   = eDP-1    , preferred       , 320x1440 , 1   , \nmonitor   = HDMI-A-1 , 2560x1440@120.0 , 0x0      , 1.0 , vrr , 1 , bitdepth , 10\n\n# Move active workspace to a monitor with mainMod + CTRL + (SHIFT) + [0-9]\nbind = $mainMod CTRL       , 1 , moveworkspacetomonitor , 1  1\nbind = $mainMod CTRL       , 2 , moveworkspacetomonitor , 2  1\nbind = $mainMod CTRL       , 3 , moveworkspacetomonitor , 3  1\nbind = $mainMod CTRL       , 4 , moveworkspacetomonitor , 4  1\nbind = $mainMod CTRL       , 5 , moveworkspacetomonitor , 5  1\nbind = $mainMod CTRL       , 6 , moveworkspacetomonitor , 6  1\nbind = $mainMod CTRL       , 7 , moveworkspacetomonitor , 7  1\nbind = $mainMod CTRL       , 8 , moveworkspacetomonitor , 8  1\nbind = $mainMod CTRL       , 9 , moveworkspacetomonitor , 9  1\nbind = $mainMod CTRL       , 0 , moveworkspacetomonitor , 10 1\n\nbind = $mainMod CTRL SHIFT , 1 , moveworkspacetomonitor , 1  0\nbind = $mainMod CTRL SHIFT , 2 , moveworkspacetomonitor , 2  0\nbind = $mainMod CTRL SHIFT , 3 , moveworkspacetomonitor , 3  0\nbind = $mainMod CTRL SHIFT , 4 , moveworkspacetomonitor , 4  0\nbind = $mainMod CTRL SHIFT , 5 , moveworkspacetomonitor , 5  0\nbind = $mainMod CTRL SHIFT , 6 , moveworkspacetomonitor , 6  0\nbind = $mainMod CTRL SHIFT , 7 , moveworkspacetomonitor , 7  0\nbind = $mainMod CTRL SHIFT , 8 , moveworkspacetomonitor , 8  0\nbind = $mainMod CTRL SHIFT , 9 , moveworkspacetomonitor , 9  0\nbind = $mainMod CTRL SHIFT , 0 , moveworkspacetomonitor , 10 0\n\n# bindl = , switch:on:Lid Switch  , exec , hyprctl reload\nbindl = , switch:on:Lid Switch  , exec , ~/.config/hypr/scripts/monitor_attached.sh\n#bindl = , switch:on:Lid Switch  , exec , ~/.dots/nixos/hosts/laptop/home-dotfiles-laptop/screenlock/lock.sh\n\n# bindl = , switch:off:Lid Switch , exec , hyprctl reload\nbindl = , switch:off:Lid Switch , exec , ~/.config/hypr/scripts/monitor_dettached.sh\n\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/hypr/presets/monitors.exampleconf",
    "content": "#################################################################################\n#   _   _                  _                 _    ____             __ _         #      \n#  | | | |_   _ _ __  _ __| | __ _ _ __   __| |  / ___|___  _ __  / _(_) __ _   #\n#  | |_| | | | | '_ \\| '__| |/ _` | '_ \\ / _` | | |   / _ \\| '_ \\| |_| |/ _` |  #\n#  |  _  | |_| | |_) | |  | | (_| | | | | (_| | | |__| (_) | | | |  _| | (_| |  #\n#  |_| |_|\\__, | .__/|_|  |_|\\__,_|_| |_|\\__,_|  \\____\\___/|_| |_|_| |_|\\__, |  #\n#        |___/|_|                                                      |___/    # \n#                                                                               #\n#################################################################################\n\n\n\nmonitor = DP-1    , 2560x1440@120.0  , 0x0     , 1.0\n#monitor = HDMI-A-2 , 1920x1080@120.0 , 0x-1080 , 1.0   \n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/hypr/presets/monitors_external.conf",
    "content": "#################################################################################\n#   _   _                  _                 _    ____             __ _         #      \n#  | | | |_   _ _ __  _ __| | __ _ _ __   __| |  / ___|___  _ __  / _(_) __ _   #\n#  | |_| | | | | '_ \\| '__| |/ _` | '_ \\ / _` | | |   / _ \\| '_ \\| |_| |/ _` |  #\n#  |  _  | |_| | |_) | |  | | (_| | | | | (_| | | |__| (_) | | | |  _| | (_| |  #\n#  |_| |_|\\__, | .__/|_|  |_|\\__,_|_| |_|\\__,_|  \\____\\___/|_| |_|_| |_|\\__, |  #\n#        |___/|_|                                                      |___/    # \n#                                                                               #\n#################################################################################\n\n\n\nmonitor   = eDP-1    , 1920x1080@60.0    , 0x0     , 1.0\nmonitor   = HDMI-A-2 , 1920x1080@120.0   , 0x-1080 , 1.0\n\nworkspace = HDMI-A-2 , 0        , persistent:true\nworkspace = HDMI-A-2 , 1        , persistent:true\nworkspace = HDMI-A-2 , 2        , persistent:true\nworkspace = HDMI-A-2 , 3        , persistent:true\nworkspace = HDMI-A-2 , 4        , persistent:true\nworkspace = HDMI-A-2 , 5        , persistent:true\nworkspace = HDMI-A-2 , 6        , persistent:true\nworkspace = HDMI-A-2 , 7        , persistent:true\nworkspace = HDMI-A-2 , 8        , persistent:true\nworkspace = HDMI-A-2 , 9        , persistent:true\n\nworkspace = eDP-1 , 10        , persistent:true\nworkspace = eDP-1 , 11        , persistent:true\nworkspace = eDP-1 , 12        , persistent:true\nworkspace = eDP-1 , 13        , persistent:true\nworkspace = eDP-1 , 14        , persistent:true\nworkspace = eDP-1 , 15        , persistent:true\nworkspace = eDP-1 , 16        , persistent:true\nworkspace = eDP-1 , 17        , persistent:true\nworkspace = eDP-1 , 18        , persistent:true\nworkspace = eDP-1 , 19        , persistent:true\n\n# Switch workspaces with mainMod + [0-9]\nbind = $mainMod CTRL , 1     , workspace , 11\nbind = $mainMod CTRL , 2     , workspace , 12\nbind = $mainMod CTRL , 3     , workspace , 13\nbind = $mainMod CTRL , 4     , workspace , 14\nbind = $mainMod CTRL , 5     , workspace , 15\nbind = $mainMod CTRL , 6     , workspace , 16\nbind = $mainMod CTRL , 7     , workspace , 17\nbind = $mainMod CTRL , 8     , workspace , 18\nbind = $mainMod CTRL , 9     , workspace , 19\nbind = $mainMod CTRL , 0     , workspace , 20\n\n# Move active window to a workspace with mainMod + SHIFT + [0-9]\nbind = $mainMod CTRL SHIFT , 1 , movetoworkspace , 11\nbind = $mainMod CTRL SHIFT , 2 , movetoworkspace , 12\nbind = $mainMod CTRL SHIFT , 3 , movetoworkspace , 13\nbind = $mainMod CTRL SHIFT , 4 , movetoworkspace , 14\nbind = $mainMod CTRL SHIFT , 5 , movetoworkspace , 15\nbind = $mainMod CTRL SHIFT , 6 , movetoworkspace , 16\nbind = $mainMod CTRL SHIFT , 7 , movetoworkspace , 17\nbind = $mainMod CTRL SHIFT , 8 , movetoworkspace , 18\nbind = $mainMod CTRL SHIFT , 9 , movetoworkspace , 19\nbind = $mainMod CTRL SHIFT , 0 , movetoworkspace , 20\n\nexec      = hyprctl dispatch focusmonitor 1\n\nbindl     =       , switch:Lid Switch  , exec , ~/.dots/ags/launch.sh\n#monitor   = eDP-1, disable \n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/hypr/presets/monitors_internal.conf",
    "content": "#################################################################################\n#   _   _                  _                 _    ____             __ _         #      \n#  | | | |_   _ _ __  _ __| | __ _ _ __   __| |  / ___|___  _ __  / _(_) __ _   #\n#  | |_| | | | | '_ \\| '__| |/ _` | '_ \\ / _` | | |   / _ \\| '_ \\| |_| |/ _` |  #\n#  |  _  | |_| | |_) | |  | | (_| | | | | (_| | | |__| (_) | | | |  _| | (_| |  #\n#  |_| |_|\\__, | .__/|_|  |_|\\__,_|_| |_|\\__,_|  \\____\\___/|_| |_|_| |_|\\__, |  #\n#        |___/|_|                                                      |___/    # \n#                                                                               #\n#################################################################################\n\n\n\nmonitor   = eDP-1    , 1920x1080@60.0  , 0x0  , 1.0\n\nworkspace = eDP-1 , 0        , persistent:true\nworkspace = eDP-1 , 1        , persistent:true\nworkspace = eDP-1 , 2        , persistent:true\nworkspace = eDP-1 , 3        , persistent:true\nworkspace = eDP-1 , 4        , persistent:true\nworkspace = eDP-1 , 5        , persistent:true\nworkspace = eDP-1 , 6        , persistent:true\nworkspace = eDP-1 , 7        , persistent:true\nworkspace = eDP-1 , 8        , persistent:true\nworkspace = eDP-1 , 9        , persistent:true\n\n\n# lock screen if lid is closed \nbindl     =       , switch:Lid Switch  , exec , gtklock\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/hypr/scripts/brightness",
    "content": "#!/bin/sh\n\nprevious_brightness=$(brightnessctl g)\n\ncase $1 in\n    off)\n        brightnessctl -s -q\n        previous_brightness=$(brightnessctl g)\n        current_brightness=$previous_brightness\n        while [ \"$current_brightness\" -gt 1 ]; do\n            current_brightness=$((current_brightness - 1200))\n            brightnessctl s -q $current_brightness\n            sleep 0.03\n        done\n        ;;\n\n    on)\n        brightnessctl -r -q\n        ;;\nesac\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/hypr/scripts/launch_ags.sh",
    "content": "#!/usr/bin/env zsh\n\npkill  ags\n\n# Launch ags\necho \"---\" | tee -a /tmp/ags.log\nags 2>&1 | tee -a /tmp/ags.log & disown\n\necho \"shell launched...\""
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/hypr/scripts/logoutlaunch.sh",
    "content": "#!/usr/bin/env sh\n\n# set variables\nwLayout=\"$HOME/.config/wlogout/layout_$1\"\nwlTmplt=\"$HOME/.config/wlogout/style_$1.css\"\n\n# set font size\nfntSize=`gsettings get org.gnome.desktop.interface font-name | sed \"s/'//g\" | awk '{print $2}'`\nexport fntSize=$(( fntSize * 2 ))\n\n# set scaling as per monitor res\nres=`cat /sys/class/drm/*/modes | head -1 | cut -d 'x' -f 2`\ncase $1 in\n    1)  wlColms=1\n        export mgn=$(( res * 10 / 100 ))\n        export hvr=$(( res * 5 / 100 )) ;;\n    2)  wlColms=5\n        export mgn=$(( res * 8 / 100 ))\n        export mgn2=$(( res * 65 / 100 ))\n        export hvr=$(( res * 3 / 100 ))\n        export hvr2=$(( res * 60 / 100 )) ;;\n    *)  echo \"Error: invalid parameter passed...\"\n        exit 1 ;;\nesac\n\n# eval config files\nwlStyle=`envsubst < $wlTmplt`\n\n# launch wlogout\nwlogout -b $wlColms -c 0 -r 0 --layout $wLayout --css <(echo \"$wlStyle\") --protocol layer-shell\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/hypr/scripts/monitor_attached.sh",
    "content": "#!/bin/sh\n\nhyprctl keyword monitor \"eDP-1 , preferred , auto , 1 , mirror , HDMI-A-1\"\nhyprctl dispatch moveworkspacetomonitor 1  1\nhyprctl dispatch moveworkspacetomonitor 2  1\nhyprctl dispatch moveworkspacetomonitor 3  1\nhyprctl dispatch moveworkspacetomonitor 4  1\nhyprctl dispatch moveworkspacetomonitor 5  1\nhyprctl dispatch moveworkspacetomonitor 6  1\nhyprctl dispatch moveworkspacetomonitor 7  1\nhyprctl dispatch moveworkspacetomonitor 8  1\nhyprctl dispatch moveworkspacetomonitor 9  1\nhyprctl dispatch moveworkspacetomonitor 10 1\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/hypr/scripts/monitor_dettached.sh",
    "content": "#!/bin/sh\nhyprctl keyword monitor \"eDP-1 , preferred , 320x1440 , 1 ,\" \n#hyprctl dispatch moveworkspacetomonitor 1  0\n#hyprctl dispatch moveworkspacetomonitor 2  0\n#hyprctl dispatch moveworkspacetomonitor 3  0\n#hyprctl dispatch moveworkspacetomonitor 4  0\n#hyprctl dispatch moveworkspacetomonitor 5  0\n#hyprctl dispatch moveworkspacetomonitor 6  0\n#hyprctl dispatch moveworkspacetomonitor 7  0\n#hyprctl dispatch moveworkspacetomonitor 8  0\n#hyprctl dispatch moveworkspacetomonitor 9  0\n#hyprctl dispatch moveworkspacetomonitor 10 0\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/hypr/scripts/w2m.sh",
    "content": "#!/bin/sh\n\nhyprctl dispatch moveworkspacetomonitor 1  1\nhyprctl dispatch moveworkspacetomonitor 2  1\nhyprctl dispatch moveworkspacetomonitor 3  1\nhyprctl dispatch moveworkspacetomonitor 4  1\nhyprctl dispatch moveworkspacetomonitor 5  1\nhyprctl dispatch moveworkspacetomonitor 6  1\nhyprctl dispatch moveworkspacetomonitor 7  1\nhyprctl dispatch moveworkspacetomonitor 8  1\nhyprctl dispatch moveworkspacetomonitor 9  1\nhyprctl dispatch moveworkspacetomonitor 10 1\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/neofetch/ascii.txt",
    "content": "    .--.\n   |o_o |\n   |:_/ |\n  //   \\ \\\n (|     | )\n/'\\_   _/`\\\n\\___)=(___/\n\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/neofetch/config.conf",
    "content": "print_info() {\n    prin \"\"\n    prin \"$(color 6)󰌢 \"\"ThinkPad T14 G3\"\n    info underline\n    info \"$(color 7)╭\"$(color 1)\"󰣇 \" distro\n    info \"$(color 7)├\"$(color 2)\" \" kernel\n    info \"$(color 7)├\"$(color 3)\" \" uptime\n    info \"$(color 7)├\"$(color 5)\" \" de \n    info \"$(color 7)├\"$(color 4)\" \" packages\n    info \"$(color 7)├\"$(color 6)\"󰞱 \" cpu\n    info \"$(color 7)╰\"$(color 2)\"󰍛 \" memory\n    prin \"\"\n    prin \"$(color 3)󰮯 $(color 2)  $(color 1) $(color 4)  $(color 5) $(color 6)  $(color 7)󰊠\"\n    #prin \"\"\n    prin \"$(color 3)Hi$(color 7), $(color 2)M$(color 1)o$(color 4)m $(color 5)=$(color 6)) \"\n\n}\n\n\n\n# Title\n\n\n# Hide/Show Fully qualified domain name.\n#\n# Default:  'off'\n# Values:   'on', 'off'\n# Flag:     --title_fqdn\ntitle_fqdn=\"off\"\n\n\n# Kernel\n\n\n# Shorten the output of the kernel function.\n#\n# Default:  'on'\n# Values:   'on', 'off'\n# Flag:     --kernel_shorthand\n# Supports: Everything except *BSDs (except PacBSD and PC-BSD)\n#\n# Example:\n# on:  '4.8.9-1-ARCH'\n# off: 'Linux 4.8.9-1-ARCH'\nkernel_shorthand=\"on\"\n\n\n# Distro\n\n\n# Shorten the output of the distro function\n#\n# Default:  'off'\n# Values:   'on', 'tiny', 'off'\n# Flag:     --distro_shorthand\n# Supports: Everything except Windows and Haiku\ndistro_shorthand=\"on\"\n\n# Show/Hide OS Architecture.\n# Show 'x86_64', 'x86' and etc in 'Distro:' output.\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --os_arch\n#\n# Example:\n# on:  'Arch Linux x86_64'\n# off: 'Arch Linux'\nos_arch=\"off\"\n\n\n# Uptime\n\n\n# Shorten the output of the uptime function\n#\n# Default: 'on'\n# Values:  'on', 'tiny', 'off'\n# Flag:    --uptime_shorthand\n#\n# Example:\n# on:   '2 days, 10 hours, 3 mins'\n# tiny: '2d 10h 3m'\n# off:  '2 days, 10 hours, 3 minutes'\nuptime_shorthand=\"on\"\n\n\n# Memory\n\n\n# Show memory pecentage in output.\n#\n# Default: 'off'\n# Values:  'on', 'off'\n# Flag:    --memory_percent\n#\n# Example:\n# on:   '1801MiB / 7881MiB (22%)'\n# off:  '1801MiB / 7881MiB'\nmemory_percent=\"off\"\n\n# Change memory output unit.\n#\n# Default: 'mib'\n# Values:  'kib', 'mib', 'gib'\n# Flag:    --memory_unit\n#\n# Example:\n# kib  '1020928KiB / 7117824KiB'\n# mib  '1042MiB / 6951MiB'\n# gib: ' 0.98GiB / 6.79GiB'\nmemory_unit=\"gib\"\n\n\n# Packages\n\n\n# Show/Hide Package Manager names.\n#\n# Default: 'tiny'\n# Values:  'on', 'tiny' 'off'\n# Flag:    --package_managers\n#\n# Example:\n# on:   '998 (pacman), 8 (flatpak), 4 (snap)'\n# tiny: '908 (pacman, flatpak, snap)'\n# off:  '908'\npackage_managers=\"off\"\n\n\n# Shell\n\n\n# Show the path to $SHELL\n#\n# Default: 'off'\n# Values:  'on', 'off'\n# Flag:    --shell_path\n#\n# Example:\n# on:  '/bin/bash'\n# off: 'bash'\nshell_path=\"off\"\n\n# Show $SHELL version\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --shell_version\n#\n# Example:\n# on:  'bash 4.4.5'\n# off: 'bash'\nshell_version=\"on\"\n\n\n# CPU\n\n\n# CPU speed type\n#\n# Default: 'bios_limit'\n# Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'.\n# Flag:    --speed_type\n# Supports: Linux with 'cpufreq'\n# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value.\nspeed_type=\"bios_limit\"\n\n# CPU speed shorthand\n#\n# Default: 'off'\n# Values: 'on', 'off'.\n# Flag:    --speed_shorthand\n# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz\n#\n# Example:\n# on:    'i7-6500U (4) @ 3.1GHz'\n# off:   'i7-6500U (4) @ 3.100GHz'\nspeed_shorthand=\"on\"\n\n# Enable/Disable CPU brand in output.\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --cpu_brand\n#\n# Example:\n# on:   'Intel i7-6500U'\n# off:  'i7-6500U (4)'\ncpu_brand=\"off\"\n\n# CPU Speed\n# Hide/Show CPU speed.\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --cpu_speed\n#\n# Example:\n# on:  'Intel i7-6500U (4) @ 3.1GHz'\n# off: 'Intel i7-6500U (4)'\ncpu_speed=\"off\"\n\n# CPU Cores\n# Display CPU cores in output\n#\n# Default: 'logical'\n# Values:  'logical', 'physical', 'off'\n# Flag:    --cpu_cores\n# Support: 'physical' doesn't work on BSD.\n#\n# Example:\n# logical:  'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores)\n# physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores)\n# off:      'Intel i7-6500U @ 3.1GHz'\ncpu_cores=\"off\"\n\n# CPU Temperature\n# Hide/Show CPU temperature.\n# Note the temperature is added to the regular CPU function.\n#\n# Default: 'off'\n# Values:  'C', 'F', 'off'\n# Flag:    --cpu_temp\n# Supports: Linux, BSD\n# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable\n#       coretemp kernel module. This only supports newer Intel processors.\n#\n# Example:\n# C:   'Intel i7-6500U (4) @ 3.1GHz [27.2°C]'\n# F:   'Intel i7-6500U (4) @ 3.1GHz [82.0°F]'\n# off: 'Intel i7-6500U (4) @ 3.1GHz'\ncpu_temp=\"off\"\n\n\n# GPU\n\n\n# Enable/Disable GPU Brand\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --gpu_brand\n#\n# Example:\n# on:  'AMD HD 7950'\n# off: 'HD 7950'\ngpu_brand=\"on\"\n\n# Which GPU to display\n#\n# Default: 'all'\n# Values:  'all', 'dedicated', 'integrated'\n# Flag:    --gpu_type\n# Supports: Linux\n#\n# Example:\n# all:\n#   GPU1: AMD HD 7950\n#   GPU2: Intel Integrated Graphics\n#\n# dedicated:\n#   GPU1: AMD HD 7950\n#\n# integrated:\n#   GPU1: Intel Integrated Graphics\ngpu_type=\"dedicated\"\n\n\n# Resolution\n\n\n# Display refresh rate next to each monitor\n# Default: 'off'\n# Values:  'on', 'off'\n# Flag:    --refresh_rate\n# Supports: Doesn't work on Windows.\n#\n# Example:\n# on:  '1920x1080 @ 60Hz'\n# off: '1920x1080'\nrefresh_rate=\"off\"\n\n\n# Gtk Theme / Icons / Font\n\n\n# Shorten output of GTK Theme / Icons / Font\n#\n# Default: 'off'\n# Values:  'on', 'off'\n# Flag:    --gtk_shorthand\n#\n# Example:\n# on:  'Numix, Adwaita'\n# off: 'Numix [GTK2], Adwaita [GTK3]'\ngtk_shorthand=\"off\"\n\n\n# Enable/Disable gtk2 Theme / Icons / Font\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --gtk2\n#\n# Example:\n# on:  'Numix [GTK2], Adwaita [GTK3]'\n# off: 'Adwaita [GTK3]'\ngtk2=\"on\"\n\n# Enable/Disable gtk3 Theme / Icons / Font\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --gtk3\n#\n# Example:\n# on:  'Numix [GTK2], Adwaita [GTK3]'\n# off: 'Numix [GTK2]'\ngtk3=\"on\"\n\n\n# IP Address\n\n\n# Website to ping for the public IP\n#\n# Default: 'http://ident.me'\n# Values:  'url'\n# Flag:    --ip_host\npublic_ip_host=\"http://ident.me\"\n\n# Public IP timeout.\n#\n# Default: '2'\n# Values:  'int'\n# Flag:    --ip_timeout\npublic_ip_timeout=2\n\n\n# Desktop Environment\n\n\n# Show Desktop Environment version\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --de_version\nde_version=\"on\"\n\n\n# Disk\n\n\n# Which disks to display.\n# The values can be any /dev/sdXX, mount point or directory.\n# NOTE: By default we only show the disk info for '/'.\n#\n# Default: '/'\n# Values:  '/', '/dev/sdXX', '/path/to/drive'.\n# Flag:    --disk_show\n#\n# Example:\n# disk_show=('/' '/dev/sdb1'):\n#      'Disk (/): 74G / 118G (66%)'\n#      'Disk (/mnt/Videos): 823G / 893G (93%)'\n#\n# disk_show=('/'):\n#      'Disk (/): 74G / 118G (66%)'\n#\ndisk_show=('/')\n\n# Disk subtitle.\n# What to append to the Disk subtitle.\n#\n# Default: 'mount'\n# Values:  'mount', 'name', 'dir', 'none'\n# Flag:    --disk_subtitle\n#\n# Example:\n# name:   'Disk (/dev/sda1): 74G / 118G (66%)'\n#         'Disk (/dev/sdb2): 74G / 118G (66%)'\n#\n# mount:  'Disk (/): 74G / 118G (66%)'\n#         'Disk (/mnt/Local Disk): 74G / 118G (66%)'\n#         'Disk (/mnt/Videos): 74G / 118G (66%)'\n#\n# dir:    'Disk (/): 74G / 118G (66%)'\n#         'Disk (Local Disk): 74G / 118G (66%)'\n#         'Disk (Videos): 74G / 118G (66%)'\n#\n# none:   'Disk: 74G / 118G (66%)'\n#         'Disk: 74G / 118G (66%)'\n#         'Disk: 74G / 118G (66%)'\ndisk_subtitle=\"mount\"\n\n# Disk percent.\n# Show/Hide disk percent.\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --disk_percent\n#\n# Example:\n# on:  'Disk (/): 74G / 118G (66%)'\n# off: 'Disk (/): 74G / 118G'\ndisk_percent=\"on\"\n\n\n# Song\n\n\n# Manually specify a music player.\n#\n# Default: 'auto'\n# Values:  'auto', 'player-name'\n# Flag:    --music_player\n#\n# Available values for 'player-name':\n#\n# amarok\n# audacious\n# banshee\n# bluemindo\n# clementine\n# cmus\n# deadbeef\n# deepin-music\n# dragon\n# elisa\n# exaile\n# gnome-music\n# gmusicbrowser\n# gogglesmm\n# guayadeque\n# io.elementary.music\n# iTunes\n# juk\n# lollypop\n# mocp\n# mopidy\n# mpd\n# muine\n# netease-cloud-music\n# olivia\n# playerctl\n# pogo\n# pragha\n# qmmp\n# quodlibet\n# rhythmbox\n# sayonara\n# smplayer\n# spotify\n# strawberry\n# tauonmb\n# tomahawk\n# vlc\n# xmms2d\n# xnoise\n# yarock\nmusic_player=\"mpd\"\n\n# Format to display song information.\n#\n# Default: '%artist% - %album% - %title%'\n# Values:  '%artist%', '%album%', '%title%'\n# Flag:    --song_format\n#\n# Example:\n# default: 'Song: Jet - Get Born - Sgt Major'\nsong_format=\"%artist% - %album% - %title%\"\n\n# Print the Artist, Album and Title on separate lines\n#\n# Default: 'off'\n# Values:  'on', 'off'\n# Flag:    --song_shorthand\n#\n# Example:\n# on:  'Artist: The Fratellis'\n#      'Album: Costello Music'\n#      'Song: Chelsea Dagger'\n#\n# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger'\nsong_shorthand=\"off\"\n\n# 'mpc' arguments (specify a host, password etc).\n#\n# Default:  ''\n# Example: mpc_args=(-h HOST -P PASSWORD)\nmpc_args=()\n\n\n# Text Colors\n\n\n# Text Colors\n#\n# Default:  'distro'\n# Values:   'distro', 'num' 'num' 'num' 'num' 'num' 'num'\n# Flag:     --colors\n#\n# Each number represents a different part of the text in\n# this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info'\n#\n# Example:\n# colors=(distro)      - Text is colored based on Distro colors.\n# colors=(4 6 1 8 8 6) - Text is colored in the order above.\ncolors=(distro)\n\n\n# Text Options\n\n\n# Toggle bold text\n#\n# Default:  'on'\n# Values:   'on', 'off'\n# Flag:     --bold\nbold=\"on\"\n\n# Enable/Disable Underline\n#\n# Default:  'on'\n# Values:   'on', 'off'\n# Flag:     --underline\nunderline_enabled=\"on\"\n\n# Underline character\n#\n# Default:  '-'\n# Values:   'string'\n# Flag:     --underline_char\nunderline_char=\"-\"\n\n\n# Info Separator\n# Replace the default separator with the specified string.\n#\n# Default:  ':'\n# Flag:     --separator\n#\n# Example:\n# separator=\"->\":   'Shell-> bash'\n# separator=\" =\":   'WM = dwm'\nseparator=\"󰇙\"\n\n\n# Color Blocks\n\n\n# Color block range\n# The range of colors to print.\n#\n# Default:  '0', '15'\n# Values:   'num'\n# Flag:     --block_range\n#\n# Example:\n#\n# Display colors 0-7 in the blocks.  (8 colors)\n# neofetch --block_range 0 7\n#\n# Display colors 0-15 in the blocks. (16 colors)\n# neofetch --block_range 0 15\nblock_range=(0 15)\n\n# Toggle color blocks\n#\n# Default:  'on'\n# Values:   'on', 'off'\n# Flag:     --color_blocks\ncolor_blocks=\"on\"\n\n# Color block width in spaces\n#\n# Default:  '3'\n# Values:   'num'\n# Flag:     --block_width\nblock_width=3\n\n# Color block height in lines\n#\n# Default:  '1'\n# Values:   'num'\n# Flag:     --block_height\nblock_height=1\n\n# Color Alignment\n#\n# Default: 'auto'\n# Values: 'auto', 'num'\n# Flag: --col_offset\n#\n# Number specifies how far from the left side of the terminal (in spaces) to\n# begin printing the columns, in case you want to e.g. center them under your\n# text.\n# Example:\n# col_offset=\"auto\" - Default behavior of neofetch\n# col_offset=7      - Leave 7 spaces then print the colors\ncol_offset=\"auto\"\n\n# Progress Bars\n\n\n# Bar characters\n#\n# Default:  '-', '='\n# Values:   'string', 'string'\n# Flag:     --bar_char\n#\n# Example:\n# neofetch --bar_char 'elapsed' 'total'\n# neofetch --bar_char '-' '='\nbar_char_elapsed=\"-\"\nbar_char_total=\"=\"\n\n# Toggle Bar border\n#\n# Default:  'on'\n# Values:   'on', 'off'\n# Flag:     --bar_border\nbar_border=\"on\"\n\n# Progress bar length in spaces\n# Number of chars long to make the progress bars.\n#\n# Default:  '15'\n# Values:   'num'\n# Flag:     --bar_length\nbar_length=15\n\n# Progress bar colors\n# When set to distro, uses your distro's logo colors.\n#\n# Default:  'distro', 'distro'\n# Values:   'distro', 'num'\n# Flag:     --bar_colors\n#\n# Example:\n# neofetch --bar_colors 3 4\n# neofetch --bar_colors distro 5\nbar_color_elapsed=\"distro\"\nbar_color_total=\"distro\"\n\n\n# Info display\n# Display a bar with the info.\n#\n# Default: 'off'\n# Values:  'bar', 'infobar', 'barinfo', 'off'\n# Flags:   --cpu_display\n#          --memory_display\n#          --battery_display\n#          --disk_display\n#\n# Example:\n# bar:     '[---=======]'\n# infobar: 'info [---=======]'\n# barinfo: '[---=======] info'\n# off:     'info'\ncpu_display=\"off\"\nmemory_display=\"off\"\nbattery_display=\"off\"\ndisk_display=\"off\"\n\n\n# Backend Settings\n\n\n# Image backend.\n#\n# Default:  'ascii'\n# Values:   'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off',\n#           'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'\n# Flag:     --backend\nimage_backend=\"kitty\"\n\n# Image Source\n#\n# Which image or ascii file to display.\n#\n# Default:  'auto'\n# Values:   'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'\n#           'command output (neofetch --ascii \"$(fortune | cowsay -W 30)\")'\n# Flag:     --source\n#\n# NOTE: 'auto' will pick the best image source for whatever image backend is used.\n#       In ascii mode, distro ascii art will be used and in an image mode, your\n#       wallpaper will be used.\nimage_source=\"$HOME/.dots/nixos/hosts/laptop/home-dotfiles-laptop/ags/assets/nixos.png\"\n\n\n# Ascii Options\n\n\n# Ascii distro\n# Which distro's ascii art to display.\n#\n# Default: 'auto'\n# Values:  'auto', 'distro_name'\n# Flag:    --ascii_distro\n# NOTE: AIX, Alpine, Anarchy, Android, Antergos, antiX, \"AOSC OS\",\n#       \"AOSC OS/Retro\", Apricity, ArcoLinux, ArchBox, ARCHlabs,\n#       ArchStrike, XFerience, ArchMerge, Arch, Artix, Arya, Bedrock,\n#       Bitrig, BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD,\n#       BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS,\n#       Chapeau, Chrom*, Cleanjaro, ClearOS, Clear_Linux, Clover,\n#       Condres, Container_Linux, CRUX, Cucumber, Debian, Deepin,\n#       DesaOS, Devuan, DracOS, DarkOs, DragonFly, Drauger, Elementary,\n#       EndeavourOS, Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD,\n#       FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo, Pentoo,\n#       gNewSense, GNOME, GNU, GoboLinux, Grombyang, Guix, Haiku, Huayra,\n#       Hyperbola, janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion,\n#       Korora, KSLinux, Kubuntu, LEDE, LFS, Linux_Lite,\n#       LMDE, Lubuntu, Lunar, macos, Mageia, MagpieOS, Mandriva,\n#       Manjaro, Maui, Mer, Minix, LinuxMint, MX_Linux, Namib,\n#       Neptune, NetBSD, Netrunner, Nitrux, NixOS, Nurunner,\n#       NuTyX, OBRevenge, OpenBSD, openEuler, OpenIndiana, openmamba,\n#       OpenMandriva, OpenStage, OpenWrt, osmc, Oracle, OS Elbrus, PacBSD,\n#       Parabola, Pardus, Parrot, Parsix, TrueOS, PCLinuxOS, Peppermint,\n#       popos, Porteus, PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix,\n#       Raspbian, Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan,\n#       Regata, Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific,\n#       Septor, SereneLinux, SharkLinux, Siduction, Slackware, SliTaz,\n#       SmartOS, Solus, Source_Mage, Sparky, Star, SteamOS, SunOS,\n#       openSUSE_Leap, openSUSE_Tumbleweed, openSUSE, SwagArch, Tails,\n#       Trisquel, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio,\n#       Ubuntu, Venom, Void, Obarun, windows10, Windows7, Xubuntu, Zorin,\n#       and IRIX have ascii logos\n# NOTE: Arch, Ubuntu, Redhat, and Dragonfly have 'old' logo variants.\n#       Use '{distro name}_old' to use the old logos.\n# NOTE: Ubuntu has flavor variants.\n#       Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME,\n#       Ubuntu-Studio, Ubuntu-Mate  or Ubuntu-Budgie to use the flavors.\n# NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu,\n#       CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android,\n#       Antrix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola,\n#       Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS,\n#       Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian,\n#       postmarketOS, and Void have a smaller logo variant.\n#       Use '{distro name}_small' to use the small variants.\nascii_distro=\"arch_small\"\n\n# Ascii Colors\n#\n# Default:  'distro'\n# Values:   'distro', 'num' 'num' 'num' 'num' 'num' 'num'\n# Flag:     --ascii_colors\n#\n# Example:\n# ascii_colors=(distro)      - Ascii is colored based on Distro colors.\n# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors.\nascii_colors=(distro)\n\n# Bold ascii logo\n# Whether or not to bold the ascii logo.\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --ascii_bold\nascii_bold=\"on\"\n\n\n# Image Options\n\n\n# Image loop\n# Setting this to on will make neofetch redraw the image constantly until\n# Ctrl+C is pressed. This fixes display issues in some terminal emulators.\n#\n# Default:  'off'\n# Values:   'on', 'off'\n# Flag:     --loop\nimage_loop=\"off\"\n\n# Thumbnail directory\n#\n# Default: '~/.cache/thumbnails/neofetch'\n# Values:  'dir'\nthumbnail_dir=\"${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch\"\n\n# Crop mode\n#\n# Default:  'normal'\n# Values:   'normal', 'fit', 'fill'\n# Flag:     --crop_mode\n#\n# See this wiki page to learn about the fit and fill options.\n# https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F\ncrop_mode=\"fit\"\n\n# Crop offset\n# Note: Only affects 'normal' crop mode.\n#\n# Default:  'center'\n# Values:   'northwest', 'north', 'northeast', 'west', 'center'\n#           'east', 'southwest', 'south', 'southeast'\n# Flag:     --crop_offset\ncrop_offset=\"center\"\n\n# Image size\n# The image is half the terminal width by default.\n#\n# Default: 'auto'\n# Values:  'auto', '00px', '00%', 'none'\n# Flags:   --image_size\n#          --size\nimage_size=\"350px\"\n\n# Gap between image and text\n#\n# Default: '3'\n# Values:  'num', '-num'\n# Flag:    --gap\ngap=1\n\n# Image offsets\n# Only works with the w3m backend.\n#\n# Default: '0'\n# Values:  'px'\n# Flags:   --xoffset\n#          --yoffset\nyoffset=0\nxoffset=0\n\n# Image background color\n# Only works with the w3m backend.\n#\n# Default: ''\n# Values:  'color', 'blue'\n# Flag:    --b\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/screenlock/lock.sh",
    "content": "#!/usr/bin/env sh\n\n# Path to config file\nCONFIG_FILE=~/.config/screenlock/lock_config.conf\n\n# read config file\nsource \"$CONFIG_FILE\"\n\n# Initialize error count\nerrors=0\n\n# check if config file input of \"LID_STATUS\" is valid\nif [ ! -f \"$LID_STATUS\" ]; then\n  echo \"LID_STATUS file does not exist or is not readable.\"\n  ((errors++))\nfi\n\n# check if config file input of \"EXTERNAL_MONITOR_STATUS\" is valid\nif [ ! -f \"$EXTERNAL_MONITOR_STATUS\" ]; then\n  echo \"EXTERNAL_MONITOR_STATUS file does not exist or is not readable.\"\n  ((errors++))\nfi\n\n# check if config file input of \"LID_CLOSED_CONDITION\" is valid\nif [ \"$LID_CLOSED_CONDITION\" != \"closed\" ] && [ \"$LID_CLOSED_CONDITION\" != \"open\" ]; then\n  echo \"LID_CLOSED_CONDITION must be either 'closed' or 'open'.\"\n  ((errors++))\nfi\n\n# check if config file input of \"EXTERNAL_MONITOR_CONDITION\" is valid\nif [ \"$EXTERNAL_MONITOR_CONDITION\" != \"disconnected\" ] && [ \"$EXTERNAL_MONITOR_CONDITION\" != \"connected\" ]; then\n  echo \"EXTERNAL_MONITOR_CONDITION must be either 'disconnected' or 'connected'.\"\n  ((errors++))\nfi\n\n# check if config file input of \"LOCK_COMMAND\" is valid\n#if ! command -v \"$LOCK_COMMAND\" &> /dev/null; then\n#    echo \"Screenlocker '$LOCK_COMMAND' is not installed or not in PATH.\"\n#    ((errors++))\n#fi\n\n# Output status\nif [ $errors != 0 ]; then\n  echo \"There are $errors errors in the configuration. Please correct them before running the script.\"\n  exit 1\nfi\n\nwhile true; do\n  # check conditions\n  if [[ $(cat \"$LID_STATUS\") == *\"$LID_CLOSED_CONDITION\"* && $(cat \"$EXTERNAL_MONITOR_STATUS\") == *\"$EXTERNAL_MONITOR_CONDITION\"* ]]; then\n    # execute screenlocker\n    $LOCK_COMMAND $LOCK_COMMAND_PARAMS\n  fi\n  sleep 1\ndone\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/screenlock/lock_config.conf",
    "content": "# Config file for screenlocker\n\n# path to lid status file\nLID_STATUS=\"/proc/acpi/button/lid/LID/state\"\n\n# lid closed status (output of i.e.: \"/proc/acpi/button/lid/LID/state\")\nLID_CLOSED_CONDITION=\"closed\"\n\n# path to external monitor status file\nEXTERNAL_MONITOR_STATUS=\"/sys/class/drm/card1-HDMI-A-1/status\"\n\n# external monitor connection status (output of i.e.: \"/sys/class/drm/card0-HDMI-A-1/status\")\nEXTERNAL_MONITOR_CONDITION=\"disconnected\"\n\n# command of the screenlocker to be executed\nLOCK_COMMAND=\"hyprlock\"\n\n# additional parameters for the screenlocker command\nLOCK_COMMAND_PARAMS=\"\"\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/screenlock/lock_screen.sh",
    "content": "#!/usr/bin/env zsh\n\nif [ ! -d \"/tmp/hypr/latest_screenshot\" ]; then\n    mkdir -p /tmp/hypr/latest_screenshot\nelse\n    echo \"Directory /tmp/hypr/latest_screenshot already exists... continue\"\nfi\n\nplayerctl pause\n\ngrimblast save output /tmp/hypr/latest_screenshot/latest.png &&\n\nconvert /tmp/hypr/latest_screenshot/latest.png -blur 0x3 -brightness-contrast -5x0 /tmp/hypr/latest_screenshot/latest_blur.png &&\n\nswaylock -f &&\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/waybar/config.jsonc",
    "content": "{\n  \"spacing\": 0,\n  //\"margin-left\": 10,\n  //\"margin-right\": 10,\n  //\"margin-top\": 10,\n  \"margin-left\": 0,\n  \"margin-right\": 0,\n  \"margin-top\": 0,\n  \"layer\": \"top\",\n  \"reload_style_on_change\": true,\n  \"modules-left\": [\n    \"image\",\n    \"hyprland/workspaces\"\n  ],\n  \"modules-center\": [\n    \"clock\"\n  ],\n  \"modules-right\": [\n    \"cpu\",\n    \"memory\",\n    \"temperature\",\n    \"backlight\",\n    \"battery\",\n    \"tray\",\n    \"network\",\n    \"bluetooth\",\n    \"pulseaudio\",\n    \"custom/notification\",\n    \"custom/power\"\n  ],\n  \"image\": {\n    \"path\": \"/home/martin/Dokumente/Backgrounds/nixos.png\",\n    \"size\": 20,\n    \"interval\": 86400, // once every day\n    \"on-click\": \"mpc toggle\"\n  },\n  \"hyprland/workspaces\": {\n    \"format\": \"{icon}\",\n    \"tooltip\": false,\n    \"all-outputs\": false,\n    \"current-only\": true,\n    \"sort-by-number\": true,\n    \"persistent-workspaces\": {\n      \"1\": \"\",\n      \"2\": \"\",\n      \"3\": \"\",\n      \"4\": \"\",\n      \"5\": \"\",\n      \"6\": \"\",\n      \"7\": \"\",\n      \"8\": \"\",\n      \"9\": \"\",\n      \"10\": \"\"\n    },\n    \"format-icons\": {\n      \"1\": \"\",\n      \"2\": \"\",\n      \"3\": \"\",\n      \"4\": \"\",\n      \"5\": \"\",\n      \"6\": \"\",\n      \"7\": \"\",\n      \"8\": \"\",\n      \"9\": \"\",\n      \"10\": \"\",\n      \"active\": \"\",\n      \"default\": \"\"\n    }\n  },\n  \"clock\": {\n    \"format\": \"{:%H:%M}\",\n    \"tooltip-format\": \"<big>{:%Y %B}</big>\\n<tt><small>{calendar}</small></tt>\",\n    \"format-alt\": \"{:%d.%m.%y - %H:%M}\"\n  },\n  \"cpu\": {\n    \"format\": \"{icon}\",\n    \"format-icons\": [\n      \"󰝦\",\n      \"󰪞\",\n      \"󰪟\",\n      \"󰪠\",\n      \"󰪡\",\n      \"󰪢\",\n      \"󰪣\",\n      \"󰪤\",\n      \"󰪥\"\n    ],\n    \"tooltip\": false,\n    \"interval\": 1\n  },\n  \"memory\": {\n    \"tooltip\": false,\n    \"format\": \"󰆼{used:.1f} GiB\"\n  },\n  \"temperature\": {\n    \"tooltip\": false,\n    \"thermal-zone\": 6,\n    \"critical-threshold\": 90,\n    \"format\": \"{temperatureC}°C\",\n    \"interval\": 1\n  },\n  \"backlight\": {\n    \"tooltip\": false,\n    \"format\": \"{icon}{percent}%\",\n    \"format-icons\": [\n      \"\",\n      \"\",\n      \"\",\n      \"\",\n      \"\",\n      \"\",\n      \"\",\n      \"\",\n      \"\"\n    ]\n  },\n  \"battery\": {\n    \"states\": {\n      \"warning\": 30,\n      \"critical\": 15\n    },\n    \"format\": \"{icon}\",\n    \"format-full\": \"<span foreground=\\\"#2A995C\\\">󱐥</span>\",\n    \"format-charging\": \"<span foreground=\\\"#2A995C\\\">󱐋</span>{capacity}%\",\n    \"format-plugged\": \"󱐋{capacity}%\",\n    \"format-alt\": \"{icon} {capacity}%\",\n    \"format-icons\": [\n      \" \",\n      \" \",\n      \" \",\n      \" \",\n      \" \"\n    ],\n    \"interval\": 1\n  },\n  \"tray\": {\n    \"spacing\": 6\n  },\n  \"network\": {\n    \"format-wifi\": \"\",\n    \"format-ethernet\": \"󰈀\",\n    \"tooltip-format\": \"{ifname} ({ipaddr}) via {gwaddr} at\\n{essid}\",\n    \"format-linked\": \"{ifname} (No IP) \",\n    \"format-disconnected\": \"󰖪\",\n    \"on-click\": \"swaync-client -t -sw\"\n  },\n  \"bluetooth\": {\n    \"format\": \"\",\n    \"format-disabled\": \"󰂲\",\n    \"format-connected\": \"󰂱\",\n    \"tooltip-format\": \"{controller_alias}\\t{controller_address}\",\n    \"tooltip-format-connected\": \"{controller_alias}\\t{controller_address}\\n\\n{device_enumerate}\",\n    \"tooltip-format-enumerate-connected\": \"{device_alias}\\t{device_address}\",\n    \"on-click\": \"swaync-client -t -sw\"\n  },\n  \"pulseaudio\": {\n    // \"scroll-step\": 1, // %, can be a float\n    \"format\": \"{icon} {format_source}\",\n    \"format-bluetooth\": \"{icon} {format_source}\",\n    \"format-bluetooth-muted\": \" {icon} {format_source}\",\n    \"format-muted\": \"󰸈 {format_source}\",\n    \"format-source\": \"\",\n    \"format-source-muted\": \"\",\n    \"format-icons\": {\n      \"headphone\": \"\",\n      \"hands-free\": \"\",\n      \"headset\": \"\",\n      \"phone\": \"\",\n      \"portable\": \"\",\n      \"car\": \"\",\n      \"default\": [\n        \"\",\n        \"\",\n        \"\"\n      ]\n    },\n    \"on-click\": \"swaync-client -t -sw\",\n    \"on-click-right\": \"pavucontrol\"\n  },\n  \"custom/notification\": {\n    \"tooltip\": false,\n    \"format\": \"{icon}\",\n    \"format-icons\": {\n      \"notification\": \"󰂟\",\n      \"none\": \"\",\n      \"dnd-notification\": \"󰺁\",\n      \"dnd-none\": \"\",\n      \"inhibited-notification\": \"󰂟\",\n      \"inhibited-none\": \"\",\n      \"dnd-inhibited-notification\": \"󰺁\",\n      \"dnd-inhibited-none\": \"\"\n    },\n    \"return-type\": \"json\",\n    \"exec-if\": \"which swaync-client\",\n    \"exec\": \"swaync-client -swb\",\n    \"on-click\": \"swaync-client -t -sw\",\n    \"on-click-right\": \"swaync-client -d -sw\",\n    \"escape\": true\n  },\n  \"custom/power\": {\n    \"format\": \"\",\n    \"on-click\": \"wlogout -b 5 -c 0 -r 0 -T 0 -B 0\",\n    \"interval\": 86400, // once every day\n    \"tooltip\": true\n  }\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-dotfiles-laptop/waybar/launch.sh",
    "content": "#!/usr/bin/env sh\n\nis_swww_daemon_running() {\n    if pgrep -x \"swww-daemon\" > /dev/null\n    then\n        return 0\n    else\n\texec swww-daemon &\n        return 1\n    fi\n}\n\n# wait for the swww-daemon\nwhile ! is_swww_daemon_running; do\n    echo \"wait for swww-daemon\"\n    sleep 1\ndone\n\nswww img ~/.config/backgrounds/minimal_landscape.jpg \n\npkill waybar\n\nsassc $HOME/.config/waybar/themes/style-catppuccin-mocha.scss $HOME/.config/waybar/style.css\n\nwaybar\n"
  },
  {
    "path": "nixos/hosts/laptop/home-laptop.nix",
    "content": "{ inputs, pkgs, ... }:\n\nlet\n  vars = import ../../variables.nix;\nin\n\n{\n  imports = [\n    ../../configs/home-configs/styling.nix\n    ../../configs/home-configs/zsh.nix\n    ../../configs/home-configs/kitty.nix\n    ../../configs/home-configs/waybar.nix\n    ./link-dotfiles-laptop.nix\n    ./home-programs-laptop.nix\n  ];\n\n  home.username = vars.user1;\n  home.homeDirectory = vars.homeDirectoryUser1;\n\n  #broken?????    #services.gpg-agent = {\n  #  enable = true;\n  #  defaultCacheTtl = 1800;\n  #  enableSshSupport = true;\n  #};\n\n  dconf.settings = {\n    \"org/virt-manager/virt-manager/connections\" = {\n      autoconnect = [ \"qemu:///system\" ];\n      uris = [ \"qemu:///system\" ];\n    };\n  };\n\n  xdg.desktopEntries.\"org.gnome.Settings\" = {\n    name = \"Settings\";\n    comment = \"Gnome Control Center\";\n    icon = \"org.gnome.Settings\";\n    exec = \"env XDG_CURRENT_DESKTOP=GNOME gnome-control-center --verbose\";\n    categories = [ \"X-Preferences\" ];\n    terminal = true;\n  };\n\n  xdg.desktopEntries.\"com.RoccoRakete.ThemeSwitcher\" = {\n    name = \"ThemeSwitcher\";\n    comment = \"Dotfile ThemeSwitcher\";\n    icon = \"org.gnome.Settings\";\n    exec = \"/home/martin/.local/bin/theme_switcher\";\n    categories = [ \"X-Preferences\" ];\n    terminal = false;\n  };\n\n  xdg.desktopEntries.\"Betaflight Configurator 10.9.0\" = {\n    name = \"Betaflight Configurator 10.9.0\";\n    comment = \"Configurator FPV Flight Controllers\";\n    icon = \"/home/martin/.local/bin/BetaflightConfigurator10_9_0/icon/bf_icon_128.png\";\n    exec = \"/home/martin/.local/bin/betaflight-configurator\";\n    categories = [ \"X-FPV\" ];\n    terminal = false;\n  };\n\n  xdg.desktopEntries.\"BlHeliSuite32\" = {\n    name = \"BlHeliSuite32\";\n    comment = \"Configurator for BlHeli32 ESC's\";\n    icon = \"org.gnome.Settings\";\n    exec = \"/home/martin/.local/bin/blhelisuite32\";\n    categories = [ \"X-FPV\" ];\n    terminal = false;\n  };\n\n  xdg.desktopEntries.\"ExpressLRS Configurator\" = {\n    name = \"ExpressLRS Configurator\";\n    comment = \"Configurator for ExpressLRS\";\n    icon = \"expresslrs-configurator\";\n    exec = \"/home/martin/.local/bin/expresslrs-configurator\";\n    categories = [ \"X-FPV\" ];\n    terminal = false;\n  };\n\n  #xdg.desktopEntries.\"SuperSlicer\" = {\n  #  name = \"SuperSlicer\";\n  #  comment = \"3D Print Slicer\";\n  #  icon = \"SuperSlicer\";\n  #  exec = \"/home/martin/.local/bin/superslicer\";\n  #  categories = [ \"X-FPV\" ];\n  #  terminal = false;\n  #};\n\n  home.file = { };\n  home.sessionVariables = { };\n\n  home.stateVersion = \"23.11\";\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/home-programs-laptop.nix",
    "content": "{ inputs, pkgs, ... }:\n\n{\n  imports = [\n    inputs.ags.homeManagerModules.default\n    #inputs.hyprlock.homeManagerModules.default\n    inputs.anyrun.homeManagerModules.default\n    inputs.walker.homeManagerModules.default\n  ];\n\n  nixpkgs.config.allowUnfree = true;\n\n  programs.home-manager.enable = true;\n\n  programs = {\n    hyprlock.enable = true;\n    anyrun = {\n      enable = false;\n      config = {\n        plugins = [\n          inputs.anyrun.packages.${pkgs.system}.applications\n        ];\n        width = { fraction = 0.25; };\n        y = { fraction = 0.3; };\n        hideIcons = false;\n        ignoreExclusiveZones = true;\n        layer = \"overlay\";\n        hidePluginInfo = true;\n        closeOnClick = true;\n        showResultsImmediately = true;\n        maxEntries = null;\n      };\n      extraCss = ''\n        @import url(\"stylesheet.css\");\n      '';\n    };\n    wofi = {\n      enable = true;\n    };\n    walker = {\n      enable = false;\n    };\n    #rofi = {\n    #  enable = true;\n    #  package = pkgs.rofi.override { plugins = [ pkgs.rofi-wayland ]; };\n    #};\n    ags = {\n      enable = false;\n      configDir = ./home-dotfiles-laptop/ags;\n      #configDir = null;\n      extraPackages = [ pkgs.libsoup_3 ];\n    };\n\n    vscode = {\n      enable = true;\n      extensions = with pkgs.vscode-extensions; [\n        bbenoist.nix\n        jnoortheen.nix-ide\n        piousdeer.adwaita-theme\n        pkief.material-product-icons\n      ];\n      userSettings = { };\n    };\n\n    zathura = {\n      enable = true;\n    };\n\n    zoxide = {\n      enable = true;\n      options = [\n        \"--cmd cd\"\n      ];\n    };\n    git = {\n      enable = true;\n      userName = \"RoccoRakete\";\n      userEmail = \"m.schaumann@mscloud.uk\";\n      extraConfig = {\n        credential.helper = \"${\n          pkgs.git.override { withLibsecret = true; }\n        }/bin/git-credential-libsecret\";\n      };\n    };\n  };\n\n  # Packages that should be installed to the user profile.\n  home.packages = with pkgs; [\n    htop\n    sassc\n    gparted\n    (python311.withPackages (p: [ p.python-pam ]))\n  ];\n}\n"
  },
  {
    "path": "nixos/hosts/laptop/link-dotfiles-laptop.nix",
    "content": "{ config, ... }:\n\n{\n  # neofetch\n  home.file.\"${config.xdg.configHome}/neofetch\" = {\n    source = ./home-dotfiles-laptop/neofetch;\n    recursive = true;\n    enable = true;\n  };\n\n  # hyprland\n  home.file.\"${config.xdg.configHome}/hypr\" = {\n    source = ./home-dotfiles-laptop/hypr;\n    recursive = true;\n    enable = true;\n  };\n\n  # screenlock\n  home.file.\"${config.xdg.configHome}/screenlock\" = {\n    source = ./home-dotfiles-laptop/screenlock;\n    recursive = true;\n    enable = true;\n  };\n\n  # ThemeSwitcher\n  home.file.\"${config.xdg.configHome}/themeswitcher\" = {\n    source = ../../../cfg/themeswitcher;\n    recursive = true;\n    enable = true;\n  };\n\n  # waybar launchscript\n  #home.file.\"${config.xdg.configHome}/waybar/launch.sh\" = {\n  #  source = ./home-dotfiles-laptop/waybar/launch.sh;\n  #  recursive = true;\n  #  enable = true;\n  #};\n\n  # waybar config\n  #home.file.\"${config.xdg.configHome}/waybar/config.jsonc\" = {\n  #  source = ./home-dotfiles-laptop/waybar/config.jsonc;\n  #  recursive = true;\n  #  enable = true;\n  #};\n\n  # waybar themes\n  #home.file.\"${config.xdg.configHome}/waybar/themes\" = {\n  #  source = ../../../styles/waybar;\n  #  recursive = true;\n  #  enable = true;\n  #};\n\n  # anyrun launchscript\n  #home.file.\"${config.xdg.configHome}/anyrun/launch.sh\" = {\n  #  source = ./home-dotfiles-laptop/anyrun/launch.sh;\n  #  recursive = true;\n  #  enable = true;\n  #};\n\n  # anyrun themes\n  #home.file.\"${config.xdg.configHome}/anyrun/themes\" = {\n  #  source = ../../../styles/anyrun;\n  #  recursive = true;\n  #  enable = true;\n  #};\n}\n"
  },
  {
    "path": "nixos/nixos.nix",
    "content": "{ pkgs, ... }:\n\nlet\n  inherit (pkgs) nixos-icons;\n  vars = import ./variables.nix;\nin\n\n{\n  #environment.sessionVariables.NIXOS_OZONE_WL = \"1\";\n  environment.sessionVariables.FLAKE = \"/home/${vars.user1}/.dots/nixos/\";\n  environment = {\n    variables = { };\n    pathsToLink = [\n      \"/share/zsh\"\n    ];\n  };\n\n  environment.sessionVariables = rec {\n     # XDG_STATE_HOME = \"$HOME/.local/state\";\n     # XDG_CURRENT_DESKTOP = \"GNOME\";\n      # Not officially in the specification\n      # XDG_BIN_HOME    = \"$HOME/.local/bin\";\n      # PATH = [ \n      # \"${XDG_BIN_HOME}\"\n      # ];\n      };\n\n    nix = {\n      optimise.automatic = true;\n\n      gc = {\n        automatic = true;\n        dates = \"daily\";\n        options = \"--delete-older-than 7d\";\n      };\n\n      settings = {\n        builders-use-substitutes = true;\n        substituters = [\n          \"https://hyprland.cachix.org\"\n          \"https://anyrun.cachix.org\"\n        ];\n        trusted-public-keys = [\n          \"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=\"\n          \"anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s=\"\n        ];\n        experimental-features = \"nix-command flakes\";\n        auto-optimise-store = true;\n      };\n    };\n\n    nixpkgs.overlays = [\n      (final: prev: {\n        pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [\n          (\n            python-final: python-prev: {\n              catppuccin = python-prev.catppuccin.overridePythonAttrs (oldAttrs: rec {\n                version = \"1.3.2\";\n\n                src = prev.fetchFromGitHub {\n                  owner = \"catppuccin\";\n                  repo = \"python\";\n                  rev = \"refs/tags/v${version}\";\n                  hash = \"sha256-spPZdQ+x3isyeBXZ/J2QE6zNhyHRfyRQGiHreuXzzik=\";\n                };\n\n                # can be removed next version\n                disabledTestPaths = [\n                  \"tests/test_flavour.py\" # would download a json to check correctness of flavours\n                ];\n              });\n            }\n          )\n        ];\n      })\n    ];\n\n    # Bootloader.\n    boot = {\n      initrd.systemd.enable = true;\n      tmp.cleanOnBoot = true;\n      kernelPackages = pkgs.linuxPackages_latest;\n      kernelParams = [ \"quiet\" \"nosgx\" ];\n\n      loader = {\n        timeout = 0;\n        systemd-boot.enable = true;\n        efi.canTouchEfiVariables = true;\n      };\n\n      plymouth = {\n        enable = true;\n        theme = \"bgrt\";\n        logo = \"${nixos-icons}/share/icons/hicolor/48x48/apps/nix-snowflake-white.png\";\n      };\n    };\n\n    # Set your time zone.\n    time.timeZone = \"Europe/Berlin\";\n\n    # Locale Settings\n    i18n = {\n      extraLocaleSettings = {\n        defaultLocale = \"de_DE.UTF-8\";\n        LC_ADDRESS = \"de_DE.UTF-8\";\n        LC_IDENTIFICATION = \"de_DE.UTF-8\";\n        LC_MEASUREMENT = \"de_DE.UTF-8\";\n        LC_MONETARY = \"de_DE.UTF-8\";\n        LC_NAME = \"de_DE.UTF-8\";\n        LC_NUMERIC = \"de_DE.UTF-8\";\n        LC_PAPER = \"de_DE.UTF-8\";\n        LC_TELEPHONE = \"de_DE.UTF-8\";\n        LC_TIME = \"de_DE.UTF-8\";\n      };\n    };\n\n    # Configure console(tty)\n    console.keyMap = \"de\";\n    #console.font = \"ter-v32b\";\n    #console.packages = with pkgs; [ terminus_font ];\n\n    hardware = {\n      pulseaudio.enable = false;\n      opengl.extraPackages = with pkgs; [\n        intel-compute-runtime\n        intel-media-driver\n        vaapiIntel\n      ];\n    };\n\n    # virtualisation\n    virtualisation = {\n      podman.enable = true;\n      libvirtd.enable = true;\n    };\n\n    security.pam.services.swaylock = { };\n    security.pam.services.gtklock = { };\n    security.pam.services.hyprlock = { };\n    security.polkit.enable = true;\n\n    # Enable sound with pipewire.\n    #sound.enable = true;\n    security.rtkit.enable = true;\n\n    # Define a user account. Don't forget to set a password with ‘passwd’.\n    users = {\n      defaultUserShell = pkgs.zsh;\n      users.${vars.user1} = {\n        isNormalUser = true;\n        description = \"Martin\";\n        extraGroups = [ \"video\" \"input\" \"networkmanager\" \"wheel\" \"dialout\" \"libvirtd\" ];\n      };\n    };\n\n    xdg.portal.enable = true;\n\n    system.activationScripts.script.text = ''\n      cp /home/${vars.user1}/face.png /var/lib/AccountsService/icons/${vars.user1}\n    '';\n\n    # Installed Fonts\n    fonts = {\n      enableDefaultPackages = true;\n      fontDir.enable = true;\n      packages = with pkgs; [\n        (nerdfonts.override {\n          fonts = [\n            \"Ubuntu\"\n            \"UbuntuMono\"\n            \"Hermit\"\n          ];\n        })\n      ];\n    };\n\n    system.stateVersion = \"23.05\";\n  }\n"
  },
  {
    "path": "nixos/overlays/betaflight-configurator.nix",
    "content": "\nself: super: {\n  betaflightConfigurator = let\n    pname = \"betaflight-configurator\";\n    desktopItem = super.makeDesktopItem {\n      name = pname;\n      exec = pname;\n      icon = pname;\n      comment = \"Betaflight configuration tool\";\n      desktopName = \"Betaflight Configurator\";\n      genericName = \"Flight controller configuration tool\";\n    };\n  in super.stdenv.mkDerivation rec {\n    inherit pname;\n    version = \"10.9.0\";\n    src = super.fetchurl {\n      url = \"https://github.com/betaflight/${pname}/releases/download/${version}/${pname}_${version}_linux64-portable.zip\";\n      sha256 = \"sha256-9FzMyBIR2u1zXHtTWJABM6RF1+OyjYdEPlRwtig9blI=\";\n    };\n\n    # remove large unneeded files\n    postUnpack = ''\n      find -name \"lib*.so\" -delete\n    '';\n\n    nativeBuildInputs = [ super.wrapGAppsHook super.unzip ];\n\n    buildInputs = [ super.dbus-glib super.dbus super.gsettings-desktop-schemas super.gtk3 ];\n\n    installPhase = ''\n      runHook preInstall\n      mkdir -p $out/bin \\\n               $out/opt/${pname}\n\n      cp -r . $out/opt/${pname}/\n      install -m 444 -D icon/bf_icon_128.png $out/share/icons/hicolor/128x128/apps/${pname}.png\n      cp -r ${desktopItem}/share/applications $out/share/\n\n      makeWrapper ${super.nwjs}/bin/nw $out/bin/${pname} --add-flags $out/opt/${pname}\n      runHook postInstall\n    '';\n\n    meta = with self.lib; {\n      description = \"The Betaflight flight control system configuration tool\";\n      longDescription = ''\n        A crossplatform configuration tool for the Betaflight flight control system.\n        Various types of aircraft are supported by the tool and by Betaflight, e.g.\n        quadcopters, hexacopters, octocopters and fixed-wing aircraft.\n      '';\n      homepage    = \"https://github.com/betaflight/betaflight/wiki\";\n      sourceProvenance = with builtins; [ sourceTypes.binaryNativeCode ];\n      license     = licenses.gpl3;\n      maintainers = with self.maintainers; [ wucke13 ];\n      platforms   = platforms.linux;\n    };\n  };\n}\n\n"
  },
  {
    "path": "nixos/overlays/blhelisuite32.nix",
    "content": "self: super: {\n  BlHeliSuite32xl =\n    let\n      pname = \"blhelisuite32\";\n      desktopItem = super.makeDesktopItem {\n        name = pname;\n        exec = pname;\n        icon = pname;\n        comment = \"BlHeli32 ESC Configurator\";\n        desktopName = \"BlHeli32Suite\";\n        genericName = \"BlHeli32 ESC Configurator\";\n      };\n    in\n    super.stdenv.mkDerivation rec {\n      inherit pname;\n      version = \"10.0.0\";\n      src = super.fetchurl {\n        url = \"https://github.com/bitdump/BLHeli/releases/download/Rev32.10/BLHeliSuite32xLinux64_1044.zip\";\n        sha256 = \"sha256-Fi/rMQz02/2QVTY32Q16DcJPWmeVcx+EjcN+meBxt14=\";\n      };\n\n      # remove large unneeded files\n      postUnpack = ''\n      '';\n\n      nativeBuildInputs = [ super.wrapGAppsHook super.unzip super.libGL super.autoPatchelfHook ];\n\n      buildInputs = [  super.gvfs super.libgcc super.libgccjit super.libGL super.libglibutil super.zlib super.gtk3 super.systemdLibs super.glibc ];\n\n      installPhase = ''\n        runHook preInstall\n\n          mkdir -p $out/bin \\\n                   $out/opt/${pname}\n\n          cp -r . $out/opt/${pname}/\n          #install -m 444 -D icon/bf_icon_128.png $out/share/icons/hicolor/128x128/apps/${pname}.png\n          cp -r ${desktopItem}/share/applications $out/share/\n\n          makeWrapper $out/opt/${pname}/BLHeliSuite32xl $out/bin/${pname} --add-flags $out/opt/${pname}\n          patchelf --set-rpath '$out/lib' $out/opt/${pname}/BLHeliSuite32xl\n          runHook postInstall\n      '';\n\n      meta = with self.lib; {\n        description = \"The Betaflight flight control system configuration tool\";\n        longDescription = ''\n          A crossplatform configuration tool for the Betaflight flight control system.\n          Various types of aircraft are supported by the tool and by Betaflight, e.g.\n          quadcopters, hexacopters, octocopters and fixed-wing aircraft.\n        '';\n        homepage = \"https://github.com/betaflight/betaflight/wiki\";\n        sourceProvenance = with builtins; [ sourceTypes.binaryNativeCode ];\n        license = licenses.gpl3;\n        maintainers = with self.maintainers; [ wucke13 ];\n        platforms = platforms.linux;\n      };\n    };\n}\n\n"
  },
  {
    "path": "nixos/overlays/default.bkp",
    "content": "{ makeDesktopItem, nwjs }:\n\nself: super:\n\n{\n  betaflightConfigurator = self.stdenv.mkDerivation rec {\n    pname = \"betaflight-configurator\";\n    version = \"10.9.0\";\n    desktopItem = makeDesktopItem {\n      name = pname;\n      exec = pname;\n      icon = pname;\n      comment = \"Betaflight configuration tool\";\n      desktopName = \"Betaflight Configurator\";\n      genericName = \"Flight controller configuration tool\";\n    };\n\n\n    src = self.fetchurl {\n      url = \"https://github.com/betaflight/${pname}/releases/download/${version}/${pname}_${version}_linux64-portable.zip\";\n      sha256 = \"sha256-9FzMyBIR2u1zXHtTWJABM6RF1+OyjYdEPlRwtig9blI=\";\n    };\n\n    nativeBuildInputs = [\n      self.unzip\n    ];\n\n    unpackPhase = ''\n      unzip $src\n    '';\n\n    installPhase = ''\n      runHook preInstall\n      mkdir -p $out/bin \\\n               $out/opt/${pname}\n\n      cp -r. $out/opt/${pname}/\n      install -m 444 -D icon/bf_icon_128.png $out/share/icons/hicolor/128x128/apps/${pname}.png\n      cp -r ${desktopItem}/share/applications $out/share/applications/\n\n      makeWrapper ${nwjs}/bin/nw $out/bin/${pname} --add-flags \"$out/opt/${pname}\"\n      runHook postInstall\n    '';\n\n    meta = with self.lib; {\n      description = \"A cross-platform configuration tool for the Betaflight flight control software\";\n      homepage = \"https://github.com/betaflight/betaflight-configurator\";\n      license = licenses.mit;\n      platforms = platforms.unix;\n    };\n  };\n}\n\n"
  },
  {
    "path": "nixos/overlays/test.nix",
    "content": "self: super: {\n  betaflightConfigurator =\n    let\n      pname = \"betaflight-configurator\";\n      desktopItem = super.makeDesktopItem {\n        name = pname;\n        exec = pname;\n        icon = pname;\n        comment = \"Betaflight configuration tool\";\n        desktopName = \"Betaflight Configurator\";\n        genericName = \"Flight controller configuration tool\";\n      };\n    in\n    super.stdenv.mkDerivation rec {\n      inherit pname;\n      version = \"10.9.0\";\n      src = super.fetchurl {\n        url = \"https://github.com/betaflight/${pname}/releases/download/${version}/${pname}_${version}_linux64-portable.zip\";\n        sha256 = \"sha256-9FzMyBIR2u1zXHtTWJABM6RF1+OyjYdEPlRwtig9blI=\";\n      };\n\n      # remove large unneeded files\n      postUnpack = ''\n        find -name \"lib*.so\" -delete\n      '';\n\n      nativeBuildInputs = [ super.wrapGAppsHook super.unzip ];\n\n      buildInputs = [ super.dbus-glib super.dbus super.gsettings-desktop-schemas super.gtk3 ];\n\n      # Erzwingen der spezifischen NW.js-Version\n      NWJS_SRC = super.fetchurl {\n        url = \"https://dl.nwjs.io/v0.84.0/nwjs-v0.84.0-linux-x64.tar.gz\";\n        hash = \"sha256-VIygMzCPTKzLr47bG1DYy/zj0OxsjGcms0G1BkI/TEI=\";\n      };\n\n      installPhase = ''\n        runHook preInstall\n        mkdir -p $out/bin \\\n        $out/opt/${pname}\n\n        tar -xf $out-nwjs-v0.84.0-linux-x64.tar.gz -C $out/bin/\n\n        cp -r. $out/opt/${pname}/\n        install -m 444 -D icon/bf_icon_128.png $out/share/icons/hicolor/128x128/apps/${pname}.png\n        cp -r ${desktopItem}/share/applications $out/share/\n\n        makeWrapper $out/bin/nwjs-v0.84.0-linux-x64/nw $out/bin/${pname} --add-flags $out/opt/${pname}\n        runHook postInstall\n      '';\n\n      meta = with self.lib; {\n        description = \"The Betaflight flight control system configuration tool\";\n        longDescription = ''\n          A crossplatform configuration tool for the Betaflight flight control system.\n          Various types of aircraft are supported by the tool and by Betaflight, e.g.\n          quadcopters, hexacopters, octocopters and fixed-wing aircraft.\n        '';\n        homepage = \"https://github.com/betaflight/betaflight/wiki\";\n        sourceProvenance = with builtins; [ sourceTypes.binaryNativeCode ];\n        license = licenses.gpl3;\n        maintainers = with self.maintainers; [ wucke13 ];\n        platforms = platforms.linux;\n      };\n    };\n}\n"
  },
  {
    "path": "nixos/packages.nix",
    "content": "{ pkgs, inputs, ... }:\n#let\n#  myOverlays = import ./overlays/betaflight-configurator.nix;\n#in\n{\n\n  #nixpkgs.overlays = [ myOverlays ];\n\n  # Allow unfree packages\n  nixpkgs = {\n    config = {\n      allowUnfree = true;\n      permittedInsecurePackages = [\n        #\"electron-25.9.0\"\n        #\"electron-19.1.9\"\n        #\"nix-2.16.2\"\n      ];\n      overlays = [\n      ];\n    };\n  };\n\n  services.udev.packages = [ pkgs.swayosd ];\n\n  # Package configurations\n  environment.systemPackages = with pkgs; [\n\n    #(\n    #  pkgs.runCommand\n    #    \"brave-wrapped\"\n    #    { nativeBuildInputs = [ pkgs.makeWrapper ]; }\n    #    ''\n    #      makeWrapper ${lib.getExe pkgs.brave} $out/bin/brave \\\n    #        --append-flags \"--enable-features=TouchpadOverscrollHistoryNavigation\" \\\n    #        --append-flags \"--password-store=basic\" \\\n    #        --append-flags \"--enable-chrome-browser-cloud-management\"\n    #    ''\n    #)\n\n    #Commandline arguments\n    (\n      brave.override {\n        commandLineArgs = [\n          \"--enable-features=TouchpadOverscrollHistoryNavigation\"\n          \"--password-store=basic\"\n        ];\n      }\n    )\n\n\n\n    #Packages\n    # gnome\n    gnome.gnome-bluetooth\n    gnome.gnome-settings-daemon\n    gnome.gnome-software\n    glib\n    nautilus-open-any-terminal\n    libadwaita\n    gnome.gnome-control-center\n    gnome.gvfs\n    gnome.sushi\n    gnome.seahorse\n    gnome.gnome-tweaks\n    gtk4\n    gtk3\n\n    # theming\n    inputs.walker.packages.${system}.default\n    inputs.anyrun.packages.${system}.default\n    swaynotificationcenter\n    swayosd\n    wlogout\n    neofetch\n    swww\n    pywal\n    imagemagick\n    nwg-look\n    hyprpicker\n    gradience\n    kitty-themes\n\n    # code\n    yarn\n    nodejs_22\n    stylua\n    codespell\n    isort\n    black\n    prettierd\n    shfmt\n    jsbeautifier\n    lua-language-server\n    dart-sass\n    bun\n    neovide\n    fzf\n    libgcc\n    libgccjit\n    bintools-unwrapped\n    nixpkgs-fmt\n    python3\n    gcc-unwrapped\n    gnumake\n    gccgo\n    cargo\n    ripgrep\n    fd\n    jq\n    nil\n    rustfmt\n    java-language-server\n    jsonfmt\n    luaformatter\n    typescript\n    meson\n    vala\n    cmake\n    pkg-config\n    uncrustify\n    #vala-language-server\n    #neovim-unwrapped\n\n    # homelab\n    rpi-imager\n    super-slicer-beta\n    orca-slicer\n\n    # information\n    lutris\n    openra\n    firefox\n    thunderbird\n    brave\n    bitwarden\n    vesktop\n    #betaflight-configurator\n    #BlHeliSuite32xl\n    #betaflightConfigurator\n    whatsapp-for-linux\n    #kicad\n\n    # office\n    obsidian\n    libreoffice-fresh\n    nextcloud-client\n    mailspring\n    localsend\n\n    # media\n    obs-studio\n    wf-recorder\n    grimblast\n    wayshot\n    spotify\n    gimp\n    gthumb\n    jellyfin-media-player\n    heroic\n\n    # system\n    clipse\n    proxmox-backup-client\n    inputs.eza.packages.${system}.default\n    inputs.hypridle.packages.${system}.default\n    pika-backup\n    envsubst\n    grim\n    deadnix\n    mesa-demos\n    mesa\n    nitch\n    coreutils\n    powerstat\n    mate.mate-polkit\n    polkit\n    wget\n    brightnessctl\n    libnotify\n    inotify-tools\n    pavucontrol\n    bluez\n    bluez-tools\n    wl-clip-persist\n    wl-clipboard\n    sway-audio-idle-inhibit\n    xdg-desktop-portal\n    distrobox\n    nixos-icons\n    libsecret\n    wireguard-tools\n    wireguard-go\n    networkmanagerapplet\n    intel-gpu-tools\n    usbutils\n    btop\n    stress-ng\n    slurp\n    playerctl\n    unzip\n    wev\n    sabnzbd\n    wineWowPackages.waylandFull\n    wlr-randr\n    powertop\n    poweralertd\n    pulseaudio\n    inputs.nh.packages.${system}.default\n    satty\n  ];\n}\n"
  },
  {
    "path": "nixos/pkgs/default.nix",
    "content": "{ pkgs, ... }:\nlet\n  callPackage = pkgs.callPackage;\nin\n{\n  nixpkgs.overlays = [\n    (_final: _prev: {\n      custompkgs = {\n        kanagawa-gtk-theme = callPackage ./kanagawa-gtk-theme.nix { };\n      };\n    })\n  ];\n}\n"
  },
  {
    "path": "nixos/pkgs/kanagawa-gtk-theme.nix",
    "content": "{ lib\n, stdenvNoCC\n, fetchFromGitHub\n, gtk3\n, gtk-engine-murrine\n, hicolor-icon-theme\n}:\nstdenvNoCC.mkDerivation {\n  pname = \"kanagawa-gtk-theme\";\n  version = \"unstable-2023-07-03\";\n\n  src = fetchFromGitHub {\n    owner = \"Fausto-Korpsvart\";\n    repo = \"Kanagawa-GKT-Theme\";\n    rev = \"35936a1e3bbd329339991b29725fc1f67f192c1e\";\n    hash = \"sha256-BZRmjVas8q6zsYbXFk4bCk5Ec/3liy9PQ8fqFGHAXe0=\";\n  };\n\n  nativeBuildInputs = [\n    gtk3\n  ];\n\n  propagatedBuildInputs = [\n    hicolor-icon-theme\n  ];\n\n  propagatedUserEnvPkgs = [\n    gtk-engine-murrine\n  ];\n\n  dontDropIconThemeCache = true;\n\n  installPhase = ''\n    runHook preInstall\n    mkdir -p $out/share/themes\n    cp -a themes/* $out/share/themes\n    mkdir -p $out/share/icons\n    cp -a icons/* $out/share/icons\n    for theme in $out/share/icons/*; do\n      gtk-update-icon-cache -f $theme\n    done\n    runHook postInstall\n  '';\n\n  meta = with lib; {\n    description = \"A GTK theme with the Kanagawa colour palette\";\n    homepage = \"https://github.com/Fausto-Korpsvart/Kanagawa-GKT-Theme\";\n    license = licenses.gpl3Only;\n    platforms = platforms.all;\n  };\n}\n"
  },
  {
    "path": "nixos/variables.nix",
    "content": "let\n  user1 = \"martin\";\nin\n\n  {\n    desktop = \"OptiPlex3060\";\n    laptop = \"ThinkPad\";\n    user1 = user1;\n    homeDirectoryUser1 = \"/home/${user1}\";\n  }\n"
  },
  {
    "path": "scripts/blepower.sh",
    "content": "#!/usr/bin/env sh\n\nbluetooth_status=$(bluetoothctl show | grep \"Powered: yes\")\n\nif [ -n \"$bluetooth_status\" ]; then\n    echo \"Bluetooth is enabled. Disabling...\"\n    bluetoothctl power off\nelse\n    echo \"Bluetooth is disabled. Enabling...\"\n    bluetoothctl power on\nfi\n\n"
  },
  {
    "path": "scripts/sleep.sh",
    "content": "#!/usr/bin/env sh\n\nbrightnessctl s 1\npactl set-sink-volume @DEFAULT_SINK@ 30%\n"
  },
  {
    "path": "scripts/update.sh",
    "content": "#!/usr/bin/env sh\n\nkitty sh -c \"upgrade-laptop -u && home-upgrade-laptop\" \n"
  },
  {
    "path": "scripts/wifipower.sh",
    "content": "#!/usr/bin/env sh\n\nwifi_status=$(nmcli radio wifi)\n\nif [ \"$wifi_status\" = \"enabled\" ]; then\n    echo \"Wi-Fi is enabled. Disabling...\"\n    nmcli radio wifi off\nelse\n    echo \"Wi-Fi is disabled. Enabling...\"\n    nmcli radio wifi on\nfi\n\n"
  }
]