aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alacritty/alacritty.yml252
-rwxr-xr-xbin/batt9
-rwxr-xr-xbin/battery_check29
3 files changed, 156 insertions, 134 deletions
diff --git a/alacritty/alacritty.yml b/alacritty/alacritty.yml
index 213a355..f3f6045 100644
--- a/alacritty/alacritty.yml
+++ b/alacritty/alacritty.yml
@@ -175,126 +175,146 @@ font:
# If `true`, bold text is drawn using the bright color variants.
draw_bold_text_with_bright_colors: false
-# Colors (Tomorrow Night)
-colors:
- # Default colors
- primary:
- background: '#101112'
- foreground: '#ffffff'
-
- # Bright and dim foreground colors
+# colorschemes
+schemes:
+ # default
+ default_theme: &def
+ # Default colors
+ primary:
+ background: '#101112'
+ foreground: '#ffffff'
+
+ # Bright and dim foreground colors
+ #
+ # The dimmed foreground color is calculated automatically if it is not
+ # present. If the bright foreground color is not set, or
+ # `draw_bold_text_with_bright_colors` is `false`, the normal foreground
+ # color will be used.
+ #dim_foreground: '#828482'
+ bright_foreground: '#eaeaea'
+
+ # Cursor colors
+ #
+ # Colors which should be used to draw the terminal cursor.
+ #
+ # Allowed values are CellForeground and CellBackground, which reference the
+ # affected cell, or hexadecimal colors like #ff00ff.
+ cursor:
+ text: CellBackground
+ cursor: CellForeground
+
+ # Vi mode cursor colors
+ #
+ # Colors for the cursor when the vi mode is active.
+ #
+ # Allowed values are CellForeground and CellBackground, which reference the
+ # affected cell, or hexadecimal colors like #ff00ff.
+ vi_mode_cursor:
+ text: CellBackground
+ cursor: CellForeground
+
+ # Search colors
+ #
+ # Colors used for the search bar and match highlighting.
+ search:
+ # Allowed values are CellForeground and CellBackground, which reference the
+ # affected cell, or hexadecimal colors like #ff00ff.
+ matches:
+ foreground: '#000000'
+ background: '#ffffff'
+ focused_match:
+ foreground: CellBackground
+ background: CellForeground
+
+ bar:
+ background: '#c5c8c6'
+ foreground: '#1d1f21'
+
+ # Line indicator
+ #
+ # Color used for the indicator displaying the position in history during
+ # search and vi mode.
+ #
+ # By default, these will use the opposing primary color.
+ line_indicator:
+ foreground: None
+ background: None
+
+ # Selection colors
+ #
+ # Colors which should be used to draw the selection area.
#
- # The dimmed foreground color is calculated automatically if it is not
- # present. If the bright foreground color is not set, or
- # `draw_bold_text_with_bright_colors` is `false`, the normal foreground
- # color will be used.
- #dim_foreground: '#828482'
- bright_foreground: '#eaeaea'
-
- # Cursor colors
- #
- # Colors which should be used to draw the terminal cursor.
- #
- # Allowed values are CellForeground and CellBackground, which reference the
- # affected cell, or hexadecimal colors like #ff00ff.
- cursor:
- text: CellBackground
- cursor: CellForeground
-
- # Vi mode cursor colors
- #
- # Colors for the cursor when the vi mode is active.
- #
- # Allowed values are CellForeground and CellBackground, which reference the
- # affected cell, or hexadecimal colors like #ff00ff.
- vi_mode_cursor:
- text: CellBackground
- cursor: CellForeground
-
- # Search colors
- #
- # Colors used for the search bar and match highlighting.
- search:
# Allowed values are CellForeground and CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
- matches:
- foreground: '#000000'
- background: '#ffffff'
- focused_match:
- foreground: CellBackground
+ selection:
+ text: CellBackground
background: CellForeground
-
- bar:
- background: '#c5c8c6'
- foreground: '#1d1f21'
-
- # Line indicator
- #
- # Color used for the indicator displaying the position in history during
- # search and vi mode.
- #
- # By default, these will use the opposing primary color.
- line_indicator:
- foreground: None
- background: None
-
- # Selection colors
- #
- # Colors which should be used to draw the selection area.
- #
- # Allowed values are CellForeground and CellBackground, which reference the
- # affected cell, or hexadecimal colors like #ff00ff.
- selection:
- text: CellBackground
- background: CellForeground
-
- # Normal colors
- normal:
- black: '#101112'
- red: '#ff0000'
- green: '#0cf20c'
- yellow: '#ffff7f'
- blue: '#799df6'
- magenta: '#ff00ff'
- cyan: '#00ffff'
- white: '#dfdfdf'
-
- # Bright colors
- bright:
- black: '#666666'
- red: '#d54e53'
- green: '#b9ca4a'
- yellow: '#e7c547'
- blue: '#7aa6da'
- magenta: '#c397d8'
- cyan: '#70c0b1'
- white: '#eaeaea'
-
- # Dim colors
- #
- # If the dim colors are not set, they will be calculated automatically based
- # on the `normal` colors.
- dim:
- black: '#131415'
- red: '#864343'
- green: '#777c44'
- yellow: '#9e824c'
- blue: '#556a7d'
- magenta: '#75617b'
- cyan: '#5b7d78'
- white: '#828482'
-
- # Indexed Colors
- #
- # The indexed colors include all colors from 16 to 256.
- # When these are not set, they're filled with sensible defaults.
- #
- # Example:
- # `- { index: 16, color: '#ff00ff' }`
- #
- indexed_colors: []
-
-# colorschemes
+
+ # Normal colors
+ normal:
+ black: '#101112'
+ red: '#ff0000'
+ green: '#0cf20c'
+ yellow: '#ffff7f'
+ blue: '#799df6'
+ magenta: '#ff00ff'
+ cyan: '#00ffff'
+ white: '#dfdfdf'
+
+ # Bright colors
+ bright:
+ black: '#666666'
+ red: '#d54e53'
+ green: '#b9ca4a'
+ yellow: '#e7c547'
+ blue: '#7aa6da'
+ magenta: '#c397d8'
+ cyan: '#70c0b1'
+ white: '#eaeaea'
+
+ # Dim colors
+ #
+ # If the dim colors are not set, they will be calculated automatically based
+ # on the `normal` colors.
+ dim:
+ black: '#131415'
+ red: '#864343'
+ green: '#777c44'
+ yellow: '#9e824c'
+ blue: '#556a7d'
+ magenta: '#75617b'
+ cyan: '#5b7d78'
+ white: '#828482'
+
+ # Space Duck
+ space_duck: &duck
+ # Default colors
+ primary:
+ background: '#0f111b'
+ foreground: '#ecf0c1'
+ # Normal colors
+ normal:
+ black: '#101112'
+ red: '#e33400'
+ green: '#5ccc96'
+ yellow: '#b3a1e6'
+ blue: '#00a3cc'
+ magenta: '#f2ce00'
+ cyan: '#7a5ccc'
+ white: '#686f9a'
+
+ # Bright colors
+ bright:
+ black: '#686f9a'
+ red: '#e33400'
+ green: '#5ccc96'
+ yellow: '#b3a1e6'
+ blue: '#00a3cc'
+ magenta: '#f2ce00'
+ cyan: '#7a5ccc'
+ white: '#f0f1ce'
+
+colors: *duck
# Bell
#
diff --git a/bin/batt b/bin/batt
index 0e88611..10d992b 100755
--- a/bin/batt
+++ b/bin/batt
@@ -2,9 +2,12 @@
batt() {
batt="$(acpi | awk '{print $4}' | sed -e 's/%,//g')"
- icon=""
state="$(cat /sys/class/power_supply/BAT0/status)"
+ icon=""
+
+ [ "$batt" -e 98 ] && icon=""
+
[ "$batt" -ge 90 ] && icon=""
[ "$batt" -le 50 ] && icon=""
@@ -13,6 +16,10 @@ batt() {
[ "$batt" -le 5 ] && icon=""
+ [ "$state" == "Charging" ] && icon=""
+
+ battery_check "$batt" "$state"
+
printf "%s %d%%" "$icon" "$batt"
}
diff --git a/bin/battery_check b/bin/battery_check
index 7d77b82..3ee4ca1 100755
--- a/bin/battery_check
+++ b/bin/battery_check
@@ -2,22 +2,17 @@
# Simple script to monitor the battery's status and level
-interval=300 # 5 minutes
critical_level=7
-while true
-do
- batt="$(cat /sys/class/power_supply/BAT0/capacity)"
- state="$(cat /sys/class/power_supply/BAT0/status)"
-
- if [[ $batt -ge 99 ]]; then
- notify-send -u normal"Bateria" "Completamente carregada! (100%)"; pkill -RTMIN+20 dwmblocks
- elif [[ $batt -eq 20 ]] ; then
- notify-send -u normal "Bateria descarregando" "Nível de bateria alcançou 20%"; pkill -RTMIN+20 dwmblocks
- elif [[ $batt -eq 10 ]] ; then
- notify-send -u normal "Bateria descarregando" "Nível de bateria alcançou 10%"; pkill -RTMIN+20 dwmblocks
- elif [[ $batt -le "$critical_level" ]]; then
- notify-send -u critical "Bateria crítica!" "Nível de bateria alcançou 7%"; pkill -RTMIN+20 dwmblocks
- fi
- sleep "$interval"
-done
+batt="$1"
+state="$2"
+
+if [[ $batt -ge 99 ]]; then
+ notify-send -u normal"Bateria" "Completamente carregada! (100%)"; pkill -RTMIN+20 dwmblocks
+elif [[ $batt -eq 20 ]] ; then
+ notify-send -u normal "Bateria descarregando" "Nível de bateria alcançou 20%"; pkill -RTMIN+20 dwmblocks
+elif [[ $batt -eq 10 ]] ; then
+ notify-send -u normal "Bateria descarregando" "Nível de bateria alcançou 10%"; pkill -RTMIN+20 dwmblocks
+elif [[ $batt -le "$critical_level" ]]; then
+ notify-send -u critical "Bateria crítica!" "Nível de bateria alcançou 7%"; pkill -RTMIN+20 dwmblocks
+fi