Skip to content

Commit

Permalink
#30 fixed, but buggy code?
Browse files Browse the repository at this point in the history
  • Loading branch information
dollplayer2501 committed Oct 12, 2023
1 parent 1f0fa59 commit b38ad24
Show file tree
Hide file tree
Showing 18 changed files with 622 additions and 349 deletions.
Binary file modified _screenshots/screenshot__default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _screenshots/screenshot__node.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _screenshots/screenshot_editor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _screenshots/screenshot_filer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _screenshots/screenshot_terminal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion angle_minus_five_degrees.conky.conf
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ conky.config = {
' config.lua ' ..
' const.lua ' ..

' config/wall_clock.lua ' ..
' config/wall_clock_hours24.lua ' ..
' config/wall_clock_hours12.lua ' ..
' config/background_tiles.lua ' ..
' config/bar_more.lua ' ..
' config/ring_cpu.lua ' ..
Expand Down
67 changes: 48 additions & 19 deletions angle_minus_five_degrees.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ function _load_modules(_id)
end


_load_modules('wall_clock')
_load_modules('wall_clock_hours24')
_load_modules('wall_clock_hours12')
_load_modules('background_tiles')
_load_modules('bar_more')
_load_modules('ring_cpu')
Expand Down Expand Up @@ -95,35 +96,63 @@ function conky_main()


---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
-- Wall Clock
-- Wall Clock - hours 24
---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
if true == global_config.display_module.wall_clock then
local cfg = get_config_wall_clock(global_const, global_config, TODAY_WIDTH)
drawing_wall_clock(cr_draw,
if true == global_config.display_module.wall_clock_hours24 then
local cfg = get_config_wall_clock_hours24(global_const, global_config, TODAY_WIDTH)
drawing_wall_clock_hours24(cr_draw,
-- position
cfg.center_x, cfg.center_y,
-- Clock hands - 12 hour
cfg.hands_radius_hour12, cfg.hands_width_hour12,
-- Clock hands - 24 hour
cfg.hands_radius_hour24, cfg.hands_width_hour24,
-- Clock hands - minutes
cfg.hands_update_interval_mins, cfg.hands_radius_mins, cfg.hands_width_mins,
-- Clock hands - seconds
cfg.hands_display_secs, cfg.hands_radius_secs, cfg.hands_width_secs,
-- Clock marks - 12 hour
cfg.marks_radius_from_hour12, cfg.marks_radius_to_hour12, cfg.marks_width_hour12,
-- Clock marks - minutes
cfg.marks_display_mins,
cfg.marks_radius_from_mins, cfg.marks_radius_to_mins, cfg.marks_width_mins,
cfg.hands_radius_hour24, cfg.hands_width_hour24, cfg.hands_back_length_rate_hour24,
-- Clock marks - 24 hour - main hand
cfg.marks_radius_from_hour24_main, cfg.marks_radius_to_hour24_main, cfg.marks_width_hour24_main,
-- Clock marks - 24 hour - sub hand
cfg.marks_radius_from_hour24_sub, cfg.marks_radius_to_hour24_sub, cfg.marks_width_hour24_sub,
-- Clock marks - 24 hour - sub hand - short (10 min)
cfg.marks_radius_from_hour24_sub_short, cfg.marks_radius_to_hour24_sub_short, cfg.marks_width_hour24_sub_short,
-- Clock marks - 24 hour - sub hand - long (30min)
cfg.marks_radius_from_hour24_sub_long, cfg.marks_radius_to_hour24_sub_long, cfg.marks_width_hour24_sub_long,
-- Clock number - 24 hour
cfg.number_display_hour24,
cfg.number_adjust_x_hour24, cfg.number_adjust_y_hour24,
cfg.number_font_align_hour24, cfg.number_font_size_hour24, cfg.number_font_face_hour24, cfg.number_font_weight_hour24,
-- etc
cfg.hands_update_interval_mins,
cfg.hands_hour24_fix_degree,
cfg.hands_line_cap, cfg.marks_line_cap,
-- color
global_color.wall_clock)
end


---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
-- Wall Clock - hours 12
---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
if true == global_config.display_module.wall_clock_hours12 then
local cfg = get_config_wall_clock_hours12(global_const, global_config, TODAY_WIDTH)
drawing_wall_clock_hours12(cr_draw,
-- position
cfg.center_x, cfg.center_y,
-- Clock hands - 12 hour
cfg.hands_radius_hour12, cfg.hands_width_hour12, cfg.hands_back_length_rate_hour12,
-- Clock hands - minutes
cfg.hands_radius_mins, cfg.hands_width_mins, cfg.hands_back_length_rate_mins,
-- Clock hands - seconds
cfg.hands_display_secs, cfg.hands_radius_secs, cfg.hands_width_secs, cfg.hands_back_length_rate_secs,
-- Clock marks - 12 o'clock, top
cfg.marks_display_mins00, cfg.marks_radius_from_mins00, cfg.marks_radius_to_mins00, cfg.marks_width_mins00,
-- Clock marks - 15 minutes without 12 o'clock
cfg.marks_display_mins15, cfg.marks_radius_from_mins15, cfg.marks_radius_to_mins15, cfg.marks_width_mins15,
-- Clock marks - 10 minutes
cfg.marks_radius_from_mins10, cfg.marks_radius_to_mins10, cfg.marks_width_mins10,
-- Clock marks - 1 minute
cfg.marks_display_mins01,
cfg.marks_radius_from_mins, cfg.marks_radius_to_mins, cfg.marks_width_mins,
-- Clock number - 24 hour
cfg.number_display_mins10,
cfg.number_adjust_x_mins10, cfg.number_adjust_y_mins10,
cfg.number_font_align_x_mins10, cfg.number_font_size_mins10, cfg.number_font_face_mins10, cfg.number_font_weight_mins10,
-- etc
cfg.hands_update_interval_mins,
cfg.hands_line_cap, cfg.marks_line_cap,
-- color
global_color.wall_clock)
Expand Down
10 changes: 7 additions & 3 deletions color_default.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,20 @@ function get_color()
marks = {
hour12 = setting_hex_to_rgba('#7f3fbf', 0.4),
hour24 = setting_hex_to_rgba('#7f7fff', 0.6),
mins = setting_hex_to_rgba('#7f3fbf', 0.4),
mins00 = setting_hex_to_rgba('#7f3fbf', 0.8),
mins15 = setting_hex_to_rgba('#7f3fbf', 0.8),
mins10 = setting_hex_to_rgba('#7f3fbf', 0.8),
mins01 = setting_hex_to_rgba('#7f3fbf', 0.8),
},
number = {
hour24 = setting_hex_to_rgba('#7f3fbf', 0.8),
mins10 = setting_hex_to_rgba('#7f3fbf', 0.8),
},
hands ={
hour12 = setting_hex_to_rgba('#7f3fbf', 0.8),
hour24 = setting_hex_to_rgba('#7f7fff', 0.4),
hour24 = setting_hex_to_rgba('#7f7fff', 0.8),
mins = setting_hex_to_rgba('#7f3fbf', 0.8),
secs = setting_hex_to_rgba('#ff7fff', 0.4),
secs = setting_hex_to_rgba('#ff7fff', 0.6),
},
},

Expand Down
8 changes: 6 additions & 2 deletions color_node.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,19 @@ function get_color()
marks = {
hour12 = setting_hex_to_rgba(node.node11, 0.4),
hour24 = setting_hex_to_rgba(node.node11, 0.6),
mins = setting_hex_to_rgba(node.node11, 0.4),
mins00 = setting_hex_to_rgba(node.node11, 0.8),
mins15 = setting_hex_to_rgba(node.node11, 0.8),
mins10 = setting_hex_to_rgba(node.node11, 0.8),
mins01 = setting_hex_to_rgba(node.node11, 0.8),
},
number = {
hour24 = setting_hex_to_rgba(node.node10, 0.6),
mins10 = setting_hex_to_rgba(node.node10, 0.6),
},
hands ={
hour12 = setting_hex_to_rgba(node.node11, 0.8),
hour24 = setting_hex_to_rgba(node.node07, 0.6),
mins = setting_hex_to_rgba(node.node11, 0.6),
mins = setting_hex_to_rgba(node.node11, 0.8),
secs = setting_hex_to_rgba(node.node07, 0.8),
},
},
Expand Down
64 changes: 36 additions & 28 deletions config-sample.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function get_config()
--
-- The existance of this file is not checked within the scripts.
--
color_scheme = 'color_default.lua', -- or 'color_node.lua'
color_scheme = 'color_default.lua', -- or 'color_node.lua',

-- Whether or not to display gradient color of background
-- Caution!
Expand All @@ -27,16 +27,10 @@ function get_config()
-- When the screen is set to 0 degrees, this moire does not occur.
display_background_gradient = true,

-- Whether or not to display clock seconds
display_seconds = {
wall_clock = true,
ring_clock = true,
text_clock = true,
},

-- Whether or not to display meaningless gimmicks
display_top_right_gimmick = true,


-- Update interval time, network upspeed and down
graph_network_time_interval = 1,

Expand All @@ -54,18 +48,28 @@ function get_config()
dummy_ip_address = '123.456.789.012',
},

-- Whether or not to display 12pm or 0am
-- This setting only affects the 12 hour circle of the ring clock
--
-- 24 hour system | Global | Japan
-- ------------------+----------+---------
-- 0:00 / midnight | 12:00 pm | 0:00 am
-- 12:00 / afternoon | 12:00 am | 0:00 pm

-- Whether or not to display clock seconds
display_seconds = {
wall_clock = true,
ring_clock = true,
text_clock = true,
},

--
-- I think in many countries it is expressed as '12:00pm' and '12:00am',
-- but this expression left strange to me...
-- Wall clock
--
display_hour12_japanese_style = false,
wall_clock = {
display_marks_minutes00 = false,
display_marks_minutes01 = true,
display_marks_minutes15 = false,
display_number_display = true,
display_number_hour24 = true,
-- It's especially annoying that the minute hand updates
-- at `update_interval`(of conky's config) intervals
-- This value must be greater than or equal 1 and less than or equal to 59 (seconds)
update_interval_minutes = 15,
},

--
-- 12 hour system or 24 hour system
Expand All @@ -78,23 +82,26 @@ function get_config()
suppression_hour_zero = false,
},

-- Whether or not to display 12pm or 0am
-- This setting only affects the 12 hour circle of the ring clock
--
-- Wall clock
-- 24 hour system | Global | Japan
-- ------------------+----------+---------
-- 0:00 / midnight | 12:00 pm | 0:00 am
-- 12:00 / afternoon | 12:00 am | 0:00 pm
--
wall_clock = {
display_marks_minutes = true,
display_number_hour24 = true,
-- It's especially annoying that the minute hand updates
-- at `update_interval`(of conky's config) intervals
-- This value must be greater than or equal 1 and less than or equal to 59 (seconds)
update_interval_minutes = 15,
},
-- I think in many countries it is expressed as '12:00pm' and '12:00am',
-- but this expression left strange to me...
--
display_hour12_japanese_style = false,


--
-- Whether or not to display each modules
--
display_module = {
wall_clock = true,
wall_clock_hours24 = true,
wall_clock_hours12 = true,
background_tiles = true,
bar_more = true,
ring_cpu = true,
Expand All @@ -109,6 +116,7 @@ function get_config()
debug_lines = false,
},


--
-- Filesystem
--
Expand Down
63 changes: 0 additions & 63 deletions config/wall_clock.lua

This file was deleted.

64 changes: 64 additions & 0 deletions config/wall_clock_hours12.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
--
-- Wall Clock Hours 12
--

function get_config_wall_clock_hours12(_const, _config, _today_width)
return {
-- position
center_x = _const.CENTER_POSITION.THEME.X,
center_y = _const.CENTER_POSITION.THEME.Y,

-- Clock hands - 12 hour
hands_radius_hour12 = _const.BACKGROUND.LINES.LENGTH.CENTER_TO.RIGHT - 80,
hands_width_hour12 = 24,
hands_back_length_rate_hour12 = 0.1,

-- Clock hands - minutes
hands_radius_mins = _const.BACKGROUND.LINES.LENGTH.CENTER_TO.RIGHT + 30,
hands_width_mins = 16,
hands_back_length_rate_mins = 0.1,

-- Clock hands - seconds
hands_display_secs = _config.display_seconds.wall_clock,
hands_radius_secs = _const.BACKGROUND.LINES.LENGTH.CENTER_TO.RIGHT + 50,
hands_width_secs = 8,
hands_back_length_rate_secs = 0.2,

-- Clock marks - 12 o'clock, top
marks_display_mins00 = _config.wall_clock.display_marks_minutes00,
marks_radius_from_mins00 = _const.BACKGROUND.LINES.LENGTH.CENTER_TO.RIGHT - 200,
marks_radius_to_mins00 = _const.BACKGROUND.LINES.LENGTH.CENTER_TO.RIGHT + 80,
marks_width_mins00 = 6,

-- Clock marks - 15 minutes without 12 o'clock
marks_display_mins15 = _config.wall_clock.display_marks_minutes15,
marks_radius_from_mins15 = _const.BACKGROUND.LINES.LENGTH.CENTER_TO.RIGHT - 120,
marks_radius_to_mins15 = _const.BACKGROUND.LINES.LENGTH.CENTER_TO.RIGHT + 80,
marks_width_mins15 = 4,

-- Clock marks - 10 minutes
marks_radius_from_mins10 = _const.BACKGROUND.LINES.LENGTH.CENTER_TO.RIGHT - 90,
marks_radius_to_mins10 = _const.BACKGROUND.LINES.LENGTH.CENTER_TO.RIGHT + 40,
marks_width_mins10 = 2,

-- Clock marks - 1 minute
marks_display_mins01 = _config.wall_clock.display_marks_minutes01,
marks_radius_from_mins = _const.BACKGROUND.LINES.LENGTH.CENTER_TO.RIGHT - 40,
marks_radius_to_mins = _const.BACKGROUND.LINES.LENGTH.CENTER_TO.RIGHT - 10,
marks_width_mins = 2,

-- Clock number - 24 hour
number_display_mins10 = _config.wall_clock.display_number_mins10,
number_adjust_x_mins10 = 0,
number_adjust_y_mins10 = 10,
number_font_align_x_mins10 = _const.ALIGN.LEFT,
number_font_size_mins10 = 84,
number_font_face_mins10 = _const.FONT_FACE_2_1,
number_font_weight_mins10 = CAIRO_FONT_WEIGHT_NORMAL,

-- etc
hands_update_interval_mins = _config.wall_clock.update_interval_minutes,
hands_line_cap = CAIRO_LINE_CAP_ROUND,
marks_line_cap = CAIRO_LINE_CAP_ROUND,
}
end
Loading

0 comments on commit b38ad24

Please sign in to comment.