You are not logged in.
I have been building a number of tint2 executors. I thought it might be nice to assemble them in one place.
tint2 config
First is the tint2 config. It will show how I define each executor. I will only post the relevant portions from the tint2 config.For this particular tint2 bar, I am not using a taskbar on it.
#-------------------------------------
# Panel
panel_items = E:E:E:E:F:S:CP
panel_size = 100% 48
panel_margin = 0 1
panel_padding = 6 0 0
panel_background_id = 1
wm_menu = 1
panel_dock = 0
panel_position = top center horizontal
panel_layer = bottom
panel_monitor = all
panel_shrink = 0
autohide = 0
autohide_show_timeout = 0.3
autohide_hide_timeout = 1.5
autohide_height = 6
strut_policy = follow_size
panel_window_name = tint2
disable_transparency = 0
mouse_effects = 1
font_shadow = 0
mouse_hover_icon_asb = 20 0 20
mouse_pressed_icon_asb = 100 0 0
#-------------------------------------
# Separator 1
separator = new
separator_background_id = 0
separator_color = #5d8185 60
separator_style = line
separator_size = 2
separator_padding = 4 8
#-------------------------------------
# Separator 2
separator = new
separator_background_id = 0
separator_color = #5d8185 60
separator_style = line
separator_size = 2
separator_padding = 4 8
#-------------------------------------
# Separator 3
separator = new
separator_background_id = 0
separator_color = #5d8185 60
separator_style = line
separator_size = 2
separator_padding = 4 8
#-------------------------------------
# Separator 4
separator = new
separator_background_id = 0
separator_color = #5d8185 60
separator_style = line
separator_size = 2
separator_padding = 4 8
#-------------------------------------
# Separator 5
separator = new
separator_background_id = 0
separator_color = #5d8185 60
separator_style = line
separator_size = 2
separator_padding = 4 8
#-------------------------------------
# Separator 5
separator = new
separator_background_id = 0
separator_color = #5d8185 60
separator_style = line
separator_size = 2
separator_padding = 4 8
#-------------------------------------
# Executor 1
execp = new
execp_command = hostname
execp_interval = 0
execp_has_icon = 0
execp_cache_icon = 1
execp_continuous = 0
execp_markup = 1
execp_tooltip = Left click for hardinfo
execp_lclick_command = hardinfo
execp_rclick_command =
execp_mclick_command =
execp_uwheel_command =
execp_dwheel_command =
execp_font = Droid Sans Fallback 12
execp_font_color = #00ffff 100
execp_padding = 0 0
execp_background_id = 0
execp_centered = 0
execp_icon_w = 0
execp_icon_h = 0
#-------------------------------------
# Executor 2
execp = new
execp_command = /home/tknomanzr/bin/python/uptime.py
execp_interval = 1
execp_has_icon = 0
execp_cache_icon = 1
execp_continuous = 1
execp_markup = 1
execp_tooltip = Total Uptime. Left click for htop
execp_lclick_command = x-terminal-emulator --command=htop; exit
execp_rclick_command =
execp_mclick_command =
execp_uwheel_command =
execp_dwheel_command =
execp_font = Droid Sans Fallback 12
execp_font_color = #00ffff 100
execp_padding = 2 2
execp_background_id = 0
execp_centered = 0
execp_icon_w = 0
execp_icon_h = 0
#-------------------------------------
# Executor 3
execp = new
execp_command = /home/tknomanzr/bin/python/cpu.py
execp_interval = 1
execp_has_icon = 0
execp_cache_icon = 1
execp_continuous = 1
execp_markup = 1
execp_tooltip = Left click for per cpu info
execp_lclick_command = /home/tknomanzr/bin/python/per_cpu.py
execp_rclick_command =
execp_mclick_command =
execp_uwheel_command =
execp_dwheel_command =
execp_font = Droid Sans Fallback 12
execp_font_color = #00ffff 100
execp_padding = 2 2
execp_background_id = 0
execp_centered = 0
execp_icon_w = 0
execp_icon_h = 0
#-------------------------------------
# Executor 4
execp = new
execp_command = /home/tknomanzr/bin/python/bitcoin/show_bitcoin
execp_interval = 60*60
execp_has_icon = 0
execp_cache_icon = 1
execp_continuous = 1
execp_markup = 0
execp_tooltip = Left click for details and historical prices
execp_lclick_command = /home/tknomanzr/bin/python/bitcoin/show_bitcoin_detail.py
execp_rclick_command =
execp_mclick_command =
execp_uwheel_command =
execp_dwheel_command =
execp_font = Droid Sans Fallback 12
execp_font_color = #00ffff 100
execp_padding = 2 2
execp_background_id = 0
execp_centered = 0
execp_icon_w = 36
execp_icon_h = 36
uptime.py
This script shows the uptime for the system. It has no additional dependencies.
#!/usr/bin/env python
from datetime import timedelta
with open('/proc/uptime', 'r') as f:
uptime_seconds = float(f.readline().split()[0])
uptime_seconds = int(uptime_seconds)
uptime_string = str(timedelta(seconds = uptime_seconds))
print("Uptime: " + uptime_string)
Offline
cpu.py
The next script is the cpu.py script. It's job is to show overall cpu useage on the tint2 bar. It depends on psutil. This can be obtained in Debian with the command:
sudo apt install python-psutil
The script:
!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# cpu.py
#
# Copyright 2017 William Bradley <tknomanzr@testbed>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
#
#
import psutil
result = psutil.cpu_percent(interval=1)
print ("cpu%: " + str(result))
per_cpu.py
Next is a small pygtk app that shows the cpu usage per logical core. It is possible to modify the script to show only physical cores. I might implement an arg parser for this script at some point, so that we could show logical or physical cores. I plan to implement more details from psutil into this script eventually. At present it is a small example of implementing a pygtk script with asynchronous threading. This script depends on python-psutil, pygtk, gtk and gobject. pygtk can be obtained via the command:
sudo apt install python-gtk2
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# per_ cpu.py
#
# Copyright 2017 William Bradley <tknomanzr@testbed>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
#
#
import psutil
import sys
import pygtk, gobject
pygtk.require('2.0')
import gtk
from threading import Thread
class Per_Cpu:
global labels
labels = []
global vbox
vbox = gtk.VBox()
def show_per_cpu(self):
result = psutil.cpu_percent(interval=None, percpu=True)
return result
def destroy(self, widget, data=None):
gtk.main_quit()
return
def threaded(self):
thread = Thread(target=self.updateValues)
thread.start()
return True
def updateValues(self):
for label in labels:
label.destroy()
try:
self.button
self.button.destroy()
except:
pass
result = self.show_per_cpu()
# Add labels for each value in the result list.
for i in result:
msg = '<big>cpu ' + str(result.index(i)) + ': ' + str(i) + '</big>'
self.label = gtk.Label()
self.label.set_markup(msg)
labels.append(self.label)
vbox.pack_start(self.label, False)
self.button = gtk.Button("Exit")
self.button.connect("clicked", self.destroy, None)
self.button.connect_object("clicked", gtk.Widget.destroy, self.window)
# This packs the button into the window (a GTK container).
vbox.pack_start(self.button, False)
self.window.show_all()
return
def __init__(self):
# create a new window
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.connect("destroy", self.destroy)
self.window.set_title("Per CPU Usage")
self.window.set_decorated(False)
self.window.set_keep_above(True)
self.window.move(200, 48)
# Sets the border width of the window.
self.window.set_border_width(2)
# Create a widget container
self.window.add(vbox)
num_cpus = psutil.cpu_count(logical = True)
msg = "<big>Showing results for " + str(num_cpus) + " logical cpu cores.</big>"
self.label = gtk.Label()
self.label.set_markup(msg)
vbox.pack_start(self.label, False)
# Add a button to exit the window
self.updateValues()
self.window.show_all()
def main(self):
# Ensure that only one instance of the program runs.
try:
import socket
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
## Create an abstract socket, by prefixing it with null.
s.bind( '\0postconnect_gateway_notify_lock')
except socket.error as e:
error_code = e.args[0]
error_string = e.args[1]
print "Process already running (%d:%s ). Exiting" % ( error_code, error_string)
sys.exit (0)
gobject.timeout_add_seconds(1, self.threaded)
gobject.threads_init()
gtk.main()
if __name__ == "__main__":
win = Per_Cpu()
win.main()
Offline
I'm liking where this is heading. Thanks for the information so far. If you have a config for a weather executor, I wouldn't complain if you added it here
"All we are is dust in the wind, dude"
- Theodore "Ted" Logan
"Led Zeppelin didn't write tunes that everybody liked, they left that to the Bee Gees."
- Wayne Campbell
Offline
show_bitcoin.py
This is a modification of the show_bitcoin script I used for conky. One the tint2 bar, it only shows the relative value of any bitcoin stored in an electrum wallet. This script depends on electrum and electrum must be properly setup. This script uses the unicode value for Bitcoin. If it does not show properly, it is likely a font issue.
#! /usr/bin/python
# A simple utility that will calculate bitcoin balance from an electrum wallet.
# Requires: electrum
# Assumes: you currently have bitcoin stored in an electrum wallet.
# Author: William Bradley
# BunsenLabs Forum Handle: tknomanzr
# License: wtfpl. Use this script however you see fit.
import json, urllib2, subprocess
import sys
reload(sys)
sys.setdefaultencoding('UTF8')
url = 'https://coinbase.com/api/v1/prices/historical'
# Get current bitcoin price
price = urllib2.urlopen(url)
price_data = price.read(34)
price_data = price_data[26:-2]
price_data = float(price_data)
# Get balance from wallet.
# It comes in as a json object that needs to be converted.
balance = json.loads(subprocess.check_output(["electrum","getbalance"]))
current_balance = balance['confirmed']
current_balance = float(current_balance)
# Get approximate value of bitcoin in wallet.
value = price_data * current_balance
bitcoin = u'\u0243'
print (bitcoin + ': $' + str(round(value,2))
Finally, I wanted to show details as a historical price graph for the past thirty days. This is a heavy script with several dependencies. The script depends on:
gdax
pandas
matplotlib
I obtained these three dependencies via pip install. However, pandas can be installed via
sudo apt install python-pandas
Similarly, matplotlib can be installed via the command:
sudo apt install python-matplotlib
Debian does not have gdax in its repositories. It will have to be installed via pip install. Gdax is a pythonic bitcoin trading api. However, we only care about the function get_historic_rates, which requires no api keys or sign ins.
The script:
#! /usr/bin/python
# A simple utility that will calculate bitcoin balance from an electrum wallet.
# Requires: gdax, pandas, matplotlib
# Assumes: you currently have bitcoin stored in an electrum wallet.
# Author: William Bradley
# BunsenLabs Forum Handle: tknomanzr
# License: GPL3.0.
import gdax
import pandas as pd
import matplotlib.pyplot as plt
plt.style.use('dark_background')
import datetime
import subprocess
import os, fcntl
def run_once():
global fh
fh=open(os.path.realpath(__file__),'r')
try:
fcntl.flock(fh,fcntl.LOCK_EX|fcntl.LOCK_NB)
except:
os._exit(0)
return
if __name__ == "__main__":
run_once()
# Get historical bitcoin price information from gdax
client = gdax.PublicClient()
rates = client.get_product_historic_rates('BTC-USD', granularity=60*60*24)
# Modify the dates from ISO 8601 to human readable.
dates = [datetime.date.fromtimestamp(element[0]) for element in rates]
# Create the pandas plot.
df = pd.DataFrame(rates, columns = ['date', 'low', 'high', 'open', 'close', 'volume'])
df['date'] = [datetime.date.fromtimestamp(element[0]) for element in rates]
df = df.head(30)
df = df.sort_values('date', ascending = True)
df.plot('date', 'close', kind='line', use_index=True, title='Bitcoin closing prices by date', rot=90, grid=True, figsize=[6,9])
plt.show()
Finally, a screenshot to show it all in action up to this point:
Stay tuned. There will be more to come. Also, please feel free to post your own tint2 executor scripts.
Offline
@dobbie03. Thanks. That will be my next script I will look into whether there is an api I can use.
Offline
Awesome! Thank you.
"All we are is dust in the wind, dude"
- Theodore "Ted" Logan
"Led Zeppelin didn't write tunes that everybody liked, they left that to the Bee Gees."
- Wayne Campbell
Offline
Thanks to the awesome Addy I have a weather display
#!/bin/bash
# I take this script from Anachron's i3blocks
# I only slightly modify this script to add an option to show icon, useful for my tint2 executor
# 'weather -i' = with icon, 'weather' = text only
# Cheers!
# Addy
# Open Weather Map API code, register to http://openweathermap.org to get one ;)
API_KEY="your API here"
# Check on http://openweathermap.org/find
CITY_ID="your city id here"
URGENT_LOWER=0
URGENT_HIGHER=30
ICON_SUNNY=" Clear"
ICON_CLOUDY=" Cloudy"
ICON_RAINY=" Rainy"
ICON_STORM=" Storm"
ICON_SNOW=" Snow"
ICON_FOG=" Fog"
ICON_MISC=" "
TEXT_SUNNY="Clear"
TEXT_CLOUDY="Cloudy"
TEXT_RAINY="Rainy"
TEXT_STORM="Storm"
TEXT_SNOW="Snow"
TEXT_FOG="Fog"
SYMBOL_CELSIUS="˚C"
WEATHER_URL="http://api.openweathermap.org/data/2.5/weather?id=${CITY_ID}&appid=${API_KEY}&units=metric"
WEATHER_INFO=$(wget -qO- "${WEATHER_URL}")
WEATHER_MAIN=$(echo "${WEATHER_INFO}" | grep -o -e '\"main\":\"[a-Z]*\"' | awk -F ':' '{print $2}' | tr -d '"')
WEATHER_TEMP=$(echo "${WEATHER_INFO}" | grep -o -e '\"temp\":\-\?[0-9]*' | awk -F ':' '{print $2}' | tr -d '"')
if [[ "${WEATHER_MAIN}" = *Snow* ]]; then
if [[ $1 = "-i" ]]; then
echo "${ICON_SNOW} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
else
echo "${TEXT_SNOW} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
fi
elif [[ "${WEATHER_MAIN}" = *Rain* ]] || [[ "${WEATHER_MAIN}" = *Drizzle* ]]; then
if [[ $1 = "-i" ]]; then
echo "${ICON_RAINY} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
else
echo "${TEXT_RAINY} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
fi
elif [[ "${WEATHER_MAIN}" = *Cloud* ]]; then
if [[ $1 = "-i" ]]; then
echo "${ICON_CLOUDY} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
else
echo "${TEXT_CLOUDY} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
fi
elif [[ "${WEATHER_MAIN}" = *Clear* ]]; then
if [[ $1 = "-i" ]]; then
echo "${ICON_SUNNY} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
else
echo "${TEXT_SUNNY} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
fi
elif [[ "${WEATHER_MAIN}" = *Fog* ]] || [[ "${WEATHER_MAIN}" = *Mist* ]]; then
if [[ $1 = "-i" ]]; then
echo "${ICON_FOG} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
else
echo "${TEXT_FOG} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
fi
else
if [[ $1 = "-i" ]]; then
echo "${ICON_MISC} ${WEATHER_MAIN} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
else
echo "${WEATHER_MAIN} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
fi
fi
if [[ "${WEATHER_TEMP}" -lt "${URGENT_LOWER}" ]] || [[ "${WEATHER_TEMP}" -gt "${URGENT_HIGHER}" ]]; then
exit 33
fi
I have this as a script saved in ~/.bin/weather. Works a treat
"All we are is dust in the wind, dude"
- Theodore "Ted" Logan
"Led Zeppelin didn't write tunes that everybody liked, they left that to the Bee Gees."
- Wayne Campbell
Offline
^ i have not a single font in my collection that would display these icons right.
how do you do it?
Offline
Thanks to the awesome Addy I have a weather display
#!/bin/bash # I take this script from Anachron's i3blocks # I only slightly modify this script to add an option to show icon, useful for my tint2 executor # 'weather -i' = with icon, 'weather' = text only # Cheers! # Addy # Open Weather Map API code, register to http://openweathermap.org to get one ;) API_KEY="your API here" # Check on http://openweathermap.org/find CITY_ID="your city id here" URGENT_LOWER=0 URGENT_HIGHER=30 ICON_SUNNY=" Clear" ICON_CLOUDY=" Cloudy" ICON_RAINY=" Rainy" ICON_STORM=" Storm" ICON_SNOW=" Snow" ICON_FOG=" Fog" ICON_MISC=" " TEXT_SUNNY="Clear" TEXT_CLOUDY="Cloudy" TEXT_RAINY="Rainy" TEXT_STORM="Storm" TEXT_SNOW="Snow" TEXT_FOG="Fog" SYMBOL_CELSIUS="˚C" WEATHER_URL="http://api.openweathermap.org/data/2.5/weather?id=${CITY_ID}&appid=${API_KEY}&units=metric" WEATHER_INFO=$(wget -qO- "${WEATHER_URL}") WEATHER_MAIN=$(echo "${WEATHER_INFO}" | grep -o -e '\"main\":\"[a-Z]*\"' | awk -F ':' '{print $2}' | tr -d '"') WEATHER_TEMP=$(echo "${WEATHER_INFO}" | grep -o -e '\"temp\":\-\?[0-9]*' | awk -F ':' '{print $2}' | tr -d '"') if [[ "${WEATHER_MAIN}" = *Snow* ]]; then if [[ $1 = "-i" ]]; then echo "${ICON_SNOW} ${WEATHER_TEMP}${SYMBOL_CELSIUS}" else echo "${TEXT_SNOW} ${WEATHER_TEMP}${SYMBOL_CELSIUS}" fi elif [[ "${WEATHER_MAIN}" = *Rain* ]] || [[ "${WEATHER_MAIN}" = *Drizzle* ]]; then if [[ $1 = "-i" ]]; then echo "${ICON_RAINY} ${WEATHER_TEMP}${SYMBOL_CELSIUS}" else echo "${TEXT_RAINY} ${WEATHER_TEMP}${SYMBOL_CELSIUS}" fi elif [[ "${WEATHER_MAIN}" = *Cloud* ]]; then if [[ $1 = "-i" ]]; then echo "${ICON_CLOUDY} ${WEATHER_TEMP}${SYMBOL_CELSIUS}" else echo "${TEXT_CLOUDY} ${WEATHER_TEMP}${SYMBOL_CELSIUS}" fi elif [[ "${WEATHER_MAIN}" = *Clear* ]]; then if [[ $1 = "-i" ]]; then echo "${ICON_SUNNY} ${WEATHER_TEMP}${SYMBOL_CELSIUS}" else echo "${TEXT_SUNNY} ${WEATHER_TEMP}${SYMBOL_CELSIUS}" fi elif [[ "${WEATHER_MAIN}" = *Fog* ]] || [[ "${WEATHER_MAIN}" = *Mist* ]]; then if [[ $1 = "-i" ]]; then echo "${ICON_FOG} ${WEATHER_TEMP}${SYMBOL_CELSIUS}" else echo "${TEXT_FOG} ${WEATHER_TEMP}${SYMBOL_CELSIUS}" fi else if [[ $1 = "-i" ]]; then echo "${ICON_MISC} ${WEATHER_MAIN} ${WEATHER_TEMP}${SYMBOL_CELSIUS}" else echo "${WEATHER_MAIN} ${WEATHER_TEMP}${SYMBOL_CELSIUS}" fi fi if [[ "${WEATHER_TEMP}" -lt "${URGENT_LOWER}" ]] || [[ "${WEATHER_TEMP}" -gt "${URGENT_HIGHER}" ]]; then exit 33 fi
I have this as a script saved in ~/.bin/weather. Works a treat
Thanks for posting it here! I feel appreciated.
And big credits to Anachron for his i3blocks module.
^ i have not a single font in my collection that would display these icons right.
how do you do it?
It needs awesome font
If it ain't broke, then tweak it until it breaks.
Offline
Thanks for answering in my absence Addy.
"All we are is dust in the wind, dude"
- Theodore "Ted" Logan
"Led Zeppelin didn't write tunes that everybody liked, they left that to the Bee Gees."
- Wayne Campbell
Offline
Something I am working on for moc:
Inspired by ohnonot's mpi-panel, which I've been using for months.
Offline
Something I am working on for moc:
https://i.imgur.com/i88GxlX.gif
Inspired by ohnonot's mpi-panel, which I've been using for months.
Wow, it has a running text??
It's cool
If it ain't broke, then tweak it until it breaks.
Offline
Offline
Just wanted to add a nice little yad bash script i found that can be incorporated into a tint2 button.
Multi progress bars options
Here is an excellent example of multiple progress bars. It will only show the drives that are
currently mounted.eval exec yad --title="xdf" --image=drive-harddisk --text="Disk\ usage:" --buttons-layout=end --width=650 --multi-progress \
$(df -hT $1 | tail -n +2 | awk '{printf "--bar=\"<b>%s</b> (%s - %s) [%s/%s]\" %s ", $7, $1, $2, $4, $3, $6}')
I call it mounted.sh
#!/bin/sh
eval exec yad --title="xdf" --image=drive-harddisk --text="Disk\ usage:" --buttons-layout=end --width=650 --multi-progress \
$(df -hT $1 | tail -n +2 | awk '{printf "--bar=\"<b>%s</b> (%s - %s) [%s/%s]\" %s ", $7, $1, $2, $4, $3, $6}')
Tint2 button used... http://www.iconsdb.com/gray-icons/hdd-icon.html
Tint2 button config ...
#-------------------------------------
# Button 1
button = new
button_icon = /home/sc/Pictures/mounted-buttons/hdd-24.png
button_text =
button_lclick_command = mounted.sh
button_rclick_command =
button_mclick_command =
button_uwheel_command =
button_dwheel_command =
button_font = Sans 10
button_font_color = #ffffff 100
button_padding = 8 0
button_background_id = 0
button_centered = 0
button_max_icon_size = 22
Scrots...
Offline
Yad + Tint2 button password generator from bash script.
passgen.sh
#!/bin/sh
date +%s | sha256sum | base64 | head -c 32 ; echo
yad command...
passgen.sh | yad --title "passgen" --text-info --width 53
Button = http://www.iconsdb.com/gray-icons/key-3-icon.html
Tint2 config...
#-------------------------------------
# Button 1
button = new
button_icon = /home/sc/Pictures/passgen-buttons/key1.png
button_text =
button_lclick_command = passgen.sh | yad --title "passgen" --text-info --width 53
button_rclick_command =
button_mclick_command =
button_uwheel_command =
button_dwheel_command =
button_font_color = #ffffff 100
button_padding = 2 0
button_background_id = 0
button_centered = 0
button_max_icon_size = 22
Scrot...
Offline
^ Both of these are sweet. Thanks for the contribution.
Offline
@Steve Those are really cool!
Just popped in my mind that probably damo's script regarding power consumption could be also used with yad and a button.
Offline
^^ cheers.
Got one more, this is for arch users to check updates but you could do similar for deb users as well.
Im using simple terminal here just because its simple
#-------------------------------------
# Button 1
button = new
button_icon = /home/sc/Pictures/Update-buttons/archupdate.png
button_text =
button_lclick_command = st -g 50x20 -f monospace -t pac-update -e sudo pacman -Syu
button_rclick_command =
button_mclick_command =
button_uwheel_command =
button_dwheel_command =
button_font_color = #ffffff 100
button_padding = 4 0
button_background_id = 0
button_centered = 0
button_max_icon_size = 22
Offline
Yad + Tint2 button password generator from bash script.
passgen.sh
#!/bin/sh date +%s | sha256sum | base64 | head -c 32 ; echo
openssl rand -base64 32
maybe better?
;-)
or maybe even
openssl rand -base64 32 | xclip -selection clipboard
Last edited by ohnonot (2017-10-22 06:39:16)
Offline
Steve wrote:Yad + Tint2 button password generator from bash script.
passgen.sh
#!/bin/sh date +%s | sha256sum | base64 | head -c 32 ; echo
;-)
or maybe even
openssl rand -base64 32 | xclip -selection clipboard
You could do away with yad altogether with that one, a lot less clicks so that is a good one!
I needed to install xclip for that command though.
Last edited by Steve (2017-10-22 10:15:07)
Offline