mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-27 00:58:36 +00:00
Update extras (syntax files) w/ new docs.
Generate the list of symbols for vim & nano syntax files using docs data + jinja2. Also refactored the doc handling a bit.
This commit is contained in:
parent
aaf285540e
commit
670973a678
@ -47,6 +47,7 @@ set(conky_sources ${CMAKE_BINARY_DIR}/config.h ${CMAKE_BINARY_DIR}/build.h)
|
||||
add_subdirectory(lua)
|
||||
add_subdirectory(data)
|
||||
add_subdirectory(doc)
|
||||
add_subdirectory(extras)
|
||||
|
||||
# Include 3rdparty toluapp
|
||||
add_subdirectory(3rdparty/toluapp)
|
||||
|
@ -89,7 +89,7 @@ mark_as_advanced(RELEASE)
|
||||
|
||||
option(MAINTAINER_MODE "Enable maintainer mode" false)
|
||||
|
||||
option(BUILD_DOCS "Build documentation" false)
|
||||
option(BUILD_DOCS "Build documentation & extras (syntax files for editors)" false)
|
||||
|
||||
option(BUILD_I18N "Enable if you want internationalization support" true)
|
||||
if(BUILD_I18N)
|
||||
|
@ -21,8 +21,7 @@
|
||||
if(BUILD_DOCS)
|
||||
add_custom_target(man.md
|
||||
ALL
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/docgen.py man.md.j2 > ${CMAKE_CURRENT_BINARY_DIR}/man.md
|
||||
OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/man.md
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/render.py man.md.j2 > ${CMAKE_CURRENT_BINARY_DIR}/man.md
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
SOURCES config_settings.yaml variables.yaml lua.yaml man.md.j2
|
||||
)
|
||||
|
@ -105,8 +105,7 @@ values:
|
||||
desc: |-
|
||||
This table contains some information about Conky's window.
|
||||
The following table describes the values contained:
|
||||
NOTE: This table is only defined when X support is
|
||||
enabled.
|
||||
|
||||
| Key | Value |
|
||||
|---------------------|---------------------------------------------------------------------------------|
|
||||
| drawable | Window's drawable (Xlib Drawable), requires Lua extras enabled at compile time. |
|
||||
@ -121,3 +120,6 @@ values:
|
||||
| text_start_y | The y component of the starting coordinate of text drawing. |
|
||||
| text_width | The width of the text drawing region. |
|
||||
| text_height | The height of the text drawing region. |
|
||||
|
||||
NOTE: This table is only defined when X support is
|
||||
enabled.
|
||||
|
@ -1,16 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
from warnings import filters
|
||||
import os
|
||||
import yaml
|
||||
|
||||
with open("config_settings.yaml") as file:
|
||||
base_path = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
with open(os.path.join(base_path, "config_settings.yaml")) as file:
|
||||
config_settings = yaml.safe_load(file)
|
||||
|
||||
with open("variables.yaml") as file:
|
||||
with open(os.path.join(base_path, "variables.yaml")) as file:
|
||||
variables = yaml.safe_load(file)
|
||||
|
||||
with open("lua.yaml") as file:
|
||||
with open(os.path.join(base_path, "lua.yaml")) as file:
|
||||
lua = yaml.safe_load(file)
|
||||
|
||||
data = {
|
44
extras/CMakeLists.txt
Normal file
44
extras/CMakeLists.txt
Normal file
@ -0,0 +1,44 @@
|
||||
#
|
||||
# Conky, a system monitor, based on torsmo
|
||||
#
|
||||
# Please see COPYING for details
|
||||
#
|
||||
# Copyright (c) 2005-2021 Brenden Matthews, et. al. (see AUTHORS) All rights
|
||||
# reserved.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation, either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details. You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
if(BUILD_DOCS)
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/nano)
|
||||
add_custom_target(conky.nanorc
|
||||
ALL
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/doc/render.py nano/conky.nanorc.j2 > ${CMAKE_CURRENT_BINARY_DIR}/nano/conky.nanorc
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
SOURCES
|
||||
${CMAKE_SOURCE_DIR}/doc/variables.yaml
|
||||
${CMAKE_SOURCE_DIR}/doc/config_settings.yaml
|
||||
${CMAKE_SOURCE_DIR}/doc/lua.yaml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nano/conky.nanorc.j2
|
||||
)
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/vim/syntax)
|
||||
add_custom_target(conkyrc.vim
|
||||
ALL
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/doc/render.py vim/syntax/conkyrc.vim.j2 > ${CMAKE_CURRENT_BINARY_DIR}/vim/syntax/conkyrc.vim
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
SOURCES
|
||||
${CMAKE_SOURCE_DIR}/doc/variables.yaml
|
||||
${CMAKE_SOURCE_DIR}/doc/config_settings.yaml
|
||||
${CMAKE_SOURCE_DIR}/doc/lua.yaml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/vim/syntax/conkyrc.vim.j2
|
||||
)
|
||||
endif(BUILD_DOCS)
|
@ -1,18 +0,0 @@
|
||||
##
|
||||
## Syntax highlighting for conkyrc files.
|
||||
##
|
||||
##
|
||||
syntax "conky" "(\.*conkyrc.*$|conky.conf)"
|
||||
|
||||
## Configuration items
|
||||
color green "\<(alignment|append_file|background|border_inner_margin|border_outer_margin|border_width|color0|color1|color2|color3|color4|color5|color6|color7|color8|color9|colorN|cpu_avg_samples|default_bar_height|default_bar_width|default_color|default_gauge_height|default_gauge_width|default_graph_height|default_graph_width|default_outline_color|default_shade_color|diskio_avg_samples|display|double_buffer|draw_borders|draw_graph_borders|draw_outline|draw_shades|extra_newline|font|font0|font1|font2|font3|font4|font5|font6|font7|font8|font9|format_human_readable|gap_x|gap_y|xinerama_head|http_port|http_refresh|if_up_strictness|imap|imlib_cache_flush_interval|imlib_cache_size|lua_draw_hook_post|lua_draw_hook_pre|lua_load|lua_shutdown_hook|lua_startup_hook|mail_spool|max_port_monitor_connections|max_text_width|max_user_text|maximum_width|minimum_height|minimum_width|mpd_host|mpd_password|mpd_port|music_player_interval|mysql_host|mysql_port|mysql_user|mysql_password|mysql_db|net_avg_samples|no_buffers|nvidia_display|out_to_console|out_to_http|out_to_ncurses|out_to_stderr|out_to_x|override_utf8_locale|overwrite_file|own_window|own_window_class|own_window_colour|own_window_hints|own_window_title|own_window_transparent|own_window_type|pad_percents|pop3|sensor_device|short_units|show_graph_range|show_graph_scale|stippled_borders|temperature_unit|template|template0|template1|template2|template3|template4|template5|template6|template7|template8|template9|text|text_buffer_size|times_in_seconds|top_cpu_separate|top_name_verbose|top_name_width|total_run_times|update_interval|update_interval_on_battery|uppercase|use_spacer|use_xft|xftalpha|xftfont)\>"
|
||||
|
||||
## Configuration item constants
|
||||
color yellow "\<(above|below|bottom_left|bottom_right|bottom_middle|desktop|dock|no|none|normal|override|skip_pager|skip_taskbar|sticky|top_left|top_right|top_middle|middle_left|middle_right|middle_middle|undecorated|yes)\>"
|
||||
|
||||
## Variables
|
||||
color brightblue "\<(acpiacadapter|acpifan|acpitemp|addr|addrs|alignc|alignr|apcupsd|apcupsd_cable|apcupsd_charge|apcupsd_lastxfer|apcupsd_linev|apcupsd_load|apcupsd_loadbar|apcupsd_loadgauge|apcupsd_loadgraph|apcupsd_model|apcupsd_name|apcupsd_status|apcupsd_temp|apcupsd_timeleft|apcupsd_upsmode|apm_adapter|apm_battery_life|apm_battery_time|audacious_bar|audacious_bitrate|audacious_channels|audacious_filename|audacious_frequency|audacious_length|audacious_length_seconds|audacious_main_volume|audacious_playlist_length|audacious_playlist_position|audacious_position|audacious_position_seconds|audacious_status|audacious_title|battery|battery_bar|battery_percent|battery_short|battery_time|blink|buffers|cached|cat|catp|cmdline_to_pid|color|color0|color1|color2|color3|color4|color5|color6|color7|color8|color9|combine|conky_build_arch|conky_build_date|conky_version|cpu|cpubar|cpugauge|cpugraph|cpugovernor|curl|desktop|desktop_name|desktop_number|disk_protect|diskio|diskio_read|diskio_write|diskiograph|diskiograph_read|diskiograph_write|distribution|downspeed|downspeedf|downspeedgraph|draft_mails|else|endif|entropy_avail|entropy_bar|entropy_perc|entropy_poolsize|eval|eve|exec|execbar|execgauge|execgraph|execi|execibar|execigauge|execigraph|execp|execpi|flagged_mails|font|font0|font1|font2|font3|font4|font5|font6|font7|font8|font9|format_time|forwarded_mails|free_bufcache|freq|freq_g|fs_bar|fs_bar_free|fs_free|fs_free_perc|fs_size|fs_type|fs_used|fs_used_perc|goto|gw_iface|gw_ip|hddtemp|head|hr|hwmon|i2c|i8k_ac_status|i8k_bios|i8k_buttons_status|i8k_cpu_temp|i8k_left_fan_rpm|i8k_left_fan_status|i8k_right_fan_rpm|i8k_right_fan_status|i8k_serial|i8k_version|ibm_brightness|ibm_fan|ibm_temps|ibm_volume|ical|iconv_start|iconv_stop|if_empty|if_existing|if_gw|if_match|if_mixer_mute|if_mounted|if_mpd_playing|if_running|if_smapi_bat_installed|if_up|if_updatenr|if_pa_sink_muted|if_xmms2_connected|image|imap_messages|imap_unseen|ioscheduler|irc|journal|kernel|laptop_mode|lines|loadavg|loadgraph|lua|lua_bar|lua_gauge|lua_graph|lua_parse|machine|mails|mboxscan|mem|memwithbuffers|membar|memwithbuffersbar|memwithbuffersgraph|memavail|memeasyfree|memfree|memgauge|memgraph|memmax|memperc|mixer|mixerbar|mixerl|mixerlbar|mixerr|mixerrbar|moc_album|moc_artist|moc_bitrate|moc_curtime|moc_file|moc_rate|moc_song|moc_state|moc_timeleft|moc_title|moc_totaltime|monitor|monitor_number|mpd_album|mpd_artist|mpd_bar|mpd_bitrate|mpd_elapsed|mpd_file|mpd_length|mpd_name|mpd_percent|mpd_random|mpd_repeat|mpd_smart|mpd_status|mpd_title|mpd_comment|mpd_track|mpd_vol|mysql|nameserver|new_mails|nodename|nodename_short|no_update|nvidia|obsd_product|obsd_sensors_fan|obsd_sensors_temp|obsd_sensors_volt|obsd_vendor|offset|outlinecolor|pa_sink_volume|pa_sink_volumebar|pa_sink_description|pa_card_name pa_card_active_profile|pb_battery|pid_chroot|pid_cmdline|pid_cwd|pid_environ|pid_environ_list|pid_exe|pid_nice|pid_openfiles|pid_parent|pid_priority|pid_state|pid_state_short|pid_stderr|pid_stdin|pid_stdout|pid_threads|pid_thread_list|pid_time_kernelmode|pid_time_usermode|pid_time|pid_uid|pid_euid|pid_suid|pid_fsuid|pid_gid|pid_egid|pid_sgid|pid_fsgid|pid_read|pid_vmpeak|pid_vmsize|pid_vmlck|pid_vmhwm|pid_vmrss|pid_vmdata|pid_vmstk|pid_vmexe|pid_vmlib|pid_vmpte|pid_write|platform|pop3_unseen|pop3_used|processes|read_tcp|read_udp|replied_mails|rss|running_processes|running_threads|scroll|seen_mails|shadecolor|shmem|sip_status|smapi|smapi_bat_bar|smapi_bat_perc|smapi_bat_power|smapi_bat_temp|sony_fanspeed|stippled_hr|stock|swap|swapbar|swapfree|swapmax|swapperc|sysname|tab|tail|tcp_ping|tcp_portmon|template0|template1|template2|template3|template4|template5|template6|template7|template8|template9|texeci|texecpi|threads|time|to_bytes|top|top_io|top_mem|top_time|totaldown|totalup|trashed_mails|tztime|gid_name|uid_name|unflagged_mails|unforwarded_mails|unreplied_mails|unseen_mails|updates|upspeed|upspeedf|upspeedgraph|uptime|uptime_short|user_names|user_number|user_terms|user_times|user_time|utime|voffset|voltage_mv|voltage_v|weather|wireless_ap|wireless_bitrate|wireless_essid|wireless_link_bar|wireless_link_qual|wireless_link_qual_max|wireless_link_qual_perc|wireless_mode|words|xmms2_album|xmms2_artist|xmms2_bar|xmms2_bitrate|xmms2_comment|xmms2_date|xmms2_duration|xmms2_elapsed|xmms2_genre|xmms2_id|xmms2_percent|xmms2_playlist|xmms2_size|xmms2_smart|xmms2_status|xmms2_timesplayed|xmms2_title|xmms2_tracknr|xmms2_url)\>"
|
||||
|
||||
color brightblue "\$\{?[0-9A-Z_!@#$*?-]+\}?"
|
||||
color cyan "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
|
||||
color brightred "^TEXT$"
|
18
extras/nano/conky.nanorc.j2
Normal file
18
extras/nano/conky.nanorc.j2
Normal file
@ -0,0 +1,18 @@
|
||||
##
|
||||
## Syntax highlighting for conkyrc files.
|
||||
##
|
||||
##
|
||||
syntax "conky" "(\.*conkyrc.*$|conky.conf)"
|
||||
|
||||
## Configuration items
|
||||
color green "\<({{ config_settings['values']|map(attribute="name")|join('|') }})\>"
|
||||
|
||||
## Configuration item constants
|
||||
color yellow "\<(above|below|bottom_left|bottom_right|bottom_middle|desktop|dock|no|none|normal|override|skip_pager|skip_taskbar|sticky|top_left|top_right|top_middle|middle_left|middle_right|middle_middle|undecorated|yes)\>"
|
||||
|
||||
## Variables
|
||||
color brightblue "\<({{ variables['values']|map(attribute="name")|join('|') }})\>"
|
||||
|
||||
color brightblue "\$\{?[0-9A-Z_!@#$*?-]+\}?"
|
||||
color cyan "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
|
||||
color brightred "^TEXT$"
|
@ -1,65 +0,0 @@
|
||||
" Vim syntax file
|
||||
" Language: conkyrc
|
||||
" Author: Ciaran McCreesh <ciaranm@gentoo.org>
|
||||
" Version: 20060307
|
||||
" Copyright: Copyright (c) 2005 Ciaran McCreesh
|
||||
" Licence: You may redistribute this under the same terms as Vim itself
|
||||
"
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn region ConkyrcComment start=/^\s*#/ end=/$/
|
||||
|
||||
syn keyword ConkyrcSetting alignment append_file background border_inner_margin border_outer_margin border_width color0 color1 color2 color3 color4 color5 color6 color7 color8 color9 colorN cpu_avg_samples default_bar_height default_bar_width default_color default_gauge_height default_gauge_width default_graph_height default_graph_width default_outline_color default_shade_color diskio_avg_samples display double_buffer draw_borders draw_graph_borders draw_outline draw_shades extra_newline font font0 font1 font2 font3 font4 font5 font6 font7 font8 font9 format_human_readable gap_x gap_y xinerama_head http_port http_refresh if_up_strictness imap imlib_cache_flush_interval imlib_cache_size lua_draw_hook_post lua_draw_hook_pre lua_load lua_shutdown_hook lua_startup_hook mail_spool max_port_monitor_connections max_text_width max_user_text maximum_width minimum_height minimum_width mpd_host mpd_password mpd_port music_player_interval mysql_host mysql_port mysql_user mysql_password mysql_db net_avg_samples no_buffers nvidia_display out_to_console out_to_http out_to_ncurses out_to_stderr out_to_x override_utf8_locale overwrite_file own_window own_window_class own_window_colour own_window_hints own_window_title own_window_transparent own_window_type pad_percents pop3 sensor_device short_units show_graph_range show_graph_scale stippled_borders temperature_unit template template0 template1 template2 template3 template4 template5 template6 template7 template8 template9 text text_buffer_size times_in_seconds top_cpu_separate top_name_verbose top_name_width total_run_times update_interval update_interval_on_battery uppercase use_spacer use_xft xftalpha xftfont
|
||||
|
||||
syn keyword ConkyrcConstant
|
||||
\ above
|
||||
\ below
|
||||
\ bottom_left
|
||||
\ bottom_right
|
||||
\ bottom_middle
|
||||
\ desktop
|
||||
\ dock
|
||||
\ no
|
||||
\ none
|
||||
\ normal
|
||||
\ override
|
||||
\ skip_pager
|
||||
\ skip_taskbar
|
||||
\ sticky
|
||||
\ top_left
|
||||
\ top_right
|
||||
\ top_middle
|
||||
\ middle_left
|
||||
\ middle_right
|
||||
\ middle_middle
|
||||
\ undecorated
|
||||
\ yes
|
||||
|
||||
syn match ConkyrcNumber /\S\@<!\d\+\(\.\d\+\)\?\(\S\@!\|}\@=\)/
|
||||
\ nextgroup=ConkyrcNumber,ConkyrcColour skipwhite
|
||||
syn match ConkyrcColour /\S\@<!#[a-fA-F0-9]\{6\}\(\S\@!\|}\@=\)/
|
||||
\ nextgroup=ConkyrcNumber,ConkyrcColour skipwhite
|
||||
|
||||
syn region ConkyrcText start=/^TEXT$/ end=/\%$/ contains=ConkyrcVar
|
||||
|
||||
syn region ConkyrcVar start=/\${/ end=/}/ contained contains=ConkyrcVarStuff
|
||||
syn region ConkyrcVar start=/\$\w\@=/ end=/\W\@=\|$/ contained contains=ConkyrcVarName
|
||||
|
||||
syn match ConkyrcVarStuff /{\@<=/ms=s contained nextgroup=ConkyrcVarName
|
||||
|
||||
syn keyword ConkyrcVarName contained nextgroup=ConkyrcNumber,ConkyrcColour skipwhite acpiacadapter acpifan acpitemp addr addrs alignc alignr apcupsd apcupsd_cable apcupsd_charge apcupsd_lastxfer apcupsd_linev apcupsd_load apcupsd_loadbar apcupsd_loadgauge apcupsd_loadgraph apcupsd_model apcupsd_name apcupsd_status apcupsd_temp apcupsd_timeleft apcupsd_upsmode apm_adapter apm_battery_life apm_battery_time audacious_bar audacious_bitrate audacious_channels audacious_filename audacious_frequency audacious_length audacious_length_seconds audacious_main_volume audacious_playlist_length audacious_playlist_position audacious_position audacious_position_seconds audacious_status audacious_title battery battery_bar battery_percent battery_short battery_time blink buffers cached cat catp cmdline_to_pid color color0 color1 color2 color3 color4 color5 color6 color7 color8 color9 combine conky_build_arch conky_build_date conky_version cpu cpubar cpugauge cpugraph cpugovernor curl desktop desktop_name desktop_number disk_protect diskio diskio_read diskio_write diskiograph diskiograph_read diskiograph_write distribution downspeed downspeedf downspeedgraph draft_mails else endif entropy_avail entropy_bar entropy_perc entropy_poolsize eval eve exec execbar execgauge execgraph execi execibar execigauge execigraph execp execpi flagged_mails font font0 font1 font2 font3 font4 font5 font6 font7 font8 font9 format_time forwarded_mails free_bufcache freq freq_g fs_bar fs_bar_free fs_free fs_free_perc fs_size fs_type fs_used fs_used_perc goto gw_iface gw_ip hddtemp head hr hwmon i2c i8k_ac_status i8k_bios i8k_buttons_status i8k_cpu_temp i8k_left_fan_rpm i8k_left_fan_status i8k_right_fan_rpm i8k_right_fan_status i8k_serial i8k_version ibm_brightness ibm_fan ibm_temps ibm_volume ical iconv_start iconv_stop if_pa_sink_muted if_empty if_existing if_gw if_match if_mixer_mute if_mounted if_mpd_playing if_running if_smapi_bat_installed if_up if_updatenr if_xmms2_connected image imap_messages imap_unseen ioscheduler irc journal kernel laptop_mode lines loadavg loadgraph lua lua_bar lua_gauge lua_graph lua_parse machine mails mboxscan mem memwithbuffers membar memwithbuffersbar memwithbuffersgraph memavail memeasyfree memfree memgauge memgraph memmax memperc mixer mixerbar mixerl mixerlbar mixerr mixerrbar moc_album moc_artist moc_bitrate moc_curtime moc_file moc_rate moc_song moc_state moc_timeleft moc_title moc_totaltime monitor monitor_number mpd_album mpd_artist mpd_bar mpd_bitrate mpd_elapsed mpd_file mpd_length mpd_name mpd_percent mpd_random mpd_repeat mpd_smart mpd_status mpd_title mpd_comment mpd_track mpd_vol mysql nameserver new_mails nodename nodename_short no_update nvidia obsd_product obsd_sensors_fan obsd_sensors_temp obsd_sensors_volt obsd_vendor offset outlinecolor pa_sink_volume pa_sink_volumebar pa_sink_description pa_card_name pa_card_active_profile pb_battery pid_chroot pid_cmdline pid_cwd pid_environ pid_environ_list pid_exe pid_nice pid_openfiles pid_parent pid_priority pid_state pid_state_short pid_stderr pid_stdin pid_stdout pid_threads pid_thread_list pid_time_kernelmode pid_time_usermode pid_time pid_uid pid_euid pid_suid pid_fsuid pid_gid pid_egid pid_sgid pid_fsgid pid_read pid_vmpeak pid_vmsize pid_vmlck pid_vmhwm pid_vmrss pid_vmdata pid_vmstk pid_vmexe pid_vmlib pid_vmpte pid_write platform pop3_unseen pop3_used processes read_tcp read_udp replied_mails rss running_processes running_threads scroll seen_mails shadecolor shmem sip_status smapi smapi_bat_bar smapi_bat_perc smapi_bat_power smapi_bat_temp sony_fanspeed stippled_hr stock swap swapbar swapfree swapmax swapperc sysname tab tail tcp_ping tcp_portmon template0 template1 template2 template3 template4 template5 template6 template7 template8 template9 texeci texecpi threads time to_bytes top top_io top_mem top_time totaldown totalup trashed_mails tztime gid_name uid_name unflagged_mails unforwarded_mails unreplied_mails unseen_mails updates upspeed upspeedf upspeedgraph uptime uptime_short user_names user_number user_terms user_times user_time utime voffset voltage_mv voltage_v weather wireless_ap wireless_bitrate wireless_essid wireless_link_bar wireless_link_qual wireless_link_qual_max wireless_link_qual_perc wireless_mode words xmms2_album xmms2_artist xmms2_bar xmms2_bitrate xmms2_comment xmms2_date xmms2_duration xmms2_elapsed xmms2_genre xmms2_id xmms2_percent xmms2_playlist xmms2_size xmms2_smart xmms2_status xmms2_timesplayed xmms2_title xmms2_tracknr xmms2_url
|
||||
|
||||
hi def link ConkyrcComment Comment
|
||||
hi def link ConkyrcSetting Keyword
|
||||
hi def link ConkyrcConstant Constant
|
||||
hi def link ConkyrcNumber Number
|
||||
hi def link ConkyrcColour Special
|
||||
|
||||
hi def link ConkyrcText String
|
||||
hi def link ConkyrcVar Identifier
|
||||
hi def link ConkyrcVarName Keyword
|
||||
|
||||
let b:current_syntax = "conkyrc"
|
65
extras/vim/syntax/conkyrc.vim.j2
Normal file
65
extras/vim/syntax/conkyrc.vim.j2
Normal file
@ -0,0 +1,65 @@
|
||||
" Vim syntax file
|
||||
" Language: conkyrc
|
||||
" Author: Ciaran McCreesh <ciaranm@gentoo.org>
|
||||
" Version: 20060307
|
||||
" Copyright: Copyright (c) 2005 Ciaran McCreesh
|
||||
" Licence: You may redistribute this under the same terms as Vim itself
|
||||
"
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn region ConkyrcComment start=/^\s*#/ end=/$/
|
||||
|
||||
syn keyword ConkyrcSetting {{ config_settings['values']|map(attribute="name")|join(' ') }}
|
||||
|
||||
syn keyword ConkyrcConstant
|
||||
\ above
|
||||
\ below
|
||||
\ bottom_left
|
||||
\ bottom_right
|
||||
\ bottom_middle
|
||||
\ desktop
|
||||
\ dock
|
||||
\ no
|
||||
\ none
|
||||
\ normal
|
||||
\ override
|
||||
\ skip_pager
|
||||
\ skip_taskbar
|
||||
\ sticky
|
||||
\ top_left
|
||||
\ top_right
|
||||
\ top_middle
|
||||
\ middle_left
|
||||
\ middle_right
|
||||
\ middle_middle
|
||||
\ undecorated
|
||||
\ yes
|
||||
|
||||
syn match ConkyrcNumber /\S\@<!\d\+\(\.\d\+\)\?\(\S\@!\|}\@=\)/
|
||||
\ nextgroup=ConkyrcNumber,ConkyrcColour skipwhite
|
||||
syn match ConkyrcColour /\S\@<!#[a-fA-F0-9]\{6\}\(\S\@!\|}\@=\)/
|
||||
\ nextgroup=ConkyrcNumber,ConkyrcColour skipwhite
|
||||
|
||||
syn region ConkyrcText start=/^TEXT$/ end=/\%$/ contains=ConkyrcVar
|
||||
|
||||
syn region ConkyrcVar start=/\${/ end=/}/ contained contains=ConkyrcVarStuff
|
||||
syn region ConkyrcVar start=/\$\w\@=/ end=/\W\@=\|$/ contained contains=ConkyrcVarName
|
||||
|
||||
syn match ConkyrcVarStuff /{\@<=/ms=s contained nextgroup=ConkyrcVarName
|
||||
|
||||
syn keyword ConkyrcVarName contained nextgroup=ConkyrcNumber,ConkyrcColour skipwhite {{ variables['values']|map(attribute="name")|join(' ') }}
|
||||
|
||||
hi def link ConkyrcComment Comment
|
||||
hi def link ConkyrcSetting Keyword
|
||||
hi def link ConkyrcConstant Constant
|
||||
hi def link ConkyrcNumber Number
|
||||
hi def link ConkyrcColour Special
|
||||
|
||||
hi def link ConkyrcText String
|
||||
hi def link ConkyrcVar Identifier
|
||||
hi def link ConkyrcVarName Keyword
|
||||
|
||||
let b:current_syntax = "conkyrc"
|
Loading…
x
Reference in New Issue
Block a user