termfilechooser

This commit is contained in:
Miguel Palhas
2026-02-17 20:35:11 +00:00
parent abdf71f7dc
commit a5089b77e9
12 changed files with 63 additions and 230 deletions
+1
View File
@@ -19,6 +19,7 @@
./claude
./opencode
./yazi
./termfilechooser.nix
];
programs = {
+7 -3
View File
@@ -20,9 +20,9 @@ in
hyprcursor
pamixer
hyprshot
satty
playerctl
hyprsunset
xdg-desktop-portal-termfilechooser
libnotify
cliphist
wl-screenrec
@@ -151,11 +151,15 @@ in
];
windowrule = [
# satty
"float on, match:class com.gabm.satty"
# imv
"float on, match:class imv"
"move cursor -50% -50%, match:class imv"
"float on, match:title termfilechooser"
"size 1200 800, match:title termfilechooser"
"move center, match:title termfilechooser"
# bluetooth
@@ -208,8 +212,8 @@ in
# "$mod, d, exec, nerd-dictation-toggle"
# printscreen
", Print, exec, hyprshot -m region --output-folder ~/downloads/screenshots"
"SHIFT, Print, exec, hyprshot -m window --output-folder ~/screenshots"
", Print, exec, hyprshot -m region --raw | satty --filename - --output-filename ~/downloads/screenshots/$(date +%Y-%m-%d_%H-%M-%S).png"
"SHIFT, Print, exec, hyprshot -m window --raw | satty --filename - --output-filename ~/downloads/screenshots/$(date +%Y-%m-%d_%H-%M-%S).png"
# move focus with mod + arrows
"$mod, h, movefocus, l"
@@ -1,46 +0,0 @@
{
inputs,
pkgs,
...
}:
{
home.packages = with pkgs; [ upower ];
programs.hyprpanel = {
enable = true;
settings = {
bar.layouts = {
"0" = {
left = [
"dashboard"
"workspaces"
];
middle = [ "media" ];
right = [
"volume"
"network"
"bluetooth"
"systray"
"clock"
"notifications"
];
};
"*" = {
left = [ ];
middle = [ ];
right = [ ];
};
};
theme.bar.transparent = true;
theme.font.size = "18px";
menus = {
dashboard = {
directories.enable = false;
stats.enable_gpu = true;
};
};
};
};
}
+16
View File
@@ -0,0 +1,16 @@
{ pkgs, ... }:
{
xdg.configFile."xdg-desktop-portal/hyprland-portals.conf".text = ''
[preferred]
default=hyprland;gtk
org.freedesktop.impl.portal.FileChooser=termfilechooser
'';
xdg.configFile."xdg-desktop-portal-termfilechooser/config".text = ''
[filechooser]
cmd=${pkgs.writeShellScript "termfilechooser-yazi" ''
exec kitty -T termfilechooser yazi "$@"
''}
default_dir=$HOME
'';
}
-12
View File
@@ -1,12 +0,0 @@
{ inputs, pkgs, ... }:
{
services.xserver = {
enable = true;
displayManager = {
startx.enable = true;
};
autoRepeatDelay = 250;
autoRepeatInterval = 30;
};
services.displayManager.gdm.enable = true;
}
+3 -3
View File
@@ -1,6 +1,6 @@
{ inputs, pkgs, ... }:
let
sddm-astronaut-theme = pkgs.callPackage ../../../../pkgs/sddm-astronaut-theme/package.nix { };
sddm-noctalia-theme = pkgs.callPackage ../../../../pkgs/sddm-noctalia-theme/package.nix { };
in
{
services.xserver = {
@@ -15,7 +15,7 @@ in
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
theme = "sddm-astronaut-theme";
theme = "sddm-noctalia";
package = pkgs.kdePackages.sddm;
extraPackages = with pkgs.kdePackages; [
qtmultimedia
@@ -26,6 +26,6 @@ in
};
environment.systemPackages = with pkgs; [
sddm-astronaut-theme
sddm-noctalia-theme
];
}
@@ -2,6 +2,7 @@
{
environment.systemPackages = with pkgs; [
wl-clipboard
xdg-desktop-portal-termfilechooser
];
programs.hyprland = {
-57
View File
@@ -1,57 +0,0 @@
{
inputs,
pkgs,
lib,
...
}:
let
tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet";
hyprland-session = "${pkgs.hyprland}/share/wayland-sessions";
session-dirs = lib.concatStringsSep ":" [
"${pkgs.hyprland}/share/wayland-sessions"
"${pkgs.gnome-session}/share/xsessions"
"${pkgs.hyprland}/share"
"${pkgs.gnome-session}/share"
"/usr/share/wayland-sessions"
"/usr/share/xsessions"
"/usr/share"
"/usr/local/share"
];
in
{
services.greetd = {
enable = true;
settings = {
default_session = {
command = "/run/current-system/sw/bin/greet-launcher";
user = "greeter";
};
};
};
environment.systemPackages = with pkgs; [
greetd.tuigreet
(writeShellScriptBin "greet-launcher" ''
export XDG_DATA_DIRS=${session-dirs}
exec ${pkgs.greetd.tuigreet}/bin/tuigreet \
--sessions ${session-dirs} \
--remember --time \
--cmd /etc/greetd/xsession
'')
];
environment.etc."greetd/xsession" = {
text = ''
#!/bin/sh
case "$1" in
*wayland*) export XDG_SESSION_TYPE=wayland ;;
*) export XDG_SESSION_TYPE=x11; export DISPLAY=:0 ;;
esac
exec ${pkgs.dbus}/bin/dbus-run-session "$1"
'';
mode = "0755";
};
security.pam.services.greetd.enable = true;
}
+1
View File
@@ -10,6 +10,7 @@
};
services = {
upower.enable = true;
thermald.enable = true;
power-profiles-daemon.enable = false;
-29
View File
@@ -1,29 +0,0 @@
{ pkgs, ... }:
pkgs.stdenv.mkDerivation {
pname = "sddm-astronaut-theme";
version = "1.0-pixel-sakura-v2";
src = pkgs.fetchFromGitHub {
owner = "Keyitdev";
repo = "sddm-astronaut-theme";
rev = "master";
sha256 = "sha256-+94WVxOWfVhIEiVNWwnNBRmN+d1kbZCIF10Gjorea9M=";
};
installPhase = ''
mkdir -p $out/share/sddm/themes/sddm-astronaut-theme
cp -r * $out/share/sddm/themes/sddm-astronaut-theme/
# Override the theme variant to pixel_sakura
sed -i 's|ConfigFile=Themes/astronaut.conf|ConfigFile=Themes/pixel_sakura.conf|' \
$out/share/sddm/themes/sddm-astronaut-theme/metadata.desktop
'';
meta = with pkgs.lib; {
description = "Modern astronaut-themed SDDM login theme";
homepage = "https://github.com/Keyitdev/sddm-astronaut-theme";
license = licenses.gpl3;
platforms = platforms.linux;
};
}
+34
View File
@@ -0,0 +1,34 @@
{ pkgs, ... }:
pkgs.stdenv.mkDerivation {
pname = "sddm-noctalia-theme";
version = "1.0";
src = pkgs.fetchFromGitHub {
owner = "mahaveergurjar";
repo = "sddm";
rev = "noctalia";
sha256 = "1a9xb9hkci2bkfmq04lhd66aa60kkf97c16knrm4sgpwqdpvzba1";
};
installPhase = ''
mkdir -p $out/share/sddm/themes/sddm-noctalia
cp -r * $out/share/sddm/themes/sddm-noctalia/
# Patch for Qt6 SDDM greeter compatibility
# SDDM reads QtVersion from metadata.desktop to find the greeter binary;
# default is 5 (sddm-greeter), we need 6 (sddm-greeter-qt6)
substituteInPlace $out/share/sddm/themes/sddm-noctalia/metadata.desktop \
--replace-fail "Theme-Id=noctalia" "QtVersion=6
Theme-Id=noctalia"
substituteInPlace $out/share/sddm/themes/sddm-noctalia/Main.qml \
--replace-fail "import QtGraphicalEffects 1.12" "import Qt5Compat.GraphicalEffects"
'';
meta = with pkgs.lib; {
description = "Noctalia-themed SDDM login theme";
homepage = "https://github.com/mahaveergurjar/sddm/tree/noctalia";
license = licenses.gpl3;
platforms = platforms.linux;
};
}
-80
View File
@@ -1,80 +0,0 @@
{
lib,
stdenv,
fetchurl,
autoPatchelfHook,
zlib,
libgcc,
}:
let
# Latest nightly as of 2026-02-11
version = "nightly-ff2dc8bdde83aaefb4abaf73b7ac27059edeef25";
# Platform-specific binary selection
sources = {
x86_64-linux = {
url = "https://github.com/tempoxyz/tempo-foundry/releases/download/${version}/foundry_nightly_linux_amd64.tar.gz";
hash = "sha256-0zpZpHEJ8m0YD0C4VqmFqmdneJHKjATawJO6fu5b6Og=";
};
aarch64-linux = {
url = "https://github.com/tempoxyz/tempo-foundry/releases/download/${version}/foundry_nightly_linux_arm64.tar.gz";
hash = lib.fakeSha256; # Update if building on aarch64-linux
};
x86_64-darwin = {
url = "https://github.com/tempoxyz/tempo-foundry/releases/download/${version}/foundry_nightly_darwin_amd64.tar.gz";
hash = lib.fakeSha256; # Update if building on darwin
};
aarch64-darwin = {
url = "https://github.com/tempoxyz/tempo-foundry/releases/download/${version}/foundry_nightly_darwin_arm64.tar.gz";
hash = lib.fakeSha256; # Update if building on darwin
};
};
platform = sources.${stdenv.hostPlatform.system} or (throw "Unsupported platform: ${stdenv.hostPlatform.system}");
in
stdenv.mkDerivation {
pname = "tempo-foundry-bin";
inherit version;
src = fetchurl {
inherit (platform) url hash;
};
nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
buildInputs = lib.optionals stdenv.isLinux [
zlib
libgcc
];
dontBuild = true;
dontConfigure = true;
sourceRoot = ".";
installPhase = ''
runHook preInstall
mkdir -p $out/bin
# Install binaries (Tempo fork includes forge, cast, anvil, chisel)
for bin in forge cast anvil chisel; do
if [ -f "$bin" ]; then
install -m755 -D "$bin" "$out/bin/$bin"
fi
done
runHook postInstall
'';
meta = {
description = "Tempo's fork of Foundry - portable and modular toolkit for Ethereum development with Tempo protocol features";
homepage = "https://github.com/tempoxyz/tempo-foundry";
license = with lib.licenses; [ mit asl20 ];
maintainers = [ ];
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
mainProgram = "forge";
};
}