-wofi-emoji +bemoji

This commit is contained in:
m3tam3re 2023-06-18 06:00:57 +02:00
parent 23745eb5b1
commit 339809b1a2
8 changed files with 212 additions and 4 deletions

View File

@ -0,0 +1,68 @@
{ config, lib, pkgs, ... }:
with lib;
let cfg = config.features.cli.fish;
in {
options.features.cli.fish.enable = mkEnableOption "enable fish shell";
config = mkIf cfg.enable {
programs.fish = {
enable = true;
plugins = [{
name = "foreign-env";
src = pkgs.fetchFromGitHub {
owner = "oh-my-fish";
repo = "plugin-foreign-env";
rev = "dddd9213272a0ab848d474d0cbde12ad034e65bc";
sha256 = "00xqlyl3lffc5l0viin1nyp819wf81fncqyz87jx8ljjdhilmgbs";
};
}];
loginShellInit = ''
set -x WEBKIT_DISABLE_COMPOSITING_MODE 1
set -x EDITOR emacsclient
set -x VISUAL emacsclient
set -x XDG_DATA_HOME $HOME/.local/share
set -x FZF_ALT_C_COMMAND fd --type d --exclude .git --follow --hidden
set -x FZF_DEFAULT_COMMAND fd --type f --exclude .git --follow --hidden
set -x FZF_CTRL_T_COMMAND "$FZF_DEFAULT_COMMAND"
if test (tty) = "/dev/tty1"
exec Hyprland &> /dev/null
end
'';
shellAbbrs = {
ls = "exa";
grep = "rg";
ps = "procs";
n = "nix";
nd = "nix develop -c $SHELL";
ns = "nix shell";
nsn = "nix shell nixpkgs#";
nb = "nix build";
nbn = "nix build nixpkgs#";
nf = "nix flake";
nrs = "sudo nixos-rebuild switch --flake .#$HOSTNAME";
snr = "sudo nixos-rebuild --flake .";
snrs = "sudo nixos-rebuild --flake . switch";
hm = "home-manager --flake .";
hms = "home-manager --flake . switch";
tsu = "sudo tailscale up";
tsd = "sudo tailscale down";
vi = "nvim";
vim = "nvim";
wgd = "sudo systemctl stop wg-quick-wg0.service";
wgu = "sudo systemctl start wg-quick-wg0.service";
};
};
};
}

View File

@ -0,0 +1,89 @@
{ pkgs, ... }: {
imports = [
./crypto.nix
./design.nix
# ./espanso.nix
./extrafonts.nix
./media.nix
./office.nix
./qt.nix
./syncthing.nix
./waybar.nix
./wofi.nix
];
xdg.mimeApps = {
enable = true;
defaultApplications = { "application/pdf" = [ "okular.desktop" ]; };
};
home.sessionVariables = {
WEBKIT_DISABLE_COMPOSITING_MODE = "1";
NIXOS_OZONE_WL = "1";
EDITOR = "emacsclient";
VISUAL = "emacsclient";
TERMINAL = "alacritty";
BROWSER = "nyxt";
QT_QPA_PLATFORM = "wayland";
XDG_CONFIG_HOME = "\${HOME}/.config";
XDG_BIN_HOME = "\${HOME}/.local/bin";
XDG_DATA_HOME = "\${HOME}/.local/share";
};
home.sessionPath =
[ "\${XDG_BIN_HOME}" "\${HOME}/.cargo/bin" "$HOME/.npm-global/bin" ];
fonts.fontconfig.enable = true;
services.mako = {
enable = true;
backgroundColor = "#282a36";
textColor = "#80FFEA";
borderColor = "#9742b5";
width = 400;
height = 150;
padding = "10,20";
borderRadius = 8;
borderSize = 1;
margin = "20,20";
};
home.packages = with pkgs; [
alacritty
appimage-run
blueberry
brave
brightnessctl
clipman
distrobox
flameshot
firefox
fuzzel
gnome.file-roller
gnome.seahorse
gnome.sushi
gnome.vinagre
glib
gsettings-desktop-schemas
hyprpaper
pamixer
pavucontrol
libsForQt5.qtstyleplugins
nyxt
qt5ct
rustdesk
tor-browser-bundle-bin
transmission-gtk
ungoogled-chromium
unrar
unzip
usbutils
v4l-utils
wl-clipboard
wlogout
wtype
xdg-utils
ydotool
zip
];
}

View File

@ -1,11 +1,12 @@
{ pkgs, outputs, ...}:
let
wofi-pass = outputs.packages.x86_64-linux.wofi-pass;
bemoji = outputs.packages.x86_64-linux.bemoji;
in
{
home.packages = [
pkgs.wofi
pkgs.wofi-emoji
bemoji
wofi-pass
];
}

View File

@ -163,7 +163,7 @@
bind= $mainMod, F, fullscreen
bind = $mainMod, V, togglefloating,
bind = $mainMod, D, exec, wofi --show drun --allow-images
bind = $mainMod SHIFT, S, exec, wofi-emoji
bind = $mainMod SHIFT, S, exec, bemoji
bind = $mainMod, P, exec, wofi-pass
bind = $mainMod SHIFT, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle

24
pkgs/bemoji/default.nix Normal file
View File

@ -0,0 +1,24 @@
{ stdenv, lib, fetchFromGitHub, bash, pkgs, makeWrapper }:
with lib;
with pkgs;
stdenv.mkDerivation {
pname = "bemoji";
version = "0.3.0";
src = fetchFromGitHub {
owner = "marty-oehme";
repo = "bemoji";
rev = "dc68887";
sha256 = "XXNrUaS06UHF3cVfIfWjGF1sdPE709W2tFhfwTitzNs=";
};
buildInputs = [ bash coreutils wl-clipboard wofi wtype ];
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/bin
cp bemoji $out/bin/bemoji
wrapProgram $out/bin/bemoji \
--prefix PATH : ${makeBinPath [ bash coreutils wl-clipboard wofi wtype ]}
'';
}

View File

@ -0,0 +1,24 @@
{ stdenv, lib, fetchFromGitHub, bash, pkgs, makeWrapper }:
with lib;
with pkgs;
stdenv.mkDerivation {
pname = "wofi-pass";
version = "0.1";
src = fetchFromGitHub {
owner = "TinfoilSubmarine";
repo = "wofi-pass";
rev = "869c545";
sha256 = "gcfW8E/3/dqv0P3S4z9fDv8k4R7czcIKwpo/OHFFWj0=";
};
buildInputs = [ bash coreutils wl-clipboard wofi wtype ];
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/bin
cp wofi-pass $out/bin/wofi-pass
wrapProgram $out/bin/wofi-pass \
--prefix PATH : ${makeBinPath [ bash coreutils wl-clipboard wofi wtype ]}
'';
}

View File

@ -1,5 +1,6 @@
{ pkgs ? import <nixpkgs> { } }: {
wofi-pass = pkgs.callPackage ./wofi-pass { };
bemoji = pkgs.callPackage ./bemoji { };
}

View File

@ -1,6 +1,7 @@
{ stdenv, lib, fetchFromGitHub, bash, pkgs, makeWrapper }:
with lib;
with pkgs;
stdenv.mkDerivation {
pname = "wofi-pass";
@ -11,13 +12,13 @@ stdenv.mkDerivation {
rev = "869c545";
sha256 = "gcfW8E/3/dqv0P3S4z9fDv8k4R7czcIKwpo/OHFFWj0=";
};
buildInputs = [ bash ];
buildInputs = [ bash coreutils wl-clipboard wofi wtype ];
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/bin
cp wofi-pass $out/bin/wofi-pass
wrapProgram $out/bin/wofi-pass \
--prefix PATH : ${makeBinPath [ bash ]}
--prefix PATH : ${makeBinPath [ bash coreutils wl-clipboard wofi wtype ]}
'';
}