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

new plugin: user menu with gravatar icon #11

Closed
aanatoly opened this issue Dec 4, 2015 · 17 comments
Closed

new plugin: user menu with gravatar icon #11

aanatoly opened this issue Dec 4, 2015 · 17 comments
Assignees
Milestone

Comments

@aanatoly
Copy link
Owner

aanatoly commented Dec 4, 2015

Requirements:

  • based on menu plugin
  • can use gravatar image
  • can use local image
  • menu
    • default entries:
      • logout
      • lock screen
    • default action - dialog to set a command
@aanatoly aanatoly added this to the 7.1 milestone Dec 4, 2015
@aanatoly aanatoly self-assigned this Dec 4, 2015
@aanatoly aanatoly changed the title user plugin with photo and menu with common actions user plugin with photo and menu Dec 4, 2015
@RichJack
Copy link

RichJack commented Dec 4, 2015

Sound great, like the one in the Chrome OS bar? You've read my mind :)

@aanatoly aanatoly changed the title user plugin with photo and menu new plugin: user menu with gravatar icon Dec 5, 2015
@aanatoly
Copy link
Owner Author

aanatoly commented Dec 5, 2015

a screenie
2015-12-05-043518_146x92_escrotum

@aanatoly
Copy link
Owner Author

aanatoly commented Dec 5, 2015

Required config

plugin {
    type = user
    config {
        border = 2
        gravataremail = [email protected]
        # image = /usr/share/pixmaps/foo.png
        # icon = some-icon
        item {
            name = Lock Display
            icon = gnome-lockscreen
            action = slock
        }
        item {
            name = logout
            icon = gnome-session-logout
            action = xlogout
        }
    }
}

aanatoly added a commit that referenced this issue Dec 5, 2015
aanatoly added a commit that referenced this issue Dec 5, 2015
aanatoly added a commit that referenced this issue Dec 5, 2015
[#11]
change `menu` to serve as base class
change `user` to base upon `menu`
aanatoly added a commit that referenced this issue Dec 5, 2015
aanatoly added a commit that referenced this issue Dec 5, 2015
[#11]
set `user` plugin default icon to `avatar-default`
aanatoly added a commit that referenced this issue Dec 5, 2015
aanatoly added a commit that referenced this issue Dec 5, 2015
aanatoly added a commit that referenced this issue Dec 5, 2015
aanatoly added a commit that referenced this issue Dec 5, 2015
aanatoly added a commit that referenced this issue Dec 5, 2015
aanatoly added a commit that referenced this issue Dec 5, 2015
aanatoly added a commit that referenced this issue Dec 5, 2015
aanatoly added a commit that referenced this issue Dec 5, 2015
aanatoly added a commit that referenced this issue Dec 5, 2015
@aanatoly
Copy link
Owner Author

aanatoly commented Dec 5, 2015

done, see develop branch

@aanatoly aanatoly closed this as completed Dec 5, 2015
@aanatoly aanatoly modified the milestones: 7.0, 7.1 Dec 5, 2015
@RichJack
Copy link

RichJack commented Dec 5, 2015

Brilliant work again. I have set it to a static image and it works great
which is enough for me at the moment, but it didn't find my gravatar image
though using:
gravataremail = [email protected]

Is there anyway, it could find a Google+ profile image as well?

On 5 December 2015 at 03:07, aanatoly [email protected] wrote:

done, see develop http:///aanatoly/fbpanel/tree/develop branch


Reply to this email directly or view it on GitHub
#11 (comment).

@aanatoly
Copy link
Owner Author

aanatoly commented Dec 5, 2015

Hi
You can try this script to fetch gravatar https://gist.github.com/aanatoly/42eac40250baaabd8643
and see where is a problem. Use --debug flag

It works for me with your email both in a panel and with script

2015-12-05-184300_219x46_escrotum

@aanatoly
Copy link
Owner Author

aanatoly commented Dec 5, 2015

Plz post you config, I'll try to reproduce it.
Just in case, fbpanel stores tmp image as /tmp/gravatar so run the script
./wget-gravatar --debug -e [email protected] -o /tmp/gravatar

@aanatoly aanatoly reopened this Dec 5, 2015
@aanatoly aanatoly modified the milestones: 7.1, 7.0 Dec 5, 2015
@RichJack
Copy link

RichJack commented Dec 5, 2015

It correctly downloads the gravatar to /tmp/gravatar but it doesn't set it on the panel. I can manually set the gravatar icon though with:
image = /tmp/gravatar

Here's my config:

Global {
    edge = bottom
    allign = right
    xmargin = 12
    ymargin = 5
    widthtype = request
    width = 14
    height = 35
    transparent = true
    tintcolor = #000000
    alpha = 124
    setdocktype = true
    setpartialstrut = true
    autohide = false
    heightWhenHidden = 2
    roundcorners = true
    roundcornersradius = 6
    layer = above
    MaxElemHeight = 24
    setlayer = false
}
Plugin {
    type = space
    config {
        size = 2
    }
}
Plugin {
    type = tclock
    config {
        foreground = "#ffffff"
        ClockFmt = <span font="Roboto 10" color="white"><b>%H:%M</b></span>
        TooltipFmt = %A%n%d %B %G
        ShowCalendar = true
        ShowTooltip = true
    }
}
Plugin {
    type = space
    config {
        size = 13
    }
}
Plugin {
    type = battery
}
Plugin {
    type = space
    config {
        size = 2
    }
}
Plugin {
    type = tray
}
Plugin {
    type = space
    config {
        size = 2
    }
}
plugin {
    type = user
    config {
        border = 0
        gravataremail = [email protected]
        item {
            name = Shutdown
            icon = system-shutdown-panel
            action = yad-shutdown
        }
        item {
            name = Hibernate
            icon = system-hibernate
            action = sh -c 'dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Hibernate'
        }
        item {
            name = Sleep
            icon = system-sleep
            action = sh -c 'dm-tool lock & dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend'
        }
        item {
            name = Lock Screen
            icon = gnome-lock-screen
            action = dm-tool lock
        }
        item {
            name = Switch User
            icon = switch-user
            action = dm-tool switch-to-greeter
        }
        item {
            name = Update panel
            icon = reload
            action = killall -SIGUSR1 fbpanel
        }
        item {
            name = Change Avatar
            icon = mugshot
            action = mugshot
        }
    }
}

@aanatoly
Copy link
Owner Author

aanatoly commented Dec 5, 2015

What does user plugin do? Shows broken image, shows nothing? Can yoiu send a screenshot, plz ? It will help

@RichJack
Copy link

RichJack commented Dec 5, 2015

It comes from your code earlier in this issue when you posted the code needed to implement the gravatar plugin: #11 (comment)

@aanatoly
Copy link
Owner Author

aanatoly commented Dec 5, 2015

I can't reproduce it so far.
Let try this:

  • kill panel
  • leave in a config file only gravataremail = [email protected] line,
    and remove image = .. and icon = ... lines
  • remove /tmp/gravatar
  • start panel

and send me a screenshot of what you have now. Thanks

@RichJack
Copy link

RichJack commented Dec 5, 2015

Okay, here's my stripped down config (hope it's what you meant):

Global {
    edge = bottom
    allign = right
    xmargin = 12
    ymargin = 5
    widthtype = request
    width = 14
    height = 35
    transparent = true
    tintcolor = #000000
    alpha = 124
    setdocktype = true
    setpartialstrut = true
    autohide = false
    heightWhenHidden = 2
    roundcorners = true
    roundcornersradius = 6
    layer = above
    MaxElemHeight = 24
    setlayer = false
}

Plugin {
    type = tclock
    config {
        foreground = "#ffffff"
        ClockFmt = <span font="Roboto 10" color="white"><b>%H:%M</b></span>
        TooltipFmt = %A%n%d %B %G
        ShowCalendar = true
        ShowTooltip = true
    }
}

plugin {
    type = user
    config {
        border = 2
        gravataremail = [email protected]
    }
}

Screenshot:
fbpanel_gravatar

@aanatoly
Copy link
Owner Author

aanatoly commented Dec 5, 2015

ok, thanks.

aanatoly added a commit that referenced this issue Dec 5, 2015
aanatoly added a commit that referenced this issue Dec 5, 2015
@aanatoly
Copy link
Owner Author

aanatoly commented Dec 5, 2015

Fixed. Now it should work, see develop branch
2015-12-06-000201_214x62_escrotum

@aanatoly aanatoly closed this as completed Dec 5, 2015
@RichJack
Copy link

RichJack commented Dec 6, 2015

Thank you, it is fixed :)

Would it be possible to allow customization of the tooltip along the lines
of:
tooltip = $USER is logged in

Also, I don't know whether you would consider allowing for a Google profile
pic as well as Gravatar? I've been looking into it and you can get it by
querying this web address with your Google username:

http://picasaweb.google.com/data/entry/api/user/${GUSERNAME}?alt=json

eg: http://picasaweb.google.com/data/entry/api/user/chromixium?alt=json

Then the website displays the full path to the logo as follows:

"gphoto$thumbnail":{"$t":"http://lh3.googleusercontent.com/-wGDIB6oPy0w/AAAAAAAAAAI/AAAAAAAAAAA/kb8-My-IGTI/s64-c/101947769087707595037.jpg"}}}

There's more info here:
http://stackoverflow.com/questions/9128700/getting-google-profile-picture-url-with-user-id

Kind regards
RichJack

On 5 December 2015 at 22:09, aanatoly [email protected] wrote:

Fixed. Now it should work, see develop branch
[image: 2015-12-06-000201_214x62_escrotum]
https://cloud.githubusercontent.com/assets/6735508/11610514/70383ef2-9bad-11e5-98c2-84def7957d84.png


Reply to this email directly or view it on GitHub
#11 (comment).

@RichJack
Copy link

RichJack commented Dec 6, 2015

Actually, if you decide to implement this, could the icon be downloaded to
~/.face ?

That way it would be set as the login avatar in lightdm...

Don't worry if you don't want to implement this, as I can script it to
create the .face file and run at startup and then just set the image =
parameter in the plugin. It'd just be cool that's all!

On 6 December 2015 at 11:45, RichJack [email protected] wrote:

Thank you, it is fixed :)

Would it be possible to allow customization of the tooltip along the lines
of:
tooltip = $USER is logged in

Also, I don't know whether you would consider allowing for a Google
profile pic as well as Gravatar? I've been looking into it and you can get
it by querying this web address with your Google username:

http://picasaweb.google.com/data/entry/api/user/${GUSERNAME}?alt=json

eg: http://picasaweb.google.com/data/entry/api/user/chromixium?alt=json

Then the website displays the full path to the logo as follows:

"gphoto$thumbnail":{"$t":"http://lh3.googleusercontent.com/-wGDIB6oPy0w/AAAAAAAAAAI/AAAAAAAAAAA/kb8-My-IGTI/s64-c/101947769087707595037.jpg"}}}

There's more info here:

http://stackoverflow.com/questions/9128700/getting-google-profile-picture-url-with-user-id

Kind regards
RichJack

On 5 December 2015 at 22:09, aanatoly [email protected] wrote:

Fixed. Now it should work, see develop branch
[image: 2015-12-06-000201_214x62_escrotum]
https://cloud.githubusercontent.com/assets/6735508/11610514/70383ef2-9bad-11e5-98c2-84def7957d84.png


Reply to this email directly or view it on GitHub
#11 (comment).

@aanatoly
Copy link
Owner Author

aanatoly commented Dec 6, 2015

Feature request are welcome. big and small
I suggest to open an issue for each one of them, as we did before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants