📣 2020-08-31 Update: improved configuration #33
Replies: 3 comments
-
This is a big one! Much-improved configurability is the primary new feature. You can try it out now on the https://github.com/AdamWagner/stackline/tree/feature/configuration branch, or wait for it be merged. There are 3 configuration themes: Appearance Features Paths Config validation & live-tweaking All config values can be edited while Values can be set using the hs -c "stackline.config:set('appearance.radius', 3)" … or the ipc port: echo ":appearance.radius:3` | hs -m stackline-config All config fields support You can get and set nested config fields via a dot-separated path, like this: Config fields are typed and validated on initialization and when live-set. The default config c = {}
c.paths = {}
c.appearance = {}
c.features = {}
-- Paths
c.paths.getStackIdxs = hs.configdir .. '/stackline/bin/yabai-get-stack-idx'
c.paths.jq = '/usr/local/bin/jq'
c.paths.yabai = '/usr/local/bin/yabai'
-- Appearance
c.appearance.color = { white = 0.90 }
c.appearance.alpha = 1
c.appearance.dimmer = 2.5 -- larger numbers increase contrast b/n focused & unfocused state
c.appearance.iconDimmer = 1.1 -- custom dimmer for icon
c.appearance.showIcons = true
c.appearance.size = 32
c.appearance.radius = 3
c.appearance.padding = 4
c.appearance.iconPadding = 4
c.appearance.pillThinness = 6
c.appearance.vertSpacing = 1.2
c.appearance.offset = {}
c.appearance.offset.y = 2
c.appearance.offset.x = 4
c.appearance.shouldFade = true
c.appearance.fadeDuration = 0.2
-- Features
c.features.clickToFocus = true
c.features.hsBugWorkaround = true
c.features.fzyFrameDetect = {}
c.features.fzyFrameDetect.enabled = true
c.features.fzyFrameDetect.fuzzFactor = 15 -- window frame dimensions will be rounded to nearest fuzzFactor
c.features.winTitles = 'not_implemented' -- false, true, 'when_switching', 'not_implemented'
c.features.dynamicLuminosity = 'not_implemented' -- false, true, 'not_implemented' You can try it out now on the https://github.com/AdamWagner/stackline/tree/feature/configuration branch, or wait for it be merged. |
Beta Was this translation helpful? Give feedback.
-
This is awesome! You've put a lot of work into this, I can't wait to try it when I get back to my laptop! |
Beta Was this translation helpful? Give feedback.
-
init.lua before stackline = require "stackline.stackline.stackline" init.lua after stackline = require "stackline.stackline.stackline"
stackline:init() -- must initialize stackline in your init.lua file! The changes, of course, allow you to pass in custom config options ;-) stackline = require "stackline.stackline.stackline"
local myStackline = {
appearance = {
showIcons = false, -- default is true
},
features = {
clickToFocus = false, -- default is true
fzyFrameDetect = {
fuzzFactor = 25 -- default is 30
},
},
}
stackline:init(myStackline) -- ah yea! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Configuration is documented in the wiki:
https://github.com/AdamWagner/stackline/wiki/Configuring-stackline
From @alin23:
Beta Was this translation helpful? Give feedback.
All reactions