Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
X3n0m0rph59 committed Dec 13, 2023
1 parent 6e8e82c commit 693e704
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions magma/src/tui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,8 @@ pub(crate) fn handle_events() -> io::Result<bool> {

// adjust brightness
if key.code == KeyCode::F(8) {
let mut brightness = crate::STATE
.read()
.unwrap()
.current_brightness
.unwrap_or(0);
let mut brightness =
crate::STATE.read().unwrap().current_brightness.unwrap_or(0);

if key.modifiers == KeyModifiers::SHIFT {
brightness -= 1;
Expand All @@ -143,11 +140,8 @@ pub(crate) fn handle_events() -> io::Result<bool> {
});
}
if key.code == KeyCode::F(9) {
let mut brightness = crate::STATE
.read()
.unwrap()
.current_brightness
.unwrap_or(0);
let mut brightness =
crate::STATE.read().unwrap().current_brightness.unwrap_or(0);

if key.modifiers == KeyModifiers::SHIFT {
brightness += 1;
Expand Down

0 comments on commit 693e704

Please sign in to comment.