Skip to content

Commit

Permalink
feat(cleanup): waybar
Browse files Browse the repository at this point in the history
  • Loading branch information
sioodmy committed Jan 16, 2024
1 parent 59ca448 commit 84b89e8
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 54 deletions.
1 change: 0 additions & 1 deletion home/cli/misc.nix

This file was deleted.

2 changes: 0 additions & 2 deletions home/misc/media.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
};
# https://wiki.archlinux.org/title/mpv#Hardware_video_acceleration
config = {
hwdec = "auto-safe";
gpu-context = "wayland";
profile = "gpu-hq";
osc = false;
border = false;
};
Expand Down
51 changes: 0 additions & 51 deletions home/rice/waybar/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -84,57 +84,6 @@ in {
exec = "${weather}/bin/weather";
return-type = "json";
};
"custom/crypto" = let
crypto = pkgs.stdenv.mkDerivation {
name = "waybar-wttr";
buildInputs = [
(pkgs.python39.withPackages
(pythonPackages: with pythonPackages; [requests]))
];
unpackPhase = "true";
installPhase = ''
mkdir -p $out/bin
cp ${./crypto.py} $out/bin/crypto
chmod +x $out/bin/crypto
'';
};
in {
format = "{}";
tooltip = true;
interval = 30;
exec = "${crypto}/bin/crypto";
return-type = "json";
};
"custom/vpn" = {
format = " VPN {}";
tooltip = true;
interval = 1;
exec = "${lib.getBin mullvad-status}/mullvad-status";
};
"custom/lock" = {
tooltip = false;
on-click = "sh -c '(sleep 0.5s; ${pkgs.gtklock}/bin/gtklock)' & disown";
format = "";
};
"custom/swallow" = {
tooltip = false;
on-click = let
hyprctl = config.wayland.windowManager.hyprland.package + "/bin/hyprctl";
notify-send = pkgs.libnotify + "/bin/notify-send";
rg = pkgs.ripgrep + "/bin/rg";
in
pkgs.writeShellScript "waybar-swallow" ''
#!/bin/sh
if ${hyprctl} getoption misc:enable_swallow | ${rg}/bin/rg -q "int: 1"; then
${hyprctl} keyword misc:enable_swallow false >/dev/null &&
${notify-send} "Hyprland" "Turned off swallowing"
else
${hyprctl} keyword misc:enable_swallow true >/dev/null &&
${notify-send} "Hyprland" "Turned on swallowing"
fi
'';
format = "󰘻";
};
"custom/power" = {
tooltip = false;
# TODO
Expand Down

0 comments on commit 84b89e8

Please sign in to comment.