Skif-off left a comment (geany/geany-plugins#1532)
It's possible.
For example, GeanyLua and something like
```lua
local h = io.open(geany.appinfo().scriptdir .. geany.dirsep .. "geany.conf",
"rb")
if h == nil then
geany.message("Fail!")
return
end
local s = h:read("*a")
h:close()
if string.find(s, "sidebar_pos=0", 1, true) ~= nil then
geany.message("Sidebar on the left side.")
elseif string.find(s, "sidebar_pos=1", 1, true) ~= nil then
geany.message("Sidebar on the right side.")
else
geany.message("Sidebar on the left side.")
end
```
or
```lua
local h = io.open(geany.appinfo().scriptdir .. geany.dirsep .. "geany.conf",
"rb")
if h == nil then
geany.message("Fail!")
return
end
local s = h:read("*a")
h:close()
local kf = keyfile.new()
keyfile.data(kf, s)
if keyfile.has(kf, "geany", "sidebar_pos") ~= true then
geany.message("Sidebar on the left side.")
else
local v = keyfile.value(kf, "geany", "sidebar_pos")
if tonumber(v) == 0 then
geany.message("Sidebar on the left side.")
else
geany.message("Sidebar on the right side.")
end
end
```
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/issues/1532#issuecomment-3733628311
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany-plugins/issues/1532/[email protected]>