From 7b68408ad64413f08708c7e5e5ef2be49e3cbbc2 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Tue, 9 May 2023 12:54:57 -0500 Subject: [PATCH] updates and adding some things --- flake.lock | 21 +++++++++++++++++++++ flake.nix | 7 ++++++- modules/emacs.nix | 4 ++++ pkgs/desktop-packages.nix | 2 ++ scripts/emacslof | 5 +++-- user/modules/hyprland.nix | 6 +++--- 6 files changed, 39 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 5bc8839..eeb7031 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,25 @@ { "nodes": { + "anyrun": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1683202497, + "narHash": "sha256-ViFgWVzW/sK14DSMC6/uxnkgOFUOtjghagpvqosEo24=", + "owner": "Kirottu", + "repo": "anyrun", + "rev": "9f920a2108117c895f1dbda3a209eb4133cd2990", + "type": "github" + }, + "original": { + "owner": "Kirottu", + "repo": "anyrun", + "type": "github" + } + }, "blobs": { "flake": false, "locked": { @@ -447,6 +467,7 @@ }, "root": { "inputs": { + "anyrun": "anyrun", "emacs": "emacs", "eww": "eww", "home-manager": "home-manager", diff --git a/flake.nix b/flake.nix index 397d19f..968dee8 100644 --- a/flake.nix +++ b/flake.nix @@ -26,12 +26,16 @@ simple-nixos-mailserver = { url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-22.11"; }; + anyrun = { + url = "github:Kirottu/anyrun"; + inputs.nixpkgs.follows = "nixpkgs"; + }; libre-presenter = { url = "gitlab:chriscochrun/church-presenter"; }; }; - outputs = { nixpkgs, nixpkgs-stable, home-manager, hyprland, nixos-hardware, emacs, nix-bitcoin, libre-presenter, ... }: + outputs = { nixpkgs, nixpkgs-stable, home-manager, hyprland, nixos-hardware, emacs, nix-bitcoin, libre-presenter, anyrun, ... }: let system = "x86_64-linux"; username = "chris"; @@ -40,6 +44,7 @@ config = { allowUnfree = true; }; overlays = [ emacs.overlays.default + anyrun.overlay # (self: super: { # ffmpeg_5-full = super.ffmpeg_5-full.overrideAttrs (old: { # postFixup = '' diff --git a/modules/emacs.nix b/modules/emacs.nix index e7772d5..4dcb44e 100644 --- a/modules/emacs.nix +++ b/modules/emacs.nix @@ -68,6 +68,9 @@ with lib; melpaPackages.orderless melpaPackages.cape devdocs + nano-theme + nano-modeline + nano-agenda yasnippet wgrep melpaPackages.tempel @@ -81,6 +84,7 @@ with lib; helpful format-all web-mode + php-mode lua-mode nix-mode cmake-mode diff --git a/pkgs/desktop-packages.nix b/pkgs/desktop-packages.nix index b648da0..c1cd753 100644 --- a/pkgs/desktop-packages.nix +++ b/pkgs/desktop-packages.nix @@ -18,6 +18,7 @@ with lib; dash brightnessctl dunst + bottom ttyper kget audacity @@ -50,6 +51,7 @@ with lib; libsForQt5.bismuth libnotify rofi-wayland + anyrun wf-recorder wofi waybar diff --git a/scripts/emacslof b/scripts/emacslof index 3002a28..5151e37 100755 --- a/scripts/emacslof +++ b/scripts/emacslof @@ -22,12 +22,13 @@ if [ $(pgrep -c emacsclient) -gt 0 ]; then exit else echo WAYLAND - emacsrg=$(wlrctl window list | rg emacs) + emacsrg=$(wlrctl window list | rg emacs | rg -v dired) + echo $emacsrg emacswin=$(echo $emacsrg | sed 's/.*\: //') echo $emacswin - exec wlrctl toplevel focus app_id:emacs + exec wlrctl toplevel focus title:"$emacswin" exit fi fi diff --git a/user/modules/hyprland.nix b/user/modules/hyprland.nix index 0a711e9..3726ccb 100644 --- a/user/modules/hyprland.nix +++ b/user/modules/hyprland.nix @@ -141,11 +141,11 @@ bindr = ALT,Alt_L,exec,/home/chris/bin/window.sh bind = SUPER,w,exec,/home/chris/bin/window.sh bind = SUPER,E,exec,/home/chris/bin/emacslof - bind = SUPER,d,exec,emacsclient -c -e '(chris/dired-open-wm)' - bind = SUPER,v,exec,emacsclient -c -e '(chris/dired-open-videos)' + bind = SUPER,d,exec,emacsclient -c -e '(dired-jump)' + bind = SUPER,v,exec,emacsclient -e '(chris/dired-open-videos)' bind = SUPER,B,exec,/home/chris/bin/fflof bind = SUPER,A,exec,alacritty --class pulsemixer -e pulsemixer - bind = SUPERCTRL,i,exec,alacritty --class btop -e btop + bind = SUPERCTRL,i,exec,alacritty --class btop -e btm bind = ,Print,exec,screenshot bind = SUPER,P,exec,/home/chris/bin/rbw.sh