Skip to content

Commit 85ca62c

Browse files
vatsalkeshavbim9262
authored andcommitted
added icon functionality for hueshift
1 parent 1c14373 commit 85ca62c

File tree

8 files changed

+13
-3
lines changed

8 files changed

+13
-3
lines changed

files/icons/awesome4.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ docker = "\uf21a" # fa-ship
2828
github = "\uf09b" # fa-github
2929
gpu = "\uf26c" # fa-television
3030
headphones = "\uf025" # fa-headphones
31+
hueshift = "\uf0eb" # fa-lightbulb-o
3132
joystick = "\uf11b" # fa-gamepad
3233
keyboard = "\uf11c" # fa-keyboard-o
3334
mail = "\uf0e0" # fa-envelope

files/icons/awesome5.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ docker = "\uf21a"
2828
github = "\uf09b"
2929
gpu = "\uf26c"
3030
headphones = "\uf025"
31+
hueshift = "\uf0eb" # fa-lightbulb-o
3132
joystick = "\uf11b"
3233
keyboard = "\uf11c"
3334
mail = "\uf0e0"

files/icons/awesome6.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ docker = "\uf21a"
3232
github = "\uf09b"
3333
gpu = "\uf26c"
3434
headphones = "\uf025"
35+
hueshift = "\uf0eb" # fa-lightbulb-o
3536
joystick = "\uf11b"
3637
keyboard = "\uf11c"
3738
mail = "\uf0e0"
@@ -93,4 +94,4 @@ weather_sun = "\uf185" # fa-sun
9394
weather_thunder = "\uf0e7" # fa-bolt
9495
weather_thunder_night = "\uf0e7" # fa-bolt
9596
webcam = "\uf03d" # fa-video
96-
xrandr = "\uf26c"
97+
xrandr = "\uf26c"

files/icons/emoji.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ docker = "🚢"
2424
github = "🐙🐱"
2525
gpu = "🖥️"
2626
headphones = "🎧"
27+
hueshift = "💡"
2728
joystick = "🎮"
2829
keyboard = "⌨️"
2930
mail = "📨"

files/icons/material-nf.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ docker = "\uf308" # nf-linux-docker
4848
github = "\U000f02a4" # nf-md-github
4949
gpu = "\U000f0379" # nf-md-monitor
5050
headphones = "\U000f02cb" # nf-md-headphones
51+
hueshift = "\U000f0336" # nf-md-lightbulb_outline
5152
joystick = "\U000f0297" # nf-md-gamepad_variant
5253
keyboard = "\U000f030c" # nf-md-keyboard
5354
mail = "\U000f01ee" # nf-md-email

files/icons/material.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ docker = "\ue532" # directions_boat
3838
github = "\ue86f" # code
3939
gpu = "\ue333" # tv
4040
headphones = "\ue60f" # bluetooth_audio
41+
hueshift = "\ue0f0" # lightbulb
4142
joystick = "\ue30f" # gamepad
4243
keyboard = "\ue312" # keyboard
4344
mail = "\ue0be" # email

src/blocks/hueshift.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ pub async fn run(config: &Config, api: &CommonApi) -> Result<()> {
9090
(MouseButton::WheelDown, None, "temperature_down"),
9191
])?;
9292

93-
let format = config.format.with_default(" $temperature ")?;
93+
let format = config.format.with_default(" $icon $temperature ")?;
9494

9595
// limit too big steps at 500K to avoid too brutal changes
9696
let step = config.step.min(500);
@@ -131,7 +131,10 @@ pub async fn run(config: &Config, api: &CommonApi) -> Result<()> {
131131

132132
loop {
133133
let mut widget = Widget::new().with_format(format.clone());
134-
widget.set_values(map!("temperature" => Value::number(current_temp)));
134+
widget.set_values(map! {
135+
"icon" => Value::icon("hueshift"),
136+
"temperature" => Value::number(current_temp)
137+
});
135138
api.set_widget(widget)?;
136139

137140
select! {

src/icons.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ impl Default for Icons {
4747
"github" => "GITHUB",
4848
"gpu" => "GPU",
4949
"headphones" => "HEAD",
50+
"hueshift" => "HUE",
5051
"joystick" => "JOY",
5152
"keyboard" => "KBD",
5253
"mail" => "MAIL",

0 commit comments

Comments
 (0)