v0.8.0 added theme support, update checker and misc fixes

pull/19/head
aristocratos 2020-04-16 21:04:57 +02:00
parent caf57f41f4
commit 28e16612cf
8 changed files with 862 additions and 336 deletions

View File

@ -17,10 +17,15 @@ Resource monitor that shows usage and stats for processor, memory, disks, networ
* Send SIGTERM, SIGKILL, SIGINT to selected process.
* UI menu for changing all config file options.
* Auto scaling graph for network usage.
* Shows message in menu if new version is available
## Upcoming
## Themes
* Theme support in next update
Bashtop now has theme support and a function to download missing local themes from repository.
See [themes](themes) folder for available themes.
Let me know if you want to contribute with new themes.
## Compability
@ -31,6 +36,8 @@ Should work on most modern linux distributions with a truecolor capable terminal
**bash** (v4.4 or later) Script functionality will most probably break with earlier versions.
Bash version 5 is higly recommended to make use of $EPOCHREALTIME variable instead of alot of external date command calls.
(Optional) **[curl](https://curl.haxx.se/download.html)** (v7.16.2 or later) Needed if you want messages about updates and the ability to download themes.
## Screenshots
Main UI showing details for a selected process.
@ -98,7 +105,7 @@ USAGE: bashtop
## TODO
- [ ] TODO Add options to change colors for text, graphs and meters.
- [x] TODO Add options to change colors for text, graphs and meters.
- [ ] TODO Add options for resizing all boxes.
- [ ] TODO Add command line argument parsing.
- [ ] TODO Miscellaneous optimizations and code cleanup.

735
bashtop

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,89 @@
#Bashtop theme with default colors and black background
#by aristocratos
# Colors should be in 6 or 2 character hexadecimal or single spaced rgb decimal: "#RRGGBB", "#BW" or "0-255 0-255 0-255"
# example for white: "#FFFFFF", "#ff" or "255 255 255".
# All graphs and meters can be gradients
# For single color graphs leave "mid" and "end" variable empty.
# Use "start" and "end" variables for two color gradient
# Use "start", "mid" and "end" for three color gradient
# Main background, empty for terminal default, need to be empty if you want transparent background
theme[main_bg]="#00"
# Main text color
theme[main_fg]="#cc"
# Title color for boxes
theme[title]="#ee"
# Higlight color for keyboard shortcuts
theme[hi_fg]="#90"
# Background color of selected item in processes box
theme[selected_bg]="#7e2626"
# Foreground color of selected item in processes box
theme[selected_fg]="#ee"
# Color of inactive/disabled text
theme[inactive_fg]="#40"
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
theme[proc_misc]="#0de756"
# Cpu box outline color
theme[cpu_box]="#3d7b46"
# Memory/disks box outline color
theme[mem_box]="#8a882e"
# Net up/down box outline color
theme[net_box]="#423ba5"
# Processes box outline color
theme[proc_box]="#923535"
# Box divider line and small boxes line color
theme[div_line]="#30"
# Temperature graph colors
theme[temp_start]="#4897d4"
theme[temp_mid]="#5474e8"
theme[temp_end]="#ff40b6"
# CPU graph colors
theme[cpu_start]="#50f095"
theme[cpu_mid]="#f2e266"
theme[cpu_end]="#fa1e1e"
# Mem/Disk free meter
theme[free_start]="#223014"
theme[free_mid]="#b5e685"
theme[free_end]="#dcff85"
# Mem/Disk cached meter
theme[cached_start]="#0b1a29"
theme[cached_mid]="#74e6fc"
theme[cached_end]="#26c5ff"
# Mem/Disk available meter
theme[available_start]="#292107"
theme[available_mid]="#ffd77a"
theme[available_end]="#ffb814"
# Mem/Disk used meter
theme[used_start]="#3b1f1c"
theme[used_mid]="#d9626d"
theme[used_end]="#ff4769"
# Download graph colors
theme[download_start]="#231a63"
theme[download_mid]="#4f43a3"
theme[download_end]="#b0a9de"
# Upload graph colors
theme[upload_start]="#510554"
theme[upload_mid]="#7d4180"
theme[upload_end]="#dcafde"

89
themes/greyscale.theme Normal file
View File

@ -0,0 +1,89 @@
#Bashtop grayscale theme
#by aristocratos
# Colors should be in 6 or 2 character hexadecimal or single spaced rgb decimal: "#RRGGBB", "#BW" or "0-255 0-255 0-255"
# example for white: "#FFFFFF", "#ff" or "255 255 255".
# All graphs and meters can be gradients
# For single color graphs leave "mid" and "end" variable empty.
# Use "start" and "end" variables for two color gradient
# Use "start", "mid" and "end" for three color gradient
# Main background, empty for terminal default, need to be empty if you want transparent background
theme[main_bg]="#00"
# Main text color
theme[main_fg]="#bb"
# Title color for boxes
theme[title]="#cc"
# Higlight color for keyboard shortcuts
theme[hi_fg]="#90"
# Background color of selected item in processes box
theme[selected_bg]="#ff"
# Foreground color of selected item in processes box
theme[selected_fg]="#00"
# Color of inactive/disabled text
theme[inactive_fg]="#30"
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
theme[proc_misc]="#90"
# Cpu box outline color
theme[cpu_box]="#90"
# Memory/disks box outline color
theme[mem_box]="#90"
# Net up/down box outline color
theme[net_box]="#90"
# Processes box outline color
theme[proc_box]="#90"
# Box divider line and small boxes line color
theme[div_line]="#30"
# Temperature graph colors
theme[temp_start]="#50"
theme[temp_mid]=""
theme[temp_end]="#ff"
# CPU graph colors
theme[cpu_start]="#50"
theme[cpu_mid]=""
theme[cpu_end]="#ff"
# Mem/Disk free meter
theme[free_start]="#50"
theme[free_mid]=""
theme[free_end]="#ff"
# Mem/Disk cached meter
theme[cached_start]="#50"
theme[cached_mid]=""
theme[cached_end]="#ff"
# Mem/Disk available meter
theme[available_start]="#50"
theme[available_mid]=""
theme[available_end]="#ff"
# Mem/Disk used meter
theme[used_start]="#50"
theme[used_mid]=""
theme[used_end]="#ff"
# Download graph colors
theme[download_start]="#30"
theme[download_mid]=""
theme[download_end]="#ff"
# Upload graph colors
theme[upload_start]="#30"
theme[upload_mid]=""
theme[upload_end]="#ff"

5
themes/index.txt Normal file
View File

@ -0,0 +1,5 @@
"default black.theme"
"greyscale.theme"
"monokai.theme"
"solarized dark.theme"
"whiteout.theme"

89
themes/monokai.theme Normal file
View File

@ -0,0 +1,89 @@
#Bashtop monokai theme
#by aristocratos
# Colors should be in 6 or 2 character hexadecimal or single spaced rgb decimal: "#RRGGBB", "#BW" or "0-255 0-255 0-255"
# example for white: "#FFFFFF", "#ff" or "255 255 255".
# All graphs and meters can be gradients
# For single color graphs leave "mid" and "end" variable empty.
# Use "start" and "end" variables for two color gradient
# Use "start", "mid" and "end" for three color gradient
# Main background, empty for terminal default, need to be empty if you want transparent background
theme[main_bg]="#272822"
# Main text color
theme[main_fg]="#F8F8F2"
# Title color for boxes
theme[title]="#F8F8F2"
# Higlight color for keyboard shortcuts
theme[hi_fg]="#F92672"
# Background color of selected item in processes box
theme[selected_bg]="#7a1137"
# Foreground color of selected item in processes box
theme[selected_fg]="#F8F8F2"
# Color of inactive/disabled text
theme[inactive_fg]="#595647"
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
theme[proc_misc]="#A6E22E"
# Cpu box outline color
theme[cpu_box]="#75715E"
# Memory/disks box outline color
theme[mem_box]="#75715E"
# Net up/down box outline color
theme[net_box]="#75715E"
# Processes box outline color
theme[proc_box]="#75715E"
# Box divider line and small boxes line color
theme[div_line]="#595647"
# Temperature graph colors
theme[temp_start]="#F8F8F2"
theme[temp_mid]=""
theme[temp_end]="#F92672"
# CPU graph colors
theme[cpu_start]="#F8F8F2"
theme[cpu_mid]="#b05475"
theme[cpu_end]="#F92672"
# Mem/Disk free meter
theme[free_start]="#75715E"
theme[free_mid]="a9c474"
theme[free_end]="#e2f5bc"
# Mem/Disk cached meter
theme[cached_start]="#75715E"
theme[cached_mid]="#66D9EF"
theme[cached_end]="#aae7f2"
# Mem/Disk available meter
theme[available_start]="#75715E"
theme[available_mid]="#E6DB74"
theme[available_end]="#f2ecb6"
# Mem/Disk used meter
theme[used_start]="#75715E"
theme[used_mid]="#F92672"
theme[used_end]="#ff87b2"
# Download graph colors
theme[download_start]="#2d2042"
theme[download_mid]="#7352a8"
theme[download_end]="#ccaefc"
# Upload graph colors
theme[upload_start]="#570d33"
theme[upload_mid]="#cf277d"
theme[upload_end]="#fa91c7"

View File

@ -0,0 +1,89 @@
#Bashtop solarized theme
#by aristocratos
# Colors should be in 6 or 2 character hexadecimal or single spaced rgb decimal: "#RRGGBB", "#BW" or "0-255 0-255 0-255"
# example for white: "#FFFFFF", "#ff" or "255 255 255".
# All graphs and meters can be gradients
# For single color graphs leave "mid" and "end" variable empty.
# Use "start" and "end" variables for two color gradient
# Use "start", "mid" and "end" for three color gradient
# Main background, empty for terminal default, need to be empty if you want transparent background
theme[main_bg]="#002b36"
# Main text color
theme[main_fg]="#eee8d5"
# Title color for boxes
theme[title]="#fdf6e3"
# Higlight color for keyboard shortcuts
theme[hi_fg]="#b58900"
# Background color of selected items
theme[selected_bg]="#073642"
# Foreground color of selected items
theme[selected_fg]="#d6a200"
# Color of inactive/disabled text
theme[inactive_fg]="#073642"
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
theme[proc_misc]="#bad600"
# Cpu box outline color
theme[cpu_box]="#586e75"
# Memory/disks box outline color
theme[mem_box]="#586e75"
# Net up/down box outline color
theme[net_box]="#586e75"
# Processes box outline color
theme[proc_box]="#586e75"
# Box divider line and small boxes line color
theme[div_line]="#586e75"
# Temperature graph colors
theme[temp_start]="#268bd2"
theme[temp_mid]="#ccb5f7"
theme[temp_end]="#fc5378"
# CPU graph colors
theme[cpu_start]="#adc700"
theme[cpu_mid]="#d6a200"
theme[cpu_end]="#e65317"
# Mem/Disk free meter
theme[free_start]="#4e5900"
theme[free_mid]=""
theme[free_end]="#bad600"
# Mem/Disk cached meter
theme[cached_start]="#114061"
theme[cached_mid]=""
theme[cached_end]="#268bd2"
# Mem/Disk available meter
theme[available_start]="#705500"
theme[available_mid]=""
theme[available_end]="#edb400"
# Mem/Disk used meter
theme[used_start]="#6e1718"
theme[used_mid]=""
theme[used_end]="#e02f30"
# Download graph colors
theme[download_start]="#3d4070"
theme[download_mid]="#6c71c4"
theme[download_end]="#a3a8f7"
# Upload graph colors
theme[upload_start]="#701c45"
theme[upload_mid]="#d33682"
theme[upload_end]="#f56caf"

89
themes/whiteout.theme Normal file
View File

@ -0,0 +1,89 @@
#Bashtop "whiteout" theme
#by aristocratos
# Colors should be in 6 or 2 character hexadecimal or single spaced rgb decimal: "#RRGGBB", "#BW" or "0-255 0-255 0-255"
# example for white: "#FFFFFF", "#ff" or "255 255 255".
# All graphs and meters can be gradients
# For single color graphs leave "mid" and "end" variable empty.
# Use "start" and "end" variables for two color gradient
# Use "start", "mid" and "end" for three color gradient
# Main background, empty for terminal default, need to be empty if you want transparent background
theme[main_bg]="#ff"
# Main text color
theme[main_fg]="#30"
# Title color for boxes
theme[title]="#10"
# Higlight color for keyboard shortcuts
theme[hi_fg]="#284d75"
# Background color of selected item in processes box
theme[selected_bg]="#15283d"
# Foreground color of selected item in processes box
theme[selected_fg]="#ff"
# Color of inactive/disabled text
theme[inactive_fg]="#dd"
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
theme[proc_misc]="#03521d"
# Cpu box outline color
theme[cpu_box]="#1a361e"
# Memory/disks box outline color
theme[mem_box]="#3d3c14"
# Net up/down box outline color
theme[net_box]="#1a1742"
# Processes box outline color
theme[proc_box]="#3b1515"
# Box divider line and small boxes line color
theme[div_line]="#80"
# Temperature graph colors
theme[temp_start]="#184567"
theme[temp_mid]="#122c87"
theme[temp_end]="#9e0061"
# CPU graph colors
theme[cpu_start]="#0b8e44"
theme[cpu_mid]="#a49104"
theme[cpu_end]="#8d0202"
# Mem/Disk free meter
theme[free_start]="#b0d090"
theme[free_mid]="#70ba26"
theme[free_end]="#496600"
# Mem/Disk cached meter
theme[cached_start]="#26c5ff"
theme[cached_mid]="#74e6fc"
theme[cached_end]="#0b1a29"
# Mem/Disk available meter
theme[available_start]="#ffb814"
theme[available_mid]="#ffd77a"
theme[available_end]="#292107"
# Mem/Disk used meter
theme[used_start]="#ff4769"
theme[used_mid]="#d9626d"
theme[used_end]="#3b1f1c"
# Download graph colors
theme[download_start]="#8d82de"
theme[download_mid]="#413786"
theme[download_end]="#130f29"
# Upload graph colors
theme[upload_start]="#f590f9"
theme[upload_mid]="#722e76"
theme[upload_end]="#2b062d"