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
|
# tiny-dfr config template. Do not edit this file directly, instead
# copy it to /etc/tiny-dfr/config.toml and edit that copy.
# The daemon will merge those two files, giving preference to the one in /etc
# F{number} keys are shown when Fn is not pressed by default.
# Set this to true if you want the media keys to be shown without Fn pressed
MediaLayerDefault = false
# Set this to false if you want to hide the button outline,
# leaving only the text/logo
ShowButtonOutlines = true
# Set this to true to slowly shift the entire screen contents.
# In theory this helps with screen longevity, but macos does not bother doing it
# Disabling ShowButtonOutlines will make this effect less noticeable to the eye
EnablePixelShift = false
# Set this to the fontconfig pattern to be used to pick a font for text labels
# Some examples are:
# "" - default regular sans-serif font
# ":bold" - default bold sans-serif font
# For full reference on accepted values see the fontconfig user guide,
# section "Font Names"
# https://www.freedesktop.org/software/fontconfig/fontconfig-user.html
FontTemplate = ":bold"
# Set this to false if you want the brightness of the touchbar
# to be set to a static value instead of following the primary
# screen's brightness
AdaptiveBrightness = true
# With adaptive brightness disabled this is used as the brightness
# in the active state
# With it enabled, this is the maximum point on the brightness curve
# Accepted values are 0-255
ActiveBrightness = 128
# This key defines the contents of the primary layer
# (the one with F{number} keys)
# You can change the individual buttons, add, or remove them
# Any number of keys that is greater than 0 is allowed
# however rendering will start to break around 24 keys
# Buttons can be made larger by setting the optional Stretch field
# to a number greater than 1 (which means the button will take up
# that many button spaces).
PrimaryLayerKeys = [
# Action defines the key code to send when the button is pressed
# Text defines the button label
# Icon specifies the icon to be used for the button.
# Theme specifies the XDG icons theme.
# Stretch specifies how many button spaces the button should take up
# and defaults to 1
# Icons can either be svgs or pngs, with svgs being preferred
# For best results with pngs, they should be 48x48
# Do not include the extension in the file name.
# If a Theme is set, icons are looked up in XDG_DATA_DIRS.
# Otherwise, they are first looked up in /etc/tiny-dfr, and then in /usr/share/tiny-dfr.
# Time can be either 24hr, or 12hr. Locale is optional and will default to POSIX.
# Only one of Text, Icon or Time is allowed,
# if both are present, the behavior is undefined.
# For the list of supported key codes see
# https://docs.rs/input-linux/latest/input_linux/enum.Key.html
# Note that the escape key is not specified here, as it is added
# automatically on Macs without a physical one
{ Text = "F1", Action = "F1" },
{ Text = "F2", Action = "F2" },
{ Text = "F3", Action = "F3" },
{ Text = "F4", Action = "F4" },
{ Text = "F5", Action = "F5" },
{ Text = "F6", Action = "F6" },
{ Text = "F7", Action = "F7" },
{ Text = "F8", Action = "F8" },
{ Text = "F9", Action = "F9" },
{ Text = "F10", Action = "F10" },
{ Text = "F11", Action = "F11" },
{ Text = "F12", Action = "F12" }
# Example with Stretch:
# # because most buttons have stretch 2, they behave as if they all had 1:
# { Text = "F1", Action = "F1", Stretch = 2 },
# { Text = "F2", Action = "F2", Stretch = 2 },
# # these two buttons are half the size of the other buttons:
# { Text = "F3", Action = "F3", Stretch = 1 },
# { Text = "F4", Action = "F4", Stretch = 1 },
# { Text = "F5", Action = "F5", Stretch = 2 },
# { Text = "F6", Action = "F6", Stretch = 2 },
# { Text = "F7", Action = "F7", Stretch = 2 },
# # these two buttons are one and a half the size of the other buttons:
# { Text = "F8", Action = "F8", Stretch = 3 },
# { Text = "F9", Action = "F9", Stretch = 3 },
# { Text = "F10", Action = "F10", Stretch = 2 },
# { Text = "F11", Action = "F11", Stretch = 2 },
# { Text = "F12", Action = "F12", Stretch = 2 }
# Example of Time:
# { Time = "12hr", Action = "Time"},
# Example of Time with locale:
# { Time = "12hr", Locale = "en_IN", Action = "Time"},
# Example of Time with stretch:
# # the time key by default will be too small to accomodate date and time.
# # So it is recommended to have a stretch of atleast 3 times the rest keys.
# { Time = "12hr", Action = "Time", Stretch = 3},
# You can also put in your format string directly.
# The available variables can be found here: https://docs.rs/chrono/latest/chrono/format/strftime/index.html
# If your time block says "Time format error" you are using some invalid parameter.
# { Time = "%H:%M %-e.%m.%Y", Action = "Time", Stretch = 2}
# Example of Battery:
# { Battery = "percentage", Action = "Battery" }
# This will display a button showing the current battery percentage.
# { Battery = "icon", Action = "Battery" }
# This will display a button showing a battery icon instead of percentage.
# { Battery = "both", Action = "Battery" }
# This will display a button showing a battery icon as well as percentage.
# The logic used to calcuate the percentage will be:
# 1. On T2 Macs:
# (Amount of energy currently available / Amount of energy in the battery when it’s considered full) * 100
# 2. On Apple Silicon Macs:
# Get the value reported by the SMC in /sys/class/power_supply.
# Button will turn green if battery is charging, and red if charge is <10% and is not charging.
]
# This key defines the contents of the media key layer
MediaLayerKeys = [
{ Icon = "brightness_low", Action = "BrightnessDown" },
{ Icon = "brightness_high", Action = "BrightnessUp" },
{ Icon = "mic_off", Action = "MicMute" },
{ Icon = "search", Action = "Search" },
{ Icon = "backlight_low", Action = "IllumDown" },
{ Icon = "backlight_high", Action = "IllumUp" },
{ Icon = "fast_rewind", Action = "PreviousSong" },
{ Icon = "play_pause", Action = "PlayPause" },
{ Icon = "fast_forward", Action = "NextSong" },
{ Icon = "volume_off", Action = "Mute" },
{ Icon = "volume_down", Action = "VolumeDown" },
{ Icon = "volume_up", Action = "VolumeUp" }
# Example with XDG icons (requires `breeze-dark` theme installed):
# { Icon = "brightness-low", Theme = "breeze-dark", Action = "BrightnessDown" },
# { Icon = "brightness-high", Theme = "breeze-dark", Action = "BrightnessUp" },
# { Icon = "microphone", Theme = "breeze-dark", Action = "MicMute" },
# { Icon = "search", Theme = "breeze-dark", Action = "Search" },
# { Icon = "redshift-status-day", Theme = "breeze-dark", Action = "IllumDown" },
# { Icon = "redshift-status-on", Theme = "breeze-dark", Action = "IllumUp" },
# { Icon = "media-skip-backward", Theme = "breeze-dark", Action = "PreviousSong" },
# { Icon = "media-playback-start", Theme = "breeze-dark", Action = "PlayPause" },
# { Icon = "media-skip-forward", Theme = "breeze-dark", Action = "NextSong" },
# { Icon = "audio-volume-muted", Theme = "breeze-dark", Action = "Mute" },
# { Icon = "audio-volume-low", Theme = "breeze-dark", Action = "VolumeDown" },
# { Icon = "audio-volume-high", Theme = "breeze-dark", Action = "VolumeUp" }
]
|