feat: add formatter
0
home/config/.face
Normal file → Executable file
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
0
home/config/firefox/autohide_toolbox.css
Normal file → Executable file
0
home/config/firefox/nightTab.json
Normal file → Executable file
0
home/config/fish/functions/fish_prompt.fish
Normal file → Executable file
0
home/config/gh/config.yaml
Normal file → Executable file
0
home/config/ghostty/shader/mnoise.glsl
Normal file → Executable file
0
home/config/rofi/apps.rasi
Normal file → Executable file
0
home/config/rofi/config.rasi
Normal file → Executable file
0
home/config/rofi/gruvbox-material.rasi
Normal file → Executable file
0
home/config/tmux.yaml
Normal file → Executable file
0
home/config/wlogout/icons/hibernate.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 307 B After Width: | Height: | Size: 307 B |
0
home/config/wlogout/icons/lock.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 319 B After Width: | Height: | Size: 319 B |
0
home/config/wlogout/icons/logout.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 365 B After Width: | Height: | Size: 365 B |
0
home/config/wlogout/icons/reboot.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 398 B After Width: | Height: | Size: 398 B |
0
home/config/wlogout/icons/shutdown.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 306 B After Width: | Height: | Size: 306 B |
0
home/config/wlogout/icons/suspend.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 350 B After Width: | Height: | Size: 350 B |
0
home/config/zen/zen-keyboard-shortcuts.json
Normal file → Executable file
0
home/options/default.nix
Normal file → Executable file
0
home/options/hyprlock.nix
Normal file → Executable file
0
home/options/noctalia.nix
Normal file → Executable file
0
home/options/ntfy-client.nix
Normal file → Executable file
0
home/options/sunsetr.nix
Normal file → Executable file
0
home/presets/basic.nix
Normal file → Executable file
0
home/scripts/md2html.nix
Normal file → Executable file
106
home/scripts/memeSelector.nix
Normal file → Executable file
|
|
@ -3,68 +3,68 @@
|
|||
url,
|
||||
...
|
||||
}:
|
||||
pkgs.writers.writePython3Bin "memeSelector" {libraries = with pkgs.python3Packages; [requests];}
|
||||
''
|
||||
import requests
|
||||
import xml.etree.ElementTree as ET
|
||||
import urllib.parse
|
||||
import sys
|
||||
import os
|
||||
import tempfile
|
||||
import subprocess
|
||||
pkgs.writers.writePython3Bin "memeSelector" { libraries = with pkgs.python3Packages; [ requests ]; }
|
||||
''
|
||||
import requests
|
||||
import xml.etree.ElementTree as ET
|
||||
import urllib.parse
|
||||
import sys
|
||||
import os
|
||||
import tempfile
|
||||
import subprocess
|
||||
|
||||
BASE_URL = "${url}"
|
||||
headers = {"Depth": "1"}
|
||||
resp = requests.request(
|
||||
"PROPFIND",
|
||||
BASE_URL,
|
||||
headers=headers,
|
||||
verify="${"" + ../../system/extra/ca.crt}"
|
||||
)
|
||||
BASE_URL = "${url}"
|
||||
headers = {"Depth": "1"}
|
||||
resp = requests.request(
|
||||
"PROPFIND",
|
||||
BASE_URL,
|
||||
headers=headers,
|
||||
verify="${"" + ../../system/extra/ca.crt}"
|
||||
)
|
||||
|
||||
if resp.status_code not in (200, 207):
|
||||
print(f"Error: Http {resp.status_code}")
|
||||
sys.exit(1)
|
||||
if resp.status_code not in (200, 207):
|
||||
print(f"Error: Http {resp.status_code}")
|
||||
sys.exit(1)
|
||||
|
||||
root = ET.fromstring(resp.text)
|
||||
ns = {"d": "DAV:"}
|
||||
root = ET.fromstring(resp.text)
|
||||
ns = {"d": "DAV:"}
|
||||
|
||||
files = []
|
||||
for href in root.findall(".//d:href", ns):
|
||||
path = href.text
|
||||
if not path:
|
||||
continue
|
||||
filename = urllib.parse.unquote(path.split("/")[-1])
|
||||
files = []
|
||||
for href in root.findall(".//d:href", ns):
|
||||
path = href.text
|
||||
if not path:
|
||||
continue
|
||||
filename = urllib.parse.unquote(path.split("/")[-1])
|
||||
|
||||
if filename and not filename.endswith("/"):
|
||||
files.append(filename)
|
||||
if filename and not filename.endswith("/"):
|
||||
files.append(filename)
|
||||
|
||||
if not files:
|
||||
print("No files found")
|
||||
sys.exit(0)
|
||||
if not files:
|
||||
print("No files found")
|
||||
sys.exit(0)
|
||||
|
||||
rofi = subprocess.run(
|
||||
["rofi", "-i", "-dmenu", "-p", "Meme"],
|
||||
input="\n".join(files).encode(),
|
||||
stdout=subprocess.PIPE
|
||||
)
|
||||
rofi = subprocess.run(
|
||||
["rofi", "-i", "-dmenu", "-p", "Meme"],
|
||||
input="\n".join(files).encode(),
|
||||
stdout=subprocess.PIPE
|
||||
)
|
||||
|
||||
selected = rofi.stdout.decode().strip()
|
||||
if not selected:
|
||||
sys.exit(0)
|
||||
selected = rofi.stdout.decode().strip()
|
||||
if not selected:
|
||||
sys.exit(0)
|
||||
|
||||
url = BASE_URL + urllib.parse.quote(selected)
|
||||
tmpfile = os.path.join(tempfile.gettempdir(), selected)
|
||||
url = BASE_URL + urllib.parse.quote(selected)
|
||||
tmpfile = os.path.join(tempfile.gettempdir(), selected)
|
||||
|
||||
subprocess.run(["wget", "-q", "-O", tmpfile, url], check=True)
|
||||
subprocess.run(["wget", "-q", "-O", tmpfile, url], check=True)
|
||||
|
||||
with open(tmpfile, "rb") as f:
|
||||
subprocess.run("wl-copy", stdin=f)
|
||||
with open(tmpfile, "rb") as f:
|
||||
subprocess.run("wl-copy", stdin=f)
|
||||
|
||||
subprocess.run([
|
||||
"notify-send",
|
||||
"-i", tmpfile,
|
||||
"Meme Copied: ",
|
||||
f"{selected}"
|
||||
])
|
||||
''
|
||||
subprocess.run([
|
||||
"notify-send",
|
||||
"-i", tmpfile,
|
||||
"Meme Copied: ",
|
||||
f"{selected}"
|
||||
])
|
||||
''
|
||||
|
|
|
|||
0
home/scripts/mkWall.nix
Normal file → Executable file
0
home/scripts/ntfy.nix
Normal file → Executable file
0
home/scripts/rbwSelector.nix
Normal file → Executable file
0
home/scripts/record.nix
Normal file → Executable file
0
home/scripts/remoteRebuild.nix
Normal file → Executable file
0
home/scripts/rofiwall.nix
Normal file → Executable file
0
home/user/bitwarden.nix
Normal file → Executable file
0
home/user/config.nix
Normal file → Executable file
0
home/user/direnv.nix
Normal file → Executable file
0
home/user/environment.nix
Normal file → Executable file
0
home/user/firefox.nix
Normal file → Executable file
0
home/user/ghostty.nix
Normal file → Executable file
0
home/user/git.nix
Normal file → Executable file
0
home/user/gtk.nix
Normal file → Executable file
0
home/user/hypr/bind.nix
Normal file → Executable file
0
home/user/hypr/input.nix
Normal file → Executable file
0
home/user/hypr/window.nix
Normal file → Executable file
0
home/user/hypr/windowrule.nix
Normal file → Executable file
0
home/user/hypr/workspace.nix
Normal file → Executable file
0
home/user/hyprland.nix
Normal file → Executable file
0
home/user/internationalisation.nix
Normal file → Executable file
0
home/user/music-production.nix
Normal file → Executable file
18
home/user/nvf/default.nix
Normal file → Executable file
|
|
@ -7,8 +7,9 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
inherit (builtins) concatStringsSep;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (lib) concatStringsSep optionalString;
|
||||
inherit (lib) optionalString;
|
||||
|
||||
suda-nvim = pkgs.vimUtils.buildVimPlugin {
|
||||
name = "vim-suda";
|
||||
|
|
@ -369,11 +370,11 @@ in
|
|||
formatter = {
|
||||
conform-nvim = {
|
||||
enable = true;
|
||||
setupOpts = {
|
||||
formatters_by_ft = {
|
||||
nix = [ "nixfmt" ];
|
||||
};
|
||||
};
|
||||
# setupOpts = {
|
||||
# formatters_by_ft = {
|
||||
# nix = [ "nixfmt" ];
|
||||
# };
|
||||
# };
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -420,7 +421,10 @@ in
|
|||
nix = {
|
||||
enable = true;
|
||||
extraDiagnostics.enable = false;
|
||||
format.enable = false; # Manually configured in conform-nvim
|
||||
format = {
|
||||
type = [ "nixfmt" ];
|
||||
enable = true;
|
||||
};
|
||||
lsp.servers = [ "nixd" ];
|
||||
};
|
||||
sql.enable = true;
|
||||
|
|
|
|||