diff --git a/home/tmux/default.nix b/home/tmux/default.nix index 0a8a355f..c9ccf164 100644 --- a/home/tmux/default.nix +++ b/home/tmux/default.nix @@ -46,6 +46,8 @@ in # Better vim mode bind-key -T copy-mode-vi 'v' send -X begin-selection bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel + # Block selection in vim mode + bind-key -Tcopy-mode-vi 'C-v' send -X begin-selection \; send -X rectangle-toggle ''; }; diff --git a/home/wm/i3/default.nix b/home/wm/i3/default.nix index 2a99958e..94cec6d2 100644 --- a/home/wm/i3/default.nix +++ b/home/wm/i3/default.nix @@ -70,6 +70,7 @@ in { config = lib.mkIf isEnabled { home.packages = with pkgs; [ + ambroisie.dragger # drag-and-drop from the CLI ambroisie.i3-get-window-criteria # little helper for i3 configuration arandr # Used by a mapping pamixer # Used by a mapping @@ -197,6 +198,12 @@ in "${modifier}+Shift+d" = "exec rofi -show run -disable-history"; "${modifier}+p" = "exec --no-startup-id flameshot gui"; "${modifier}+Shift+p" = "exec rofi -show emoji"; + "${modifier}+b" = + let + inherit (config.my.home.bluetooth) enable; + prog = "${pkgs.ambroisie.rofi-bluetooth}/bin/rofi-bluetooth"; + in + lib.mkIf enable "exec ${prog}"; }) ( # Changing container focus diff --git a/pkgs/default.nix b/pkgs/default.nix index a420a7e9..46fa4abc 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -22,11 +22,13 @@ pkgs.lib.makeScope pkgs.newScope (pkgs: { nolimips = pkgs.callPackage ./nolimips { }; - vimix-cursors = pkgs.callPackage ./vimix-cursors { }; - - volantes-cursors = pkgs.callPackage ./volantes-cursors { }; + rofi-bluetooth = pkgs.callPackage ./rofi-bluetooth { }; unbound-zones-adblock = pkgs.callPackage ./unbound-zones-adblock { }; unified-hosts-lists = pkgs.callPackage ./unified-hosts-lists { }; + + vimix-cursors = pkgs.callPackage ./vimix-cursors { }; + + volantes-cursors = pkgs.callPackage ./volantes-cursors { }; }) diff --git a/pkgs/rofi-bluetooth/default.nix b/pkgs/rofi-bluetooth/default.nix new file mode 100644 index 00000000..2ff40a18 --- /dev/null +++ b/pkgs/rofi-bluetooth/default.nix @@ -0,0 +1,40 @@ +{ lib, bluez, fetchFromGitHub, makeWrapper, rofi, stdenvNoCC }: +stdenvNoCC.mkDerivation rec { + pname = "rofi-bluetooth"; + version = "unstable-2021-10-15"; + + src = fetchFromGitHub { + owner = "nickclyde"; + repo = "rofi-bluetooth"; + rev = "893db1f2b549e7bc0e9c62e7670314349a29cdf2"; + sha256 = "sha256-3oROJKEQCuSnLfbJ+JSSc9hcmJTPrLHRQJsrUcaOMss="; + }; + + buildInputs = [ + makeWrapper + ]; + + installPhase = '' + mkdir -p $out/bin + cp $src/rofi-bluetooth $out/bin/ + chmod a+x $out/bin/rofi-bluetooth + ''; + + wrapperPath = lib.makeBinPath [ + rofi + bluez + ]; + + fixupPhase = '' + patchShebangs $out/bin/${pname} + wrapProgram $out/bin/${pname} --prefix PATH : "${wrapperPath}" + ''; + + meta = with lib; { + description = "A rofi menu for managing bluetooth connections"; + homepage = "https://github.com/nickclyde/rofi-bluetooth/commit/"; + license = with licenses; [ gpl3Only ]; + platforms = platforms.linux; + maintainers = with maintainers; [ ambroisie ]; + }; +} diff --git a/profiles/wm/default.nix b/profiles/wm/default.nix index 1eeb7a80..bf9d3f98 100644 --- a/profiles/wm/default.nix +++ b/profiles/wm/default.nix @@ -23,11 +23,5 @@ in # Auto disk mounter my.home.udiskie.enable = true; }) - - (lib.mkIf (cfg.windowManager != null) { - environment.systemPackages = with pkgs; [ - ambroisie.dragger - ]; - }) ]; }