Update all dotfiles

This commit is contained in:
2025-05-22 17:56:05 -05:00
parent 0280a88a7b
commit 4bb042584b
1651 changed files with 60533 additions and 2672 deletions

View File

@ -0,0 +1,11 @@
import { App, Widget } from "astal/gtk3"
import Calendar from "./widget/Calendar"
import Sidebar from "./widget/Sidebar"
App.start({
css: "./style.css",
main() {
Sidebar();
Calendar();
}
})

View File

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
<path style="fill:#ffffff" d="M 3,1 C 1.89,1 1,1.892 1,3 V 6 H 3 V 3 H 13 V 13 H 3 V 10 H 1 V 13 C 1,14.108 1.89,15 3,15 H 13 C 14.11,15 15,14.108 15,13 V 3 C 15,1.892 14.11,1 13,1 Z"/>
<path style="fill:#ffffff" d="M 7.21,4 5.83,5.386 7.46,7.021 0,7 V 9 L 7.46,9.021 5.83,10.655 7.21,12.041 11.21,8 Z"/>
</svg>

After

Width:  |  Height:  |  Size: 392 B

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 7.40625 1 c -0.613281 0.007812 -1.234375 0.089844 -1.847656 0.253906 c -3.273438 0.878906 -5.558594 3.855469 -5.558594 7.246094 s 2.285156 6.367188 5.558594 7.242188 c 3.273437 0.878906 6.742187 -0.558594 8.4375 -3.492188 c 0.277344 -0.480469 0.109375 -1.089844 -0.367188 -1.367188 c -0.476562 -0.273437 -1.089844 -0.109374 -1.367187 0.367188 c -1.246094 2.160156 -3.777344 3.207031 -6.1875 2.5625 c -2.40625 -0.644531 -4.074219 -2.820312 -4.074219 -5.3125 c 0 -2.496094 1.667969 -4.667969 4.074219 -5.3125 c 2.410156 -0.644531 4.941406 0.402344 6.1875 2.5625 c 0.058593 0.085938 0.125 0.164062 0.203125 0.226562 l -0.019532 0.015626 l -0.007812 0.007812 h -1.4375 c -0.550781 0 -1 0.449219 -1 1 c 0 0 0 1 1 1 h 5 v -5 s 0.003906 -1 -1 -1 c -0.550781 0 -1 0.449219 -1 1 v 1.6875 l -0.015625 0.011719 l -0.011719 0.011719 c -1.277344 -2.179688 -3.53125 -3.519532 -5.953125 -3.691407 c -0.203125 -0.015625 -0.40625 -0.019531 -0.613281 -0.019531 z m 0 0" fill="#ffffff"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<defs id="defs3051">
<style type="text/css" id="current-color-scheme">
.ColorScheme-Text {
color:#ffffff;
}
</style>
</defs>
<path style="fill:currentColor;fill-opacity:1;stroke:none"
d="M 2 2 L 2 13.28125 L 2 14 L 14 14 L 14 13 L 14 12 L 14 11 L 14 10 L 14 2 L 2 2 z M 3 3 L 13 3 L 13 9 L 11 7 L 7.65625 10.34375 L 6.3125 9 L 6.28125 9 L 3 12.28125 L 3 3 z M 6 4 C 4.8954305 4 4 4.8954305 4 6 C 4 7.1045695 4.8954305 8 6 8 C 7.1045695 8 8 7.1045695 8 6 C 8 4.8954305 7.1045695 4 6 4 z "
class="ColorScheme-Text"
/>
</svg>

After

Width:  |  Height:  |  Size: 637 B

View File

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
<path style="opacity:.35;fill:#ffffff" d="M 2,2 C 1.446,2 1,2.446 1,3 V 5 H 15 V 3 C 15,2.446 14.554,2 14,2 Z M 1,11 V 13 C 1,13.554 1.446,14 2,14 H 14 C 14.554,14 15,13.554 15,13 V 11 Z"/>
<path style="fill:#ffffff" d="M 5,8 A 2,2 0 0 1 3,10 2,2 0 0 1 1,8 2,2 0 0 1 3,6 2,2 0 0 1 5,8 Z"/>
<path style="fill:#ffffff" d="M 10,8 A 2,2 0 0 1 8,10 2,2 0 0 1 6,8 2,2 0 0 1 8,6 2,2 0 0 1 10,8 Z"/>
<path style="fill:#ffffff" d="M 15,8 A 2,2 0 0 1 13,10 2,2 0 0 1 11,8 2,2 0 0 1 13,6 2,2 0 0 1 15,8 Z"/>
</svg>

After

Width:  |  Height:  |  Size: 586 B

View File

@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<defs id="defs3051">
<style type="text/css" id="current-color-scheme">
.ColorScheme-Text {
color:#ffffff;
}
</style>
</defs>
<path style="fill:currentColor;fill-opacity:1;stroke:none"
d="M 2 2 L 2 14 L 14 14 L 14 2 L 2 2 z M 3 3 L 13 3 L 13 13 L 3 13 L 3 3 z M 5 5 L 5 11 L 7 11 L 7 5 L 5 5 z M 9 5 L 9 11 L 11 11 L 11 5 L 9 5 z "
class="ColorScheme-Text"
/>
</svg>

After

Width:  |  Height:  |  Size: 479 B

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 8 1 c -2.199219 0 -4 1.800781 -4 4 v 2 c -1.109375 0 -2 0.890625 -2 2 v 5 c 0 0.554688 0.445312 1 1 1 h 10 c 0.554688 0 1 -0.445312 1 -1 v -5 c 0 -1.109375 -0.890625 -2 -2 -2 v -2 c 0 -2.199219 -1.800781 -4 -4 -4 z m 0 2 c 1.125 0 2 0.875 2 2 v 2 h -4 v -2 c 0 -1.125 0.875 -2 2 -2 z m 0 0" fill="#ffffff"/></svg>

After

Width:  |  Height:  |  Size: 451 B

View File

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
<path style="opacity:.35;fill:#ffffff" d="M 7,3 V 8 H 3 V 10 H 13 V 3 Z"/>
<path style="fill:#ffffff" d="M 6,3 3,7 H 6 Z"/>
<path style="fill:#ffffff" d="M 2,0 C 0,0 0,2 0,2 V 11 C 0,11 0,13 2,13 H 14 C 14,13 16,13 16,11 V 2 C 16,2 16,0 14,0 Z M 2,2 H 14 V 11 H 2 Z M 3,15 V 16 H 13 V 15 C 13,14 12,14 12,14 H 4 C 4,14 3,14 3,15 Z"/>
</svg>

After

Width:  |  Height:  |  Size: 422 B

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 8.011719 0 c -0.550781 0 -1 0.449219 -1 1 v 5 c 0 0.550781 0.449219 1 1 1 s 1 -0.449219 1 -1 v -5 c 0 -0.550781 -0.449219 -1 -1 -1 z m -3.136719 1.816406 c -0.128906 0.015625 -0.253906 0.058594 -0.367188 0.125 c -2.734374 1.582032 -4.074218 4.816406 -3.257812 7.871094 c 0.820312 3.050781 3.59375 5.183594 6.75 5.1875 c 3.160156 0 5.941406 -2.121094 6.765625 -5.167969 c 0.828125 -3.050781 -0.5 -6.289062 -3.230469 -7.878906 c -0.476562 -0.28125 -1.089844 -0.121094 -1.367187 0.359375 c -0.132813 0.226562 -0.171875 0.5 -0.105469 0.757812 c 0.070312 0.257813 0.234375 0.476563 0.464844 0.609376 c 1.957031 1.140624 2.902344 3.441406 2.3125 5.628906 c -0.59375 2.183594 -2.570313 3.695312 -4.832032 3.691406 c -2.265624 0 -4.238281 -1.519531 -4.824218 -3.707031 c -0.585938 -2.1875 0.363281 -4.488281 2.324218 -5.621094 c 0.476563 -0.277344 0.640626 -0.886719 0.363282 -1.363281 c -0.132813 -0.230469 -0.347656 -0.398438 -0.605469 -0.464844 c -0.125 -0.035156 -0.257813 -0.042969 -0.390625 -0.027344 z m 0 0" fill="#ffffff"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
<path style="fill:#ffffff" d="M 2,2 C 1,2 1,3 1,3 V 13 C 1,14 2,14 2,14 H 14 C 14,14 15,14 15,13 V 3 C 15,2 14,2 14,2 Z M 5.5,6.56 8.81,10.31 10.94,8.25 13,10.31 V 12 H 3 V 9.5 Z"/>
</svg>

After

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -0,0 +1,21 @@
const SRC: string
declare module "inline:*" {
const content: string
export default content
}
declare module "*.scss" {
const content: string
export default content
}
declare module "*.blp" {
const content: string
export default content
}
declare module "*.css" {
const content: string
export default content
}

View File

@ -0,0 +1,2 @@
#!/bin/bash
$HOME/.config/waybar/themeswitcher.sh

View File

@ -0,0 +1,2 @@
#!/bin/bash
$HOME/.config/hypr/scripts/wallpaper-effects.sh

View File

@ -0,0 +1,211 @@
@import url('../../.cache/wal/colors-waybar.css');
* {
all:unset;
font-size: 14px;
font-family: "Fira Sans", sans-serif;
font-weight: normal;
}
.calendar {
background: #222222;
padding: 12px;
margin:14px;
border-radius: 12px;
font-weight: bold;
border: 3px solid @color11;
box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 0.8);
padding:20px;
min-width:320px;
}
calendar:selected {
background-color:@color11;
padding:0px;
}
.sidebar {
background: #222222;
padding: 12px;
margin:14px;
border-radius: 12px;
font-weight: bold;
border: 3px solid @color11;
box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 0.8);
padding:20px;
}
.group {
padding:16px;
background-color: rgba(116, 116, 116, 0.1);
border-radius: 20px;
}
.ml4wwelcomeicon {
background:url("assets/ml4w-welcome.png");
background-size:50px;
background-repeat: no-repeat;
background-position: top;
padding: 40px 50px 20px 50px;
}
.ml4wsettingsicon {
background:url("assets/ml4w-dotfiles-settings.png");
background-size:50px;
background-repeat: no-repeat;
background-position: top;
padding: 40px 50px 20px 50px;
}
.ml4whyprlandicon {
background:url("assets/ml4w-hyprland-settings.png");
background-size:50px;
background-repeat: no-repeat;
background-position: top;
padding: 40px 50px 20px 50px;
}
.btnbar {
border: 1px solid #222222;
padding:5px;
min-height:24px;
border-radius: 24px;
min-width: 24px;
margin:0px 2px 0px 2px;
}
.btnbar.statusbar {
background:url("assets/icons/image-loading-symbolic.svg");
background-repeat:no-repeat;
background-position:center;
background-color: @color11;
background-size:20px;
}
.btnbar.wallpaper {
background:url("assets/icons/fileview-preview-symbolic.svg");
background-repeat:no-repeat;
background-position:center;
background-color: @color11;
background-size:20px;
}
.btnbar.wallpapereffects {
background:url("assets/icons/xapp-prefs-preview-symbolic.svg");
background-repeat:no-repeat;
background-position:center;
background-color: @color11;
}
.btnbar.lock {
background:url("assets/icons/padlock2-symbolic.svg");
background-repeat:no-repeat;
background-position:center;
background-color: @color11;
}
.btnbar.logout {
background:url("assets/icons/application-exit-symbolic.svg");
background-repeat:no-repeat;
background-position:center;
background-color: @color11;
}
.btnbar.restart {
background:url("assets/icons/arrow-circular-top-right-symbolic.svg");
background-repeat:no-repeat;
background-position:center;
background-color: @color11;
}
.btnbar.suspend {
background:url("assets/icons/media-playback-paused-symbolic.svg");
background-repeat:no-repeat;
background-position:center;
background-color: @color11;
}
.btnbar.exit {
background:url("assets/icons/turn-off-symbolic.svg");
background-repeat:no-repeat;
background-position:center;
background-color: @color11;
}
.midbtn {
background-color: @color11;
font-size: 12px;
padding:10px;
border-radius: 20px;
}
.AudioSlider {
background-color:@color11;
border-radius:12px;
margin-bottom:10px;
}
.AudioSlider contents {
min-height: 20px;
background-color:@color15;
border-radius:12px;
}
.AudioSlider value {
min-height: 20px;
background-color: #222222;
}
.AudioSlider slider {
min-height: 20px;
background-color:@color15;
border-radius:12px;
}
.AudioSlider highlight {
min-height:20px;
background-color:@color11;
border-radius:12px;
outline-width:3px;
}
.AudioSlider fill {
min-height:20px;
background-color:@color11;
border-radius:12px;
}
.MicrophoneSlider {
background-color:@color11;
border-radius:12px;
}
.MicrophoneSlider contents {
min-height: 20px;
background-color:@color15;
border-radius:12px;
}
.MicrophoneSlider value {
min-height: 20px;
background-color: #222222;
}
.MicrophoneSlider slider {
min-height: 20px;
background-color:@color15;
border-radius:12px;
}
.MicrophoneSlider highlight {
min-height:20px;
background-color:@color11;
border-radius:12px;
outline-width:3px;
}
.MicrophoneSlider fill {
min-height:20px;
background-color:@color11;
border-radius:12px;
}

View File

@ -0,0 +1,22 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"experimentalDecorators": true,
"strict": true,
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "Bundler",
// "checkJs": true,
// "allowJs": true,
"jsx": "react-jsx",
"jsxImportSource": "/usr/share/astal/gjs/gtk3",
"paths": {
"astal": [
"/usr/share/astal/gjs"
],
"astal/*": [
"/usr/share/astal/gjs/*"
]
},
}
}

View File

@ -0,0 +1,29 @@
import { App, Astal, Gtk, Gdk } from "astal/gtk3"
import { Variable } from "astal"
const time = Variable("").poll(1000, "date")
export default function Bar(gdkmonitor: Gdk.Monitor) {
return <window
className="Bar"
gdkmonitor={gdkmonitor}
exclusivity={Astal.Exclusivity.EXCLUSIVE}
anchor={Astal.WindowAnchor.TOP
| Astal.WindowAnchor.LEFT
| Astal.WindowAnchor.RIGHT}
application={App}>
<centerbox>
<button
onClicked="echo hello"
halign={Gtk.Align.CENTER} >
Welcome to AGS!
</button>
<box />
<button
onClick={() => print("hello")}
halign={Gtk.Align.CENTER} >
<label label={time()} />
</button>
</centerbox>
</window>
}

View File

@ -0,0 +1,72 @@
// Thanks to https://gitlab.com/filippoaceto/
import GObject, { register, property } from "astal/gobject"
import { monitorFile, readFileAsync } from "astal/file"
import { exec, execAsync } from "astal/process"
const get = (args: string) => Number(exec(`brightnessctl ${args}`))
const screen = exec(`bash -c "ls -w1 /sys/class/backlight | head -1"`)
const kbd = exec(`bash -c "ls -w1 /sys/class/leds | head -1"`)
@register({ GTypeName: "Brightness" })
export default class Brightness extends GObject.Object {
static instance: Brightness
static get_default() {
if (!this.instance)
this.instance = new Brightness()
return this.instance
}
#kbdMax = get(`--device ${kbd} max`)
#kbd = get(`--device ${kbd} get`)
#screenMax = get("max")
#screen = get("get") / (get("max") || 1)
@property(Number)
get kbd() { return this.#kbd }
set kbd(value) {
if (value < 0 || value > this.#kbdMax)
return
execAsync(`brightnessctl -d ${kbd} s ${value} -q`).then(() => {
this.#kbd = value
this.notify("kbd")
})
}
@property(Number)
get screen() { return this.#screen }
set screen(percent) {
if (percent < 0)
percent = 0
if (percent > 1)
percent = 1
if (Math.floor(percent * 100) > 1)
execAsync(`brightnessctl set ${Math.floor(percent * 100)}% -q`).then(() => {
this.#screen = percent
this.notify("screen")
})
}
constructor() {
super()
const screenPath = `/sys/class/backlight/${screen}/brightness`
const kbdPath = `/sys/class/leds/${kbd}/brightness`
monitorFile(screenPath, async f => {
const v = await readFileAsync(f)
this.#screen = Number(v) / this.#screenMax
this.notify("screen")
})
monitorFile(kbdPath, async f => {
const v = await readFileAsync(f)
this.#kbd = Number(v) / this.#kbdMax
this.notify("kbd")
})
}
}

View File

@ -0,0 +1,42 @@
import { GObject } from "astal";
import { astalify, ConstructProps, App, Astal, Gdk, Gtk } from "astal/gtk3"
class CalendarGtk extends astalify(Gtk.Calendar) {
static {
GObject.registerClass(this);
}
constructor(
props: ConstructProps<Gtk.Calendar, Gtk.Calendar.ConstructorProps>,
) {
super(props as any);
}
}
export default function Calendar() {
const anchor = Astal.WindowAnchor.TOP
| Astal.WindowAnchor.RIGHT
return <window
name="calendar"
visible={false}
application={App}
anchor={anchor}
keymode={Astal.Keymode.ON_DEMAND}
onKeyPressEvent={function (self, event: Gdk.Event) {
if (event.get_keyval()[1] === Gdk.KEY_Escape)
self.hide()
}}
>
<box
className="calendar"
>{new CalendarGtk({
hexpand: true,
vexpand: true,
showDayNames: true,
showDetails: false,
showHeading: true,
showWeekNumbers: true
})}</box>
</window>
}

View File

@ -0,0 +1,167 @@
import { App } from "astal/gtk3"
import Apps from "gi://AstalApps"
import Wp from "gi://AstalWp"
import { Variable, GLib, bind } from "astal"
import { subprocess, exec, execAsync } from "astal/process"
import { Astal, Gtk, Gdk } from "astal/gtk3"
import Brightness from "./Brightness"
function BrightnessSlider() {
const brightness = Brightness.get_default()
return <box className="MicrophoneSlider" css="min-width: 140px">
<slider
hexpand
value={bind(brightness, "screen")}
onDragged={({ value }) => brightness.screen = value}
/>
</box>
}
function AudioSlider() {
const speaker = Wp.get_default()?.audio.defaultSpeaker!
return <box className="AudioSlider" css="min-width: 140px">
<slider
hexpand
onDragged={({ value }) => speaker.volume = value}
value={bind(speaker, "volume")}
/>
</box>
}
function MicrophoneSlider() {
const microphone = Wp.get_default()?.audio.defaultMicrophone!
return <box className="MicrophoneSlider" css="min-width: 140px">
<slider
hexpand
onDragged={({ value }) => microphone.volume = value}
value={bind(microphone, "volume")}
/>
</box>
}
function openwelcomeapp() {
execAsync("com.ml4w.welcome")
App.get_window("sidebar")!.hide()
}
function opensettingsapp() {
execAsync("com.ml4w.dotfilessettings")
App.get_window("sidebar")!.hide()
}
function openhyprlandapp() {
execAsync("com.ml4w.hyprland.settings")
App.get_window("sidebar")!.hide()
}
function openwallpaper() {
const proc = subprocess(["bash", "-c", "waypaper"])
App.get_window("sidebar")!.hide()
}
function openwallpapereffects() {
const proc = subprocess(["bash", "-c", "$HOME/.config/hypr/scripts/wallpaper-effects.sh"])
App.get_window("sidebar")!.hide()
}
function openwaybarthemes() {
const proc = subprocess(["bash", "-c", "$HOME/.config/waybar/themeswitcher.sh"])
App.get_window("sidebar")!.hide()
}
function powerlock() {
const proc = subprocess(["bash", "-c", "$HOME/.config/hypr/scripts/power.sh lock"])
App.get_window("sidebar")!.hide()
}
function powerlogout() {
const proc = subprocess(["bash", "-c", "$HOME/.config/hypr/scripts/power.sh exit"])
App.get_window("sidebar")!.hide()
}
function powersuspend() {
const proc = subprocess(["bash", "-c", "$HOME/.config/hypr/scripts/power.sh suspend"])
App.get_window("sidebar")!.hide()
}
function powerrestart() {
const proc = subprocess(["bash", "-c", "$HOME/.config/hypr/scripts/power.sh reboot"])
App.get_window("sidebar")!.hide()
}
function powerexit() {
const proc = subprocess(["bash", "-c", "$HOME/.config/hypr/scripts/power.sh shutdown"])
App.get_window("sidebar")!.hide()
}
export default function Sidebar() {
const anchor = Astal.WindowAnchor.TOP
| Astal.WindowAnchor.RIGHT
return <window
name="sidebar"
application={App}
visible={false}
className="Sidebar"
anchor={anchor}
keymode={Astal.Keymode.ON_DEMAND}
onKeyPressEvent={function (self, event: Gdk.Event) {
if (event.get_keyval()[1] === Gdk.KEY_Escape)
self.hide()
}}
>
<box className="sidebar" vertical>
<box css="padding-bottom:20px;">
<box className="group" vertical>
<box homogeneous>
<button onClicked={openwelcomeapp} className="ml4wwelcomeicon"></button>
<button onClicked={opensettingsapp} className="ml4wsettingsicon"></button>
<button onClicked={openhyprlandapp} className="ml4whyprlandicon"></button>
</box>
<box homogeneous>
<button onClicked={openwelcomeapp}>Welcome App</button>
<button onClicked={opensettingsapp}>Settings App</button>
<button onClicked={openhyprlandapp}>Hyprland App</button>
</box>
</box>
</box>
<centerbox horizontal className="group">
<label vexpand label=""></label>
<box>
<button onClicked={openwallpaper} className="btnbar first wallpaper"></button>
<button onClicked={openwallpapereffects} className="btnbar wallpapereffects"></button>
<button onClicked={openwaybarthemes} className="btnbar last statusbar"></button>
</box>
<label vexpand label=""></label>
</centerbox>
<box css="padding-bottom:20px;"></box>
<box className="group" halign="left" vertical>
<label css="padding-bottom:10px" label="Speaker"></label>
<AudioSlider/>
<label css="padding-bottom:10px" label="Microphone"></label>
<MicrophoneSlider />
</box>
<box css="padding-bottom:20px;"></box>
<box className="group" halign="left" vertical>
<label css="padding-bottom:10px" label="Brightness"></label>
<BrightnessSlider />
</box>
<box css="padding-bottom:20px;"></box>
<centerbox horizontal className="group">
<label vexpand label=""></label>
<box>
<button onClicked={powerlock} className="btnbar first lock"></button>
<button onClicked={powerlogout} className="btnbar logout"></button>
<button onClicked={powersuspend} className="btnbar suspend"></button>
<button onClicked={powerrestart} className="btnbar restart"></button>
<button onClicked={powerexit} className="btnbar last exit"></button>
</box>
<label vexpand label=""></label>
</centerbox>
</box>
</window>
}