-
Notifications
You must be signed in to change notification settings - Fork 1
/
dconf_settings.jsonnet
146 lines (132 loc) · 5.06 KB
/
dconf_settings.jsonnet
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
local color_defs = import '../shell/color_definitions.libsonnet';
local wallpapers = import '../wallpaper/wallpapers.jsonnet';
local mouse_settings = {
'left-handed': true,
'natural-scroll': false,
'speed': 0.4
};
local touchpad_settings = {
'two-finger-scrolling-enabled': true
};
local desktop_accessibility_settings = {
'always-show-universal-access-status': false,
};
local desktop_calendar_settings = {
'show-weekdate': true
};
local desktop_datetime_settings = {
'automatic-timezone': true,
};
local desktop_wm_preferences = {
'button-layout': 'appmenu:minimize,maximize,close'
};
local desktop_interface_settings = {
'clock-format': '12h',
'clock-show-date': true,
'clock-show-seconds': false,
'clock-show-weekday': false,
'enable-hot-corners': true,
'font-name': 'Noto Sans 14',
'gtk-theme': 'Adwaita',
'locate-pointer': true,
'monospace-font-name': 'JetBrains Mono Nerd Font Mono 14',
'text-scaling-factor': 1.0
};
local shell_settings = {
'favorite-apps': ['org.kde.konsole.desktop', 'google-chrome.desktop', 'org.gnome.Nautilus.desktop']
};
local background_settings(wallpaper_path, dark_wallpaper_path=null) = {
'picture-uri': 'file://' + wallpaper_path,
[if dark_wallpaper_path != null then 'picture-uri-dark' ]: 'file://"$HOME"/' + dark_wallpaper_path,
};
local dash_to_panel_settings = {
LeftElement(element, visible=true):: {
'element': element,
'visible': visible,
'position': 'stackedTL'
},
RightElement(element, visible=true):: {
'element': element,
'visible': visible,
'position': 'stackedBR'
},
'animate-appicon-hover': true,
'animate-appicon-hover-animation-type': 'SIMPLE',
'appicon-margin': 8,
'appicon-padding': 4,
'available-monitors': [0],
'dot-position': 'BOTTOM',
'dot-style-focused': 'METRO',
'dot-style-unfocused': 'METRO',
'hide-overview-on-startup': true,
'hotkeys-overlay-combo': 'TEMPORARILY',
'intellihide-key-toggle': ['<Super>i'],
'leftbox-padding': -1,
'overview-click-to-exit': true,
'panel-anchors': std.toString({"0":"MIDDLE"}),
'panel-element-positions': std.toString({
"0": [
$.LeftElement("showAppsButton"),
$.LeftElement("activitiesButton", false),
$.LeftElement("leftBox"),
$.LeftElement("taskbar"),
$.RightElement("centerBox"),
$.RightElement("rightBox"),
$.RightElement("dateMenu"),
$.RightElement("systemMenu"),
$.RightElement("desktopButton")]}),
'panel-lengths': std.toString({"0": 50}),
'panel-positions': std.toString({'0': 'BOTTOM'}),
'panel-sizes': std.toString({"0": 64}),
'primary-monitor': 0,
'shift-click-action': 'MINIMIZE',
'shift-middle-click-action': 'LAUNCH',
'shortcut': ['<Super>q'],
'show-appmenu': false,
'show-apps-icon-file': '',
'status-icon-padding': -1,
'stockgs-force-hotcorner': false,
'stockgs-keep-dash': false,
'stockgs-keep-top-panel': false,
'trans-bg-color': color_defs.Colors.RoofTerracotta.hexcolor,
'trans-gradient-bottom-color': color_defs.Colors.Cardinal.hexcolor,
'trans-gradient-bottom-opacity': 0.6,
'trans-gradient-top-color': color_defs.Colors.Carnation.hexcolor,
'trans-gradient-top-opacity': 0.1,
'trans-panel-opacity': 0.1,
'trans-use-custom-bg': true,
'trans-use-custom-gradient': true,
'trans-use-custom-opacity': true,
'trans-use-dynamic-opacity': true,
'tray-padding': -1,
'window-preview-title-position': 'TOP',
};
local manifestDconfIni(ini) =
local body_lines(body) =
std.join([], [
local value_or_values = body[k];
if std.isArray(value_or_values) then
['%s=%s' % [k, value_or_values]]
else if std.isBoolean(value_or_values) || std.isNumber(value_or_values) then
['%s=%s' % [k, value_or_values]]
else if std.isString(value_or_values) then
["%s='%s'" % [k, std.toString(value_or_values)]]
else
["%s=%s" % [k, std.strReplace(std.toString(value_or_values), '"', "'")]]
for k in std.objectFields(body)
]) + [''];
local section_lines(sname, sbody) = ['[%s]' % [sname]] + body_lines(sbody),
all_sections = [section_lines(k, ini[k]) for k in std.objectFields(ini)];
std.join('\n', std.flattenArrays(all_sections));
manifestDconfIni({
'org/gnome/desktop/a11y': desktop_accessibility_settings,
'org/gnome/desktop/calendar': desktop_calendar_settings,
'org/gnome/desktop/datetime': desktop_datetime_settings,
'org/gnome/desktop/interface': desktop_interface_settings,
'org/gnome/desktop/peripherals/mouse': mouse_settings,
'org/gnome/desktop/peripherals/touchpad': touchpad_settings,
'org/gnome/desktop/wm/preferences': desktop_wm_preferences,
'org/gnome/shell': shell_settings,
'org/gnome/shell/desktop/background': background_settings('/usr/share/backgrounds/gnome/fold-l.jpg'),
'org/gnome/shell/extensions/dash-to-panel': dash_to_panel_settings,
})