Skip to content

Commit

Permalink
Updated ags and made pywal use matugen colors
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehllay committed May 9, 2024
1 parent e178857 commit 5b48ac1
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 4 deletions.
30 changes: 30 additions & 0 deletions home/.config/ags/applauncher/applauncher.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,35 @@
const { query } = await Service.import("applications")
const WINDOW_NAME = "applauncher"


const FavoriteApp = app => Widget.Button({
class_name: "applauncher-button",
tooltip_text: app.name,
on_clicked: () => {
App.closeWindow(WINDOW_NAME)
app.launch()
},
attribute: { app },
child: Widget.Icon({
icon: app.icon_name || "",
})
})

function FavoriteApps() {
return Widget.Box({
spacing: 8,
class_name: "favorite-apps",
hpack: "center",
hexpand: true,
children: [
query("firefox").map(FavoriteApp)[0],
query("org.gnome.nautilus").map(FavoriteApp)[0],
query("kitty").map(FavoriteApp)[0],
query("neovide").map(FavoriteApp)[0],
]
})
}

/** @param {import('resource:///com/github/Aylur/ags/service/applications.js').Application} app */
const AppItem = app => Widget.Button({
class_name: "applauncher-button",
Expand Down Expand Up @@ -70,6 +99,7 @@ const Applauncher = ({ width = 500, height = 500, spacing = 12 }) => {
vertical: true,
css: `margin: ${spacing * 2}px;`,
children: [
FavoriteApps(),
entry,

// wrap the list in a scrollable
Expand Down
8 changes: 8 additions & 0 deletions home/.config/ags/styles/applauncher.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ window.applauncher {
border: 2px solid transparent;
}

.favorite-apps {
font-size: 64px;
margin: 20px;
}
.favorite-apps button {
background-color: transparent;
}

.applauncher-button {
background-color: @surface_container;
padding: 0 8px;
Expand Down
4 changes: 2 additions & 2 deletions home/.config/hypr/scripts/set_wallpaper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ shift $((OPTIND -1))

if [ "${mode}" = 'light' ]; then
matugen image $1 --mode "light" -t $scheme $2
wal -l -n -t -s -q -i $1 --saturate 0.75
wal -l -n -t -s -q --theme matugen
else
matugen image $1 -t $scheme $2
wal -n -t -s -q -i $1 --saturate 0.75
wal -n -t -s -q --theme matugen
fi

# Reload AGS CSS
Expand Down
5 changes: 5 additions & 0 deletions home/.config/matugen/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,8 @@ output_path = '~/.config/matugen/colors/colors-rofi.rasi'
[templates.cava]
input_path = '~/.config/matugen/templates/cava'
output_path = '~/.config/cava/config'

[templates.wal]
input_path = '~/.config/matugen/templates/wal.json'
output_path = '~/.config/wal/colorschemes/dark/matugen.json'

8 changes: 6 additions & 2 deletions home/.config/matugen/templates/gtk.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@

@define-color window_fg_color {{colors.on_surface.default.hex}};

@define-color headerbar_bg_color{{colors.surface.default.hex}};
@define-color headerbar_bg_color {{colors.surface.default.hex}};

@define-color headerbar_fg_color {{colors.on_surface.default.hex}};

@define-color sidebar_bg_color {{colors.surface_container_low.default.hex}};

@define-color sidebar_fg_color {{colors.on_surface.default.hex}};

@define-color popover_bg_color {{colors.surface.default.hex}};

@define-color popover_fg_color {{colors.on_surface.default.hex}};

@define-color view_bg_color {{colors.surface_container_high.default.hex}};
@define-color view_bg_color {{colors.surface_container.default.hex}};

@define-color view_fg_color {{colors.on_surface.default.hex}};

Expand Down
25 changes: 25 additions & 0 deletions home/.config/matugen/templates/wal.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"special": {
"background": "{{colors.surface.default.hex}}",
"foreground": "{{colors.on_surface.default.hex}}",
"cursor": "{{colors.surface.default.hex}}"
},
"colors": {
"color0": "{{colors.surface_container_lowest.default.hex}}",
"color1": "{{harmonized_colors.red.hex}}",
"color2": "{{harmonized_colors.green.hex}}",
"color3": "{{colors.tertiary.default.hex}}",
"color4": "{{colors.primary.default.hex}}",
"color5": "{{colors.secondary.default.hex}}",
"color6": "{{harmonized_colors.aqua.hex}}",
"color7": "{{harmonized_colors.grey.hex}}",
"color8": "{{colors.surface_container_low.default.hex}}",
"color9": "{{colors.error.default.hex}}",
"color10": "{{harmonized_colors.light_green.hex}}",
"color11": "{{colors.tertiary_fixed_dim.default.hex}}",
"color12": "{{colors.primary_fixed_dim.default.hex}}",
"color13": "{{colors.secondary_fixed_dim.default.hex}}",
"color14": "{{harmonized_colors.light_aqua.hex}}",
"color15": "{{harmonized_colors.white.hex}}"
}
}

0 comments on commit 5b48ac1

Please sign in to comment.