Compare commits
7 commits
0eb1cdef9f
...
99080dbe84
Author | SHA1 | Date | |
---|---|---|---|
99080dbe84 | |||
027c77350d | |||
ad9777d394 | |||
1bc558e263 | |||
912e80ed1d | |||
9d352d94d2 | |||
aa25a36e0d |
3 changed files with 69 additions and 59 deletions
|
@ -25,32 +25,36 @@
|
|||
}')
|
||||
|
||||
(defvar battery-icon '{
|
||||
"Discharging": {
|
||||
"0": "",
|
||||
"10": "",
|
||||
"20": "",
|
||||
"30": "",
|
||||
"40": "",
|
||||
"50": "",
|
||||
"60": "",
|
||||
"70": "",
|
||||
"80": "",
|
||||
"90": "",
|
||||
"100": ""
|
||||
},
|
||||
"Charging": {
|
||||
"0": "",
|
||||
"10": "",
|
||||
"20": "",
|
||||
"30": "",
|
||||
"40": "",
|
||||
"50": "",
|
||||
"60": "",
|
||||
"70": "",
|
||||
"80": "",
|
||||
"90": "",
|
||||
"100": ""
|
||||
}
|
||||
"Discharging": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"Charging": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"Full": [
|
||||
"",
|
||||
""
|
||||
]
|
||||
}')
|
||||
|
||||
(defwidget workspaces []
|
||||
|
@ -108,26 +112,26 @@
|
|||
(defwidget battery []
|
||||
(label
|
||||
:text "${EWW_BATTERY.BAT0.capacity == 100
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["100"]}"
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status][0]}"
|
||||
: EWW_BATTERY.BAT0.capacity >= 90
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["90"]}"
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status][1]}"
|
||||
: EWW_BATTERY.BAT0.capacity >= 80
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["80"]}"
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status][2]}"
|
||||
: EWW_BATTERY.BAT0.capacity >= 70
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["70"]}"
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status][3]}"
|
||||
: EWW_BATTERY.BAT0.capacity >= 60
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["60"]}"
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status][4]}"
|
||||
: EWW_BATTERY.BAT0.capacity >= 50
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["50"]}"
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status][5]}"
|
||||
: EWW_BATTERY.BAT0.capacity >= 40
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["40"]}"
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status][6]}"
|
||||
: EWW_BATTERY.BAT0.capacity >= 30
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["30"]}"
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status][7]}"
|
||||
: EWW_BATTERY.BAT0.capacity >= 20
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["20"]}"
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status][8]}"
|
||||
: EWW_BATTERY.BAT0.capacity >= 10
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["10"]}"
|
||||
: "${battery-icon[EWW_BATTERY.BAT0.status]["0"]}"} ${EWW_BATTERY.BAT0.capacity}%"
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status][9]}"
|
||||
: "${battery-icon[EWW_BATTERY.BAT0.status][10]}"} ${EWW_BATTERY.BAT0.capacity}%"
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -25,26 +25,6 @@
|
|||
outputs."eDP-1".scale = 1;
|
||||
layout.border.active.color = "#35f835e5";
|
||||
binds = with config.lib.niri.actions; {
|
||||
"XF86AudioRaiseVolume" = {
|
||||
allow-when-locked = true;
|
||||
action = spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+";
|
||||
};
|
||||
"XF86AudioLowerVolume" = {
|
||||
allow-when-locked = true;
|
||||
action = spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-";
|
||||
};
|
||||
"XF86AudioMute" = {
|
||||
allow-when-locked = true;
|
||||
action = spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle";
|
||||
};
|
||||
"XF86MonBrightnessDown" = {
|
||||
allow-when-locked = true;
|
||||
action = spawn "brightnessctl" "set" "10-";
|
||||
};
|
||||
"XF86MonBrightnessUp" = {
|
||||
allow-when-locked = true;
|
||||
action = spawn "brightnessctl" "set" "+10";
|
||||
};
|
||||
"Alt+TouchpadScrollDown".action = spawn "brightnessctl" "set" "10-";
|
||||
"Alt+TouchpadScrollUp".action = spawn "brightnessctl" "set" "+10";
|
||||
"XF86Display".action = power-off-monitors;
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
pavucontrol
|
||||
thunderbird
|
||||
wl-clipboard
|
||||
swayosd
|
||||
prismlauncher
|
||||
noto-fonts
|
||||
libreoffice
|
||||
|
@ -345,7 +344,7 @@
|
|||
screenshot-path = "~/screenshots/%Y%m%d%H%m%N.png";
|
||||
binds = with config.lib.niri.actions; {
|
||||
"Mod+Space".action = spawn "alacritty";
|
||||
"Mod+Shift+Space".action = spawn "alacritty -e sudo -i";
|
||||
"Mod+Shift+Space".action = spawn "alacritty" "-e" "sudo" "-i";
|
||||
"Mod+F1".action = spawn "anyrun";
|
||||
"Mod+L".action = spawn "swaylock";
|
||||
"Mod+Shift+Q".action = close-window;
|
||||
|
@ -375,7 +374,34 @@
|
|||
"Mod+Shift+Backspace" = {
|
||||
action = quit { skip-confirmation = true; };
|
||||
};
|
||||
"XF86MonBrightnessDown" = {
|
||||
allow-when-locked = true;
|
||||
action = spawn "swayosd-client" "--brightness=lower";
|
||||
};
|
||||
"XF86MonBrightnessUp" = {
|
||||
allow-when-locked = true;
|
||||
action = spawn "swayosd-client" "--brightness=raise";
|
||||
};
|
||||
"XF86AudioRaiseVolume" = {
|
||||
allow-when-locked = true;
|
||||
action = spawn "swayosd-client" "--output-volume=raise";
|
||||
};
|
||||
"XF86AudioLowerVolume" = {
|
||||
allow-when-locked = true;
|
||||
action = spawn "swayosd-client" "--output-volume=lower";
|
||||
};
|
||||
"XF86AudioMute" = {
|
||||
allow-when-locked = true;
|
||||
action = spawn "swayosd-client" "--output-volume=mute-toggle";
|
||||
};
|
||||
};
|
||||
spawn-at-startup = [
|
||||
{ command = [ "eww" "daemon" ]; }
|
||||
{ command = [ "eww" "open" "dock" ]; }
|
||||
{ command = [ "swayosd-server" ]; }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.swayosd.enable = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue