Comments (7)
Theoretically yes, but someone would have to write that code and we are busy people :(. If you want to write it yourself and submit a PR, make sure to read #132 first and comply with the new setup. Sorry for all the confusion, we are trying to migrate to a new system so this branch of the repo is frozen for now.
from i3blocks-contrib.
@kb100 yes, i'm wrote one for the packer
but somehow i'm still stuck on the right click mouse
to bring up the urxvt terminal
and exec packer -Syu
need some help on this, below is the code
#used for displaying count/status in the i3blocks
output()
{
package_list=$(packer --quickcheck)
package_count=$(packer --quickcheck | wc -l)
if [ $package_count -eq 0 ]; then
echo "Up To Date"
else
echo "upgrades: $package_count"
fi
}
#used for notify-send messaging when clicking i3blocks entry
notify_output()
{
if [ $package_list -eq ""]; then
$(notify-send -t 2000 "Upgrades:" "No Upgrades Found!")
else
$(notify-send "Upgrades:" "$package_list")
fi
}
#defines i3blocks mouse click events
case $BLOCK_BUTTON in
# left click to update & list packages
1) output && notify_output ;;
#right click: run upgrade then refresh i3blocks
2) urxvt -e 'packer -Syu' && output ;;
esac
from i3blocks-contrib.
@kb100 make it work, but not using urxvt terminal
, i change it to xfce4-terminal
, have to figure out how to use urxvt.
#!/bin/bash
#used for displaying count/status in the i3blocks
output()
{
package_list=$(packer --quickcheck)
package_count=$(packer --quickcheck | wc -l)
if [ $package_count -eq 0 ]; then
echo "Up To Date"
else
echo "upgrades: $package_count"
fi
}
#used for notify-send messaging when clicking i3blocks entry
notify_output()
{
if [ $package_list -eq ""]; then
$(notify-send -t 2000 "Upgrades:" "No Upgrades Found!")
else
$(notify-send "Upgrades:" "$package_list")
fi
}
#defines i3blocks mouse click events
case $BLOCK_BUTTON in
# left click to update & list packages
1) output && notify_output ;;
# right click: run upgrade then refresh i3blocks
3) exec xfce4-terminal -e 'packer -Syu' && output ;;
esac
from i3blocks-contrib.
@kb100, make it work now, so how to submit as new alternative 'arch-update"?
from i3blocks-contrib.
My quick hack: I am using aurman
and edited L.65 to be:
output = check_output(['aurman', '-Qu']).decode('utf-8')
from i3blocks-contrib.
If you are having trouble launching a program like urxvt from within a blocklet, the recommended way to do it is using i3-msg -q exec your_command
from i3blocks-contrib.
@kb100 my bad, i should close this instead of still let it open, really sorry
from i3blocks-contrib.
Related Issues (20)
- volume-pipewire is not able to forward default sink when clicked on HOT 1
- confusing formatting in rofi-calendar
- bandwidth2: missing dependency
- temperature block shows wrong temperature
- The cpu_usage2 blocklet isn't working HOT 1
- The blocklet battery-poly isn't working HOT 2
- only appears the clock with date
- key_layout doesn't work because it doesn't output a \n at the end HOT 1
- Root Makefile errors
- Using Font Awesome 6 instead of Font Awesome 5 for dunst
- apt-upgrades
- Issue with Icons in volume-pipewire
- The memory2 block uses incorrect math to calculate ram usage HOT 1
- volume-pulseaudio higher than 100%
- calendar: calendar display at wrong position for different i3 bar position HOT 2
- [bandwidth] tailscale showing as "down"
- [volume_pulse] grep warning
- [mediaplayer] no output if metadata invalid
- [mediaplayer][rfc] make MPRIS a hard dependency?
- The module `cpu_usage2` doesn't compile with clang/llvm
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from i3blocks-contrib.