Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration Generator GUI #1223

Closed
frankred opened this issue Nov 17, 2016 · 12 comments
Closed

Configuration Generator GUI #1223

frankred opened this issue Nov 17, 2016 · 12 comments

Comments

@frankred
Copy link

Hi awesome community,

first: awesome is the best WM for linux I know! I love it! I just have one problem with it like many other people I know around me. It is very time consuming to modify simple things like: "Autostart programms", "background images", "colors", "font-sizes"... . Now my question: Is there an easy to use rc.lua config generator based on a small GUI? I googled this many times but did not find anything. I mean it is amazing that you can modify everything with your lua configuration skript. But most of the users don't want to do that all the time.

@actionless
Copy link
Member

actually you can modify those 4 kinds of stuff without modifying your rc.lua:

  1. install dex and put your autostart programs to ~/.config/autostart
  2. background image: put nitrogen or other wallpaper manager to your autostart
    3,4) colors/fonts: use custom theme or theme which follows your terminal theme (in xrdb): https://github.com/awesomeWM/awesome/tree/master/themes/xresources

@blueyed
Copy link
Member

blueyed commented Nov 17, 2016

@actionless
Is this the dex you mean? https://github.com/jceb/dex

@actionless
Copy link
Member

yup

@frankred
Copy link
Author

Ok so there is currently no gui for generating configuration :) Maybe I can create something here? Would you prefer a WEB-GUI with creating accounts and saving/sharing your awesome configs or would you like to have a desktop applikation?

@Elv13
Copy link
Member

Elv13 commented Nov 23, 2016

IMO, given Awesome configs are code, it's rather pointless. You won't be able to parse the config back without some using dark, dark art. Then, most Awesome users use it for that very reason, so they would not use such tool.

@actionless
Copy link
Member

actionless commented Nov 23, 2016

as a side note i would recommend looking on i3/sway

they have config (in the same format) on top of which it's easy to imagine some obconfig-like tools

@mindeunix
Copy link

@actionless true, it would be much easier, but if someone really needs it they can still do for Awesome WM:

function test()
    local lgi = require('lgi')
    local Gtk = lgi.Gtk
    local GObject = lgi.GObject
    
    -- Create model.
    local column = {
        NAME  = 1,
        VALUE = 2,
    }
    local model = Gtk.TreeStore.new {
        [column.NAME]  = GObject.Type.STRING,
        [column.VALUE] = GObject.Type.STRING,
    }

    -- Add values
    for k,v in pairs(beautiful.get()) do
        model:append(nil, { [column.NAME]  = k, [column.VALUE] = tostring(v) })
    end

    -- Create window and add widgets
    local window = Gtk.Window {
        title = 'Theme properties',
        default_width  = 400,
        default_height = 300,
        on_destroy = Gtk.main_quit,
        Gtk.Grid {
            Gtk.ScrolledWindow {
                expand = true,
                Gtk.TreeView {
                    model = model,
                    Gtk.TreeViewColumn {
                        title = "Key",
                        { Gtk.CellRendererText(), { text = column.NAME } },
                    },
                    Gtk.TreeViewColumn {
                        title = "Value",
                        { Gtk.CellRendererText(), { text = column.VALUE } },
                    }
                }
            }
        }
    }
    window:show_all()
end

test

@actionless
Copy link
Member

actionless commented Nov 23, 2016

but theme is a table while config is a function

however i don't see a problem to have a separate configuration table for GUI

it could be used the same as beautiful

for example in theme.lua:

theme.font = gui.font or "Sans 8"

and that gui module will be just a configuration table wrapper the same as beautiful but with ability to store data persistently to a file (i am already using a little bit similar solution but for preserving the state between awesome/machine restarts: https://github.com/actionless/awesome_config/blob/devel/utils/db.lua)

@mindeunix
Copy link

@actionless indeed, much easier to create a theme editor/generator, and we have instruments for such purposes. My example shows how to use them, sad it is impossible to apply changes without restarting Awesome WM.

I like "Configuration Generator GUI" idea, but I think it is not worth the time.

@frankred
Copy link
Author

@Elv13 awesome config is a lua script. Lua is a script language that was build to embed it into other languages so it should be no problem to do so: http://moonshinejs.org/

But anyway, my intention was not to build a Generator+Parser. My idea was to ONLY create a generator. So unidirectional not bidirectional.

@actionless
Copy link
Member

But anyway, my intention was not to build a Generator+Parser. My idea was to ONLY create a generator. So unidirectional not bidirectional.

i don't like it in a such way

@Elv13
Copy link
Member

Elv13 commented May 25, 2017

Closing this as this would be a separate project. @lawful-lazy did some work toward this if I am not mistaken

@Elv13 Elv13 closed this as completed May 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants