Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Verevkin committed Feb 25, 2021
2 parents 5c3ff2d + d39cd39 commit 886e7f0
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 85 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Most blocks assume you are running Linux, and some have their own system require
Optional:

* Font Awesome 4.x is required when using the icons config `name = "awesome"`. For version 5, use `name = "awesome5"`. On Arch Linux version 4 is available in the [`AUR`](https://aur.archlinux.org/packages/ttf-font-awesome-4/), and version 5 is available [`here`](https://www.archlinux.org/packages/community/any/ttf-font-awesome/).
* For icons config `name = material`, a patched version of Google's MaterialIcons-Regular.ttf is required which includes \u{0020} (space), sets a descent ands lower all glyphs to properly align. It can be found [here](https://gist.github.com/draoncc/3c20d8d4262892ccd2e227eefeafa8ef/raw/3e6e12c213fba1ec28aaa26430c3606874754c30/MaterialIcons-Regular-for-inline.ttf).
* Powerline Fonts are required for all themes using the powerline arrow char.
* `gperftools` is required for building with the `"profiling"` feature flag (disabled by default).

Expand Down
2 changes: 2 additions & 0 deletions src/blocks/weather.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ impl Weather {
OPENWEATHERMAP_PLACE_ENV.to_string()));
};

// This uses the "Current Weather Data" API endpoint
// Refer to https://openweathermap.org/current
let openweather_url = &format!(
"https://api.openweathermap.org/data/2.5/weather?{location_query}&appid={api_key}&units={units}",
location_query = location_query,
Expand Down
170 changes: 85 additions & 85 deletions src/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,84 +77,84 @@ lazy_static! {
"xrandr" => "SCREEN"
};

// FontAwesome 4
// FontAwesome 4: https://fontawesome.com/v4.7.0/cheatsheet/
pub static ref AWESOME: Map<String, String> = map_to_owned! {
"" => "",
"backlight_empty" => "\u{1f315}",
"backlight_full" => "\u{1f311}",
"backlight_partial1" => "\u{1f314}",
"backlight_partial2" => "\u{1f313}",
"backlight_partial3" => "\u{1f312}",
"bat_charging" => "\u{f1e6}",
"bat_discharging" => "\u{f242}",
"bat_empty" => "\u{f244}",
"bat_full" => "\u{f240}",
"bat_half" => "\u{f242}",
"bat_not_available" => "\u{f244}",
"bat_quarter" => "\u{f243}",
"bat_three_quarters" => "\u{f241}",
"bell" => "\u{f0f3}",
"bell-slash" => "\u{f1f7}",
"bluetooth" => "\u{f294}",
"calendar" => "\u{f073}",
"cogs" => "\u{f085}",
"cpu" => "\u{f0e4}",
"disk_drive" => "\u{f0a0}",
"docker" => "\u{f21a}",
"github" => "\u{f09b}",
"gpu" => "\u{f26c}",
"headphones" => "\u{f025}",
"joystick" => "\u{f11b}",
"keyboard" => "\u{f11c}",
"mail" => "\u{f0e0}",
"memory_mem" => "\u{f2db}",
"memory_swap" => "\u{f0a0}",
"mouse" => "\u{f245}",
"music" => "\u{f001}",
"music_next" => "\u{f061}",
"music_pause" => "\u{f04c}",
"music_play" => "\u{f04b}",
"music_prev" => "\u{f060}",
"net_bridge" => "\u{f0e8}",
"bat_charging" => "\u{f1e6}", // fa-plug
"bat_discharging" => "\u{f242}", // fa-battery-half
"bat_empty" => "\u{f244}", // fa-battery-empty
"bat_full" => "\u{f240}", // fa-battery-full
"bat_half" => "\u{f242}", // fa-battery-half
"bat_not_available" => "\u{f244}", // fa-battery-empty
"bat_quarter" => "\u{f243}", // fa-battery-quarter
"bat_three_quarters" => "\u{f241}", // fa-battery-three-quarters
"bell" => "\u{f0f3}", // fa-bell
"bell-slash" => "\u{f1f7}", // fa-bell-slash-o
"bluetooth" => "\u{f294}", // fa-bluetooth-b
"calendar" => "\u{f073}", // fa-calendar
"cogs" => "\u{f085}", // fa-cogs
"cpu" => "\u{f0e4}", // fa-dashboard
"disk_drive" => "\u{f0a0}", // fa-hdd-o
"docker" => "\u{f21a}", // fa-ship
"github" => "\u{f09b}", // fa-github
"gpu" => "\u{f26c}", // fa-television
"headphones" => "\u{f025}", // fa-headphones
"joystick" => "\u{f11b}", // fa-gamepad
"keyboard" => "\u{f11c}", // fa-keyboard-o
"mail" => "\u{f0e0}", // fa-envelope
"memory_mem" => "\u{f2db}", // fa-microchip
"memory_swap" => "\u{f0a0}", // fa-hdd-o
"mouse" => "\u{f245}", // fa-mouse-pointer
"music" => "\u{f001}", // fa-music
"music_next" => "\u{f061}", // fa-arrow-right
"music_pause" => "\u{f04c}", // fa-pause
"music_play" => "\u{f04b}", // fa-play
"music_prev" => "\u{f060}", // fa-arrow-left
"net_bridge" => "\u{f0e8}", // fa-sitemap
"net_down" => "\u{2b07}",
"net_loopback" => "LO",
"net_modem" => "\u{f095}",
"net_modem" => "\u{f095}", // fa-phone
"net_up" => "\u{2b06}",
"net_vpn" => "\u{f023}",
"net_wired" => "\u{f0ac}",
"net_wireless" => "\u{f1eb}",
"notification" => "\u{f0a2}",
"phone" => "\u{f10b}",
"net_vpn" => "\u{f023}", // fa-lock
"net_wired" => "\u{f0ac}", // fa-globe
"net_wireless" => "\u{f1eb}", // fa-wifi
"notification" => "\u{f0a2}", // fa-bell-o
"phone" => "\u{f10b}", // fa-mobile
"phone_disconnected" => "\u{1f4f5}",
"ping" => "\u{21ba}",
"pomodoro" => "\u{1f345}",
"resolution" => "\u{f096}", // fa-square-o
"tasks" => "\u{f0ae}",
"thermometer" => "\u{f2c8}",
"time" => "\u{f017}",
"toggle_off" => "\u{f204}",
"toggle_on" => "\u{f205}",
"unknown" => "\u{f128}",
"update" => "\u{f062}", // Same as time symbol.
"uptime" => "\u{f017}",
"volume_empty" => "\u{f026}",
"volume_full" => "\u{f028}",
"volume_half" => "\u{f027}",
"tasks" => "\u{f0ae}", // fa-tasks
"thermometer" => "\u{f2c8}", // fa-thermometer-3
"time" => "\u{f017}", // fa-clock-o
"toggle_off" => "\u{f204}", // fa-toggle-off
"toggle_on" => "\u{f205}", // fa-toggle-on
"unknown" => "\u{f128}", // fa-question
"update" => "\u{f062}", // fa-arrow-up
"uptime" => "\u{f017}", // fa-clock-o
"volume_empty" => "\u{f026}", // fa-volume-off
"volume_full" => "\u{f028}", // fa-volume-up
"volume_half" => "\u{f027}", // fa-volume-down
"volume_muted" => "\u{f026} \u{f00d}",
"microphone_empty" => "\u{f130}",
"microphone_full" => "\u{f130}",
"microphone_half" => "\u{f130}",
"microphone_muted" => "\u{f131}",
"weather_clouds" => "\u{f0c2}",
"weather_default" => "\u{f0c2}", // Cloud symbol as default
"weather_rain" => "\u{f043}",
"weather_snow" => "\u{f2dc}",
"weather_sun" => "\u{f185}",
"weather_thunder" => "\u{f0e7}",
"xrandr" => "\u{f26c}"
"microphone_empty" => "\u{f130}", // fa-microphone
"microphone_full" => "\u{f130}", // fa-microphone
"microphone_half" => "\u{f130}", // fa-microphone
"microphone_muted" => "\u{f131}", // fa-microphone-slash
"weather_clouds" => "\u{f0c2}", // fa-cloud
"weather_default" => "\u{f0c2}", // fa-cloud
"weather_rain" => "\u{f043}", // fa-tint
"weather_snow" => "\u{f2dc}", // fa-snowflake-o
"weather_sun" => "\u{f185}", // fa-sun-o
"weather_thunder" => "\u{f0e7}", // fa-bolt
"xrandr" => "\u{f26c}" // fa-television
};

// FontAwesome 5
// FontAwesome 5: https://fontawesome.com/icons?d=gallery&p=2&m=free
pub static ref AWESOME5: Map<String, String> = map_to_owned! {
"" => "",
"backlight_empty" => "\u{1f315}",
Expand Down Expand Up @@ -232,38 +232,38 @@ lazy_static! {

pub static ref MATERIAL: Map<String, String> = map_to_owned! {
"" => "",
"bat_charging" => "\u{e1a3} ",
"bat_discharging" => "\u{e19c} ",
"bat_empty" => "\u{e19c} ",
"bat_full" => "\u{e1a4} ",
"bat_half" => "\u{e1a5} ",
"bat_quarter" => "\u{e1a5} ",
"bat_three_quarters" => "\u{e1a5} ",
"bell" => "\u{e7f4} ",
"bell-slash" => "\u{e7f8} ",
"bat_charging" => "\u{e1a3}",
"bat_discharging" => "\u{e19c}",
"bat_empty" => "\u{e19c}",
"bat_full" => "\u{e1a4}",
"bat_half" => "\u{e1a5}",
"bat_quarter" => "\u{e1a5}",
"bat_three_quarters" => "\u{e1a5}",
"bell" => "\u{e7f4}",
"bell-slash" => "\u{e7f8}",
"bluetooth" => "\u{e1a7}",
"calendar" => "\u{e935}",
"cogs" => "\u{e8b8} ",
"cpu" => "\u{e640} ",
"disk_drive" => "\u{e1db} ",
"docker" => "\u{e532} ",
"github" => "\u{e86f} ",
"gpu" => "\u{e333} ",
"cogs" => "\u{e8b8}",
"cpu" => "\u{e640}",
"disk_drive" => "\u{e1db}",
"docker" => "\u{e532}",
"github" => "\u{e86f}",
"gpu" => "\u{e333}",
"headphones" => "\u{e60f}",
"joystick" => "\u{e30f}",
"keyboard" => "\u{e312}",
"mail" => "\u{e0be} ",
"memory_mem" => "\u{e322} ",
"memory_swap" => "\u{e8d4} ",
"mail" => "\u{e0be}",
"memory_mem" => "\u{e322}",
"memory_swap" => "\u{e8d4}",
"mouse" => "\u{e323}",
"music" => "\u{e405} ",
"music_next" => "\u{e044} ",
"music_pause" => "\u{e034} ",
"music_play" => "\u{e037} ",
"music_prev" => "\u{e045} ",
"music" => "\u{e405}",
"music_next" => "\u{e044}",
"music_pause" => "\u{e034}",
"music_play" => "\u{e037}",
"music_prev" => "\u{e045}",
"net_loopback" => "LO",
"notification" => "\u{e7f7}",
"phone" => "\u{e324} ",
"phone" => "\u{e324}",
"phone_disconnected" => "\u{1f4f5}",
"pomodoro" => "\u{1f345}",
"resolution" => "\u{f152}", // crop-square-rounded
Expand Down

0 comments on commit 886e7f0

Please sign in to comment.