feat: add idle inhibitor

This commit is contained in:
DACHXY 2025-01-19 14:35:36 +08:00
parent eb37fde888
commit 2fd7367176
6 changed files with 15 additions and 15 deletions

View file

@ -26,6 +26,7 @@
"modules-right": [ "modules-right": [
"wlr/taskbar", "wlr/taskbar",
"idle_inhibitor",
"network", "network",
"cpu", "cpu",
"memory", "memory",
@ -89,6 +90,7 @@
"modules-right": [ "modules-right": [
"wlr/taskbar", "wlr/taskbar",
"temperature", "temperature",
"idle_inhibitor",
"network", "network",
"pulseaudio", "pulseaudio",
"battery", "battery",

View file

@ -189,5 +189,13 @@
"max-length": 50, "max-length": 50,
"interval": 5, "interval": 5,
"on-click": "~/.config/scripts/rofiWifi.sh" "on-click": "~/.config/scripts/rofiWifi.sh"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "󰅶",
"deactivated": "󰾫"
}
} }
} }

View file

@ -40,6 +40,7 @@ tooltip label {
color: @main; color: @main;
} }
#idle_inhibitor,
#custom-cava, #custom-cava,
#clock, #clock,
#cpu, #cpu,
@ -70,6 +71,7 @@ tooltip label {
margin-right: 4px; margin-right: 4px;
} }
#idle_inhibitor,
#custom-swaync, #custom-swaync,
#pulseaudio, #pulseaudio,
#cpu, #cpu,

View file

@ -30,22 +30,9 @@ let
tmux switch-client -t $selected_name tmux switch-client -t $selected_name
''; '';
# ffmpeg
toMov = pkgs.writeShellScriptBin "toMov" ''
if [ -z "$1" ]; then
echo "Please provide an input file."
exit 1
fi
input_file="$1"
output_file="''\${input_file%.*}.mov"
ffmpeg -i "$input_file" -c:v dnxhd -profile:v dnxhr_hq -c:a pcm_s16le -pix_fmt yuv422p "$output_file"
echo "Conversion complete: $output_file"
'';
in in
{ {
home.packages = [ home.packages = [
tmuxSessionizer tmuxSessionizer
toMov
]; ];
} }

View file

@ -8,7 +8,7 @@
enable = true; enable = true;
withUWSM = false; withUWSM = false;
package = inputs.hyprland.packages."${pkgs.system}".hyprland; package = inputs.hyprland.packages."${pkgs.system}".hyprland;
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland; # portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
}; };
xdg.portal = { xdg.portal = {

View file

@ -1,7 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
security.rtkit.enable = true; security.rtkit.enable = true; # Pipewire real-time access
services.pulseaudio.enable = false; services.pulseaudio.enable = false;
services.pipewire = { services.pipewire = {
@ -11,6 +11,7 @@
pulse.enable = true; pulse.enable = true;
jack.enable = true; jack.enable = true;
wireplumber.enable = true; wireplumber.enable = true;
audio.enable = true;
}; };
services.playerctld.enable = true; services.playerctld.enable = true;