mirror of
https://codeberg.org/fairyglade/ly.git
synced 2026-08-24 06:24:20 +02:00
Fix config.brightnessctl missing + bugs
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
parent
872b15c0d4
commit
1314c57796
4 changed files with 13 additions and 11 deletions
|
|
@ -594,7 +594,7 @@ pub fn main() !void {
|
|||
var sleep = std.process.Child.init(&[_][]const u8{ "/bin/sh", "-c", sleep_cmd }, allocator);
|
||||
_ = sleep.spawnAndWait() catch .{};
|
||||
}
|
||||
} else if (pressed_key == brightness_down_key and unistd.access(&config.brightnessctl[0], unistd.X_OK) == 0) brightness_change: {
|
||||
} else if (pressed_key == brightness_down_key and unistd.access(config.brightnessctl, unistd.X_OK) == 0) brightness_change: {
|
||||
const brightness_str = std.fmt.allocPrint(allocator, "{s}%-", .{config.brightness_change}) catch {
|
||||
try info_line.addMessage(lang.err_brightness_change, config.error_bg, config.error_fg);
|
||||
break :brightness_change;
|
||||
|
|
@ -602,7 +602,7 @@ pub fn main() !void {
|
|||
defer allocator.free(brightness_str);
|
||||
var brightness = std.process.Child.init(&[_][]const u8{ config.brightnessctl, "-q", "s", brightness_str }, allocator);
|
||||
_ = brightness.spawnAndWait() catch .{};
|
||||
} else if (pressed_key == brightness_up_key and unistd.access(&config.brightnessctl[0], unistd.X_OK) == 0) brightness_change: {
|
||||
} else if (pressed_key == brightness_up_key and unistd.access(config.brightnessctl, unistd.X_OK) == 0) brightness_change: {
|
||||
const brightness_str = std.fmt.allocPrint(allocator, "+{s}%", .{config.brightness_change}) catch {
|
||||
try info_line.addMessage(lang.err_brightness_change, config.error_bg, config.error_fg);
|
||||
break :brightness_change;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue