added monitor and workspace configuration options to my hyprland config

This commit is contained in:
pagedmov
2024-11-08 01:26:06 -05:00
parent 2127996ee8
commit 4a3fb537b9
7 changed files with 120 additions and 180 deletions

View File

@@ -24,31 +24,18 @@ pkgs.writeShellApplication {
[ "$numresults" -eq 0 ] && echo "$1 not found in ${nixpkgs_toplevel}/pkgs" && exit 1
if [ "$numresults" -gt 1 ]; then
# Trim the path to show only package directory and .nix file (e.g., package/default.nix)
results=$(echo "$results" | awk -F"${nixpkgs_toplevel}/pkgs/" '{print $2}')
file=$(echo "$results" | fzf)
full_path="${nixpkgs_toplevel}/pkgs/$file"
# Check if the file contains any non-UTF-8 characters
if grep --color='auto' -P -q "[^\x00-\x7F]" "$full_path"; then
NIXD_FLAGS="--semantic-tokens=false" nvim "$full_path"
else
nvim "$full_path"
fi
nvim "$full_path"
else
# Trim the path for the single result case
result_path=$(echo "$results" | awk -F"${nixpkgs_toplevel}/pkgs/" '{print $2}')
full_path="${nixpkgs_toplevel}/pkgs/$result_path"
# Check if the file contains any non-UTF-8 characters
if grep --color='auto' -P -q "[^\x00-\x7F]" "$full_path"; then
NIXD_FLAGS="--semantic-tokens=false" nvim "$full_path"
else
nvim "$full_path"
fi
nvim "$full_path"
fi
'';
}