Compare commits

..

No commits in common. "99080dbe84d17b4c2a32ce80c84d8eca75f4f9a1" and "0eb1cdef9f2529fe1c71dd9f3ab2faf973a99a16" have entirely different histories.

3 changed files with 59 additions and 69 deletions

View file

@ -25,36 +25,32 @@
}') }')
(defvar battery-icon '{ (defvar battery-icon '{
"Discharging": [ "Discharging": {
"󰁹", "0": "󰂎",
"󰂂", "10": "󰁺",
"󰂁", "20": "󰁻",
"󰂀", "30": "󰁼",
"󰁿", "40": "󰁽",
"󰁾", "50": "󰁾",
"󰁽", "60": "󰁿",
"󰁼", "70": "󰂀",
"󰁻", "80": "󰂁",
"󰁺", "90": "󰂂",
"󰂎" "100": "󰁹"
], },
"Charging": [ "Charging": {
"󰂅", "0": "󰢟",
"󰂋", "10": "󰢜",
"󰂊", "20": "󰂆",
"󰢞", "30": "󰂇",
"󰂉", "40": "󰂈",
"󰢝", "50": "󰢝",
"󰂈", "60": "󰂉",
"󰂇", "70": "󰢞",
"󰂆", "80": "󰂊",
"󰢜", "90": "󰂋",
"󰢟" "100": "󰂅"
], }
"Full": [
"󱟢",
"󱟢"
]
}') }')
(defwidget workspaces [] (defwidget workspaces []
@ -112,26 +108,26 @@
(defwidget battery [] (defwidget battery []
(label (label
:text "${EWW_BATTERY.BAT0.capacity == 100 :text "${EWW_BATTERY.BAT0.capacity == 100
? "${battery-icon[EWW_BATTERY.BAT0.status][0]}" ? "${battery-icon[EWW_BATTERY.BAT0.status]["100"]}"
: EWW_BATTERY.BAT0.capacity >= 90 : EWW_BATTERY.BAT0.capacity >= 90
? "${battery-icon[EWW_BATTERY.BAT0.status][1]}" ? "${battery-icon[EWW_BATTERY.BAT0.status]["90"]}"
: EWW_BATTERY.BAT0.capacity >= 80 : EWW_BATTERY.BAT0.capacity >= 80
? "${battery-icon[EWW_BATTERY.BAT0.status][2]}" ? "${battery-icon[EWW_BATTERY.BAT0.status]["80"]}"
: EWW_BATTERY.BAT0.capacity >= 70 : EWW_BATTERY.BAT0.capacity >= 70
? "${battery-icon[EWW_BATTERY.BAT0.status][3]}" ? "${battery-icon[EWW_BATTERY.BAT0.status]["70"]}"
: EWW_BATTERY.BAT0.capacity >= 60 : EWW_BATTERY.BAT0.capacity >= 60
? "${battery-icon[EWW_BATTERY.BAT0.status][4]}" ? "${battery-icon[EWW_BATTERY.BAT0.status]["60"]}"
: EWW_BATTERY.BAT0.capacity >= 50 : EWW_BATTERY.BAT0.capacity >= 50
? "${battery-icon[EWW_BATTERY.BAT0.status][5]}" ? "${battery-icon[EWW_BATTERY.BAT0.status]["50"]}"
: EWW_BATTERY.BAT0.capacity >= 40 : EWW_BATTERY.BAT0.capacity >= 40
? "${battery-icon[EWW_BATTERY.BAT0.status][6]}" ? "${battery-icon[EWW_BATTERY.BAT0.status]["40"]}"
: EWW_BATTERY.BAT0.capacity >= 30 : EWW_BATTERY.BAT0.capacity >= 30
? "${battery-icon[EWW_BATTERY.BAT0.status][7]}" ? "${battery-icon[EWW_BATTERY.BAT0.status]["30"]}"
: EWW_BATTERY.BAT0.capacity >= 20 : EWW_BATTERY.BAT0.capacity >= 20
? "${battery-icon[EWW_BATTERY.BAT0.status][8]}" ? "${battery-icon[EWW_BATTERY.BAT0.status]["20"]}"
: EWW_BATTERY.BAT0.capacity >= 10 : EWW_BATTERY.BAT0.capacity >= 10
? "${battery-icon[EWW_BATTERY.BAT0.status][9]}" ? "${battery-icon[EWW_BATTERY.BAT0.status]["10"]}"
: "${battery-icon[EWW_BATTERY.BAT0.status][10]}"} ${EWW_BATTERY.BAT0.capacity}%" : "${battery-icon[EWW_BATTERY.BAT0.status]["0"]}"} ${EWW_BATTERY.BAT0.capacity}%"
) )
) )

View file

@ -25,6 +25,26 @@
outputs."eDP-1".scale = 1; outputs."eDP-1".scale = 1;
layout.border.active.color = "#35f835e5"; layout.border.active.color = "#35f835e5";
binds = with config.lib.niri.actions; { 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+TouchpadScrollDown".action = spawn "brightnessctl" "set" "10-";
"Alt+TouchpadScrollUp".action = spawn "brightnessctl" "set" "+10"; "Alt+TouchpadScrollUp".action = spawn "brightnessctl" "set" "+10";
"XF86Display".action = power-off-monitors; "XF86Display".action = power-off-monitors;

View file

@ -15,6 +15,7 @@
pavucontrol pavucontrol
thunderbird thunderbird
wl-clipboard wl-clipboard
swayosd
prismlauncher prismlauncher
noto-fonts noto-fonts
libreoffice libreoffice
@ -344,7 +345,7 @@
screenshot-path = "~/screenshots/%Y%m%d%H%m%N.png"; screenshot-path = "~/screenshots/%Y%m%d%H%m%N.png";
binds = with config.lib.niri.actions; { binds = with config.lib.niri.actions; {
"Mod+Space".action = spawn "alacritty"; "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+F1".action = spawn "anyrun";
"Mod+L".action = spawn "swaylock"; "Mod+L".action = spawn "swaylock";
"Mod+Shift+Q".action = close-window; "Mod+Shift+Q".action = close-window;
@ -374,34 +375,7 @@
"Mod+Shift+Backspace" = { "Mod+Shift+Backspace" = {
action = quit { skip-confirmation = true; }; 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;
} }