Mon Jun 3 01:00:53 AM CEST 2024
This commit is contained in:
parent
0483baf022
commit
0b1b9c1481
|
@ -8,6 +8,7 @@
|
||||||
./rofi
|
./rofi
|
||||||
./alacritty
|
./alacritty
|
||||||
./firefox
|
./firefox
|
||||||
|
./ssh
|
||||||
];
|
];
|
||||||
|
|
||||||
services.hyprpaper = {
|
services.hyprpaper = {
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
htop
|
htop
|
||||||
|
waypipe
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,19 @@ in
|
||||||
ExtensionSettings = {
|
ExtensionSettings = {
|
||||||
"{c7c120ff-2878-4e59-a5a3-cd4d1655bc13}" = {
|
"{c7c120ff-2878-4e59-a5a3-cd4d1655bc13}" = {
|
||||||
install_url = "file://${./files/signed.xpi}";
|
install_url = "file://${./files/signed.xpi}";
|
||||||
installation_mode = "force_installed";
|
installation_mode = "normal_installed";
|
||||||
|
};
|
||||||
|
"@contain-google" = {
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/google-container/latest.xpi";
|
||||||
|
installation_mode = "normal_installed";
|
||||||
|
};
|
||||||
|
"{ea4204c0-3209-4116-afd2-2a208e21a779}" = {
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/enable-bing-chat/latest.xpi";
|
||||||
|
installation_mode = "normal_installed";
|
||||||
|
};
|
||||||
|
"{3e4d2037-d300-4e95-859d-3cba866f46d3}" = {
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/private-internet-access-ext/latest.xpi";
|
||||||
|
installation_mode = "normal_installed";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -44,11 +56,21 @@ in
|
||||||
ublock-origin
|
ublock-origin
|
||||||
bitwarden
|
bitwarden
|
||||||
privacy-badger
|
privacy-badger
|
||||||
|
beyond-20
|
||||||
|
display-_anchors
|
||||||
|
facebook-container
|
||||||
|
multi-account-containers
|
||||||
|
istilldontcareaboutcookies
|
||||||
|
return-youtube-dislikes
|
||||||
|
sponsorblock
|
||||||
|
unpaywall
|
||||||
|
vimium
|
||||||
];
|
];
|
||||||
settings = {
|
settings = {
|
||||||
"browser.disableResetPrompt" = true;
|
"browser.disableResetPrompt" = true;
|
||||||
"browser.download.panel.shown" = true;
|
"browser.download.panel.shown" = true;
|
||||||
"browser.shell.checkDefaultBrowser" = false;
|
"browser.shell.checkDefaultBrowser" = false;
|
||||||
|
"browser.tabs.inTitlebar" = 0;
|
||||||
"browser.shell.defaultBrowserCheckCount" = 1;
|
"browser.shell.defaultBrowserCheckCount" = 1;
|
||||||
"browser.startup.homepage" = "https://start.duckduckgo.com";
|
"browser.startup.homepage" = "https://start.duckduckgo.com";
|
||||||
"browser.compactmode.show" = true;
|
"browser.compactmode.show" = true;
|
||||||
|
|
|
@ -7,12 +7,22 @@ let
|
||||||
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
||||||
wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste";
|
wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste";
|
||||||
hyprpaper = "${pkgs.hyprpaper}/bin/hyprpaper";
|
hyprpaper = "${pkgs.hyprpaper}/bin/hyprpaper";
|
||||||
|
firefox = "${pkgs.firefox}/bin/firefox";
|
||||||
waybar = "${inputs.waybar.packages.${pkgs.system}.waybar}/bin/waybar";
|
waybar = "${inputs.waybar.packages.${pkgs.system}.waybar}/bin/waybar";
|
||||||
wpctl = "${pkgs.wireplumber}/bin/wpctl";
|
wpctl = "${pkgs.wireplumber}/bin/wpctl";
|
||||||
alacritty = "${pkgs.alacritty}/bin/alacritty";
|
alacritty = "${pkgs.alacritty}/bin/alacritty";
|
||||||
swaylock = "${pkgs.swaylock}/bin/swaylock";
|
swaylock = "${pkgs.swaylock}/bin/swaylock";
|
||||||
rofi = "${pkgs.rofi}/bin/rofi";
|
rofi = "${pkgs.rofi}/bin/rofi";
|
||||||
jq = "${pkgs.jq}/bin/jq";
|
jq = "${pkgs.jq}/bin/jq";
|
||||||
|
rofi-ykman = pkgs.writeShellScriptBin "rofi-ykman" ''
|
||||||
|
accounts=''$(${pkgs.yubikey-manager}/bin/ykman oath accounts list)
|
||||||
|
prompt="YubiKey OATH"
|
||||||
|
account=''$(echo "''${accounts/, TOTP/\n}" | awk '{ print $0 "\0icon\x1fyubioath"; }' | ${rofi} -dmenu -i -p "''$prompt" ''${shortcuts[@]})
|
||||||
|
code=''$(${pkgs.yubikey-manager}/bin/ykman oath accounts code "''$account")
|
||||||
|
IFS=', ' read -r -a code <<< "''$code"
|
||||||
|
echo -n "''${code[-1]}" | ${pkgs.wl-clipboard}/bin/wl-copy;
|
||||||
|
'';
|
||||||
|
|
||||||
launch_alacritty = pkgs.writeShellScriptBin "launch_alacritty" ''
|
launch_alacritty = pkgs.writeShellScriptBin "launch_alacritty" ''
|
||||||
RUNNING_WAYPIPE=false
|
RUNNING_WAYPIPE=false
|
||||||
SSH_CLIENT=""
|
SSH_CLIENT=""
|
||||||
|
@ -31,7 +41,6 @@ let
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ $RUNNING_WAYPIPE == true ]; then
|
if [ $RUNNING_WAYPIPE == true ]; then
|
||||||
PREVIOUS_SESSION_ID=$(grep -z "SSH_SESSION_ID" "/proc/$CHILD_PID/environ" | xargs -0 -n 1 | grep -oP "[0-9]*")
|
PREVIOUS_SESSION_ID=$(grep -z "SSH_SESSION_ID" "/proc/$CHILD_PID/environ" | xargs -0 -n 1 | grep -oP "[0-9]*")
|
||||||
SSH_SESSION_ID=$RANDOM
|
SSH_SESSION_ID=$RANDOM
|
||||||
|
@ -57,6 +66,10 @@ in
|
||||||
indicator = true;
|
indicator = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
wl-clipboard
|
||||||
|
];
|
||||||
|
|
||||||
services.hyprpaper = {
|
services.hyprpaper = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -195,14 +208,14 @@ in
|
||||||
"$mainMod, Q, killactive,"
|
"$mainMod, Q, killactive,"
|
||||||
"$mainMod, A, exec, nautilus"
|
"$mainMod, A, exec, nautilus"
|
||||||
"$mainMod, S, exec, gnome-calendar"
|
"$mainMod, S, exec, gnome-calendar"
|
||||||
"$mainMod, B, exec, MOZ_ENABLE_WAYLAND=1 firefox"
|
"$mainMod, B, exec, MOZ_ENABLE_WAYLAND=1 ${firefox}"
|
||||||
"$mainMod, M, fullscreen, 1"
|
"$mainMod, M, fullscreen, 1"
|
||||||
"$mainMod, F11, fullscreen"
|
"$mainMod, F11, fullscreen"
|
||||||
"$mainMod, F, togglefloating,"
|
"$mainMod, F, togglefloating,"
|
||||||
"$mainMod, SPACE, togglesplit, # dwindle"
|
"$mainMod, SPACE, togglesplit, # dwindle"
|
||||||
"CONTROL_L ALT_L, L, exec, ${swaylock}"
|
"CONTROL_L ALT_L, L, exec, ${swaylock}"
|
||||||
"$mainMod, C, exec, cliphist list | awk '{print $0, \"\0icon\x1fcom.github.davidmhewitt.clipped\"}' | ${rofi} -dmenu -display-columns 2 | cliphist decode | wl-copy"
|
"$mainMod, C, exec, cliphist list | awk '{print $0, \"\0icon\x1fcom.github.davidmhewitt.clipped\"}' | ${rofi} -dmenu -display-columns 2 | cliphist decode | wl-copy"
|
||||||
"$mainMod, Y, exec, ${./files/rofi-ykman.sh}"
|
"$mainMod, Y, exec, ${rofi-ykman}/bin/rofi-ykman"
|
||||||
"$mainMod, N, exec, ${./files/rofi-ssh.sh}"
|
"$mainMod, N, exec, ${./files/rofi-ssh.sh}"
|
||||||
|
|
||||||
"$mainMod, Escape, exec, ${rofi} -show power-menu -modi power-menu:${./files/rofi-power-menu.sh}"
|
"$mainMod, Escape, exec, ${rofi} -show power-menu -modi power-menu:${./files/rofi-power-menu.sh}"
|
||||||
|
|
|
@ -1,72 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# rofi-ykman
|
|
||||||
# YubiKey OATH utility
|
|
||||||
|
|
||||||
#2019 nukeop
|
|
||||||
|
|
||||||
print_usage() {
|
|
||||||
echo "Usage: rofi-ykman [command]"
|
|
||||||
echo
|
|
||||||
echo "Commands:"
|
|
||||||
echo " clipboard Copy the code to the clipboard. (default)"
|
|
||||||
echo " type Type the code."
|
|
||||||
echo
|
|
||||||
}
|
|
||||||
|
|
||||||
clipboard () {
|
|
||||||
if [ $XDG_SESSION_TYPE == "wayland" ]
|
|
||||||
then
|
|
||||||
wl-copy
|
|
||||||
else
|
|
||||||
xsel --clipboard
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
type () {
|
|
||||||
if [ $XDG_SESSION_TYPE == "wayland" ]
|
|
||||||
then
|
|
||||||
wtype -
|
|
||||||
else
|
|
||||||
xargs xdotool type
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# shortcuts
|
|
||||||
type="Alt+1"
|
|
||||||
clipboard="Alt+2"
|
|
||||||
|
|
||||||
main() {
|
|
||||||
accounts=$(ykman oath accounts list)
|
|
||||||
|
|
||||||
shortcuts=(
|
|
||||||
-kb-custom-1 "$type"
|
|
||||||
-kb-custom-2 "$clipboard"
|
|
||||||
)
|
|
||||||
prompt="YubiKey OATH"
|
|
||||||
|
|
||||||
account=$(echo "${accounts/, TOTP/\n}" | awk '{ print $0 "\0icon\x1fyubioath"; }' | rofi -dmenu -i -p "$prompt" ${shortcuts[@]})
|
|
||||||
case $? in
|
|
||||||
1) exit ;;
|
|
||||||
10) command=type ;;
|
|
||||||
11) command=clipboard ;;
|
|
||||||
*) command=$default_command ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
code=$(ykman oath accounts code "$account")
|
|
||||||
IFS=', ' read -r -a code <<< "$code"
|
|
||||||
|
|
||||||
case $command in
|
|
||||||
clipboard) echo -n "${code[-1]}" | wl-copy;;
|
|
||||||
type) echo -n "${code[-1]}" | type;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
default_command="${1:-clipboard}"
|
|
||||||
|
|
||||||
case $default_command in
|
|
||||||
clipboard|type) ;;
|
|
||||||
*) print_usage; exit 1;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
main
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
{ inputs, config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.ssh = {
|
||||||
|
enable = true;
|
||||||
|
matchBlocks = [
|
||||||
|
{
|
||||||
|
host = "Mallorea";
|
||||||
|
hostname = "10.1";
|
||||||
|
port = 22;
|
||||||
|
user = "server";
|
||||||
|
forwardAgent = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,2 +1,6 @@
|
||||||
|
{inputs, pkgs, ...}:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
services.pcscd.enable = true;
|
||||||
|
services.udev.packages = [ pkgs.yubikey-personalization ];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue