feature/waybar #15

Merged
ahuston-0 merged 8 commits from feature/waybar into main 2025-03-15 22:43:03 -04:00
9 changed files with 81 additions and 1 deletions
Showing only changes of commit 8294dbdd0b - Show all commits

View File

@ -45,6 +45,10 @@ forEachSystem (
treefmt
statix
nixfmt-rfc-style
jsonfmt
mdformat
shfmt
yamlfmt
];
};
in

View File

@ -42,6 +42,7 @@
kitty
kubectl
kubernetes-helm
libreoffice-fresh
libtool
lsof
lynis

View File

@ -16,6 +16,7 @@
./home/gammastep.nix
./home/doom
./home/hypr
./home/waybar.nix
./non-server.nix
];

View File

@ -8,6 +8,7 @@
{
xdg.configFile = {
"hypr/hyprland.conf".source = ./hyprland.conf;
"hypr/show-hide.sh".source = ./show-hide.sh;
};
imports = [

View File

@ -22,6 +22,9 @@ monitor=,preferred,auto,auto
# exec-once = waybar & hyprpaper & firefox
exec-once = wired &
exec-once = wired
exec-once = systemctl --user start polkit-gnome-authentication-agent-1.service
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
@ -207,3 +210,7 @@ bind = $mainMod, P, exec, bwm
# lock screen
bind = $mainMod, L, exec, loginctl lock-session
# hide active window
bind = $mainMod,H,exec,/home/alice/config/hypr/hide_unhide_window.sh h
# show hide window
bind = $mainMod,I,exec,/home/alice/config/hypr/hide_unhide_window.sh s

View File

@ -0,0 +1,25 @@
#!/usr/bin/env bash
stack_file="/tmp/hide_window_pid_stack.txt"
function hide_window() {
pid=$(hyprctl activewindow -j | jq '.pid')
hyprctl dispatch movetoworkspacesilent "88,pid:$pid"
echo "$pid" >>$stack_file
}
function show_window() {
pid=$(tail -1 $stack_file && sed -i '$d' $stack_file)
[ -z "$pid" ] && exit
current_workspace=$(hyprctl activeworkspace -j | jq '.id')
hyprctl dispatch movetoworkspacesilent "$current_workspace,pid:$pid"
}
if [ -n "$1" ]; then
if [ "$1" == "h" ]; then
hide_window >>/dev/null
else
show_window >>/dev/null
fi
fi

View File

@ -0,0 +1,40 @@
[
{
"height": 20,
"layer": "top",
"position": "top",
"output": [
"eDP-2",
"eDP-1",
"HDMI-0",
"DP-0"
],
"hyprland/workspaces": {
"active-only": true,
"all-outputs": false,
"show-special": true,
"move-to-monitor": true,
"format": "{icon} {windows}",
"format-window-separator": " ",
"format-icons": {
"1": "󰎤",
"2": "󰎧",
"3": "󰎪",
"default": "",
"empty": "󱓼",
"urgent": "󱨇"
},
"persistent-workspaces": {
"1": "HDMI-0"
},
"on-scroll-down": "hyprctl dispatch workspace e-1",
"on-scroll-up": "hyprctl dispatch workspace e+1",
"window-rewrite": {
"title<Steam>": ""
},
"window-rewrite-default": "",
"window-rewrite-separator": " ",
"sort-by": "number"
}
}
]

View File

@ -2,6 +2,6 @@
lib.mkIf (!machineConfig.server) {
programs.waybar = {
enable = true;
#settings = builtins.fromJSON (import ./waybar.json);
settings = builtins.fromJSON (builtins.readFile ./waybar.json);
};
}

View File

@ -64,5 +64,6 @@
zathura
obsidian
libreoffice-qt-fresh
wlr-randr
];
}