`date`
This commit is contained in:
parent
a2e454015c
commit
d6ff7492b8
|
@ -14,6 +14,43 @@
|
||||||
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";
|
||||||
|
launch_alacritty = pkgs.writeShellScriptBin "launch_alacritty" ''
|
||||||
|
RUNNING_WAYPIPE=false
|
||||||
|
SSH_CLIENT=""
|
||||||
|
CHILD_PID=$(pgrep -P "$1")
|
||||||
|
|
||||||
|
if [ "$GRAND_CHILD_PID" != "" ]; then
|
||||||
|
GRAND_CHILD_NAME=$(ps -p "$GRAND_CHILD_PID" -o comm=)
|
||||||
|
if [ "$GRAND_CHILD_NAME" == "ssh" ]; then
|
||||||
|
CHILD_PID=$GRAND_CHILD_PID
|
||||||
|
SSH_CLIENT=$(ps -p "$CHILD_PID" -o args --no-headers | awk '{ print $2 }')
|
||||||
|
fi
|
||||||
|
if [ "$GRAND_CHILD_NAME" == "waypipe" ]; then
|
||||||
|
RUNNING_WAYPIPE=true
|
||||||
|
CHILD_PID=$(pgrep -P "$GRAND_CHILD_PID")
|
||||||
|
SSH_CLIENT=$(ps -p "$GRAND_CHILD_PID" -o args --no-headers | awk '{ print $4 }')
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
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]*")
|
||||||
|
SSH_SESSION_ID=$RANDOM
|
||||||
|
${alacritty} -e zsh -c "SSH_SESSION_ID=$SSH_SESSION_ID waypipe ssh -t \"$SSH_CLIENT\" env SSH_SESSION_ID=\"$SSH_SESSION_ID\" PREVIOUS_SESSION_ID=\"$PREVIOUS_SESSION_ID\" \"zsh --login\""
|
||||||
|
else
|
||||||
|
if [ "$(ps -p "$1" -o comm=)" == "alacritty" ]; then
|
||||||
|
CWD=$(readlink -e /proc/"$CHILD_PID"/cwd)
|
||||||
|
if [ "$CWD" != "" ]; then
|
||||||
|
${alacritty} --working-directory "$CWD"
|
||||||
|
else
|
||||||
|
${alacritty}
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
${alacritty}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
'';
|
||||||
in {
|
in {
|
||||||
services.kdeconnect = {
|
services.kdeconnect = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -27,6 +64,7 @@ in {
|
||||||
systemd.enable = true;
|
systemd.enable = true;
|
||||||
systemd.enableXdgAutostart = true;
|
systemd.enableXdgAutostart = true;
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
|
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||||
plugins = [
|
plugins = [
|
||||||
inputs.split-monitor-workspaces.packages.${pkgs.system}.split-monitor-workspaces
|
inputs.split-monitor-workspaces.packages.${pkgs.system}.split-monitor-workspaces
|
||||||
];
|
];
|
||||||
|
@ -36,12 +74,16 @@ in {
|
||||||
"hyprpaper"
|
"hyprpaper"
|
||||||
"${wl-paste} --type text --watch cliphist store"
|
"${wl-paste} --type text --watch cliphist store"
|
||||||
"${wl-paste} --type image --watch cliphist store"
|
"${wl-paste} --type image --watch cliphist store"
|
||||||
"${waybar}"
|
# "${waybar}"
|
||||||
];
|
];
|
||||||
env = [
|
env = [
|
||||||
"WLR_NO_HARDWARE_CURSORS,1"
|
"WLR_NO_HARDWARE_CURSORS,1"
|
||||||
"TERMINAL,${alacritty}"
|
"TERMINAL,${alacritty}"
|
||||||
|
"WLR_RENDERER_ALLOW_SOFTWARE,1"
|
||||||
];
|
];
|
||||||
|
debug = {
|
||||||
|
disable_logs = false;
|
||||||
|
};
|
||||||
windowrulev2 = [
|
windowrulev2 = [
|
||||||
"float, title:^(rofi)(.*)$"
|
"float, title:^(rofi)(.*)$"
|
||||||
"center, title:^(rofi)(.*)$"
|
"center, title:^(rofi)(.*)$"
|
||||||
|
@ -62,8 +104,8 @@ in {
|
||||||
gaps_in = 1;
|
gaps_in = 1;
|
||||||
gaps_out = 5;
|
gaps_out = 5;
|
||||||
border_size = 2;
|
border_size = 2;
|
||||||
col.active_border = "rgba(002f5fee)";
|
"col.active_border" = "rgba(002f5fee)";
|
||||||
col.inactive_border = "rgba(ffffff00)";
|
"col.inactive_border" = "rgba(ffffff00)";
|
||||||
layout = "dwindle";
|
layout = "dwindle";
|
||||||
};
|
};
|
||||||
input = {
|
input = {
|
||||||
|
@ -117,7 +159,7 @@ in {
|
||||||
"$mainMod, mouse:273, resizewindow"
|
"$mainMod, mouse:273, resizewindow"
|
||||||
];
|
];
|
||||||
bind = [
|
bind = [
|
||||||
"$mainMod, return, exec, ${scripts}/launch_alacritty.sh $(hyprctl activewindow -j | jq .pid)"
|
"$mainMod, return, exec, ${launch_alacritty}/bin/launch_alacritty $(hyprctl activewindow -j | ${jq} .pid)"
|
||||||
"$mainMod SHIFT, return, exec, ${alacritty}"
|
"$mainMod SHIFT, return, exec, ${alacritty}"
|
||||||
"$mainMod, Q, killactive,"
|
"$mainMod, Q, killactive,"
|
||||||
"$mainMod, A, exec, nautilus"
|
"$mainMod, A, exec, nautilus"
|
||||||
|
@ -149,7 +191,6 @@ in {
|
||||||
"$mainMod,XF86AudioLowerVolume, exec, ${playerctl} previous"
|
"$mainMod,XF86AudioLowerVolume, exec, ${playerctl} previous"
|
||||||
", Print, exec, grim -g \"$(slurp -d)\" - | wl-copy"
|
", Print, exec, grim -g \"$(slurp -d)\" - | wl-copy"
|
||||||
|
|
||||||
"focus with mainMod + arrow keys"
|
|
||||||
"$mainMod, H, exec, ${scripts}/vim-hypr-nav.sh l"
|
"$mainMod, H, exec, ${scripts}/vim-hypr-nav.sh l"
|
||||||
"$mainMod, L, exec, ${scripts}/vim-hypr-nav.sh r"
|
"$mainMod, L, exec, ${scripts}/vim-hypr-nav.sh r"
|
||||||
"$mainMod, K, exec, ${scripts}/vim-hypr-nav.sh u"
|
"$mainMod, K, exec, ${scripts}/vim-hypr-nav.sh u"
|
||||||
|
|
Loading…
Reference in New Issue