Update Hyprland config
This commit is contained in:
parent
2f0c0617d8
commit
6557a6d94e
|
@ -8,10 +8,20 @@ CHILD_PID=$(pgrep -P $1)
|
||||||
GRAND_CHILD_PID=$(pgrep -P $CHILD_PID)
|
GRAND_CHILD_PID=$(pgrep -P $CHILD_PID)
|
||||||
[[ $? == 0 ]] && [[ $(ps -p $GRAND_CHILD_PID -o comm=) == "ssh" ]] && RUNNING_SSH=true && CHILD_PID=$GRAND_CHILD_PID
|
[[ $? == 0 ]] && [[ $(ps -p $GRAND_CHILD_PID -o comm=) == "ssh" ]] && RUNNING_SSH=true && CHILD_PID=$GRAND_CHILD_PID
|
||||||
|
|
||||||
|
|
||||||
if [ $RUNNING_SSH == true ]; then
|
if [ $RUNNING_SSH == true ]; then
|
||||||
CLIENT=$(ps -p $CHILD_PID -o args --no-headers | awk '{ print $2 }')
|
CLIENT=$(ps -p $CHILD_PID -o args --no-headers | awk '{ print $2 }')
|
||||||
PORT=$(ss -tnpa | grep ssh | grep "pid=$CHILD_PID" | awk '{ print $4 }' | grep -o '[0-9]*$')
|
PORT=$(ss -tnpa | grep ssh | grep "pid=$CHILD_PID" | awk '{ print $4 }' | grep -o '[0-9]*$')
|
||||||
alacritty -e ssh $CLIENT -t "cd \"\$(readlink -e /proc/\$(cat /tmp/ssh_session_$PORT)/cwd)\"; zsh --login"
|
alacritty -e ssh $CLIENT -t "cd \"\$(readlink -e /proc/\$(cat /tmp/ssh_session_$PORT)/cwd)\"; zsh --login"
|
||||||
else
|
else
|
||||||
alacritty --working-directory "$(readlink -e /proc/$CHILD_PID/cwd)"
|
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
|
fi
|
||||||
|
|
|
@ -1,13 +1,18 @@
|
||||||
monitor=,preferred,auto,1
|
|
||||||
exec-once=hyprpaper
|
exec-once=hyprpaper
|
||||||
|
env = WLR_DRM_DEVICES,/dev/dri/card0:/dev/dri/card1
|
||||||
|
monitor=,preferred,auto,1
|
||||||
|
exec-once=waybar
|
||||||
|
exec-once=sudo wg-quick up wg0
|
||||||
|
exec-once=sleep 0.7 && swaylock
|
||||||
|
|
||||||
input {
|
input {
|
||||||
kb_layout = us
|
kb_layout = us
|
||||||
follow_mouse = 1
|
follow_mouse = 1
|
||||||
|
kb_options = compose:rctrl
|
||||||
}
|
}
|
||||||
|
|
||||||
general {
|
general {
|
||||||
gaps_in = 2
|
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)
|
||||||
|
@ -15,19 +20,21 @@ general {
|
||||||
layout = dwindle
|
layout = dwindle
|
||||||
}
|
}
|
||||||
|
|
||||||
|
xwayland {
|
||||||
|
force_zero_scaling = true
|
||||||
|
}
|
||||||
|
|
||||||
|
misc {
|
||||||
|
disable_hyprland_logo = 1
|
||||||
|
}
|
||||||
|
|
||||||
decoration {
|
decoration {
|
||||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
|
||||||
|
|
||||||
rounding = 1
|
rounding = 1
|
||||||
|
|
||||||
blur {
|
blur {
|
||||||
enabled = false
|
enabled = false
|
||||||
}
|
}
|
||||||
|
|
||||||
drop_shadow = yes
|
|
||||||
shadow_range = 2
|
|
||||||
shadow_render_power = 3
|
|
||||||
col.shadow = rgba(1a1a1aee)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
animations {
|
animations {
|
||||||
|
@ -36,7 +43,6 @@ animations {
|
||||||
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||||
|
|
||||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||||
|
|
||||||
animation = windows, 1, 2, myBezier
|
animation = windows, 1, 2, myBezier
|
||||||
animation = windowsOut, 1, 2, default, popin 80%
|
animation = windowsOut, 1, 2, default, popin 80%
|
||||||
animation = border, 1, 2, default
|
animation = border, 1, 2, default
|
||||||
|
@ -48,32 +54,15 @@ animations {
|
||||||
dwindle {
|
dwindle {
|
||||||
preserve_split = yes
|
preserve_split = yes
|
||||||
no_gaps_when_only = 1
|
no_gaps_when_only = 1
|
||||||
}
|
force_split = 2
|
||||||
|
|
||||||
master {
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
|
||||||
new_is_master = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gestures {
|
gestures {
|
||||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||||
workspace_swipe = on
|
workspace_swipe = on
|
||||||
|
workspace_swipe_invert = false
|
||||||
}
|
}
|
||||||
|
|
||||||
# Example per-device config
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
|
|
||||||
device:epic-mouse-v1 {
|
|
||||||
sensitivity = -0.5
|
|
||||||
}
|
|
||||||
|
|
||||||
# Example windowrule v1
|
|
||||||
# windowrule = float, ^(kitty)$
|
|
||||||
# Example windowrule v2
|
|
||||||
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
|
||||||
|
|
||||||
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
|
||||||
$mainMod = SUPER
|
$mainMod = SUPER
|
||||||
|
|
||||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||||
|
@ -82,7 +71,7 @@ bind = $mainMod, return, exec, /home/user/.config/awesome/scripts/launch_alacrit
|
||||||
bind = $mainMod SHIFT, return, exec, alacritty
|
bind = $mainMod SHIFT, return, exec, alacritty
|
||||||
bind = $mainMod, Q, killactive,
|
bind = $mainMod, Q, killactive,
|
||||||
bind = $mainMod, A, exec, nautilus
|
bind = $mainMod, A, exec, nautilus
|
||||||
bind = $mainMod, B, exec, firefox
|
bind = $mainMod, B, exec, MOZ_ENABLE_WAYLAND=1 firefox
|
||||||
bind = $mainMod, M, fullscreen, 1
|
bind = $mainMod, M, fullscreen, 1
|
||||||
bind = $mainMod, F11, fullscreen
|
bind = $mainMod, F11, fullscreen
|
||||||
bind = $mainMod, F, togglefloating,
|
bind = $mainMod, F, togglefloating,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"spacing": 4, // Gaps between modules (4px)
|
"spacing": 4, // Gaps between modules (4px)
|
||||||
"modules-left": ["hyprland/window"],
|
"modules-left": ["hyprland/window"],
|
||||||
"modules-center": ["hyprland/workspaces"],
|
"modules-center": ["hyprland/workspaces"],
|
||||||
"modules-right": ["tray", "wireplumber", "cpu", "memory", "temperature", "battery", "clock"],
|
"modules-right": ["tray", "wireplumber", "cpu", "memory", "custom/updates", "temperature", "battery", "clock"],
|
||||||
"wireplumber": {
|
"wireplumber": {
|
||||||
"format": "{icon} {volume}%",
|
"format": "{icon} {volume}%",
|
||||||
"on-click": "helvum",
|
"on-click": "helvum",
|
||||||
|
@ -17,6 +17,9 @@
|
||||||
"all-outputs": false,
|
"all-outputs": false,
|
||||||
"warp-on-scroll": false
|
"warp-on-scroll": false
|
||||||
},
|
},
|
||||||
|
"hyprland/window": {
|
||||||
|
"max-length": 50,
|
||||||
|
},
|
||||||
"tray": {
|
"tray": {
|
||||||
// "icon-size": 21,
|
// "icon-size": 21,
|
||||||
"spacing": 10
|
"spacing": 10
|
||||||
|
@ -33,6 +36,12 @@
|
||||||
"tooltip": false,
|
"tooltip": false,
|
||||||
"interval": 5
|
"interval": 5
|
||||||
},
|
},
|
||||||
|
"custom/updates": {
|
||||||
|
"exec": "bash -c \"checkupdates | wc -l\"",
|
||||||
|
"on-click": "alacritty -e bash -c \"yay ; echo '\nDone, press any key to exit...' ; read\"",
|
||||||
|
"interval": 60,
|
||||||
|
"format": "{} ",
|
||||||
|
},
|
||||||
"memory": {
|
"memory": {
|
||||||
"interval": 5,
|
"interval": 5,
|
||||||
"format": "{used:0.2f}G"
|
"format": "{used:0.2f}G"
|
||||||
|
|
|
@ -48,6 +48,7 @@ button:hover {
|
||||||
background-color: #ed8274;
|
background-color: #ed8274;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#window,
|
#window,
|
||||||
#clock,
|
#clock,
|
||||||
#battery,
|
#battery,
|
||||||
|
@ -59,13 +60,15 @@ button:hover {
|
||||||
#network,
|
#network,
|
||||||
#pulseaudio,
|
#pulseaudio,
|
||||||
#wireplumber,
|
#wireplumber,
|
||||||
|
#custom-updates,
|
||||||
|
#custom-powermode,
|
||||||
#tray {
|
#tray {
|
||||||
padding: 0 10px;
|
padding: 0 12px;
|
||||||
border-radius: 3px;
|
border-radius: 5px;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
background-color: #002F5F;
|
background-color: #002F5F;
|
||||||
margin-left:1.5px;
|
margin-left:2px;
|
||||||
margin-right:1.5px;
|
margin-right:2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#window {
|
#window {
|
||||||
|
@ -73,6 +76,9 @@ button:hover {
|
||||||
font-size:14px;
|
font-size:14px;
|
||||||
margin-left:0;
|
margin-left:0;
|
||||||
}
|
}
|
||||||
|
window#waybar.empty #window {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
#clock {
|
#clock {
|
||||||
margin-right:0;
|
margin-right:0;
|
||||||
|
|
Loading…
Reference in New Issue