Compare commits

..

7 commits

Author SHA1 Message Date
99080dbe84 Merge branch 'tmp' 2024-11-05 10:52:21 +01:00
027c77350d feat(niri): fix spawn shortcut 2024-11-05 10:52:08 +01:00
ad9777d394 fix(niri): shortcuts with swayosd 2024-11-05 10:51:50 +01:00
1bc558e263 fix(eww): idk 2024-11-05 10:51:40 +01:00
912e80ed1d feat(niri): programs at startup 2024-11-05 10:34:31 +01:00
9d352d94d2 fix(home): swayosd as a service 2024-11-05 10:34:04 +01:00
aa25a36e0d fix(eww): battery 2024-11-05 10:32:11 +01:00
3 changed files with 69 additions and 59 deletions

View file

@ -25,32 +25,36 @@
}') }')
(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 []
@ -108,26 +112,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]["100"]}" ? "${battery-icon[EWW_BATTERY.BAT0.status][0]}"
: EWW_BATTERY.BAT0.capacity >= 90 : EWW_BATTERY.BAT0.capacity >= 90
? "${battery-icon[EWW_BATTERY.BAT0.status]["90"]}" ? "${battery-icon[EWW_BATTERY.BAT0.status][1]}"
: EWW_BATTERY.BAT0.capacity >= 80 : EWW_BATTERY.BAT0.capacity >= 80
? "${battery-icon[EWW_BATTERY.BAT0.status]["80"]}" ? "${battery-icon[EWW_BATTERY.BAT0.status][2]}"
: EWW_BATTERY.BAT0.capacity >= 70 : EWW_BATTERY.BAT0.capacity >= 70
? "${battery-icon[EWW_BATTERY.BAT0.status]["70"]}" ? "${battery-icon[EWW_BATTERY.BAT0.status][3]}"
: EWW_BATTERY.BAT0.capacity >= 60 : EWW_BATTERY.BAT0.capacity >= 60
? "${battery-icon[EWW_BATTERY.BAT0.status]["60"]}" ? "${battery-icon[EWW_BATTERY.BAT0.status][4]}"
: EWW_BATTERY.BAT0.capacity >= 50 : EWW_BATTERY.BAT0.capacity >= 50
? "${battery-icon[EWW_BATTERY.BAT0.status]["50"]}" ? "${battery-icon[EWW_BATTERY.BAT0.status][5]}"
: EWW_BATTERY.BAT0.capacity >= 40 : EWW_BATTERY.BAT0.capacity >= 40
? "${battery-icon[EWW_BATTERY.BAT0.status]["40"]}" ? "${battery-icon[EWW_BATTERY.BAT0.status][6]}"
: EWW_BATTERY.BAT0.capacity >= 30 : EWW_BATTERY.BAT0.capacity >= 30
? "${battery-icon[EWW_BATTERY.BAT0.status]["30"]}" ? "${battery-icon[EWW_BATTERY.BAT0.status][7]}"
: EWW_BATTERY.BAT0.capacity >= 20 : EWW_BATTERY.BAT0.capacity >= 20
? "${battery-icon[EWW_BATTERY.BAT0.status]["20"]}" ? "${battery-icon[EWW_BATTERY.BAT0.status][8]}"
: EWW_BATTERY.BAT0.capacity >= 10 : EWW_BATTERY.BAT0.capacity >= 10
? "${battery-icon[EWW_BATTERY.BAT0.status]["10"]}" ? "${battery-icon[EWW_BATTERY.BAT0.status][9]}"
: "${battery-icon[EWW_BATTERY.BAT0.status]["0"]}"} ${EWW_BATTERY.BAT0.capacity}%" : "${battery-icon[EWW_BATTERY.BAT0.status][10]}"} ${EWW_BATTERY.BAT0.capacity}%"
) )
) )

View file

@ -25,26 +25,6 @@
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,7 +15,6 @@
pavucontrol pavucontrol
thunderbird thunderbird
wl-clipboard wl-clipboard
swayosd
prismlauncher prismlauncher
noto-fonts noto-fonts
libreoffice libreoffice
@ -345,7 +344,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;
@ -375,7 +374,34 @@
"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;
} }