-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcg_opts.lua
More file actions
160 lines (139 loc) · 4.74 KB
/
cg_opts.lua
File metadata and controls
160 lines (139 loc) · 4.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
cg.opt.mzteinit_entries = {
-- TODO: the `which` invocations here are a workaround in case the relevant binaries
-- are installed in a directory that mzteinit adds to $PATH, which it currently doesn't handle.
{ key = "z", label = "river", cmd = { cg.opt.system "which mzteriver" } },
{ key = "u", label = "river-classic", cmd = { cg.opt.system "which mzteriver-classic" } },
{ key = "h", label = "hyprland", cmd = { "Hyprland" } },
{ key = "n", label = "niri", cmd = { "niri", "--session" } },
{ key = "s", label = "shell", cmd = { "nu" } },
{ key = "l", label = "logout", cmd = { "!quit" } },
{ key = "p", label = "shutdown", cmd = { "systemctl", "poweroff" }, quit = true },
{ key = "r", label = "reboot", cmd = { "systemctl", "reboot" }, quit = true },
}
-- Enable if you have good internet, used for stuff like making
-- streamlink use low-latency mode.
cg.opt.good_internet = true
-- Enable if stuck on garbage hardware. Enables wayland-related workarounds.
cg.opt.nvidia = false
cg.opt.font = "3270 Nerd Font"
cg.opt.term_font = "3270 Nerd Font Mono"
-- Font size multiplier. Useful for high-res displays.
cg.opt.font_size_mul = 1
cg.opt.mulFontSize = function(siz) return math.floor(siz * cg.opt.font_size_mul) end
-- Configurations for all terminals I tend to use. To activate one, set cg.opt.term to it.
cg.opt.terminal_configurations = {
foot = {
name = "foot",
command = "foot",
exec = "foot",
workdir_command = "foot --working-directory=",
icon_name = "foot",
},
ghostty = {
name = "Ghostty",
command = "ghostty",
exec = "ghostty -e",
workdir_command = "ghostty --working-directory=",
icon_name = "com.mitchellh.ghostty",
},
kitty = {
name = "Kitty",
command = "kitty",
exec = "kitty",
workdir_command = "kitty --working-directory=",
icon_name = "kitty",
},
}
cg.opt.term = cg.opt.terminal_configurations.foot
cg.opt.cursor = {
theme = "LyraQ-cursors",
size = 24,
}
-- https://github.com/Fausto-Korpsvart/catppuccin-gtk-theme
cg.opt.gtk_theme = "Catppuccin-GTK-Red-Dark-Compact"
cg.opt.icon_theme = "candy-icons"
cg.opt.commands = {
browser = "openbrowser",
email = "claws-mail",
calculator = "qalculate-gtk",
file_manager = "thunar",
-- zenity-compatible dialoger
zenity = "yad",
screen_lock = string.format(
"i3lock -ti %s/.local/share/backgrounds/mzte.png",
os.getenv "HOME"
),
media = {
volume_up = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+",
volume_down = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-",
mute_sink = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
mute_source = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle",
play_pause = "playerctl play-pause",
stop = "playerctl stop",
next = "playerctl next",
prev = "playerctl previous",
},
backlight_up = "brightnessctl s +15%",
backlight_down = "brightnessctl s -15%",
}
cg.opt.gamemode = {
on_start = "notify-send -a 'Gamemode' 'Gamemode Active'",
on_stop = "notify-send -a 'Gamemode' 'Gamemode Inactive'",
}
cg.opt.dev_dir = os.getenv "HOME" .. "/dev"
cg.opt.irc = {
nick = "lordmzte",
realname = "LordMZTE",
}
cg.opt.matrix = {
mxid = "@lordmzte:mzte.de",
}
cg.opt.keyboard = {
layout = "de",
options = nil, -- for example "caps:swapescape"
}
local ctp_rgb = {}
setmetatable(ctp_rgb, {
__index = function(_, key)
local rs, gs, bs = string.match(cg.opt.catppuccin[key], "^(%x%x)(%x%x)(%x%x)$")
return {
r = tonumber(rs, 16),
g = tonumber(gs, 16),
b = tonumber(bs, 16),
}
end,
})
cg.opt.catppuccin = {
rgb = ctp_rgb,
base = "1e1e2e",
blue = "89b4fa",
crust = "11111b",
flamingo = "f2cdcd",
green = "a6e3a1",
lavender = "b4befe",
mantle = "181825",
maroon = "eba0ac",
mauve = "cba6f7",
overlay0 = "6c7086",
overlay1 = "7f849c",
overlay2 = "9399b2",
peach = "fab387",
pink = "f5c2e7",
red = "f38ba8",
rosewater = "f5e0dc",
sapphire = "74c7ec",
sky = "89dceb",
subtext0 = "a6adc8",
subtext1 = "bac2de",
surface0 = "313244",
surface1 = "45475a",
surface2 = "585b70",
teal = "94e2d5",
text = "cdd6f4",
yellow = "f9e2af",
}
cg.opt.homepage_url = "file://" .. os.getenv "HOME" .. "/confgenfs/cgassets/homepage.html"
cg.opt.cgpath = cg.fs and cg.fs.mountpoint or require("lfs").currentdir() .. "/cgout"
cg.opt.textwidth = 100
-- The size to use when downloading or streaming videos. Typically, only the height is checked here.
cg.opt.videosize = { 1920, 1080 }