Compare commits
2 Commits
38d5b406d9
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a88ca8787 | ||
|
|
b483b92c54 |
@@ -37,6 +37,7 @@ local fileManager = "dolphin"
|
||||
local menu = "fuzzel"
|
||||
local browser = "librewolf"
|
||||
local waybarCmd = "waybar"
|
||||
local lockCmd = "hyprlock"
|
||||
|
||||
|
||||
-------------------
|
||||
@@ -218,6 +219,7 @@ hl.bind(mainMod .. " + M", hl.dsp.exec_cmd("uwsm stop"))
|
||||
hl.bind(mainMod .. " + R", hl.dsp.exec_cmd(terminal))
|
||||
hl.bind(mainMod .. " + SPACE", hl.dsp.exec_cmd(menu))
|
||||
hl.bind(mainMod .. " + D", hl.dsp.exec_cmd(browser))
|
||||
hl.bind(mainMod .. " + L", hl.dsp.exec_cmd(lockCmd)) -- lock the screen (hyprlock)
|
||||
hl.bind(mainMod .. " + X", hl.dsp.window.close())
|
||||
|
||||
hl.bind(mainMod .. " + Q", hl.dsp.focus({ workspace = "-1" }))
|
||||
109
desktop/hypr/hyprlock.conf
Normal file
109
desktop/hypr/hyprlock.conf
Normal file
@@ -0,0 +1,109 @@
|
||||
# sample hyprlock.conf
|
||||
# for more configuration options, refer https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock
|
||||
#
|
||||
# rendered text in all widgets supports pango markup (e.g. <b> or <i> tags)
|
||||
# ref. https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/#general-remarks
|
||||
#
|
||||
# shortcuts to clear password buffer: ESC, Ctrl+U, Ctrl+Backspace
|
||||
#
|
||||
# you can get started by copying this config to ~/.config/hypr/hyprlock.conf
|
||||
#
|
||||
|
||||
$font = Monospace
|
||||
|
||||
general {
|
||||
hide_cursor = false
|
||||
}
|
||||
|
||||
# uncomment to enable fingerprint authentication
|
||||
# auth {
|
||||
# fingerprint {
|
||||
# enabled = true
|
||||
# ready_message = Scan fingerprint to unlock
|
||||
# present_message = Scanning...
|
||||
# retry_delay = 250 # in milliseconds
|
||||
# }
|
||||
# }
|
||||
|
||||
animations {
|
||||
enabled = true
|
||||
bezier = linear, 1, 1, 0, 0
|
||||
animation = fadeIn, 1, 5, linear
|
||||
animation = fadeOut, 1, 5, linear
|
||||
animation = inputFieldDots, 1, 2, linear
|
||||
}
|
||||
|
||||
background {
|
||||
monitor =
|
||||
path = screenshot
|
||||
blur_passes = 3
|
||||
}
|
||||
|
||||
input-field {
|
||||
monitor =
|
||||
size = 20%, 5%
|
||||
outline_thickness = 3
|
||||
inner_color = rgba(255, 255, 255, 0.2) # no fill
|
||||
|
||||
outer_color = rgba(E5D1ED) rgba(40, 40, 40, 1) 45deg
|
||||
check_color = rgba(00ff99ee) rgba(ff6633ee) 120deg
|
||||
fail_color = rgba(ff6633ee) rgba(ff0066ee) 40deg
|
||||
|
||||
font_color = rgb(241, 217, 250)
|
||||
fade_on_empty = false
|
||||
rounding = 15
|
||||
|
||||
font_family = $font
|
||||
placeholder_text = Input password...
|
||||
fail_text = $PAMFAIL$FPRINTFAIL
|
||||
|
||||
# uncomment if you wish to display a message during authentication
|
||||
# check_text = Authenticating...
|
||||
|
||||
# uncomment to use a letter instead of a dot to indicate the typed password
|
||||
dots_text_format = :3
|
||||
dots_size = 0.4
|
||||
dots_spacing = 0.3
|
||||
|
||||
# uncomment to use an input indicator that does not show the password length (similar to swaylock's input indicator)
|
||||
# hide_input = true
|
||||
|
||||
position = 0, -20
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
# TIME
|
||||
label {
|
||||
monitor =
|
||||
text = $TIME # ref. https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/#variable-substitution
|
||||
font_size = 90
|
||||
font_family = $font
|
||||
|
||||
position = -30, 0
|
||||
halign = center
|
||||
valign = top
|
||||
}
|
||||
|
||||
# DATE
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:60000] date +"%A, %d %B %Y" # update every 60 seconds
|
||||
font_size = 25
|
||||
font_family = $font
|
||||
|
||||
position = -30, -150
|
||||
halign = center
|
||||
valign = top
|
||||
}
|
||||
|
||||
label {
|
||||
monitor =
|
||||
text = $LAYOUT[en,ru]
|
||||
font_size = 24
|
||||
onclick = hyprctl switchxkblayout all next
|
||||
|
||||
position = 250, -20
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
@@ -107,7 +107,8 @@
|
||||
"tooltip-format": "{desc}"
|
||||
},
|
||||
"clock": {
|
||||
"format": "{:%I:%M %p %a, %b %d}",
|
||||
"format": "{:%H:%M %a, %b %d}",
|
||||
"timezone": "America/New_York",
|
||||
"tooltip": true,
|
||||
"tooltip-format": "<tt>{calendar}</tt>",
|
||||
"calendar": {
|
||||
@@ -151,7 +152,8 @@
|
||||
"sort-by-number": true
|
||||
},
|
||||
"clock#portrait": {
|
||||
"format": "{:%I:%M %p}",
|
||||
"format": "{:%H:%M}",
|
||||
"timezone": "America/New_York",
|
||||
"tooltip": true,
|
||||
"tooltip-format": "<tt>{calendar}</tt>",
|
||||
"calendar": {
|
||||
|
||||
Binary file not shown.
@@ -4,15 +4,34 @@ import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def _shutdown_cmd() -> str:
|
||||
"""Clean logout command for this session.
|
||||
|
||||
The session runs under UWSM (hyprland-uwsm). There, `hyprctl dispatch exit`
|
||||
can leave SDDM on a black screen instead of logging out, while `uwsm stop`
|
||||
tears the session down cleanly. Fall back to the compositor dispatcher when
|
||||
UWSM is not in use.
|
||||
"""
|
||||
if shutil.which("uwsm"):
|
||||
return "uwsm stop"
|
||||
return "hyprctl dispatch exit"
|
||||
|
||||
|
||||
ENTRIES = [
|
||||
("Lock", "command -v hyprlock >/dev/null 2>&1 && exec hyprlock"),
|
||||
("Log out", "hyprctl dispatch exit"),
|
||||
("Lock", "hyprlock"),
|
||||
("Log out", _shutdown_cmd()),
|
||||
("Suspend", "systemctl suspend"),
|
||||
("Reboot", "systemctl reboot"),
|
||||
("Shut down", "systemctl poweroff"),
|
||||
]
|
||||
|
||||
|
||||
def _notify(message: str) -> None:
|
||||
if shutil.which("notify-send"):
|
||||
subprocess.Popen(["notify-send", "Session menu", message])
|
||||
|
||||
|
||||
def main() -> int:
|
||||
if not shutil.which("fuzzel"):
|
||||
print("fuzzel not found", file=sys.stderr)
|
||||
@@ -27,9 +46,14 @@ def main() -> int:
|
||||
)
|
||||
choice = result.stdout.strip()
|
||||
for name, command in ENTRIES:
|
||||
if name == choice:
|
||||
subprocess.Popen(["sh", "-c", command])
|
||||
break
|
||||
if name != choice:
|
||||
continue
|
||||
program = command.split()[0]
|
||||
if not shutil.which(program):
|
||||
_notify(f"{program} not found")
|
||||
return 1
|
||||
subprocess.Popen(["sh", "-c", command])
|
||||
break
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
109
laptop/hyprlock.conf
Normal file
109
laptop/hyprlock.conf
Normal file
@@ -0,0 +1,109 @@
|
||||
# sample hyprlock.conf
|
||||
# for more configuration options, refer https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock
|
||||
#
|
||||
# rendered text in all widgets supports pango markup (e.g. <b> or <i> tags)
|
||||
# ref. https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/#general-remarks
|
||||
#
|
||||
# shortcuts to clear password buffer: ESC, Ctrl+U, Ctrl+Backspace
|
||||
#
|
||||
# you can get started by copying this config to ~/.config/hypr/hyprlock.conf
|
||||
#
|
||||
|
||||
$font = Monospace
|
||||
|
||||
general {
|
||||
hide_cursor = false
|
||||
}
|
||||
|
||||
# uncomment to enable fingerprint authentication
|
||||
# auth {
|
||||
# fingerprint {
|
||||
# enabled = true
|
||||
# ready_message = Scan fingerprint to unlock
|
||||
# present_message = Scanning...
|
||||
# retry_delay = 250 # in milliseconds
|
||||
# }
|
||||
# }
|
||||
|
||||
animations {
|
||||
enabled = true
|
||||
bezier = linear, 1, 1, 0, 0
|
||||
animation = fadeIn, 1, 5, linear
|
||||
animation = fadeOut, 1, 5, linear
|
||||
animation = inputFieldDots, 1, 2, linear
|
||||
}
|
||||
|
||||
background {
|
||||
monitor =
|
||||
path = screenshot
|
||||
blur_passes = 3
|
||||
}
|
||||
|
||||
input-field {
|
||||
monitor =
|
||||
size = 20%, 5%
|
||||
outline_thickness = 3
|
||||
inner_color = rgba(255, 255, 255, 0.2) # no fill
|
||||
|
||||
outer_color = rgba(E5D1ED) rgba(40, 40, 40, 1) 45deg
|
||||
check_color = rgba(00ff99ee) rgba(ff6633ee) 120deg
|
||||
fail_color = rgba(ff6633ee) rgba(ff0066ee) 40deg
|
||||
|
||||
font_color = rgb(241, 217, 250)
|
||||
fade_on_empty = false
|
||||
rounding = 15
|
||||
|
||||
font_family = $font
|
||||
placeholder_text = Input password...
|
||||
fail_text = $PAMFAIL$FPRINTFAIL
|
||||
|
||||
# uncomment if you wish to display a message during authentication
|
||||
# check_text = Authenticating...
|
||||
|
||||
# uncomment to use a letter instead of a dot to indicate the typed password
|
||||
dots_text_format = :3
|
||||
dots_size = 0.4
|
||||
dots_spacing = 0.3
|
||||
|
||||
# uncomment to use an input indicator that does not show the password length (similar to swaylock's input indicator)
|
||||
# hide_input = true
|
||||
|
||||
position = 0, -20
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
# TIME
|
||||
label {
|
||||
monitor =
|
||||
text = $TIME # ref. https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/#variable-substitution
|
||||
font_size = 90
|
||||
font_family = $font
|
||||
|
||||
position = -30, 0
|
||||
halign = center
|
||||
valign = top
|
||||
}
|
||||
|
||||
# DATE
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:60000] date +"%A, %d %B %Y" # update every 60 seconds
|
||||
font_size = 25
|
||||
font_family = $font
|
||||
|
||||
position = -30, -150
|
||||
halign = center
|
||||
valign = top
|
||||
}
|
||||
|
||||
label {
|
||||
monitor =
|
||||
text = $LAYOUT[en,ru]
|
||||
font_size = 24
|
||||
onclick = hyprctl switchxkblayout all next
|
||||
|
||||
position = 250, -20
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user