You are not logged in.

#1 2017-03-02 01:12:52

seventh
Member
Registered: 2017-02-07
Posts: 71

Adding power options tint2

Nice work Mr Green, thankyou. I dont mind green as a colour either.... wink

I have a question on Tint2, is there a way to create a launcher to logout/shut down etc?

Last edited by seventh (2017-03-02 01:15:12)

Offline

#2 2017-03-02 01:45:59

Mr Green
Administrator
Registered: 2010-11-07
Posts: 6,896

Re: Adding power options tint2

Take a look in ~/.config/tint2/tint2rc file, think I left launcher code.

# Launchers
#launcher_icon_theme = hicolor
#launcher_padding = 5 0 10
#launcher_background_id = 0
#launcher_icon_size = 20
#launcher_item_app = /usr/share/applications/firefox.desktop
#launcher_item_app = /usr/share/applications/pcmanfm.desktop
#launcher_item_app = /usr/share/applications/l3afpad.desktop

You would need to create a .desktop file and or script to allow you to do it.

Quick search

http://salentos.it/community/viewtopic.php?id=105


Comments, suggestions, donations please feel free to contact me mrgreen(at)archbang(dot)org Artix information https://artix-linux.github.io/migrate/

Offline

#3 2017-03-02 03:05:45

seventh
Member
Registered: 2017-02-07
Posts: 71

Re: Adding power options tint2

Im currently in an Arch Xfce4 distro but have tint2 there as well and yes that worked, thankyou. I will have to log into my archbang and try it out as well. I could use the openbox menu logout or even shortcut keys but i like having logout shutdown on the panel.

Just added below line to the #launchers in tintrc

launcher_item_app = /usr/share/applications/xfce4-session-logout.desktop

Edit: And i will make another thread as im going off topic here, sorry.

Last edited by seventh (2017-03-02 03:13:38)

Offline

#4 2017-03-02 17:14:48

peter
Member
Registered: 2016-02-16
Posts: 16

Re: Adding power options tint2

Hi,

There is a another easier way to logout with tint2:

pacman -S oblogout

Edit the Clock in tint2rc adding this line:

clock_rclick_command = oblogout

Now if you right click the clock oblogout or another command comes out.
I was not able to do execp in the tint2rc maybe someone?...

--- New edit:

I forgot to tell:
Because we use slock I also edited the /etc/oblogout.conf command suspend:

[commands]
shutdown = systemctl poweroff
restart = systemctl reboot
suspend = systemctl suspend & slock &
logout = openbox --exit
#lock = xtrlock &

Last edited by peter (2017-03-02 17:35:12)

Offline

#5 2017-03-03 01:28:09

Mr Green
Administrator
Registered: 2010-11-07
Posts: 6,896

Re: Adding power options tint2

Think if you combine launcher with oblogout then its win win. May look at this as an option in next release, possibly a simple menu.....

https://urukrama.wordpress.com/2007/12/ … n-openbox/

Install gxmessage then above will work

#!/bin/bash

gxmessage "Are you sure you want to shut down your computer?" -center -title "Take action" -font "Sans bold 10" -default "Cancel" -buttons "_Cancel":1,"_Log out":2,"_Reboot":3,"_Shut down":4 >/dev/null

case $? in
1)
echo "Exit";;
2)
killall openbox;;
3)
sudo shutdown -r now;;
4)
sudo shutdown -h now;;
esac

You may want to change case options, openbox --exit, systemctl poweroff .....

Just giving more ideas wink


Comments, suggestions, donations please feel free to contact me mrgreen(at)archbang(dot)org Artix information https://artix-linux.github.io/migrate/

Offline

#6 2017-03-03 08:30:40

peter
Member
Registered: 2016-02-16
Posts: 16

Re: Adding power options tint2

Hello,

Ok there is another eassssier way - Just follow the tint2 options

Edit tint2 and add an E for  Executor:

# Panel
panel_items = LTSBCE

Edit tint2 and add at the bottom of the file after Battery and before # End of config:

# Logout
execp = new
#execp_command = echo /usr/share/icons/Paper/24x24/actions/stock_exit.png; echo '<span foreground="#7f7">Exit</span>'
#execp_command =echo '<span foreground="#7f7">Exit</span>'
execp_command = echo /usr/share/icons/Paper/24x24/actions/stock_exit.png
execp_has_icon = 1
execp_interval = 0
execp_centered = 1
execp_font = sans 9
execp_markup = 1
execp_font_color = #aaffaa 100
execp_padding = 2 0
execp_tooltip = Logout Options
execp_lclick_command = oblogout
execp_background_id = 0

execp_command -  edit it your way.
execp_lclick_command - command to execute left mouse

End result: http://imgur.com/zxK32vW

Last edited by peter (2017-03-04 12:27:27)

Offline

#7 2017-03-04 04:02:54

seventh
Member
Registered: 2017-02-07
Posts: 71

Re: Adding power options tint2

Thankyou all . I give this a go tonight. smile

Offline

#8 2017-03-05 01:21:35

seventh
Member
Registered: 2017-02-07
Posts: 71

Re: Adding power options tint2

Worked perfectly with oblogout, sits right next to the clock/date just where i wanted it, thanks peter. I just need to find a lighter logout power button, currently only have dark ones. Might need to download those breeze icons.

Edit: arc-icon-theme had the desired icon. Was a gnome logout icon listed under actions, so my guess would be you could download gnome icon sets and get the desired result as well.

Last edited by seventh (2017-03-05 02:19:50)

Offline

#9 2017-03-05 09:00:29

peter
Member
Registered: 2016-02-16
Posts: 16

Re: Adding power options tint2

Hi,
Glad to help seventh.
One more detail - oblogout pre-installed themes:
ArchWiki
You can add others like:
https://github.com/oberon2007/oblogout- … ter/themes
Just copy the file to /usr/share/themes and edit /etc/oblogout.conf:

buttontheme = OutMix

or another that you like.

Offline

#10 2017-03-06 04:05:11

seventh
Member
Registered: 2017-02-07
Posts: 71

Re: Adding power options tint2

Thanks again peter, im using the foom theme at present but i hope to have a go at making my own icons soon so i may replace those foom with my versions.

Offline

#11 2017-03-21 08:39:16

peter
Member
Registered: 2016-02-16
Posts: 16

Re: Adding power options tint2

Hi again,
So keep the executor stuff going here's another that I adapted cpuTemp

# Executor 3
execp = new 
execp_command = ~/Extras/cpuTemp.sh
execp_interval = 4
execp_has_icon = 0 
execp_cache_icon = 0 
execp_continuous = 0 
execp_markup = 0 
execp_font = sans 9
execp_markup = 1
execp_font_color = #aaffaa 100
execp_padding = 2 0
execp_tooltip = Temp1
execp_lclick_command = 
execp_background_id = 0

The scrip -> cpuTemp.sh:

#!/bin/bash

temp=$(sensors | grep -i temp1 | head -n1 | sed -r 's/.*:\s+[\+-]?(.*C)\s+.*/\1/') 
printf '%4s' "$temp"

e=$(echo $temp | sed -e 's/.0°C//')   
if [ $e -gt 55 ]
then
notify-send 'ARCHBANG - temp1' '<span color='"'#fc3232'"'><b>Is HOT!!!</b></span>' -t 8000
elif [ $e -lt  19 ]
then
notify-send 'ARCHBANG - temp1' '<span color='"'#106bf2'"'><b>Brrrr is COLD!!!</b></span>' -t 8000
fi

cool
Temps are rising - spring is here!!

Offline

Board footer

Powered by FluxBB