Chnaged AGS config
This commit is contained in:
130
roles/ags/files/.eslintrc.yml
Normal file
130
roles/ags/files/.eslintrc.yml
Normal file
@@ -0,0 +1,130 @@
|
||||
env:
|
||||
es2022: true
|
||||
extends:
|
||||
- "eslint:recommended"
|
||||
- "plugin:@typescript-eslint/recommended"
|
||||
parser: "@typescript-eslint/parser"
|
||||
parserOptions:
|
||||
ecmaVersion: 2022
|
||||
sourceType: "module"
|
||||
project: "./tsconfig.json"
|
||||
warnOnUnsupportedTypeScriptVersion: false
|
||||
root: true
|
||||
ignorePatterns:
|
||||
- types/
|
||||
plugins:
|
||||
- "@typescript-eslint"
|
||||
rules:
|
||||
"@typescript-eslint/ban-ts-comment":
|
||||
- "off"
|
||||
"@typescript-eslint/no-non-null-assertion":
|
||||
- "off"
|
||||
# "@typescript-eslint/no-explicit-any":
|
||||
# - "off"
|
||||
"@typescript-eslint/no-unused-vars":
|
||||
- error
|
||||
- varsIgnorePattern: (^unused|_$)
|
||||
argsIgnorePattern: ^(unused|_)
|
||||
"@typescript-eslint/no-empty-interface":
|
||||
- "off"
|
||||
|
||||
arrow-parens:
|
||||
- error
|
||||
- as-needed
|
||||
comma-dangle:
|
||||
- error
|
||||
- always-multiline
|
||||
comma-spacing:
|
||||
- error
|
||||
- before: false
|
||||
after: true
|
||||
comma-style:
|
||||
- error
|
||||
- last
|
||||
curly:
|
||||
- error
|
||||
- multi-or-nest
|
||||
- consistent
|
||||
dot-location:
|
||||
- error
|
||||
- property
|
||||
eol-last:
|
||||
- error
|
||||
eqeqeq:
|
||||
- error
|
||||
- always
|
||||
indent:
|
||||
- error
|
||||
- 4
|
||||
- SwitchCase: 1
|
||||
keyword-spacing:
|
||||
- error
|
||||
- before: true
|
||||
lines-between-class-members:
|
||||
- error
|
||||
- always
|
||||
- exceptAfterSingleLine: true
|
||||
padded-blocks:
|
||||
- error
|
||||
- never
|
||||
- allowSingleLineBlocks: false
|
||||
prefer-const:
|
||||
- error
|
||||
quotes:
|
||||
- error
|
||||
- double
|
||||
- avoidEscape: true
|
||||
semi:
|
||||
- error
|
||||
- never
|
||||
nonblock-statement-body-position:
|
||||
- error
|
||||
- below
|
||||
no-trailing-spaces:
|
||||
- error
|
||||
no-useless-escape:
|
||||
- off
|
||||
max-len:
|
||||
- error
|
||||
- code: 100
|
||||
func-call-spacing:
|
||||
- error
|
||||
array-bracket-spacing:
|
||||
- error
|
||||
space-before-function-paren:
|
||||
- error
|
||||
- anonymous: never
|
||||
named: never
|
||||
asyncArrow: ignore
|
||||
space-before-blocks:
|
||||
- error
|
||||
key-spacing:
|
||||
- error
|
||||
object-curly-spacing:
|
||||
- error
|
||||
- always
|
||||
globals:
|
||||
Widget: readonly
|
||||
Utils: readonly
|
||||
App: readonly
|
||||
Variable: readonly
|
||||
Service: readonly
|
||||
pkg: readonly
|
||||
ARGV: readonly
|
||||
Debugger: readonly
|
||||
GIRepositoryGType: readonly
|
||||
globalThis: readonly
|
||||
imports: readonly
|
||||
Intl: readonly
|
||||
log: readonly
|
||||
logError: readonly
|
||||
print: readonly
|
||||
printerr: readonly
|
||||
window: readonly
|
||||
TextEncoder: readonly
|
||||
TextDecoder: readonly
|
||||
console: readonly
|
||||
setTimeout: readonly
|
||||
setInterval: readonly
|
||||
clearTimeout: readonly
|
||||
clearInterval: readonly
|
||||
@@ -4,9 +4,7 @@ const { messageAsync } = await Service.import("hyprland")
|
||||
const {
|
||||
hyprland,
|
||||
theme: {
|
||||
spacing,
|
||||
radius,
|
||||
border: { width },
|
||||
blur,
|
||||
shadows,
|
||||
dark: {
|
||||
@@ -21,10 +19,8 @@ const {
|
||||
|
||||
const deps = [
|
||||
"hyprland",
|
||||
spacing.id,
|
||||
radius.id,
|
||||
blur.id,
|
||||
width.id,
|
||||
shadows.id,
|
||||
darkActive.id,
|
||||
lightActive.id,
|
||||
@@ -49,12 +45,10 @@ function sendBatch(batch: string[]) {
|
||||
}
|
||||
|
||||
async function setupHyprland() {
|
||||
const wm_gaps = Math.floor(hyprland.gaps.value * spacing.value)
|
||||
|
||||
sendBatch([
|
||||
`general:border_size ${width}`,
|
||||
`general:gaps_out ${wm_gaps}`,
|
||||
`general:gaps_in ${Math.floor(wm_gaps / 2)}`,
|
||||
`general:border_size ${hyprland.borderSize.value}`,
|
||||
`general:gaps_out ${hyprland.gapsOut.value}`,
|
||||
`general:gaps_in ${hyprland.gapsIn.value}`,
|
||||
`general:col.active_border rgba(${activeBorder()}ff)`,
|
||||
`general:col.inactive_border rgba(${hyprland.inactiveBorder.value})`,
|
||||
`decoration:rounding ${radius}`,
|
||||
|
||||
@@ -71,8 +71,8 @@ export function mkOptions<T extends object>(cacheFile: string, object: T) {
|
||||
|
||||
Utils.ensureDirectory(cacheFile.split("/").slice(0, -1).join("/"))
|
||||
|
||||
const configFile = `${TMP}/config.json`
|
||||
console.log(configFile)
|
||||
const configFile = `${App.configDir}/config.json`
|
||||
console.log("Config file: " + configFile)
|
||||
const values = getOptions(object).reduce((obj, { id, value }) => ({ [id]: value, ...obj }), {})
|
||||
Utils.writeFileSync(JSON.stringify(values, null, 2), configFile)
|
||||
Utils.monitorFile(configFile, () => {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { icon } from "lib/utils"
|
||||
import icons from "lib/icons"
|
||||
|
||||
const options = mkOptions(OPTIONS, {
|
||||
autotheme: opt(false),
|
||||
autotheme: opt(true),
|
||||
|
||||
wallpaper: {
|
||||
resolution: opt<import("service/wallpaper").Resolution>(1920),
|
||||
@@ -52,14 +52,14 @@ const options = mkOptions(OPTIONS, {
|
||||
shadows: opt(true),
|
||||
padding: opt(7),
|
||||
spacing: opt(12),
|
||||
radius: opt(11),
|
||||
radius: opt(14),
|
||||
},
|
||||
|
||||
transition: opt(200),
|
||||
|
||||
font: {
|
||||
size: opt(13),
|
||||
name: opt("Ubuntu Nerd Font"),
|
||||
size: opt(12),
|
||||
name: opt("CaskaydiaCove Nerd Font"),
|
||||
},
|
||||
|
||||
bar: {
|
||||
@@ -69,7 +69,7 @@ const options = mkOptions(OPTIONS, {
|
||||
layout: {
|
||||
start: opt<Array<import("widget/bar/Bar").BarWidget>>([
|
||||
"launcher",
|
||||
//"workspaces",
|
||||
"workspaces",
|
||||
"taskbar",
|
||||
"expander",
|
||||
"messages",
|
||||
@@ -83,8 +83,8 @@ const options = mkOptions(OPTIONS, {
|
||||
"systray",
|
||||
"colorpicker",
|
||||
"screenrecord",
|
||||
"system",
|
||||
"battery",
|
||||
"system",
|
||||
"powermenu",
|
||||
]),
|
||||
},
|
||||
@@ -95,12 +95,12 @@ const options = mkOptions(OPTIONS, {
|
||||
},
|
||||
label: {
|
||||
colored: opt(false),
|
||||
label: opt(" Applications"),
|
||||
label: opt(""),
|
||||
},
|
||||
action: opt(() => App.toggleWindow("launcher")),
|
||||
},
|
||||
date: {
|
||||
format: opt("%H:%M - %A %e."),
|
||||
format: opt("%H:%M - %d.%m.%Y"),
|
||||
action: opt(() => App.toggleWindow("datemenu")),
|
||||
},
|
||||
battery: {
|
||||
@@ -116,7 +116,7 @@ const options = mkOptions(OPTIONS, {
|
||||
},
|
||||
taskbar: {
|
||||
iconSize: opt(0),
|
||||
monochrome: opt(true),
|
||||
monochrome: opt(false),
|
||||
exclusive: opt(false),
|
||||
},
|
||||
messages: {
|
||||
@@ -129,7 +129,7 @@ const options = mkOptions(OPTIONS, {
|
||||
]),
|
||||
},
|
||||
media: {
|
||||
monochrome: opt(true),
|
||||
monochrome: opt(false),
|
||||
preferred: opt("spotify"),
|
||||
direction: opt<"left" | "right">("right"),
|
||||
format: opt("{artists} - {title}"),
|
||||
@@ -140,7 +140,6 @@ const options = mkOptions(OPTIONS, {
|
||||
action: opt(() => App.toggleWindow("powermenu")),
|
||||
},
|
||||
},
|
||||
|
||||
launcher: {
|
||||
width: opt(0),
|
||||
margin: opt(80),
|
||||
@@ -156,12 +155,9 @@ const options = mkOptions(OPTIONS, {
|
||||
max: opt(6),
|
||||
favorites: opt([
|
||||
[
|
||||
"firefox",
|
||||
"org.gnome.Nautilus",
|
||||
"brave",
|
||||
"org.gnome.Calendar",
|
||||
"obsidian",
|
||||
"discord",
|
||||
"spotify",
|
||||
],
|
||||
]),
|
||||
},
|
||||
@@ -170,7 +166,7 @@ const options = mkOptions(OPTIONS, {
|
||||
overview: {
|
||||
scale: opt(9),
|
||||
workspaces: opt(7),
|
||||
monochromeIcon: opt(true),
|
||||
monochromeIcon: opt(false),
|
||||
},
|
||||
|
||||
powermenu: {
|
||||
@@ -189,9 +185,9 @@ const options = mkOptions(OPTIONS, {
|
||||
},
|
||||
width: opt(380),
|
||||
position: opt<"left" | "center" | "right">("right"),
|
||||
networkSettings: opt("gtk-launch gnome-control-center"),
|
||||
networkSettings: opt("nm-connection-editor"),
|
||||
media: {
|
||||
monochromeIcon: opt(true),
|
||||
monochromeIcon: opt(false),
|
||||
coverSize: opt(100),
|
||||
},
|
||||
},
|
||||
@@ -228,12 +224,15 @@ const options = mkOptions(OPTIONS, {
|
||||
|
||||
notifications: {
|
||||
position: opt<Array<"top" | "bottom" | "left" | "right">>(["top", "right"]),
|
||||
blacklist: opt(["Spotify"]),
|
||||
blacklist: opt([""]),
|
||||
width: opt(440),
|
||||
},
|
||||
|
||||
hyprland: {
|
||||
gaps: opt(2.4),
|
||||
gapsIn: opt(2),
|
||||
gapsOut: opt(3),
|
||||
borderSize: opt(1),
|
||||
inactiveBorder: opt("333333ff"),
|
||||
gapsWhenOnly: opt(false),
|
||||
},
|
||||
|
||||
19
roles/ags/files/package.json
Normal file
19
roles/ags/files/package.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "ags-dotfiles",
|
||||
"author": "Aylur",
|
||||
"kofi": "https://ko-fi.com/aylur",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Aylur/dotfiles.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@girs/accountsservice-1.0": "^1.0.0-3.2.7",
|
||||
"@typescript-eslint/eslint-plugin": "^6.20.0",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-config-standard-with-typescript": "^43.0.1",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint-plugin-n": "^16.6.2",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"typescript": "^5.3.3"
|
||||
}
|
||||
}
|
||||
@@ -54,7 +54,7 @@ class Wallpaper extends Service {
|
||||
params: {
|
||||
resolution: options.wallpaper.resolution.value,
|
||||
format: "json",
|
||||
image_format: "jpg",
|
||||
image_format: "png",
|
||||
index: "random",
|
||||
mkt: options.wallpaper.market.value,
|
||||
},
|
||||
@@ -89,9 +89,9 @@ class Wallpaper extends Service {
|
||||
this.#wallpaper()
|
||||
})
|
||||
|
||||
Utils.execAsync("swww-daemon")
|
||||
.then(this.#wallpaper)
|
||||
.catch(() => null)
|
||||
Utils.execAsync("swww init")
|
||||
.then(() => this.#wallpaper)
|
||||
.catch((e) => console.warn(e))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
19
roles/ags/files/tsconfig.json
Normal file
19
roles/ags/files/tsconfig.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "ES2022",
|
||||
"lib": [
|
||||
"ES2022"
|
||||
],
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"strict": true,
|
||||
"noImplicitAny": false,
|
||||
"baseUrl": ".",
|
||||
"typeRoots": [
|
||||
"./types",
|
||||
"./node_modules/@girs"
|
||||
],
|
||||
"skipLibCheck": true
|
||||
}
|
||||
}
|
||||
@@ -59,12 +59,6 @@ const BluetoothIndicator = () => Widget.Overlay({
|
||||
icon: icons.bluetooth.enabled,
|
||||
visible: bluetooth.bind("enabled"),
|
||||
}),
|
||||
overlay: Widget.Label({
|
||||
hpack: "end",
|
||||
vpack: "start",
|
||||
label: bluetooth.bind("connected_devices").as(c => `${c.length}`),
|
||||
visible: bluetooth.bind("connected_devices").as(c => c.length > 0),
|
||||
}),
|
||||
})
|
||||
|
||||
const NetworkIndicator = () => Widget.Icon().hook(network, self => {
|
||||
|
||||
@@ -116,6 +116,9 @@ export default [
|
||||
),
|
||||
Page("General", icons.ui.settings,
|
||||
Group("Hyprland",
|
||||
Row({ opt: h.gapsIn, title: "Gaps Inside" }),
|
||||
Row({ opt: h.gapsOut, title: "Gaps Outside" }),
|
||||
Row({ opt: h.borderSize, title: "Border Size" }),
|
||||
Row({ opt: h.gapsWhenOnly, title: "Gaps When Only" }),
|
||||
),
|
||||
Group("Launcher",
|
||||
|
||||
Reference in New Issue
Block a user