Begin work on configuration menu
This commit is contained in:
186
options.ts
Normal file
186
options.ts
Normal file
@@ -0,0 +1,186 @@
|
||||
import { opt, mkOptions } from "lib/option"
|
||||
import { distro } from "lib/variables"
|
||||
import { icon } from "lib/utils"
|
||||
import icons from "lib/icons"
|
||||
|
||||
const options = mkOptions(OPTIONS, {
|
||||
autotheme: opt(false),
|
||||
|
||||
theme: {
|
||||
dark: {
|
||||
primary: {
|
||||
bg: opt("#51a4e7"),
|
||||
fg: opt("#141414"),
|
||||
},
|
||||
error: {
|
||||
bg: opt("#e55f86"),
|
||||
fg: opt("#141414"),
|
||||
},
|
||||
bg: opt("#171717"),
|
||||
fg: opt("#eeeeee"),
|
||||
widget: opt("#eeeeee"),
|
||||
border: opt("#eeeeee"),
|
||||
},
|
||||
light: {
|
||||
primary: {
|
||||
bg: opt("#426ede"),
|
||||
fg: opt("#eeeeee"),
|
||||
},
|
||||
error: {
|
||||
bg: opt("#b13558"),
|
||||
fg: opt("#eeeeee"),
|
||||
},
|
||||
bg: opt("#fffffa"),
|
||||
fg: opt("#080808"),
|
||||
widget: opt("#080808"),
|
||||
border: opt("#080808"),
|
||||
},
|
||||
|
||||
blur: opt(0),
|
||||
scheme: opt<"dark" | "light">("dark"),
|
||||
widget: { opacity: opt(94) },
|
||||
border: {
|
||||
width: opt(1),
|
||||
opacity: opt(96),
|
||||
},
|
||||
},
|
||||
|
||||
font: {
|
||||
size: opt(13),
|
||||
name: opt("Ubuntu Nerd Font"),
|
||||
},
|
||||
|
||||
bar: {
|
||||
flatButtons: opt(true),
|
||||
position: opt<"top" | "bottom">("top"),
|
||||
corners: opt(true),
|
||||
transparent: opt(false),
|
||||
layout: {
|
||||
start: opt<Array<import("modules/bar/Bar").BarWidget>>([
|
||||
"dashboard",
|
||||
"workspaces",
|
||||
"windowtitle"
|
||||
]),
|
||||
center: opt<Array<import("modules/bar/Bar").BarWidget>>([
|
||||
"media"
|
||||
]),
|
||||
end: opt<Array<import("modules/bar/Bar").BarWidget>>([
|
||||
"volume",
|
||||
"network",
|
||||
"bluetooth",
|
||||
"systray",
|
||||
"clock",
|
||||
"notifications"
|
||||
]),
|
||||
},
|
||||
launcher: {
|
||||
icon: {
|
||||
colored: opt(true),
|
||||
icon: opt(icon(distro.logo, icons.ui.search)),
|
||||
},
|
||||
label: {
|
||||
colored: opt(false),
|
||||
label: opt(" Applications"),
|
||||
},
|
||||
action: opt(() => App.toggleWindow("launcher")),
|
||||
},
|
||||
date: {
|
||||
format: opt("%H:%M - %A %e."),
|
||||
action: opt(() => App.toggleWindow("datemenu")),
|
||||
},
|
||||
battery: {
|
||||
bar: opt<"hidden" | "regular" | "whole">("regular"),
|
||||
charging: opt("#00D787"),
|
||||
percentage: opt(true),
|
||||
blocks: opt(7),
|
||||
low: opt(30),
|
||||
},
|
||||
workspaces: {
|
||||
workspaces: opt(7),
|
||||
},
|
||||
taskbar: {
|
||||
iconSize: opt(0),
|
||||
monochrome: opt(true),
|
||||
exclusive: opt(false),
|
||||
},
|
||||
messages: {
|
||||
action: opt(() => App.toggleWindow("datemenu")),
|
||||
},
|
||||
systray: {
|
||||
ignore: opt([
|
||||
"KDE Connect Indicator",
|
||||
"spotify-client",
|
||||
]),
|
||||
},
|
||||
media: {
|
||||
monochrome: opt(true),
|
||||
preferred: opt("spotify"),
|
||||
direction: opt<"left" | "right">("right"),
|
||||
format: opt("{artists} - {title}"),
|
||||
length: opt(40),
|
||||
},
|
||||
powermenu: {
|
||||
monochrome: opt(false),
|
||||
action: opt(() => App.toggleWindow("powermenu")),
|
||||
},
|
||||
},
|
||||
|
||||
overview: {
|
||||
scale: opt(9),
|
||||
workspaces: opt(7),
|
||||
monochromeIcon: opt(true),
|
||||
},
|
||||
|
||||
powermenu: {
|
||||
sleep: opt("systemctl suspend"),
|
||||
reboot: opt("systemctl reboot"),
|
||||
logout: opt("pkill Hyprland"),
|
||||
shutdown: opt("shutdown now"),
|
||||
layout: opt<"line" | "box">("line"),
|
||||
labels: opt(true),
|
||||
},
|
||||
|
||||
quicksettings: {
|
||||
avatar: {
|
||||
image: opt(`/var/lib/AccountsService/icons/${Utils.USER}`),
|
||||
size: opt(70),
|
||||
name: opt("Linux User")
|
||||
},
|
||||
},
|
||||
|
||||
calendarmenu: {
|
||||
position: opt<"left" | "center" | "right">("center"),
|
||||
weather: {
|
||||
interval: opt(60_000),
|
||||
unit: opt<"metric" | "imperial" | "standard">("metric"),
|
||||
key: opt<string>(
|
||||
JSON.parse(Utils.readFile(`${App.configDir}/.weather`) || "{}")?.key || "",
|
||||
),
|
||||
},
|
||||
},
|
||||
|
||||
osd: {
|
||||
progress: {
|
||||
vertical: opt(true),
|
||||
pack: {
|
||||
h: opt<"start" | "center" | "end">("end"),
|
||||
v: opt<"start" | "center" | "end">("center"),
|
||||
},
|
||||
},
|
||||
microphone: {
|
||||
pack: {
|
||||
h: opt<"start" | "center" | "end">("center"),
|
||||
v: opt<"start" | "center" | "end">("end"),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
notifications: {
|
||||
position: opt<Array<"top" | "bottom" | "left" | "right">>(["top", "right"]),
|
||||
blacklist: opt(["Spotify"]),
|
||||
},
|
||||
})
|
||||
|
||||
globalThis["options"] = options
|
||||
export default options
|
||||
|
||||
Reference in New Issue
Block a user