Hi Mathias, I have the same usecase. I spawn the terminal with something like "-e ~/.config/awesome/bin/update" (see [0]). The script bin/update (see [1]):
- launches the update (apt-get dist-upgrade in your case) - updates the awesome widget so it displays the right count (0 if everything goes right) - waits for an input from the user (so the terminal stays open) [0] https://github.com/BenoitZugmeyer/dotfiles/blob/290f33235d1ff7d0ebdb8e04aa3d505e6856ed2e/.config/awesome/rc.lua#L276 [1] https://github.com/BenoitZugmeyer/dotfiles/blob/290f33235d1ff7d0ebdb8e04aa3d505e6856ed2e/.config/awesome/bin/update -- Benoît Zugmeyer On Tue, Feb 17, 2015 at 5:09 PM, Mathias Brulatout < [email protected]> wrote: > Hi everyone, > > I'm trying to change my awesome setup so that clicking on an icon will > spawn a terminal (terminator) with the command "apt-get dist-upgrade" . I > tried many things to get a nice widget tracking packages updates, but I'm > stuck here. > > Basically, I have a textbox showing the amount of updates (and hovering it > displays packages to update) after parsing the output of "apt-show-versions > -u -b", so that's nice. > > I also have an imagebox, which spawns a terminal when I click it. I'd like > to spawn a terminal and start the "apt-get dist-upgrade" command in this > spawned terminal foreground (I already made the right changes in > /etc/sudoers to use apt-get without sudo) so that I can watch the update > process. After the command has returned, the temrinal should still be > opened. > The "-e" option doesn't seem to be the answer. > > Here is the imagebox snippet: > > apticon = wibox.widget.imagebox() > apticon:set_image(beautiful.widget_apt) > apticon:buttons(awful.util.table.join( > awful.button({ }, 1, function () awful.util.spawn(terminal,false) end))) > > where terminal, as you might have guessed, refers to my terminal name > (terminator) :) > > Thanks in advance ! > > >
