Compare commits
3 Commits
38fcc71ca3
...
45200d0108
| Author | SHA1 | Date | |
|---|---|---|---|
|
45200d0108
|
|||
|
b1c4c6d4ac
|
|||
|
840948e179
|
@ -7,6 +7,7 @@ background {
|
||||
monitor =
|
||||
|
||||
{% if hostname == "sputnik" %}
|
||||
# make background transparent, used in combination with screenlock-video
|
||||
color = rgba(00000000)
|
||||
{% else %}
|
||||
path = ~/.config/wallpapers/6000x3376/akira.jpg
|
||||
@ -49,6 +50,7 @@ input-field {
|
||||
shadow_boost = 1.2
|
||||
}
|
||||
|
||||
# ferris image in the center
|
||||
image {
|
||||
monitor =
|
||||
path = ~/.config/wallpapers/ferris-stamp.png
|
||||
@ -64,6 +66,7 @@ image {
|
||||
shadow_boost = 1.2
|
||||
}
|
||||
|
||||
# clock
|
||||
label {
|
||||
monitor =
|
||||
text = <b>$TIME</b>
|
||||
@ -82,16 +85,36 @@ label {
|
||||
shadow_boost = 1.3
|
||||
}
|
||||
|
||||
# battery
|
||||
label {
|
||||
monitor =
|
||||
text = <b>$LAYOUT</b>
|
||||
text = cmd[update:5000] wmutils battery
|
||||
text_align = left
|
||||
color = rgba(200, 200, 200, 1.0)
|
||||
font_size = 20
|
||||
font_family = Noto Sans
|
||||
rotate = 0 # degrees, counter-clockwise
|
||||
|
||||
position = 24, -20
|
||||
halign = left
|
||||
valign = top
|
||||
|
||||
shadow_passes = 2
|
||||
shadow_size = 1
|
||||
shadow_boost = 1.1
|
||||
}
|
||||
|
||||
# keyboard layout
|
||||
label {
|
||||
monitor =
|
||||
text = $LAYOUT
|
||||
text_align = right
|
||||
color = rgba(200, 200, 200, 1.0)
|
||||
font_size = 20
|
||||
font_family = Noto Sans
|
||||
rotate = 0 # degrees, counter-clockwise
|
||||
|
||||
position = -12, -12
|
||||
position = -24, -20
|
||||
halign = right
|
||||
valign = top
|
||||
|
||||
@ -100,6 +123,7 @@ label {
|
||||
shadow_boost = 1.1
|
||||
}
|
||||
|
||||
# greeting text
|
||||
label {
|
||||
monitor =
|
||||
text = GREET_ $user
|
||||
@ -118,6 +142,7 @@ label {
|
||||
shadow_boost = 1.3
|
||||
}
|
||||
|
||||
# number of login attempts
|
||||
label {
|
||||
monitor =
|
||||
text = $ATTEMPTS[0]x $FAIL
|
||||
|
||||
@ -267,7 +267,7 @@ binds {
|
||||
|
||||
Mod+Return { spawn "alacritty"; }
|
||||
Mod+D { spawn "fuzzel"; }
|
||||
Mod+Plus { spawn "/home/hulthe/.local/bin/screenlock"; }
|
||||
Mod+Plus { spawn "loginctl lock-session"; }
|
||||
|
||||
// You can also use a shell:
|
||||
// Mod+T { spawn "bash" "-c" "notify-send hello && exec alacritty"; }
|
||||
@ -297,17 +297,10 @@ binds {
|
||||
Mod+Ctrl+Up { move-window-up; }
|
||||
Mod+Ctrl+Right { move-column-right; }
|
||||
Mod+Ctrl+H { move-column-left; }
|
||||
Mod+Ctrl+J { move-window-down; }
|
||||
Mod+Ctrl+K { move-window-up; }
|
||||
Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
|
||||
Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
|
||||
Mod+Ctrl+L { move-column-right; }
|
||||
|
||||
// Alternative commands that move across workspaces when reaching
|
||||
// the first or last window in a column.
|
||||
// Mod+J { focus-window-or-workspace-down; }
|
||||
// Mod+K { focus-window-or-workspace-up; }
|
||||
// Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
|
||||
// Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
|
||||
|
||||
Mod+Home { focus-column-first; }
|
||||
Mod+End { focus-column-last; }
|
||||
Mod+Ctrl+Home { move-column-to-first; }
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
{% if hostname == "sputnik" %}
|
||||
lock '$HOME/.local/bin/screenlock-video'
|
||||
{% elif hostname == "buran" %}
|
||||
lock 'hyprlock'
|
||||
{% else %}
|
||||
lock '$HOME/.local/bin/screenlock'
|
||||
{% end %}
|
||||
|
||||
@ -1,11 +1,7 @@
|
||||
#!/usr/bin/fish
|
||||
|
||||
# configured for wayland
|
||||
set LOCKPROG swaylock
|
||||
set OPTIONAL_CMDS rg sed grim lockscreen-blur jq
|
||||
set CONFIG "$HOME/.config/sway/swaylock.config"
|
||||
set DEFAULT_ARGS --daemonize --ignore-empty-password --show-failed-attempts --color 302f3b --config $CONFIG
|
||||
set BLUR_FACTOR 40
|
||||
set LOCKPROG hyprlock
|
||||
|
||||
# check if lock program is running
|
||||
if ps -e | grep " $LOCKPROG\$"
|
||||
@ -13,38 +9,4 @@ if ps -e | grep " $LOCKPROG\$"
|
||||
exit 1
|
||||
end
|
||||
|
||||
# check if we have programs required to take a screenshot and do cool stuff with it
|
||||
for cmd in $OPTIONAL_CMDS
|
||||
if not command -v $cmd &>/dev/null
|
||||
echo "$cmd could not be found, falling back to basic mode."
|
||||
$LOCKPROG $DEFAULT_ARGS
|
||||
exit 0
|
||||
end
|
||||
end
|
||||
|
||||
# get a list of outputs/monitors
|
||||
switch $XDG_CURRENT_DESKTOP
|
||||
case Hyprland
|
||||
set outputs (hyprctl monitors | rg Monitor | sed 's/Monitor //' | sed 's/ (ID.*$//')
|
||||
case sway
|
||||
set outputs (swaymsg -t get_outputs -r | rg "name" | sed 's/^.*"name": "//' | sed 's/",$//')
|
||||
case niri
|
||||
set outputs (niri msg --json outputs | jq -r 'keys | join("\n")')
|
||||
case '*'
|
||||
echo "unsupported compositor, falling back to basic mode."
|
||||
$LOCKPROG $DEFAULT_ARGS
|
||||
exit 0
|
||||
end
|
||||
|
||||
# take one screenshot of each output
|
||||
for output in $outputs
|
||||
set img "/tmp/lock-$output.png"
|
||||
grim -o $output -t ppm - | lockscreen-blur -o $img -b $BLUR_FACTOR --stamp ~/.config/wallpapers/ferris-stamp.png &
|
||||
set -a images --image
|
||||
set -a images "$output:$img"
|
||||
end
|
||||
|
||||
# wait for all screenshot jobs to complete
|
||||
wait
|
||||
|
||||
$LOCKPROG $DEFAULT_ARGS $images
|
||||
$LOCKPROG $argv
|
||||
|
||||
@ -2,7 +2,7 @@ def gitfixremote [
|
||||
--name: string = "origin",
|
||||
] {
|
||||
let url = (git remote get-url $name)
|
||||
let parsed = ($url | parse --regex '(https://)?(\w*@)?(?P<host>[^/]+)(/|:)(?P<owner>[^/]+)/(?P<repo>[^/\.]+)')
|
||||
let parsed = ($url | parse --regex '^(\w+://)?(\w*@)?(?P<host>[^/:]+)(:(?P<port>\d+))?(:|/)(?P<owner>\w+)/(?P<repo>[\w_-]+)')
|
||||
|
||||
if ($parsed | is-empty) {
|
||||
print "Unparseable remote"
|
||||
@ -13,7 +13,7 @@ def gitfixremote [
|
||||
|
||||
if ($parsed.host in ["github.com" "git.nubo.sh"]) {
|
||||
git remote set-url $name $"https://($parsed.host)/($parsed.owner)/($parsed.repo).git"
|
||||
git remote set-url --push $name $"($parsed.host):($parsed.owner)/($parsed.repo).git"
|
||||
git remote set-url --push $name $"ssh://($parsed.host)/($parsed.owner)/($parsed.repo).git"
|
||||
} else {
|
||||
print $"Unknown host: ($parsed.host)"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user