update dotfiles
This commit is contained in:
114
regolith3/Xresources
Normal file
114
regolith3/Xresources
Normal file
@@ -0,0 +1,114 @@
|
||||
! --------------------------------------------
|
||||
! -- Colors
|
||||
! --------------------------------------------
|
||||
|
||||
! nevil colors
|
||||
|
||||
#define color_base03 #ffffff
|
||||
#define color_base02 #FEFEFE
|
||||
#define color_base01 #FAFAFA
|
||||
#define color_base00 #f5f5f5
|
||||
|
||||
#define color_base0 #242424
|
||||
#define color_base1 #363636
|
||||
#define color_base2 #7e7e7e
|
||||
#define color_base3 #363636
|
||||
|
||||
#define color_yellow #FFAA33
|
||||
#define color_orange #FA8D3E
|
||||
#define color_magenta #9F40FF
|
||||
#define color_violet #A37ACC
|
||||
#define color_blue #478ACC
|
||||
#define color_cyan #4CBF99
|
||||
#define color_green #86B300
|
||||
#define color_brown #E6BA7E
|
||||
#define color_black "#000000"
|
||||
#define color_darkgrey "#747474"
|
||||
#define color_white "#FFFFFF"
|
||||
#define color_red "#FF0000"
|
||||
|
||||
#define color_wallpaper #C8C8C8
|
||||
|
||||
regolith.wallpaper.color.primary: black
|
||||
regolith.wallpaper.color.secondary:
|
||||
regolith.wallpaper.color.shading.type:
|
||||
|
||||
! i3
|
||||
|
||||
wm.gaps.inner.size: 4
|
||||
|
||||
! BAR
|
||||
|
||||
wm.bar.font: pango: SF Pro Display 10, Font Awesome 10
|
||||
wm.font: pango: SF Pro Display 10, Font Awesome 10
|
||||
|
||||
wm.bar.background.color: color_black
|
||||
wm.bar.separatorchar: /
|
||||
wm.bar.separator.color: color_red
|
||||
|
||||
wm.bar.workspace.active.background.color: color_white
|
||||
wm.bar.workspace.active.border.color: color_black
|
||||
wm.bar.workspace.active.text.color: color_black
|
||||
wm.bar.workspace.focused.background.color: color_white
|
||||
wm.bar.workspace.focused.border.color: color_black
|
||||
wm.bar.workspace.focused.text.color: color_black
|
||||
wm.bar.workspace.inactive.background.color: color_black
|
||||
wm.bar.workspace.inactive.border.color: color_black
|
||||
wm.bar.workspace.inactive.text.color: color_darkgrey
|
||||
wm.bar.workspace.urgent.background.color: color_black
|
||||
wm.bar.workspace.urgent.border.color: color_red
|
||||
wm.bar.workspace.urgent.text.color: color_red
|
||||
|
||||
wm.workspace.01.name: 1
|
||||
wm.workspace.02.name: 2
|
||||
wm.workspace.03.name: 3
|
||||
wm.workspace.04.name: 4
|
||||
wm.workspace.05.name: 5
|
||||
wm.workspace.06.name: 6
|
||||
wm.workspace.07.name: 7
|
||||
wm.workspace.08.name: 8
|
||||
wm.workspace.09.name: 9
|
||||
wm.workspace.10.name: 10
|
||||
wm.workspace.11.name: 11
|
||||
wm.workspace.12.name: 12
|
||||
wm.workspace.13.name: 13
|
||||
wm.workspace.14.name: 14
|
||||
wm.workspace.15.name: 15
|
||||
wm.workspace.16.name: 16
|
||||
wm.workspace.17.name: 17
|
||||
wm.workspace.18.name: 18
|
||||
wm.workspace.19.name: 19
|
||||
|
||||
! why doesnt color_white work here?
|
||||
i3xrocks.label.color: #FFFFFF
|
||||
i3xrocks.value.color: #FFFFFF
|
||||
i3xrocks.value.font: pango: SF Pro Display 10, Font Awesome 10
|
||||
i3xrocks.time.interval: 1
|
||||
i3xrocks.memory.percentage: true
|
||||
i3xrocks.memory.display: used
|
||||
i3xrocks.label.time:
|
||||
i3xrocks.label.wifi:
|
||||
i3xrocks.label.up:
|
||||
i3xrocks.label.dn:
|
||||
i3xrocks.label.mediaplaying:
|
||||
i3xrocks.label.memory:
|
||||
i3xrocks.label.cpu:
|
||||
i3xrocks.label.battery0:
|
||||
i3xrocks.label.battery20:
|
||||
i3xrocks.label.battery50:
|
||||
i3xrocks.label.battery80:
|
||||
i3xrocks.label.battery100:
|
||||
i3xrocks.weather.location: Parnu,Estonia
|
||||
i3xrocks.weather.format: 1
|
||||
i3xrocks.timerthing.paused: N
|
||||
i3xrocks.timerthing.running: Y
|
||||
i3xrocks.date.iso8601: true
|
||||
|
||||
ilia.stylesheet: /home/cobra/.config/regolith3/ilia.css
|
||||
|
||||
!regolith.wallpaper.file: /usr/share/backgrounds/Clouds_by_Tibor_Mokanszki.jpg
|
||||
!regolith.lockscreen.wallpaper.file: /usr/share/backgrounds/Clouds_by_Tibor_Mokanszki.jpg
|
||||
!regolith.wallpaper.file: /usr/share/backgrounds/Monument_valley_by_orbitelambda.jpg
|
||||
regolith.lockscreen.wallpaper.file: /usr/share/backgrounds/Monument_valley_by_orbitelambda.jpg
|
||||
regolith.wallpaper.file: /home/cobra/Pictures/0seytx44g9ne1.jpeg
|
||||
!/home/cobra/Pictures/mwweaijvqfnd1.jpg
|
||||
100
regolith3/Xresources.bk-before-desktop-import
Normal file
100
regolith3/Xresources.bk-before-desktop-import
Normal file
@@ -0,0 +1,100 @@
|
||||
#define WORKSPACE_NAME(INDEX, FONT, COLOR, GLYPH)
|
||||
|
||||
#define color_black "#000000"
|
||||
#define color_darkgrey "#747474"
|
||||
#define color_white "#FFFFFF"
|
||||
#define color_red "#FF0000"
|
||||
|
||||
!Xft.dpi: 160
|
||||
Xft.dpi: 160
|
||||
Xft.antialias: 0
|
||||
|
||||
i3-wm.program.lock: /usr/bin/i3lock -c 000000ff
|
||||
|
||||
i3-wm.bar.background.color: color_black
|
||||
i3-wm.bar.workspace.active.background.color: color_white
|
||||
i3-wm.bar.workspace.active.border.color: color_black
|
||||
i3-wm.bar.workspace.active.text.color: color_black
|
||||
i3-wm.bar.workspace.focused.background.color: color_white
|
||||
i3-wm.bar.workspace.focused.border.color: color_black
|
||||
i3-wm.bar.workspace.focused.text.color: color_black
|
||||
i3-wm.bar.workspace.inactive.background.color: color_black
|
||||
i3-wm.bar.workspace.inactive.border.color: color_black
|
||||
i3-wm.bar.workspace.inactive.text.color: color_darkgrey
|
||||
i3-wm.bar.workspace.urgent.background.color: color_black
|
||||
i3-wm.bar.workspace.urgent.border.color: color_red
|
||||
i3-wm.bar.workspace.urgent.text.color: color_red
|
||||
|
||||
i3-wm.workspace.01.name: WORKSPACE_NAME(1, glyph_font, QUOTE(color_blue), glyph)
|
||||
i3-wm.workspace.02.name: WORKSPACE_NAME(2, glyph_font, QUOTE(color_cyan), glyph)
|
||||
i3-wm.workspace.03.name: WORKSPACE_NAME(3, glyph_font, QUOTE(color_green), glyph)
|
||||
i3-wm.workspace.04.name: WORKSPACE_NAME(4, glyph_font, QUOTE(color_yellow), glyph)
|
||||
i3-wm.workspace.05.name: WORKSPACE_NAME(5, glyph_font, QUOTE(color_orange), glyph)
|
||||
i3-wm.workspace.06.name: WORKSPACE_NAME(6, glyph_font, QUOTE(color_red), glyph)
|
||||
i3-wm.workspace.07.name: WORKSPACE_NAME(7, glyph_font, QUOTE(color_magenta), glyph)
|
||||
i3-wm.workspace.08.name: WORKSPACE_NAME(8, glyph_font, QUOTE(color_violet), glyph)
|
||||
i3-wm.workspace.09.name: WORKSPACE_NAME(9, glyph_font, QUOTE(color_base1), glyph)
|
||||
i3-wm.workspace.10.name: WORKSPACE_NAME(10, glyph_font, QUOTE(color_blue), glyph)
|
||||
i3-wm.workspace.11.name: WORKSPACE_NAME(11, glyph_font, QUOTE(color_cyan), glyph)
|
||||
i3-wm.workspace.12.name: WORKSPACE_NAME(12, glyph_font, QUOTE(color_green), glyph)
|
||||
i3-wm.workspace.13.name: WORKSPACE_NAME(13, glyph_font, QUOTE(color_yellow), glyph)
|
||||
i3-wm.workspace.14.name: WORKSPACE_NAME(14, glyph_font, QUOTE(color_orange), glyph)
|
||||
i3-wm.workspace.15.name: WORKSPACE_NAME(15, glyph_font, QUOTE(color_red), glyph)
|
||||
i3-wm.workspace.16.name: WORKSPACE_NAME(16, glyph_font, QUOTE(color_magenta), glyph)
|
||||
i3-wm.workspace.17.name: WORKSPACE_NAME(17, glyph_font, QUOTE(color_violet), glyph)
|
||||
i3-wm.workspace.18.name: WORKSPACE_NAME(18, glyph_font, QUOTE(color_base1), glyph)
|
||||
i3-wm.workspace.19.name: WORKSPACE_NAME(19, glyph_font, QUOTE(color_blue), glyph)
|
||||
|
||||
i3-wm.bar.font: pango: SF Pro Display 10, Font Awesome 10
|
||||
i3-wm.font: pango: SF Pro Display 10, Font Awesome 10
|
||||
|
||||
|
||||
!#i3xrocks.label.color: color_white
|
||||
!#i3xrocks.value.color: color_white
|
||||
|
||||
i3xrocks.label.color: #FFFFFF
|
||||
i3xrocks.value.color: #FFFFFF
|
||||
|
||||
i3xrocks.label.time:
|
||||
!i3xrocks.label.wifi: " "
|
||||
i3xrocks.label.wifi:
|
||||
i3xrocks.label.up:
|
||||
i3xrocks.label.dn:
|
||||
i3xrocks.label.up_battery: " "
|
||||
i3xrocks.label.dn_battery: " "
|
||||
i3xrocks.memory.percentage: true
|
||||
i3xrocks.memory.display: used
|
||||
i3xrocks.label.mediaplaying:
|
||||
i3xrocks.label.memory:
|
||||
i3xrocks.label.cpu:
|
||||
i3xrocks.label.battery0:
|
||||
i3xrocks.label.battery20:
|
||||
i3xrocks.label.battery50:
|
||||
i3xrocks.label.battery80:
|
||||
i3xrocks.label.battery100:
|
||||
i3xrocks.value.font: pango: SF Pro Display 10, Font Awesome 10
|
||||
|
||||
|
||||
i3xrocks.time.interval: 1
|
||||
!i3xrocks.date.format2: %Y-%m-%d %H:%M:%S
|
||||
i3xrocks.date.iso8601: true
|
||||
|
||||
i3-wm.bar.separatorchar: /
|
||||
i3-wm.bar.separator.color: color_red
|
||||
!regolith.look.path: /usr/share/regolith-look/blackhole
|
||||
regolith.look.path: /usr/share/regolith-look/default
|
||||
|
||||
ilia.stylesheet: /home/waves/.config/regolith2/i3/ilia.css
|
||||
|
||||
!#regolith.wallpaper.file: /usr/share/regolith-look/gruvbox/gruvbox-dark-regolith2-noText-GMFranceschini.svg
|
||||
!#regolith.wallpaper.options: zoom
|
||||
|
||||
regolith.wallpaper.color.primary: #000000
|
||||
regolith.wallpaper.color.secondary: #000000
|
||||
regolith.wallpaper.color.shading.type: none
|
||||
|
||||
i3xrocks.weather.location: Parnu,Estonia
|
||||
i3xrocks.weather.format: 1
|
||||
|
||||
i3xrocks.timerthing.paused: N
|
||||
i3xrocks.timerthing.running: Y
|
||||
0
regolith3/flags/show-shortcuts
Normal file
0
regolith3/flags/show-shortcuts
Normal file
0
regolith3/flags/term-profile
Normal file
0
regolith3/flags/term-profile
Normal file
3
regolith3/i3xrocks/90_time
Normal file
3
regolith3/i3xrocks/90_time
Normal file
@@ -0,0 +1,3 @@
|
||||
# Date Time
|
||||
[time]
|
||||
interval=xresource:i3xrocks.time.interval 10
|
||||
93
regolith3/i3xrocks/scripts/net-traffic
Normal file
93
regolith3/i3xrocks/scripts/net-traffic
Normal file
@@ -0,0 +1,93 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -Eeu -o pipefail
|
||||
|
||||
# Note: net-traffic uses interval type 'repeat' so cannot use button events.
|
||||
# See https://github.com/vivien/i3blocks#interval
|
||||
|
||||
# some default values for arguments"
|
||||
UP=${label_icon:-$(xrescat i3xrocks.label.up " up")}
|
||||
DN=${label_icon:-$(xrescat i3xrocks.label.dn " dn")}
|
||||
DLY=${DLY:-5}
|
||||
ERROR_DLY=${ERROR_DLY:-10}
|
||||
RT=${RT:-}
|
||||
|
||||
# Padding the output to 5 characters to avoid jittering on the bar
|
||||
NUMFMT="numfmt --to iec --format %f --padding 5"
|
||||
|
||||
# determine the net interface name, but only use one interface
|
||||
# there could be several default routes, if you have a VPN for example
|
||||
IF="${BLOCK_INSTANCE:-$(awk '$2 == 00000000 && $1 !~ /(ppp|tun|tap)/ { print $1; exit }' < /proc/net/route)}"
|
||||
|
||||
IF_PATH="/sys/class/net/${IF}"
|
||||
|
||||
if [ -d "${IF_PATH}/bonding" ]; then
|
||||
# this is a bond, use the active slave's interface
|
||||
IF="$(< "${IF_PATH}/bonding/active_slave")"
|
||||
IF_PATH="/sys/class/net/${IF}"
|
||||
fi
|
||||
|
||||
if [[ "$IF" == "" || ! -d "$IF_PATH" || ! -f "${IF_PATH}"/statistics/rx_bytes || ! -f "${IF_PATH}"/statistics/tx_bytes ]]; then
|
||||
sleep "${ERROR_DLY}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -d "${IF_PATH}/wireless" ]; then
|
||||
NIC=${label_icon:-$(xrescat i3xrocks.label.wifi )}
|
||||
else
|
||||
NIC=${label_icon:-$(xrescat i3xrocks.label.wired )}
|
||||
fi
|
||||
|
||||
# read dev file and compute net usage
|
||||
RX1=$(cat "${IF_PATH}"/statistics/rx_bytes)
|
||||
TX1=$(cat "${IF_PATH}"/statistics/tx_bytes)
|
||||
|
||||
sleep "${DLY}"
|
||||
|
||||
RX2=$(cat "${IF_PATH}"/statistics/rx_bytes)
|
||||
TX2=$(cat "${IF_PATH}"/statistics/tx_bytes)
|
||||
|
||||
RX_DIFF=$(echo "($RX2-$RX1)/$DLY" | bc)
|
||||
TX_DIFF=$(echo "($TX2-$TX1)/$DLY" | bc)
|
||||
RX=$(echo "${RX_DIFF}" | ${NUMFMT})
|
||||
TX=$(echo "${TX_DIFF}" | ${NUMFMT})
|
||||
AX=$(echo "($RX_DIFF+$TX_DIFF)" | bc | ${NUMFMT})
|
||||
|
||||
# Add a B for bytes at the end if the string is missing a letter
|
||||
if ! [[ "${RX}" =~ [BKMG]$ ]]; then
|
||||
RX="${RX#?}B"
|
||||
fi
|
||||
|
||||
if ! [[ "${TX}" =~ [BKMG]$ ]]; then
|
||||
TX="${TX#?}B"
|
||||
fi
|
||||
|
||||
if ! [[ "${AX}" =~ [BKMG]$ ]]; then
|
||||
AX="${AX#?}B"
|
||||
fi
|
||||
|
||||
# span for text
|
||||
fspan() {
|
||||
echo "<span font_desc=\"${VALUE_FONT}\" color=\"${VALUE_COLOR}\"> ${1}</span>"
|
||||
}
|
||||
|
||||
# span for label/icon
|
||||
lspan() {
|
||||
echo "<span font_desc=\"${VALUE_FONT}\" color=\"${LABEL_COLOR}\">${1}</span>"
|
||||
}
|
||||
|
||||
# get font specifics from xresource file
|
||||
VALUE_COLOR=${color:-$(xrescat i3xrocks.value.color "#D8DEE9")}
|
||||
LABEL_COLOR=${label_color:-$(xrescat i3xrocks.label.color "#7B8394")}
|
||||
VALUE_FONT=${font:-$(xrescat i3xrocks.value.font "Source Code Pro Medium 13")}
|
||||
|
||||
# output net usage using pango markup
|
||||
if [ "$RT" = "up" ]; then
|
||||
echo "$(lspan "${NIC}")$(fspan "$TX")$(lspan "${UP}")"
|
||||
elif [ "$RT" = "down" ] || [ "$RT" = "dn" ]; then
|
||||
echo "$(lspan "${NIC}")$(fspan "$RX")$(lspan "${DN}")"
|
||||
elif [ "$RT" = "total" ]; then
|
||||
echo "$(lspan "${NIC}")$(fspan "$AX")"
|
||||
else
|
||||
echo "$(lspan "${NIC}")$(fspan "$RX") $(lspan "${DN}") /$(fspan "$TX") $(lspan "${UP}")"
|
||||
fi
|
||||
42
regolith3/i3xrocks/scripts/send-weather-notification
Normal file
42
regolith3/i3xrocks/scripts/send-weather-notification
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -Eeu -o pipefail
|
||||
|
||||
VALUE_COLOR=${color:-$(xrescat i3xrocks.value.color "#D8DEE9")}
|
||||
VALUE_FONT=${font:-$(xrescat i3xrocks.value.font "Source Code Pro Medium 13")}
|
||||
BUTTON="${button:-}"
|
||||
|
||||
# Information on the various formats: https://github.com/chubin/wttr.in
|
||||
VALUE_WEATHER_FORMAT=${weather_format:-$(xrescat i3xrocks.weather.format "1")}
|
||||
VALUE_WEATHER_FORMAT="?format=${VALUE_WEATHER_FORMAT}"
|
||||
# all format options: "https://wttr.in?format=%l:+%c+%f+%h+%p+%P+%m+%w+%S+%s"
|
||||
VALUE_SUNSET_SUNRISE_FORMAT="?format=%S-%s%20%m+"
|
||||
|
||||
# Determine units to use for temperature
|
||||
# We don't supply a default here because wttr.in is "smart" enough to choose for us
|
||||
WEATHER_UNIT=${weather_unit:-$(xrescat i3xrocks.weather.units "")}
|
||||
if [ -n "${WEATHER_UNIT}" ]; then
|
||||
WEATHER_UNIT="&${WEATHER_UNIT}"
|
||||
fi
|
||||
|
||||
# Defaults to IP address location
|
||||
VALUE_WEATHER_LOCATION=${weather_location:-$(xrescat i3xrocks.weather.location "Genova")}
|
||||
VALUE_WEATHER_ERROR_MESSAGE=${error_message:-$(xrescat i3xrocks.weather.error_message $'\u26D4')}
|
||||
WEATHER=$(curl -sS "https://wttr.in/${VALUE_WEATHER_LOCATION}${VALUE_WEATHER_FORMAT}${WEATHER_UNIT}" || echo "${VALUE_WEATHER_ERROR_MESSAGE}")
|
||||
|
||||
SUNRISE_SUNSET=$(curl -sS "https://wttr.in/${VALUE_WEATHER_LOCATION}${VALUE_SUNSET_SUNRISE_FORMAT}${WEATHER_UNIT}")
|
||||
SUNRISE_VALUE=$(echo ${SUNRISE_SUNSET} | cut -c 1-5)
|
||||
SUNSET_VALUE=$(echo ${SUNRISE_SUNSET} | cut -c 10-14)
|
||||
|
||||
if echo "${WEATHER}" | grep -q -P "Unknown\slocation"; then
|
||||
WEATHER=${VALUE_WEATHER_ERROR_MESSAGE}
|
||||
fi
|
||||
|
||||
echo "<span font_desc=\"${VALUE_FONT}\" color=\"${VALUE_COLOR}\">${WEATHER} (${SUNRISE_VALUE}-${SUNSET_VALUE})</span>"
|
||||
|
||||
#echo "x${BUTTON}"
|
||||
|
||||
if [ ! "x${BUTTON}" == "x" ]; then
|
||||
ACTION=$(xrescat i3xrocks.action.weather "xdg-open https://wttr.in/${VALUE_WEATHER_LOCATION}")
|
||||
/usr/bin/i3-msg -q exec "$ACTION"
|
||||
fi
|
||||
54
regolith3/i3xrocks/scripts/time
Normal file
54
regolith3/i3xrocks/scripts/time
Normal file
@@ -0,0 +1,54 @@
|
||||
#!/bin/bash
|
||||
# This time blocklet will use Xresources date format if defined
|
||||
# or try to determine most appropriate format based on locale and GNOME settings.
|
||||
|
||||
IS_ISO_8601=$(xrescat i3xrocks.date.iso8601)
|
||||
DATE_FORMAT=$(xrescat i3xrocks.date.format2)
|
||||
BUTTON=${button:-}
|
||||
|
||||
BAR_SEPARATOR_CHAR=$(xrescat wm.bar.separatorchar)
|
||||
BAR_SEPARATOR_COLOR=$(xrescat wm.bar.separator.color)
|
||||
|
||||
if [ "$IS_ISO_8601" == "true" ]; then
|
||||
DATE_VALUE="$(date --iso-8601=seconds)"
|
||||
elif [ -z "$DATE_FORMAT" ]; then # No custom format defined, use system defaults
|
||||
COUNTRY=$(locale | grep LC_TIME | head -n1 | cut -d "=" -f 2 | cut -d "_" -f 2 | cut -d "." -f 1)
|
||||
if [ -z "$COUNTRY" ]; then
|
||||
DATE_SPEC="%m/%d"
|
||||
else
|
||||
case $COUNTRY in
|
||||
"US" | "CN" | "JP" | "KP" | "KR" | "CA" | "TW" | "HU" | "MN" | "LT" | "BT" )
|
||||
DATE_SPEC="%m/%d"
|
||||
;;
|
||||
*)
|
||||
DATE_SPEC="%d/%m"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
TIME_FORMAT=$(gsettings get org.gnome.desktop.interface clock-format)
|
||||
|
||||
if [ "$TIME_FORMAT" == "'12h'" ]; then
|
||||
TIME_SPEC="%I:%M"
|
||||
else
|
||||
TIME_SPEC="%H:%M"
|
||||
fi
|
||||
|
||||
DATE_VALUE=$(date "+ $DATE_SPEC $TIME_SPEC")
|
||||
else
|
||||
DATE_VALUE=$(date "+ $DATE_FORMAT")
|
||||
fi
|
||||
|
||||
LABEL_ICON=${icon:-$(xrescat i3xrocks.label.time )}
|
||||
LABEL_COLOR=${label_color:-$(xrescat i3xrocks.label.color "#7B8394")}
|
||||
VALUE_COLOR=${color:-$(xrescat i3xrocks.value.color "#D8DEE9")}
|
||||
VALUE_FONT=${font:-$(xrescat i3xrocks.value.font "Source Code Pro Medium 13")}
|
||||
|
||||
echo "<span font_desc=\"${VALUE_FONT}\" color=\"${LABEL_COLOR}\">$LABEL_ICON</span> \
|
||||
<span font_desc=\"${VALUE_FONT}\" color=\"${VALUE_COLOR}\"> $DATE_VALUE</span> \
|
||||
<span font_desc=\"${VALUE_FONT}\" color=\"${BAR_SEPARATOR_COLOR}\">$BAR_SEPARATOR_CHAR </span>";
|
||||
|
||||
if [ "x${BUTTON}" == "x1" ]; then
|
||||
ACTION=$(xrescat i3xrocks.action.time "regolith-control-center datetime")
|
||||
/usr/bin/i3-msg -q exec "$ACTION"
|
||||
fi
|
||||
45
regolith3/i3xrocks/scripts/weather
Normal file
45
regolith3/i3xrocks/scripts/weather
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -Eeu -o pipefail
|
||||
|
||||
VALUE_COLOR=${color:-$(xrescat i3xrocks.value.color "#D8DEE9")}
|
||||
VALUE_FONT=${font:-$(xrescat i3xrocks.value.font "Source Code Pro Medium 13")}
|
||||
BUTTON="${button:-}"
|
||||
|
||||
# Information on the various formats: https://github.com/chubin/wttr.in
|
||||
VALUE_WEATHER_FORMAT=${weather_format:-$(xrescat i3xrocks.weather.format "1")}
|
||||
VALUE_WEATHER_FORMAT="?format=${VALUE_WEATHER_FORMAT}"
|
||||
# all format options: "https://wttr.in?format=%l:+%c+%f+%h+%p+%P+%m+%w+%S+%s"
|
||||
VALUE_SUNSET_SUNRISE_FORMAT="?format=%S-%s%20%m+"
|
||||
|
||||
# Determine units to use for temperature
|
||||
# We don't supply a default here because wttr.in is "smart" enough to choose for us
|
||||
WEATHER_UNIT=${weather_unit:-$(xrescat i3xrocks.weather.units "")}
|
||||
if [ -n "${WEATHER_UNIT}" ]; then
|
||||
WEATHER_UNIT="&${WEATHER_UNIT}"
|
||||
fi
|
||||
|
||||
# Defaults to IP address location
|
||||
VALUE_WEATHER_LOCATION=${weather_location:-$(xrescat i3xrocks.weather.location "Pärnu")}
|
||||
VALUE_WEATHER_ERROR_MESSAGE=${error_message:-$(xrescat i3xrocks.weather.error_message $'\u26D4')}
|
||||
VALUE_FETCH_WEATHER_URL="https://wttr.in/${VALUE_WEATHER_LOCATION}${VALUE_WEATHER_FORMAT}${WEATHER_UNIT}"
|
||||
#echo "hahaha = '$VALUE_FETCH_WEATHER_URL'"
|
||||
WEATHER=$(curl -sS "$VALUE_FETCH_WEATHER_URL" || echo "${VALUE_WEATHER_ERROR_MESSAGE}")
|
||||
|
||||
SUNRISE_SUNSET=$(curl -sS "https://wttr.in/${VALUE_WEATHER_LOCATION}${VALUE_SUNSET_SUNRISE_FORMAT}${WEATHER_UNIT}")
|
||||
SUNRISE_VALUE=$(echo ${SUNRISE_SUNSET} | cut -c 1-5)
|
||||
SUNSET_VALUE=$(echo ${SUNRISE_SUNSET} | cut -c 10-14)
|
||||
|
||||
if echo "${WEATHER}" | grep -q -P "Unknown\slocation"; then
|
||||
WEATHER=${VALUE_WEATHER_ERROR_MESSAGE}
|
||||
fi
|
||||
|
||||
echo "<span font_desc=\"${VALUE_FONT}\" color=\"${VALUE_COLOR}\">${WEATHER} (${SUNRISE_VALUE}-${SUNSET_VALUE})</span>"
|
||||
|
||||
#echo "x${BUTTON}"
|
||||
|
||||
if [ ! "x${BUTTON}" == "x" ]; then
|
||||
FULL_WEATHER=$(curl -sS "https://wttr.in/${VALUE_WEATHER_LOCATION}?format=%l:+%c+%f+%h+%p+%P+%m+%w+%S+%s" || echo "${VALUE_WEATHER_ERROR_MESSAGE}")
|
||||
ACTION=$(notify-send "$FULL_WEATHER")
|
||||
/usr/bin/i3-msg -q exec "$ACTION"
|
||||
fi
|
||||
37
regolith3/ilia.css
Normal file
37
regolith3/ilia.css
Normal file
@@ -0,0 +1,37 @@
|
||||
.root_box {
|
||||
margin: 24px;
|
||||
background-color: #000000;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
window {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: rgba(255,255,255,0.2);
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
.filter_entry {
|
||||
border: none;
|
||||
background: none;
|
||||
min-height: 36px;
|
||||
min-width: 320px;
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
.notebook {
|
||||
border: none;
|
||||
background-color: #000000;
|
||||
border-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.keybindings {
|
||||
font-family: RobotoMono Nerd Font;
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
* {
|
||||
background-color: #000;
|
||||
border-color: #000;
|
||||
}
|
||||
Reference in New Issue
Block a user