mirror of
https://github.com/bvanroll/oldest-dotfiles.git
synced 2025-08-29 12:02:40 +00:00
i3 and blocks changes for the win 95 look
This commit is contained in:
@@ -38,9 +38,9 @@ $percent = $2;
|
||||
$full_text = "$percent%";
|
||||
|
||||
if ($status eq 'Discharging') {
|
||||
$full_text .= ' DIS';
|
||||
$full_text .= ' ▼';
|
||||
} elsif ($status eq 'Charging') {
|
||||
$full_text .= ' CHR';
|
||||
$full_text .= ' ▲';
|
||||
}
|
||||
|
||||
$short_text = $full_text;
|
||||
@@ -56,19 +56,19 @@ print "$short_text\n";
|
||||
# consider color and urgent flag only on discharge
|
||||
if ($status eq 'Discharging') {
|
||||
|
||||
if ($percent < 20) {
|
||||
print "#FF0000\n";
|
||||
} elsif ($percent < 40) {
|
||||
print "#FFAE00\n";
|
||||
} elsif ($percent < 60) {
|
||||
print "#FFF600\n";
|
||||
} elsif ($percent < 85) {
|
||||
print "#A8FF00\n";
|
||||
}
|
||||
|
||||
if ($percent < 5) {
|
||||
exit(33);
|
||||
}
|
||||
# if ($percent < 20) {
|
||||
# print "#FF0000\n";
|
||||
# } elsif ($percent < 40) {
|
||||
# print "#FFAE00\n";
|
||||
# } elsif ($percent < 60) {
|
||||
# print "#FFF600\n";
|
||||
# } elsif ($percent < 85) {
|
||||
# print "#A8FF00\n";
|
||||
# }
|
||||
#
|
||||
# if ($percent < 5) {
|
||||
# exit(33);
|
||||
# }
|
||||
}
|
||||
|
||||
exit(0);
|
||||
|
8
i3blocks/brightness
Executable file
8
i3blocks/brightness
Executable file
@@ -0,0 +1,8 @@
|
||||
case $BLOCK_BUTTON in
|
||||
3) xbacklight -set 20 ;;
|
||||
4) xbacklight -inc 10 ;;
|
||||
5) xbacklight -dec 10 ;;
|
||||
|
||||
esac
|
||||
|
||||
printf "%.0f" "$(xbacklight -get)"
|
169
i3blocks/config
169
i3blocks/config
@@ -28,70 +28,29 @@ command=$SCRIPT_DIR/$BLOCK_NAME
|
||||
separator_block_width=15
|
||||
markup=none
|
||||
|
||||
|
||||
|
||||
|
||||
# Volume indicator
|
||||
#
|
||||
# The first parameter sets the step (and units to display)
|
||||
# The second parameter overrides the mixer selection
|
||||
# See the script for details.
|
||||
[volume]
|
||||
#label=VOL
|
||||
label=♪
|
||||
#instance=Master
|
||||
instance=PCM
|
||||
interval=once
|
||||
signal=10
|
||||
|
||||
# Memory usage
|
||||
# # Memory usage
|
||||
#
|
||||
# The type defaults to "mem" if the instance is not specified.
|
||||
[memory]
|
||||
label=MEM
|
||||
separator=false
|
||||
interval=30
|
||||
|
||||
[memory]
|
||||
label=SWAP
|
||||
instance=swap
|
||||
separator=false
|
||||
interval=30
|
||||
|
||||
# Disk usage
|
||||
#
|
||||
# The directory defaults to $HOME if the instance is not specified.
|
||||
# The script may be called with a optional argument to set the alert
|
||||
# (defaults to 10 for 10%).
|
||||
[disk]
|
||||
label=HOME
|
||||
#instance=/mnt/data
|
||||
interval=30
|
||||
|
||||
# Network interface monitoring
|
||||
#
|
||||
# If the instance is not specified, use the interface used for default route.
|
||||
# The address can be forced to IPv4 or IPv6 with -4 or -6 switches.
|
||||
[iface]
|
||||
instance=wlan0
|
||||
color=#00FF00
|
||||
interval=10
|
||||
separator=false
|
||||
|
||||
[wifi]
|
||||
instance=wlp3s0
|
||||
interval=10
|
||||
separator=false
|
||||
|
||||
[bandwidth]
|
||||
#instance=eth0
|
||||
interval=5
|
||||
|
||||
# CPU usage
|
||||
#
|
||||
# The script may be called with -w and -c switches to specify thresholds,
|
||||
# see the script for details.
|
||||
[cpu_usage]
|
||||
label=CPU
|
||||
interval=10
|
||||
min_width=CPU: 100.00%
|
||||
#[cpu_usage]
|
||||
#label=CPU
|
||||
#interval=10
|
||||
#min_width=CPU: 100.00%
|
||||
#separator=false
|
||||
|
||||
#[load_average]
|
||||
@@ -100,30 +59,57 @@ min_width=CPU: 100.00%
|
||||
# Battery indicator
|
||||
#
|
||||
# The battery instance defaults to 0.
|
||||
[battery]
|
||||
#label=BAT
|
||||
label=⚡
|
||||
#instance=1
|
||||
interval=30
|
||||
|
||||
# Date Time
|
||||
#
|
||||
[time]
|
||||
command=date '+%Y-%m-%d %H:%M'
|
||||
interval=5
|
||||
|
||||
# Generic media player support
|
||||
#
|
||||
# This displays "ARTIST - SONG" if a music is playing.
|
||||
# Supported players are: spotify, vlc, audacious, xmms2, mplayer, and others.
|
||||
#[mediaplayer]
|
||||
#instance=spotify
|
||||
#interval=5
|
||||
#signal=10
|
||||
#
|
||||
#[colors]
|
||||
#command=echo "<span color='red'>roses</span> and <span color='#0000ff'>violets</span>"
|
||||
#markup=pango
|
||||
#interval=once
|
||||
|
||||
|
||||
[mediaplayer]
|
||||
instance=spotify
|
||||
interval=5
|
||||
signal=10
|
||||
label=♪
|
||||
#color=#000000
|
||||
|
||||
# OpenVPN support
|
||||
#
|
||||
# Support multiple VPN, with colors.
|
||||
|
||||
[memory]
|
||||
label=RAM
|
||||
separator=false
|
||||
interval=30
|
||||
#color=#000000
|
||||
|
||||
#
|
||||
#[memory]
|
||||
#label=SWAP
|
||||
#instance=swap
|
||||
#separator=false
|
||||
#interval=30
|
||||
|
||||
# Disk usage
|
||||
#
|
||||
# The directory defaults to $HOME if the instance is not specified.
|
||||
# The script may be called with a optional argument to set the alert
|
||||
# (defaults to 10 for 10%).
|
||||
[disk]
|
||||
label=DISK
|
||||
#instance=/mnt/data
|
||||
interval=30
|
||||
#color=#000000
|
||||
|
||||
|
||||
|
||||
#[openvpn]
|
||||
#interval=20
|
||||
|
||||
@@ -151,3 +137,62 @@ interval=5
|
||||
#instance=NUM
|
||||
#interval=once
|
||||
#signal=11
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
|
||||
|
||||
#[iface]
|
||||
#instance=wlan0
|
||||
#color=#00FF00
|
||||
#interval=10
|
||||
#label="eth"
|
||||
|
||||
[wifi]
|
||||
instance=wlp3s0
|
||||
interval=10
|
||||
label=⥮
|
||||
#color=#000000
|
||||
|
||||
#
|
||||
#[bandwidth]
|
||||
##instance=eth0
|
||||
#interval=5
|
||||
|
||||
|
||||
|
||||
[brightness]
|
||||
label=💻
|
||||
interval=1
|
||||
|
||||
|
||||
|
||||
[volume]
|
||||
#label=VOL
|
||||
label=🔊
|
||||
instance=Master
|
||||
#instance=PCM
|
||||
interval=1
|
||||
signal=10
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
[battery]
|
||||
#label=BAT
|
||||
label=I⚡
|
||||
instance=0
|
||||
interval=30
|
||||
|
||||
[battery]
|
||||
label=E⚡
|
||||
instance=1
|
||||
interval=30
|
||||
|
||||
[time]
|
||||
command=date '+%Y-%m-%d %H:%M'
|
||||
interval=5
|
||||
|
||||
|
||||
|
@@ -33,8 +33,8 @@ fi
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
if [[ "$(cat /sys/class/net/$IF/operstate)" = 'down' ]]; then
|
||||
echo down # full text
|
||||
echo down # short text
|
||||
echo ✕ # full text
|
||||
#echo down # short text
|
||||
echo \#FF0000 # color
|
||||
exit
|
||||
fi
|
||||
|
@@ -26,7 +26,7 @@ MIXER="default"
|
||||
[ -n "$(lsmod | grep pulse)" ] && MIXER="pulse"
|
||||
[ -n "$(lsmod | grep jack)" ] && MIXER="jackplug"
|
||||
MIXER="${2:-$MIXER}"
|
||||
|
||||
MIXER="default"
|
||||
# The instance option sets the control to report and configure
|
||||
# This defaults to the first control of your selected mixer
|
||||
# For a list of the available, use `amixer -D $Your_Mixer scontrols`
|
||||
|
Reference in New Issue
Block a user