vsido-exit (systemd based logout script for VSIDO)

PackRat

#30
QuoteUsing the same code seems impossible that one is centered and one is not

I don't understand that either. As a wild guess, I tried a bunch of different gtk themes in case there is something broken there; no changes.

QuoteHow large in inches is the size of the logout popup on your screen?

It's the 543x275 pixels as specified by the yad script; approximately 7.5 x 4 inches (gimp print size).

Remembered there is a larger image in the ~/images -


I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

ozitraveller

Would this dialog normally need to be maximised or minimised? I fact, would it need a title either?

Just my 2 cents. :)

VastOne

The old one did not and I think plain Jane is quite nice.. :D
VSIDO      VSIDO Change Blog    

    I dev VSIDO


PackRat

version #2:

#!/usr/bin/env bash
vslo_menu (){
vslo_ttle="vs-session-manager"
vslo_clas="$vslo_ttl"
vslo_wico="/usr/share/pixmaps/logout_window.png"
vslo_logo="/usr/share/pixmaps/logout_logo.png"
vslo_bute="/usr/share/pixmaps/logout_exit.png"
vslo_buts="/usr/share/pixmaps/logout_suspend.png"
vslo_butr="/usr/share/pixmaps/logout_reboot.png"
vslo_butq="/usr/share/pixmaps/logout_shutdown.png"
vslo_main=$(yad --title="$vslo_ttle" --class="$vslo_clas" --window-icon="$vslo_wico" --width="543" --height="275" --image="$vslo_logo" --center --fixed --on-top --buttons-layout=center --button="Logout!$vslo_bute!Logout of VSIDO:2" --button="Suspend!$vslo_buts!Suspend VSIDO:3" --button="Reboot!$vslo_butr!Reboot VSIDO:4" --button="Shutdown!$vslo_butq!Shutdown VSIDO:5")
vslo_main=$?


Is that a typo on line 4? Should it read:

vslo_clas="$vslo_ttle"

to match line #3 so that the class name will be "vs-session-manager"
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

VastOne

#35
Quote from: hakerdefo on January 30, 2017, 05:48:02 PM
@PackRat Someone with a bit of Gimp'ing talent can create an empty transparent canvas of around 550 x 225 and put the VSIDO orb on top of it and merge the layers. The resulting image then can be manipulated into YAD window.

The first one is the requested size of 550x225

The second one is 675 x 200 to accommodate for a fifth (Cancel) button

The third one is 675 x 225 for consistency.. I think 200 height will be fine but we shall see
VSIDO      VSIDO Change Blog    

    I dev VSIDO

VastOne

#36
The more and more I search about images and yad the more I think they do not coexist well at all

Plain Jane is my vote for a 5 button with:

Cancel Logout Suspend Reboot Shutdown
VSIDO      VSIDO Change Blog    

    I dev VSIDO



hakerdefo

@Snap I don't know french so I'll take it as a joke ;)
You Can't Always Git What You Want

hakerdefo

Quote from: VastOne on January 31, 2017, 02:21:41 AMThe more and more I search about images and yad the more I think they do not coexist well at all

man yad | grep "image"


QuoteSet the dialog image which appears on the left side of dialog. IMAGE might be file name or icon name from current icon theme.

As I already said in one of my previous posts yad always allign image on the left side of dialog.
You Can't Always Git What You Want

hakerdefo

Quote from: PackRat on January 31, 2017, 01:24:43 AM
Is that a typo on line 4?
RatMan as I keep repeating in this forum you are the man!
That is a typo! Thanks for the pointer!
Cheers!!!
You Can't Always Git What You Want

hakerdefo

#42
Quote from: ozitraveller on January 30, 2017, 08:37:07 PM
Would this dialog normally need to be maximised or minimised? I fact, would it need a title either?

Just my 2 cents. :)
Hi there mate,
The titlebar is necessary as it provides the 'cancel' option via the close button. And perhaps you didn't try the script otherwise you would have noticed the window is fixed-size. It wouldn't maximize. In a good window manager theme the maximize button would remain hidden or disabled.
Just my two cents ;)
You Can't Always Git What You Want

PackRat

#43
Quote from: VastOne on January 31, 2017, 02:21:41 AM
The more and more I search about images and yad the more I think they do not coexist well at all

Plain Jane is my vote for a 5 button with:

Cancel Logout Suspend Reboot Shutdown

You mean like this?



I didn't see a "border only" type option for yad in the man page so you can put this in the ~/.fluxbox/apps

[app] (name=yad) (class=vs-session-manager)
  [Shaded] {no}
  [Deco] {BORDER}       # change {BORDER} to {0x627} for titlebar, borders, close button only
  [Minimized] {no}
  [Maximized] {no}
  [Fullscreen] {no}
  [Layer] {2}
  [Alpha] {255}
[end]
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

hakerdefo

#44
Here is V3 as promised. A new feature and new icons  8)
What is the new feature? "Screen Lock" is the new feature.
It allows you to quickly lock your session when need be.
This option will only be visible in the dialog if you have any one of the following installed,

lightdm
suckless-tools
i3lock
light-locker
xscreensaver


The script will prefer the "Screen Lock" helper application in the above order.
If none of the above is installed the "Screen Lock" button won't appear in the dialog menu.

I have decided to rename the script to "vs-session-manager" to avoid any conflict with the current "vsido-exit" script.

So here is how to install V3,
Download the attached vs-session-manager.tar.gz archive. Extract its contents into a directory.
Open that directory in terminal emulator.
Run the following commands,


sudo cp vs-session-manager /usr/local/bin/


sudo chmod 755 /usr/local/bin/vs-session-manager



sudo cp vs-session-manager.desktop /usr/share/applications/


sudo chmod 644 /usr/share/applications/vs-session-manager.desktop



sudo cp logout_exit.png logout_lock.png logout_reboot.png logout_shutdown.png logout_suspend.png vs-session-manager.svg /usr/share/pixmaps/


You can manually add an entry for "vs-session-manager" in Fluxbox menu.
It will autometically show as "vs-session-manager" in the main menu of any freedesktop.org compliant DE or WM.

Feedback welcome  :)

Here is a scrot of "vs-session-manager" in action,


Cheers!!!
You Can't Always Git What You Want