joewing / jwm

Joe's Window Manager
http://joewing.net/projects/jwm
MIT License
514 stars 84 forks source link

Logout Dialog customization #179

Open ghost opened 9 years ago

ghost commented 9 years ago

Hi, one of the ToriOS testers has said (on multiple occasions) that the logout dialog saying 'Exit JWM' is confusing, since we are building an OS using JWM, rather than one called JWM :) Would it be easy to implement a way to customize this? I am thinking something like:

<Exit label="Logout" confirm="true" message="Logout?" icon="system-logout.svg"/>

I know I could disable confirmation, but that is also problematic... Or I could make my own script and run jwm -exit.

If you think this is too much of a fringe use case I will simply make my own dialog as a wrapper.

yetanothergeek commented 9 years ago

I like to put the exit command under its own sub menu:

<RootMenu>
  <!-- other stuff here -->
  <Menu label="Exit">
    <Exit label="Exit" confirm="false"/>
  </Menu>
</RootMenu>

That way, the user has to click both exit labels (or press right-arrow; enter) in order to exit. So it's basically a little added safety, but without the confirmation dialog.

ghost commented 9 years ago

@yetanothergeek that is a good point. I'll bring that up and see what they think!

joewing commented 9 years ago

Sounds reasonable. I was thinking it might also be nice to allow using the dialog for other things, such as messages from a script, etc.

ghost commented 9 years ago

That is exciting sounding!! I am already thinking of ways I could use that! Shutdown & Reboot dialog Notifications there are so many more possibilities!!!

ghost commented 9 years ago

Also one could use oblogout which enables icon themes and shows buttons like suspend, hibernate and so on. Use jwm --exit as exit command.

pevsner commented 9 years ago

I have this for system shutdown/restart. I use a right click menu for favourite apps, left click menu for system settings, middle click desktops.

<RootMenu  height="20" onroot="1">
<!-- entries -->
     <Restart icon="/home/adrian/bin/pixmaps/blue.png" label="restart jwm" />
<Menu icon="/home/adrian/bin/pixmaps/marker1.png"  label="Exit">
     <Exit icon="~/bin/pixmaps/marker2.png" label="Logout" confirm="false" />
        <Program icon="/home/adrian/bin/pixmaps/marker2.png" label="Restart">dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart</Program>
      <Program icon="/home/adrian/bin/pixmaps/marker-exit.png" label="Shutdown">dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop</Program>
</Menu>