Compare commits
3 Commits
8da2bc8cfe
...
28e9c221ad
| Author | SHA1 | Date | |
|---|---|---|---|
| 28e9c221ad | |||
| 59ae2bd981 | |||
| 5b8cc6eb8d |
@@ -18,17 +18,15 @@ list_workspaces() {
|
|||||||
# 1. Select only workspaces on the current monitor.
|
# 1. Select only workspaces on the current monitor.
|
||||||
# 2. Remove duplicates (might be a bug with split-monitor-workspaces
|
# 2. Remove duplicates (might be a bug with split-monitor-workspaces
|
||||||
# 3. Create the output structure
|
# 3. Create the output structure
|
||||||
|
# 4. Select interesting entries, ones that are focused, active or have windows
|
||||||
# 5. Sort
|
# 5. Sort
|
||||||
hyprctl workspaces -j | jq --compact-output --monochrome-output "
|
hyprctl workspaces -j | jq --compact-output --monochrome-output "
|
||||||
map( select( .monitor | contains(\"${monitor}\") ) ) |
|
map( select( .monitor | contains(\"${monitor}\") ) ) |
|
||||||
reduce .[] as \$item ( []; if any( .[]; .id == \$item.id ) then . else . + [\$item] end ) |
|
reduce .[] as \$item ( []; if any( .[]; .id == \$item.id ) then . else . + [\$item] end ) |
|
||||||
map( { id: .id, name, active: (.id == ${active}), focused: (.id == ${focused}), has_windows: (.lastwindowtitle != \"\") } ) |
|
map( { id: .id, name, active: (.id == ${active}), focused: (.id == ${focused}), has_windows: (.lastwindowtitle != \"\") } ) |
|
||||||
|
map( select (.active or .focused or .has_windows)) |
|
||||||
sort_by(.id)
|
sort_by(.id)
|
||||||
"
|
"
|
||||||
|
|
||||||
# Other lines that may be useful in the future
|
|
||||||
# - Select interesting entries, ones that are focused, active or have windows
|
|
||||||
# map( select (.active or .focused or .has_windows))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
monitor=$1
|
monitor=$1
|
||||||
|
|||||||
8
system/features/gc.nix
Normal file
8
system/features/gc.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{ ... }: {
|
||||||
|
# Automatic
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 30d";
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
./configuration.nix
|
./configuration.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../authorized-keys.nix
|
../../authorized-keys.nix
|
||||||
|
../../features/gc.nix
|
||||||
../../features/gui.nix
|
../../features/gui.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../authorized-keys.nix
|
../../authorized-keys.nix
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
../../features/gc.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|||||||
@@ -1,12 +1,4 @@
|
|||||||
# Edit this configuration file to define what should be installed on
|
{ pkgs, ... }:
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
||||||
|
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
networking.hostName = "vega"; # Define your hostname.
|
networking.hostName = "vega"; # Define your hostname.
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
./configuration.nix
|
./configuration.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../authorized-keys.nix
|
../../authorized-keys.nix
|
||||||
|
../../features/gc.nix
|
||||||
../../features/gui.nix
|
../../features/gui.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -22,9 +22,24 @@
|
|||||||
userEmail = "periodic@blazestar.net";
|
userEmail = "periodic@blazestar.net";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Set up eww here because it's based on the monitor configuration
|
wayland.windowManager.hyprland.settings = {
|
||||||
# Eww is idempotent, so it's fine to just run it on every reload to make sure things are open
|
# Set up eww here because it's based on the monitor configuration
|
||||||
wayland.windowManager.hyprland.settings.exec = [
|
# Eww is idempotent, so it's fine to just run it on every reload to make sure things are open
|
||||||
"eww daemon && eww open-many vertical-statusbar"
|
exec = [
|
||||||
];
|
"eww daemon && eww open-many vertical-statusbar"
|
||||||
|
];
|
||||||
|
# Set up workspaces for this system
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
|
||||||
|
workspace = [
|
||||||
|
"1, defaultName:1"
|
||||||
|
"2, defaultName:2"
|
||||||
|
"3, defaultName:3"
|
||||||
|
"4, defaultName:4"
|
||||||
|
"5, defaultName:5"
|
||||||
|
"6, defaultName:6"
|
||||||
|
"7, defaultName:7"
|
||||||
|
"8, defaultName:8"
|
||||||
|
"9, defaultName:9"
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user