some changes

This commit is contained in:
elwrcl committed 2026-05-24 14:37:06 +03:00
1 parent d1781b8ac9
commit 41bdc758d4
3 files changed
+4 -49

No files matched your search

-46
View File
@@ -1,46 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p python3
import sys
import re
import os
def convert_file(filepath):
if not os.path.isfile(filepath):
return
with open(filepath, 'r', encoding='utf-8') as f:
lines = f.readlines()
new_lines = []
changed = False
# "CTRL $mainMod, right, layoutmsg, focus r"
pattern = re.compile(r'^(\s*)"([^"]*,[^"]*)"\s*$')
for line in lines:
match = pattern.match(line)
if match:
indent = match.group(1)
content = match.group(2)
parts = [f'"{p.strip()}"' for p in content.split(',')]
args_str = " ".join(parts)
new_line = f'{indent}{{ _args = [ {args_str} ]; }}\n'
new_lines.append(new_line)
changed = True
else:
new_lines.append(line)
if changed:
with open(filepath, 'w', encoding='utf-8') as f:
f.writelines(new_lines)
print(f"Converted: {filepath}")
else:
print(f"Skipped (no changes): {filepath}")
if __name__ == "__main__":
if len(sys.argv) < 2:
print("Usage: python3 lua_converter.py <file1.nix> <file2.nix> ...")
sys.exit(1)
for file in sys.argv[1:]:
convert_file(file)
+2 -1
View File
@@ -9,7 +9,8 @@
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland; package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
configType = "hyprlang";
xwayland.enable = true; xwayland.enable = true;
systemd.enable = false; systemd.enable = false;
systemd.variables = [ "-all" ]; systemd.variables = [ "-all" ];
+2 -2
View File
@@ -7,8 +7,8 @@
{ {
programs.hyprland = { programs.hyprland = {
enable = true; enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland; package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland; portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
xwayland.enable = true; xwayland.enable = true;
withUWSM = true; withUWSM = true;
}; };