Update Hyprland config

This commit is contained in:
Thomas Avé 2023-12-02 00:03:50 +01:00
parent 2f0c0617d8
commit 6557a6d94e
4 changed files with 50 additions and 36 deletions

View File

@ -8,10 +8,20 @@ CHILD_PID=$(pgrep -P $1)
GRAND_CHILD_PID=$(pgrep -P $CHILD_PID)
[[ $? == 0 ]] && [[ $(ps -p $GRAND_CHILD_PID -o comm=) == "ssh" ]] && RUNNING_SSH=true && CHILD_PID=$GRAND_CHILD_PID
if [ $RUNNING_SSH == true ]; then
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]*$')
alacritty -e ssh $CLIENT -t "cd \"\$(readlink -e /proc/\$(cat /tmp/ssh_session_$PORT)/cwd)\"; zsh --login"
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

View File

@ -1,13 +1,18 @@
monitor=,preferred,auto,1
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 {
kb_layout = us
follow_mouse = 1
kb_options = compose:rctrl
}
general {
gaps_in = 2
gaps_in = 1
gaps_out = 5
border_size = 2
col.active_border = rgba(002f5fee)
@ -15,19 +20,21 @@ general {
layout = dwindle
}
xwayland {
force_zero_scaling = true
}
misc {
disable_hyprland_logo = 1
}
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 1
blur {
enabled = false
}
drop_shadow = yes
shadow_range = 2
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
animations {
@ -36,7 +43,6 @@ animations {
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 2, myBezier
animation = windowsOut, 1, 2, default, popin 80%
animation = border, 1, 2, default
@ -47,33 +53,16 @@ animations {
dwindle {
preserve_split = yes
no_gaps_when_only=1
}
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = true
no_gaps_when_only = 1
force_split = 2
}
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
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
# 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, Q, killactive,
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, F11, fullscreen
bind = $mainMod, F, togglefloating,

View File

@ -4,7 +4,7 @@
"spacing": 4, // Gaps between modules (4px)
"modules-left": ["hyprland/window"],
"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": {
"format": "{icon} {volume}%",
"on-click": "helvum",
@ -17,6 +17,9 @@
"all-outputs": false,
"warp-on-scroll": false
},
"hyprland/window": {
"max-length": 50,
},
"tray": {
// "icon-size": 21,
"spacing": 10
@ -33,6 +36,12 @@
"tooltip": false,
"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": {
"interval": 5,
"format": "{used:0.2f}G"

View File

@ -48,6 +48,7 @@ button:hover {
background-color: #ed8274;
}
#window,
#clock,
#battery,
@ -59,13 +60,15 @@ button:hover {
#network,
#pulseaudio,
#wireplumber,
#custom-updates,
#custom-powermode,
#tray {
padding: 0 10px;
border-radius: 3px;
padding: 0 12px;
border-radius: 5px;
color: #ffffff;
background-color: #002F5F;
margin-left:1.5px;
margin-right:1.5px;
margin-left:2px;
margin-right:2px;
}
#window {
@ -73,6 +76,9 @@ button:hover {
font-size:14px;
margin-left:0;
}
window#waybar.empty #window {
background-color: transparent;
}
#clock {
margin-right:0;