-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathi3-cheat.conf
98 lines (79 loc) · 2.99 KB
/
i3-cheat.conf
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
-- Conky configuration for i3-wm cheatsheet
--
-- Michael Gilchrist ([email protected])
-- Obtain the path of this script, for relative sourcing of other scripts
local current_file_path = debug.getinfo(1, "S").source:sub(2)
local working_dir = current_file_path:match("(.*/)")
-- Source the shared functions module and confuration defaults
local MOD = dofile(working_dir .. 'scripts/config_helper.lua')
local CONF = dofile(working_dir .. 'scripts/config_defaults.lua')
-- Obtain settings from the configuration file
local HOSTNAME = MOD.get_hostname()
local RESOLUTION = MOD.get_resolution()
local CONFIG_DEFAULTS = CONF.defaults
-- For debugging - only available when run interactively
print("Path: ", current_file_path)
print("Dir: ", working_dir)
print("Hostname: ", HOSTNAME)
print("Resolution: ", RESOLUTION)
-- Get system specific customizations
if HOSTNAME == "davinci" then
GAP_X = 1075
GAP_Y = 88
MINIMUM_WIDTH = 400
MAXIMUM_WIDTH = 400
FONT = 'Hack:size=8'
elseif HOSTNAME == "galileo" and RESOLUTION == "2256x1504" then
GAP_X = 500
GAP_Y = 128
MINIMUM_WIDTH = 350
MAXIMUM_WIDTH = 350
FONT = 'Hack:size=12'
elseif HOSTNAME == "galileo" and RESOLUTION == "1920x1280_60.00" then
GAP_X = 375
GAP_Y = 88
MINIMUM_WIDTH = 300
MAXIMUM_WIDTH = 300
FONT = 'Hack:size=10'
end
-- Apply system specific customizations to a customization table
local custom = {
alignment = 'top_right',
gap_x = GAP_X,
gap_y = GAP_Y,
font = FONT,
minimum_width = MINIMUM_WIDTH,
maximum_width = MAXIMUM_WIDTH,
update_interval = 3,
}
-- Merge defaults with additional settings
local conky_config = MOD.merge_tables(CONFIG_DEFAULTS, custom)
-- For debugging
--MOD.print_merged_config_table(conky_config)
-- Apply the merged table to conky.config
conky.config = conky_config
-- Create executable path
-- local exe_path = working_dir .. 'scripts/git.rb ~/git'
-- conky.text = [[
-- ${execp ruby ]] .. exe_path .. [[}
-- ]]
conky.text = [[
${color0}i3 Shortcuts ${hr}${color1}
MOD + SHIFT + c Reload Config
MOD + SHIFT + r Restart i3
MOD + SHIFT + e Exit i3
${color0}Focus${color1} ${hr 1}
MOD + j Focus Left MOD + SHIFT + j Move Focus Left
MOD + k Focus Down MOD + SHIFT + k Move Focus Down
MOD + l Focus Up MOD + SHIFT + l Move Focus Up
MOD + ; Focus Right MOD + SHIFT + ; Move Focus Right
MOD + a Focus Parent MOD + SPACE Toggle Focus Mode
${color0}Size and Layout${color1} ${hr 1}
MOD + r Resize MOD + e Default Layout
MOD + f Fullscreen MOD + w Tabbed Layout
MOD + SH + SP Float MOD + s Stacking Layout
${color0}Workspace${color1} ${hr 1}
MOD + v Split Vertically MOD + h Split Horizontally
MOD + \# Switch WS MOD + SHIFT + \# Move Window to WS
MOD + d Open Launcher MOD + SHIFT + q Kill Window
]]