├── .gitignore ├── Readme.md ├── assets ├── Arch.svg ├── BlazinLock.png ├── Installation.gif ├── Logo.png ├── Styles.gif ├── Updating.gif ├── blazinlockes.png ├── blazinlockew.png ├── blazinlockhs.png ├── blazinlockhw.png ├── blazinlocki.png └── blazinlocks.png ├── blazinlock ├── flake.nix ├── hyprlock ├── blazinscripts.sh ├── music.webp └── pfp.jpg └── installer.sh /.gitignore: -------------------------------------------------------------------------------- 1 | flake.lock 2 | result 3 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | Logo 4 | 5 | 6 |
7 |
8 | 9 |
10 | A Modern HyprLock Theme which is compatible with End4dots, Hyprdots adn Default Hyprland Installations 11 |
12 |
13 | 14 | ### Easy to Use and Has the following Features 15 | * Music Widget 16 | * Time Widget 17 | * PFP Widget along with Username and Hostname 18 | * Battery Widget 19 | * Modern Looking Input Box 20 | * Auto Color Pallete generation for End4 and Hyprdots 21 | * HyprLock Config Creation using Various Methords 22 | * Screenshot with End4 (Ags) Material Color Scheme 23 | * Current Wallpaper with End4 (Ags) Material Color Scheme 24 | * Screenshot with Hyprdots (Waybar) Color Scheme 25 | * Current Wallpaper with Hyprdots (Waybar) Color Scheme 26 | * Default Screenshot 27 | * Custom Image (Any Custom Image can be set as Hyprlock bg but it is not yet included in the Installer, you can run this manually) 28 | 29 |
30 |
31 |
 Introduction 
   32 |
 Installation 
   33 |
 Styles 
   34 |
35 | 36 |
37 |
38 |
39 | 40 | 41 | 42 | --- 43 | 44 | > [!CAUTION] 45 | > The script modifies your `hyprland` config to enable BlazinLock on Super + L Keybind. 46 | 47 | To install, execute the following commands: 48 | 49 | ```shell 50 | git clone https://github.com/Thunder-Blaze/BlazinLock/ ~/BlazinLock 51 | cd ~/BlazinLock 52 | chmod +x installer.sh 53 | ./installer.sh 54 | ``` 55 | 56 | Please reboot or relogin after the install script completes. 57 | 58 | > [!INFO] 59 | > If the BlazinLock is not getting triggered by Default even after choosing yes in Installer 60 | > Manually set it to default by following the given instructions 61 | 62 | ### Hyprdots 63 | - In `.config/hypr/keybindings.conf`, replace `swaylock` with `blazinlock -s` 64 | - you can replace -s with the type of lock you want 65 | 66 | ### End-4 Dots 67 | - In `.config/hypr/hyprlock/keybinds.conf`, replace `loginctl lock-session` with `blazinlock -s` 68 | - you can replace -s with the type of lock you want 69 | 70 | ### Normal Installations 71 | - add this line to your `.config/hypr/hyprlock.conf` 72 | - you can replace -s with the type of lock you want 73 | ```shell 74 | bind = $mainMod, L, exec, blazinlock -s 75 | ``` 76 | 77 | > [!IMPORTANT] 78 | > Please note that any hyprlock configurations you had will be overwritten. 79 | > However, all replaced configs are backed up and may be recovered from `~/.config/hyde/hyprlock.conf.backup` and `~/.config/hyde/hyprlock.backup/`. 80 | 81 | 82 | 83 | --- 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 |
blazinlock -ew
blazinlock -es
blazinlock -hw
blazinlock -hs
blazinlock -i "path"
blazinlock -s
112 | 113 | 114 | ## CUSTOMIZING PFP 115 | After Installation, goto "~/.config/hyde/hyprlock" 116 | Replace the pfp.jpg with the image you want as your PFP 117 | 118 | > [!IMPORTANT] 119 | > The only File types that are currently supported are JPG, PNG and WEBP. 120 | 121 | 122 | ## RESOURCES 123 | Special Thanks to 124 | In-saiyan's [hyprlock-config](https://github.com/In-Saiyan/hyprlock-config) 125 | ashish-kus's [hyprlock.conf](https://gist.github.com/ashish-kus/dd562b0bf5e8488a09e0b9c289f4574c) 126 | -------------------------------------------------------------------------------- /assets/Arch.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /assets/BlazinLock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder-Blaze/BlazinLock/380089954f89ff5f85b34983a3c015670452a198/assets/BlazinLock.png -------------------------------------------------------------------------------- /assets/Installation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder-Blaze/BlazinLock/380089954f89ff5f85b34983a3c015670452a198/assets/Installation.gif -------------------------------------------------------------------------------- /assets/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder-Blaze/BlazinLock/380089954f89ff5f85b34983a3c015670452a198/assets/Logo.png -------------------------------------------------------------------------------- /assets/Styles.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder-Blaze/BlazinLock/380089954f89ff5f85b34983a3c015670452a198/assets/Styles.gif -------------------------------------------------------------------------------- /assets/Updating.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder-Blaze/BlazinLock/380089954f89ff5f85b34983a3c015670452a198/assets/Updating.gif -------------------------------------------------------------------------------- /assets/blazinlockes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder-Blaze/BlazinLock/380089954f89ff5f85b34983a3c015670452a198/assets/blazinlockes.png -------------------------------------------------------------------------------- /assets/blazinlockew.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder-Blaze/BlazinLock/380089954f89ff5f85b34983a3c015670452a198/assets/blazinlockew.png -------------------------------------------------------------------------------- /assets/blazinlockhs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder-Blaze/BlazinLock/380089954f89ff5f85b34983a3c015670452a198/assets/blazinlockhs.png -------------------------------------------------------------------------------- /assets/blazinlockhw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder-Blaze/BlazinLock/380089954f89ff5f85b34983a3c015670452a198/assets/blazinlockhw.png -------------------------------------------------------------------------------- /assets/blazinlocki.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder-Blaze/BlazinLock/380089954f89ff5f85b34983a3c015670452a198/assets/blazinlocki.png -------------------------------------------------------------------------------- /assets/blazinlocks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder-Blaze/BlazinLock/380089954f89ff5f85b34983a3c015670452a198/assets/blazinlocks.png -------------------------------------------------------------------------------- /blazinlock: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | function help { 4 | if [ -s /usr/bin/figlet ]; then 5 | figlet Help 6 | else 7 | echo "Help" 8 | fi 9 | echo "Usage: blazinlock [OPTIONS] [OPTION_VALUE](Optional)" 10 | echo "Eg -" 11 | echo " blazinlock -cn" 12 | echo " blazinlock -hw" 13 | echo " blazinlock -i \$HOME/Pictures/background.png" 14 | echo " blazinlock -s" 15 | echo "" 16 | echo "=============================================================" 17 | echo "OPTIONS" 18 | echo " -cn = Configure for NixOS (Copies the Hyprlock Folder)" 19 | echo " -hs = Hyprdots (waybar) Integration Screenshot" 20 | echo " -hw = Hyprdots (waybar) Integration Wallpaper" 21 | echo " -es = End 4 Dots (ags) Integration Screenshot" 22 | echo " -ew = End 4 Dots (ags) Integration Wallpaper" 23 | echo " -s = Screenshot Type Hyprlock" 24 | echo " -i = User Image Type Hyprlock" 25 | } 26 | 27 | 28 | if [ "$#" -eq 0 ]; then 29 | help 30 | echo "Falling Back to Screenshot" 31 | Standalone 0 32 | fi 33 | 34 | # Define paths 35 | HYPRLOCK_DIR="$HOME/.config/hypr/" 36 | WAYBAR_THEME_CSS="$HOME/.config/waybar/theme.css" 37 | AGS_THEME_CSS="$HOME/.local/state/ags/scss/_material.scss" 38 | 39 | HyperdotIntegration() { 40 | local TYPE=$1 41 | 42 | if [ $TYPE -eq 0 ]; then 43 | BACKGROUND_IMAGE=screenshot 44 | else 45 | BACKGROUND_IMAGE=$(swww query | grep -oP 'currently displaying: image: \K.*') 46 | if [ -z "$BACKGROUND_IMAGE" ] || [ ! -f "$BACKGROUND_IMAGE" ]; then 47 | echo "No valid background image found from swww." 48 | exit 1 49 | fi 50 | fi 51 | 52 | # Extract Theme Colors 53 | if [ "$2" == "end4" ]; then 54 | # AGS INTEGRATION (End 4 Dots) 55 | FG_COLOR=$(grep "\$primary:" "$AGS_THEME_CSS" | awk '{print $2}' | tr -d ';') 56 | BG_COLOR=$(grep "\$background:" "$AGS_THEME_CSS" | awk '{print $2}' | tr -d ';') 57 | TEXT_COLOR=$(grep "\$onBackground:" "$AGS_THEME_CSS" | awk '{print $2}' | tr -d ';') 58 | else 59 | # WAYBAR INTEGRATION 60 | FG_COLOR=$(grep 'main-fg' "$WAYBAR_THEME_CSS" | awk -F'rgba\\(|,|\\)' '{printf "%02X%02X%02X\n", $2, $3, $4}') 61 | BG_COLOR=$(grep 'main-bg' "$WAYBAR_THEME_CSS" | awk -F'rgba\\(|,|\\)' '{printf "%02X%02X%02X\n", $2, $3, $4}') 62 | TEXT_COLOR=$(grep 'wb-act-bg' "$WAYBAR_THEME_CSS" | awk -F'rgba\\(|,|\\)' '{printf "%02X%02X%02X\n", $2, $3, $4}') 63 | fi 64 | 65 | # Check if colors were extracted successfully 66 | if [ -z "$FG_COLOR" ] || [ -z "$BG_COLOR" ] || [ -z "$TEXT_COLOR" ]; then 67 | echo "Error: Failed to extract colors from $THEME_CSS. Please check the file." 68 | exit 1 69 | fi 70 | 71 | BG_COLOR=${BG_COLOR: -6} 72 | FG_COLOR=${FG_COLOR: -6} 73 | TEXT_COLOR=${TEXT_COLOR: -6} 74 | 75 | cd $HYPRLOCK_DIR 76 | chmod u+w "hyprlock.conf" 77 | 78 | # Create the hyprlock config 79 | cat << EOF > "hyprlock.conf" 80 | general { 81 | grace = 1 82 | ignore_empty_input = true 83 | text_trim = false 84 | disable_loading_bar = true 85 | } 86 | 87 | background { 88 | color = rgba(${BG_COLOR}FF) 89 | path = $BACKGROUND_IMAGE 90 | blur_size = 2 91 | blur_passes = 3 92 | zindex = -1 93 | } 94 | 95 | # INPUT FIELD 96 | input-field { 97 | monitor = 98 | size = 230, 50 99 | outline_thickness = 4 100 | dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8 101 | dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0 102 | dots_center = true 103 | outer_color = rgba(${TEXT_COLOR}99) 104 | fail_color = rgba(${TEXT_COLOR}99) 105 | inner_color = rgba(${BG_COLOR}FF) 106 | font_color = rgba(${TEXT_COLOR}FF) 107 | fade_on_empty = false 108 | font_family = JetBrainsMono Nerd Font Mono 109 | placeholder_text = Input Password... 110 | hide_input = false 111 | position = 0, -220 112 | halign = center 113 | valign = center 114 | zindex = 10 115 | } 116 | 117 | # CLOCK/TIME 118 | label { 119 | monitor = 120 | text = \$TIME 121 | color = rgba(255, 255, 255, 1) 122 | shadow_color = rgba(${BG_COLOR}AA) 123 | font_size = 90 124 | shadow_passes = 3 125 | shadow_boost = 0.5 126 | font_family = JetBrains Mono Nerd Font Mono ExtraBold 127 | position = 0, -100 128 | halign = center 129 | valign = top 130 | zindex = 3 131 | } 132 | 133 | # Big Rectangle 134 | shape { 135 | monitor = 136 | size = 100%, 60 137 | color = rgba(${BG_COLOR}FF) 138 | halign = center 139 | valign = bottom 140 | zindex = 0 141 | } 142 | 143 | # Small Rectangle for Battery 144 | shape { 145 | monitor = 146 | size = 70, 32 147 | rounding = 12 148 | color = rgba(${FG_COLOR}FF) 149 | halign = right 150 | valign = bottom 151 | position = -14, 14 152 | zindex = 1 153 | } 154 | 155 | # Battery Status 156 | label { 157 | monitor = 158 | text = cmd[update:5000] ~/.config/hypr/hyprlock/blazinscripts.sh -bat 159 | shadow_passes = 1 160 | shadow_boost = 0.5 161 | color = rgba(${BG_COLOR}FF) 162 | shadow_color = rgba(${BG_COLOR}AA) 163 | font_size = 14 164 | font_family = Maple Mono 165 | position = -21, -8 166 | halign = right 167 | valign = bottom 168 | zindex = 2 169 | } 170 | 171 | # Small Rectangle for Session 172 | shape { 173 | monitor = 174 | size = 150, 32 175 | rounding = 10 176 | color = rgba(${FG_COLOR}FF) 177 | halign = center 178 | valign = bottom 179 | position = 0, 14 180 | zindex = 1 181 | } 182 | 183 | # Current Session Status 184 | label { 185 | monitor = 186 | text = cmd[update:24000000] echo "Session : \$XDG_SESSION_DESKTOP" 187 | # shadow_passes = 1 188 | # shadow_boost = 0.5 189 | color = rgba(${BG_COLOR}FF) 190 | shadow_color = rgba(${BG_COLOR}AA) 191 | font_size = 12 192 | font_family = Jost Medium 193 | position = 0, -5 194 | halign = center 195 | valign = bottom 196 | zindex = 2 197 | } 198 | 199 | # PFP Image 200 | image { 201 | monitor = 202 | path = \$HOME/.config/hypr/hyprlock/pfp.jpg 203 | size = 100 204 | rounding = -1 205 | border_size = 3 206 | border_color = rgba(${TEXT_COLOR}FF) 207 | position = 10, 10 208 | halign = left 209 | valign = bottom 210 | zindex = 3 211 | } 212 | 213 | 214 | # Username 215 | label { 216 | monitor = 217 | text = \$USER 218 | shadow_passes = 1 219 | shadow_boost = 0.5 220 | color = rgba(${FG_COLOR}FF) 221 | shadow_color = rgba(${FG_COLOR}AA) 222 | font_size = 14 223 | font_family = Jost Bold Italic 224 | position = 120, 28 225 | halign = left 226 | valign = bottom 227 | zindex = 2 228 | } 229 | 230 | # Hostname 231 | label { 232 | monitor = 233 | text = cmd[update:24000000] echo "@\$(uname -n)" 234 | shadow_passes = 1 235 | shadow_boost = 0.5 236 | color = rgba(${TEXT_COLOR}BB) 237 | shadow_color = rgba(${TEXT_COLOR}AA) 238 | font_size = 14 239 | font_family = Jost Bold Italic 240 | position = 120, -20 241 | halign = left 242 | valign = bottom 243 | zindex = 2 244 | } 245 | 246 | # Lock Icon 247 | label { 248 | monitor = 249 | text =  250 | shadow_passes = 1 251 | shadow_boost = 0.5 252 | color = rgba(${TEXT_COLOR}FF) 253 | shadow_color = rgba(${TEXT_COLOR}AA) 254 | font_size = 20 255 | font_family = Font Awesome 6 Free Solid 256 | position = 0, -65 257 | halign = center 258 | valign = top 259 | zindex = 2 260 | } 261 | # PLAYER IMAGE 262 | image { 263 | monitor = 264 | path = \$HOME/.config/hypr/hyprlock/music.webp 265 | size = 60 # lesser side if not 1:1 ratio 266 | rounding = 5 # negative values mean circle 267 | border_size = 0 268 | rotate = 0 # degrees, counter-clockwise 269 | reload_time = 2 270 | reload_cmd = ~/.config/hypr/hyprlock/blazinscripts.sh -music --arturl 271 | position = -106, 0 272 | halign = center 273 | valign = center 274 | zindex = 1 275 | } 276 | 277 | # PLAYER BOX 278 | shape { 279 | monitor = 280 | color = rgba(${BG_COLOR}BB) 281 | size = 300, 84 282 | rounding = 10 # negative values mean circle 283 | position = 0, 0 284 | halign = center 285 | valign = center 286 | zindex = 0 287 | } 288 | 289 | # PLAYER TITTLE 290 | label { 291 | monitor = 292 | text = cmd[update:1000] echo "\$(~/.config/hypr/hyprlock/blazinscripts.sh -music --title)" 293 | color = rgba(${TEXT_COLOR}FF) 294 | font_size = 14 295 | font_family = JetBrains Mono Nerd Font Mono ExtraBold 296 | position = 50, -12 297 | halign = center 298 | valign = center 299 | zindex = 1 300 | } 301 | 302 | # PLAYER STATUS 303 | label { 304 | monitor = 305 | text = cmd[update:1000] echo "\$(~/.config/hypr/hyprlock/blazinscripts.sh -music --status)" 306 | color = rgba(${TEXT_COLOR}FF) 307 | font_size = 18 308 | font_family = JetBrains Mono Nerd Font Mono Bold 309 | position = -50, -15 310 | halign = center 311 | valign = center 312 | zindex = 1 313 | } 314 | 315 | # PLAYER SOURCE 316 | label { 317 | monitor = 318 | text = cmd[update:1000] echo "\$(~/.config/hypr/hyprlock/blazinscripts.sh -music --source)" 319 | color = rgba(${FG_COLOR}99) 320 | font_size = 10 321 | font_family = JetBrains Mono Nerd Font Mono 322 | position = -20, 18 323 | halign = center 324 | valign = center 325 | zindex = 1 326 | } 327 | 328 | # PLAYER Artist 329 | label { 330 | monitor = 331 | text = cmd[update:1000] echo "\$(~/.config/hypr/hyprlock/blazinscripts.sh -music --artist)" 332 | color = rgba(${FG_COLOR}BB) 333 | font_size = 12 334 | font_family = JetBrains Mono Nerd Font Mono 335 | position = 10, -35 336 | halign = center 337 | valign = center 338 | zindex = 1 339 | } 340 | EOF 341 | chmod u-w "hyprlock.conf" 342 | echo "Generated Hyprland/End4 Config" 343 | } 344 | 345 | Standalone() { 346 | local TYPE=$1 347 | 348 | if [ $TYPE -eq 0 ]; then 349 | BACKGROUND_IMAGE=screenshot 350 | else 351 | BACKGROUND_IMAGE="$2" 352 | echo $2 353 | if [ -z "$BACKGROUND_IMAGE" ] || [ ! -f "$BACKGROUND_IMAGE" ]; then 354 | echo "No valid path provided for background image." 355 | exit 1 356 | elif [[ "$BACKGROUND_IMAGE" =~ ^.*\.{gif}$ ]]; then 357 | echo "GIFs are not supported ATM" 358 | exit 1 359 | fi 360 | fi 361 | 362 | cd $HYPRLOCK_DIR 363 | chmod u+w "hyprlock.conf" 364 | 365 | # Create the hyprlock config 366 | cat << EOF > "hyprlock.conf" 367 | general { 368 | grace = 1 369 | ignore_empty_input = true 370 | text_trim = false 371 | disable_loading_bar = true 372 | } 373 | 374 | background { 375 | color = rgba(222222FF) 376 | path = $BACKGROUND_IMAGE 377 | blur_size = 2 378 | blur_passes = 3 379 | zindex = -1 380 | } 381 | 382 | # INPUT FIELD 383 | input-field { 384 | monitor = 385 | size = 230, 50 386 | outline_thickness = 4 387 | dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8 388 | dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0 389 | dots_center = true 390 | outer_color = rgba(22222299) 391 | fail_color = rgba(22222299) 392 | inner_color = rgba(255, 255, 255, 0.8) 393 | font_color = rgb(34, 34, 34) 394 | fade_on_empty = false 395 | font_family = JetBrainsMono Nerd Font Mono 396 | placeholder_text = Input Password... 397 | hide_input = false 398 | position = 0, -220 399 | halign = center 400 | valign = center 401 | zindex = 10 402 | } 403 | 404 | # CLOCK/TIME 405 | label { 406 | monitor = 407 | text = \$TIME 408 | color = rgba(255, 255, 255, 1) 409 | font_size = 90 410 | shadow_passes = 3 411 | shadow_boost = 0.5 412 | font_family = JetBrains Mono Nerd Font Mono ExtraBold 413 | position = 0, -100 414 | halign = center 415 | valign = top 416 | zindex = 3 417 | } 418 | 419 | # Big Rectangle 420 | shape { 421 | monitor = 422 | size = 100%, 60 423 | color = rgba(222222AA) 424 | halign = center 425 | valign = bottom 426 | zindex = 0 427 | } 428 | 429 | # Small Rectangle for Battery 430 | shape { 431 | monitor = 432 | size = 70, 32 433 | rounding = 12 434 | color = rgba(FFFFFFFF) 435 | halign = right 436 | valign = bottom 437 | position = -14, 14 438 | zindex = 1 439 | } 440 | 441 | # Battery Status 442 | label { 443 | monitor = 444 | text = cmd[update:5000] ~/.config/hypr/hyprlock/blazinscripts.sh -bat 445 | shadow_passes = 1 446 | shadow_boost = 0.5 447 | color = rgba(222222FF) 448 | font_size = 14 449 | font_family = Maple Mono 450 | position = -21, -8 451 | halign = right 452 | valign = bottom 453 | zindex = 2 454 | } 455 | 456 | # Small Rectangle for Session 457 | shape { 458 | monitor = 459 | size = 150, 32 460 | rounding = 10 461 | color = rgba(FFFFFFFF) 462 | halign = center 463 | valign = bottom 464 | position = 0, 14 465 | zindex = 1 466 | } 467 | 468 | # Current Session Status 469 | label { 470 | monitor = 471 | text = cmd[update:24000000] echo "Session : \$XDG_SESSION_DESKTOP" 472 | # shadow_passes = 1 473 | # shadow_boost = 0.5 474 | color = rgba(222222FF) 475 | font_size = 12 476 | font_family = Jost Medium 477 | position = 0, -5 478 | halign = center 479 | valign = bottom 480 | zindex = 2 481 | } 482 | 483 | # PFP Image 484 | image { 485 | monitor = 486 | path = \$HOME/.config/hypr/hyprlock/pfp.jpg 487 | size = 100 488 | rounding = -1 489 | border_size = 3 490 | border_color = rgba(FFFFFFFF) 491 | position = 10, 10 492 | halign = left 493 | valign = bottom 494 | zindex = 3 495 | } 496 | 497 | 498 | # Username 499 | label { 500 | monitor = 501 | text = \$USER 502 | shadow_passes = 1 503 | shadow_boost = 0.5 504 | color = rgba(FFFFFFFF) 505 | font_size = 14 506 | font_family = Jost Bold Italic 507 | position = 120, 28 508 | halign = left 509 | valign = bottom 510 | zindex = 2 511 | } 512 | 513 | # Hostname 514 | label { 515 | monitor = 516 | text = cmd[update:24000000] echo "@\$(uname -n)" 517 | shadow_passes = 1 518 | shadow_boost = 0.5 519 | color = rgba(FFFFFFBB) 520 | font_size = 14 521 | font_family = Jost Bold Italic 522 | position = 120, -20 523 | halign = left 524 | valign = bottom 525 | zindex = 2 526 | } 527 | 528 | # Lock Icon 529 | label { 530 | monitor = 531 | text =  532 | shadow_passes = 1 533 | shadow_boost = 0.5 534 | color = rgba(255, 255, 255, 1) 535 | font_size = 20 536 | font_family = Font Awesome 6 Free Solid 537 | position = 0, -65 538 | halign = center 539 | valign = top 540 | zindex = 2 541 | } 542 | # PLAYER IMAGE 543 | image { 544 | monitor = 545 | path = \$HOME/.config/hypr/hyprlock/music.webp 546 | size = 60 # lesser side if not 1:1 ratio 547 | rounding = 5 # negative values mean circle 548 | border_size = 0 549 | rotate = 0 # degrees, counter-clockwise 550 | reload_time = 2 551 | reload_cmd = ~/.config/hypr/hyprlock/blazinscripts.sh -music --arturl 552 | position = -106, 0 553 | halign = center 554 | valign = center 555 | zindex = 1 556 | } 557 | 558 | # PLAYER BOX 559 | shape { 560 | monitor = 561 | color = rgba(222222BB) 562 | size = 300, 84 563 | rounding = 10 # negative values mean circle 564 | position = 0, 0 565 | halign = center 566 | valign = center 567 | zindex = 0 568 | } 569 | 570 | # PLAYER TITTLE 571 | label { 572 | monitor = 573 | text = cmd[update:1000] echo "\$(~/.config/hypr/hyprlock/blazinscripts.sh -music --title)" 574 | color = rgba(255, 255, 255, 0.8) 575 | font_size = 14 576 | font_family = JetBrains Mono Nerd Font Mono ExtraBold 577 | position = 50, -12 578 | halign = center 579 | valign = center 580 | zindex = 1 581 | } 582 | 583 | # PLAYER STATUS 584 | label { 585 | monitor = 586 | text = cmd[update:1000] echo "\$(~/.config/hypr/hyprlock/blazinscripts.sh -music --status)" 587 | color = rgba(255, 255, 255, 1) 588 | font_size = 18 589 | font_family = JetBrains Mono Nerd Font Mono Bold 590 | position = -50, -15 591 | halign = center 592 | valign = center 593 | zindex = 1 594 | } 595 | 596 | # PLAYER SOURCE 597 | label { 598 | monitor = 599 | text = cmd[update:1000] echo "\$(~/.config/hypr/hyprlock/blazinscripts.sh -music --source)" 600 | color = rgba(255, 255, 255, 0.6) 601 | font_size = 10 602 | font_family = JetBrains Mono Nerd Font Mono 603 | position = -20, 16 604 | halign = center 605 | valign = center 606 | zindex = 1 607 | } 608 | 609 | # PLAYER Artist 610 | label { 611 | monitor = 612 | text = cmd[update:1000] echo "\$(~/.config/hypr/hyprlock/blazinscripts.sh -music --artist)" 613 | color = rgba(255, 255, 255, 0.8) 614 | font_size = 12 615 | font_family = JetBrains Mono Nerd Font Mono 616 | position = 10, -35 617 | halign = center 618 | valign = center 619 | zindex = 1 620 | } 621 | EOF 622 | chmod u-w "hyprlock.conf" 623 | echo "Generated Hyprland Config" 624 | } 625 | 626 | case "$1" in 627 | -cn) 628 | echo "Configuring BlazinLock for Nix" 629 | sudo cp -r "$BLAZINLOCK_DATA_DIR/hyprlock" ~/.config/hypr 630 | echo "Configuration Completed, Now you can use BlazinLock." 631 | ;; 632 | -s) 633 | echo "Screenshot Lock" 634 | Standalone 0 635 | ;; 636 | -i) 637 | echo "Custom Image Lock" 638 | Standalone 1 "$2" 639 | ;; 640 | -hs) 641 | echo "Hyprlock Screenshot" 642 | HyperdotIntegration 0 643 | ;; 644 | -hw) 645 | echo "Hyprlock Wallpaper" 646 | HyperdotIntegration 1 647 | ;; 648 | -es) 649 | echo "End 4 Screenshot" 650 | HyperdotIntegration 0 end4 651 | ;; 652 | -ew) 653 | echo "End 4 Wallpaper" 654 | HyperdotIntegration 1 end4 655 | ;; 656 | *) 657 | help 658 | echo "Falling Back to Screenshot" 659 | Standalone 0 660 | # exit 1 661 | ;; 662 | esac 663 | 664 | hyprlock 665 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "Nix flake for BlazinLock (Hyprlock auto-theming)"; 3 | 4 | inputs = { 5 | nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 | flake-utils.url = "github:numtide/flake-utils"; 7 | }; 8 | 9 | outputs = { self, nixpkgs, flake-utils, ... }: 10 | flake-utils.lib.eachDefaultSystem (system: 11 | let 12 | pkgs = import nixpkgs { 13 | inherit system; 14 | }; 15 | in { 16 | packages.default = pkgs.stdenv.mkDerivation { 17 | pname = "blazinlock"; 18 | version = "1.1.0"; 19 | 20 | src = pkgs.fetchFromGitHub { 21 | owner = "Thunder-Blaze"; 22 | repo = "BlazinLock"; 23 | rev = "critical"; 24 | sha256 = "sha256-c97fpV27asUWj52yRw2QKl0OduGct2YOu6iVcIWT+y8="; 25 | }; 26 | 27 | nativeBuildInputs = [ pkgs.makeWrapper ]; 28 | 29 | installPhase = '' 30 | echo "Installing to: $out" 31 | 32 | # Verify if $out exists and is correct 33 | mkdir -p $out/bin 34 | if [ ! -d "$out" ]; then 35 | echo "Error: $out does not exist" 36 | exit 1 37 | fi 38 | 39 | # Copy blazinlock to the correct directory 40 | cp blazinlock $out/blazinlock-raw 41 | chmod +x $out/blazinlock-raw 42 | 43 | # Wrap the binary with environment variables 44 | makeWrapper $out/blazinlock-raw $out/bin/blazinlock --set BLAZINLOCK_DATA_DIR $out/ 45 | 46 | # Copy hyprlock config into the right place 47 | cp -r hyprlock $out/ 48 | ''; 49 | 50 | meta = with pkgs.lib; { 51 | description = "Auto Theming Hyprlock, compatible with Normal, Hyprdots and End4 Installations"; 52 | homepage = "https://github.com/Thunder-Blaze/BlazinLock"; 53 | license = licenses.mit; 54 | maintainers = with maintainers; [ ]; 55 | }; 56 | }; 57 | 58 | devShells.default = pkgs.mkShell { 59 | buildInputs = [ pkgs.bash pkgs.coreutils pkgs.gnugrep pkgs.gawk pkgs.gnused pkgs.git ]; 60 | shellHook = '' 61 | echo "Development shell for BlazinLock" 62 | ''; 63 | }; 64 | 65 | # Dependencies that are needed globally on the system 66 | environment.systemPackages = with pkgs; [ 67 | hyprlock # Hyprlock for screen locking 68 | playerctl # For Music Widget 69 | ]; 70 | } 71 | ); 72 | } 73 | 74 | -------------------------------------------------------------------------------- /hyprlock/blazinscripts.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | 4 | # Script for Battery Stats 5 | if [ "$1" == "-bat" ]; then 6 | # Get the current battery percentage 7 | battery_percentage=$(cat /sys/class/power_supply/BAT0/capacity) 8 | 9 | # Get the battery status (Charging or Discharging) 10 | battery_status=$(cat /sys/class/power_supply/BAT0/status) 11 | 12 | # Define the battery icons for each 10% segment 13 | battery_icons=("󰂃" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰁹") 14 | 15 | # Define the charging icon 16 | charging_icon="󰂄" 17 | 18 | # Calculate the index for the icon array 19 | icon_index=$((battery_percentage / 10)) 20 | 21 | if [ "$icon_index" -eq 10 ]; then 22 | icon_index=9 23 | fi 24 | 25 | # Get the corresponding icon 26 | battery_icon=${battery_icons[icon_index]} 27 | 28 | # Check if the battery is charging 29 | if [ "$battery_status" = "Charging" ]; then 30 | battery_icon="$charging_icon" 31 | fi 32 | 33 | # Output the battery percentage and icon 34 | echo "$battery_icon $battery_percentage%" 35 | 36 | 37 | 38 | 39 | 40 | # Script for Music Stats 41 | elif [ "$1" == "-music" ]; then 42 | 43 | # Function to get metadata using playerctl 44 | get_metadata() { 45 | key=$1 46 | playerctl metadata --format "{{ $key }}" 2>/dev/null 47 | } 48 | 49 | # Check for arguments 50 | 51 | # Function to determine the source and return an icon and text 52 | get_source_info() { 53 | trackid=$(get_metadata "mpris:trackid") 54 | if [[ "$trackid" == *"firefox"* ]]; then 55 | echo -e "Firefox 󰈹" 56 | elif [[ "$trackid" == *"spotify"* ]]; then 57 | echo -e "Spotify " 58 | elif [[ "$trackid" == *"chromium"* ]]; then 59 | echo -e "Chrome " 60 | else 61 | echo "Source  " 62 | fi 63 | } 64 | 65 | # Parse the argument 66 | case "$2" in 67 | --title) 68 | title=$(get_metadata "xesam:title") 69 | if [ -z "$title" ]; then 70 | echo "Nothing Playing" 71 | else 72 | ten=" " 73 | thirty="$ten$ten$ten" 74 | len=${#title} 75 | end=" " 76 | if ((len>13)); then 77 | len=13 78 | end="..." 79 | fi 80 | title="${title:0:13}${thirty:0:$((13 - len))}" 81 | echo "${title}${end}" 82 | #echo "${title:0:18}" # Limit the output to 50 characters 83 | fi 84 | ;; 85 | --arturl) 86 | url=$(get_metadata "mpris:artUrl") 87 | if [ -z "$url" ]; then 88 | echo "" 89 | else 90 | if [[ "$url" == file://* ]]; then 91 | url=${url#file://} 92 | elif [[ "$url" == https://i.scdn.co/* ]]; then 93 | cd "$HOME/.config/hypr/hyprlock" 94 | temp_url=$(echo $url | awk -F '/' '{print $5}') 95 | if [ ! -f "${temp_url}" ]; then 96 | rm *[^.jpg][^.sh][^.webp] >/dev/null 2>/dev/null 97 | wget $url -O $temp_url >/dev/null 2>/dev/null 98 | fi 99 | url="$HOME/.config/hypr/hyprlock/${temp_url}" 100 | fi 101 | echo "$url" 102 | fi 103 | ;; 104 | --artist) 105 | artist=$(get_metadata "xesam:artist") 106 | if [ -z "$artist" ]; then 107 | echo "" 108 | else 109 | ten=" " 110 | thirty="$ten$ten$ten" 111 | len=${#artist} 112 | end=" " 113 | if ((len>10)); then 114 | len=10 115 | end="..." 116 | fi 117 | artist="${artist:0:10}${thirty:0:$((10 - len))}" 118 | echo "${artist}${end}" 119 | # echo "${artist:0:30}" # Limit the output to 50 characters 120 | fi 121 | ;; 122 | --length) 123 | length=$(get_metadata "mpris:length") 124 | if [ -z "$length" ]; then 125 | echo "" 126 | else 127 | # Convert length from microseconds to a more readable format (seconds) 128 | echo "$(echo "scale=2; $length / 1000000 / 60" | bc) m" 129 | fi 130 | ;; 131 | --status) 132 | status=$(playerctl status 2>/dev/null) 133 | if [[ $status == "Playing" ]]; then 134 | echo "󰎆" 135 | elif [[ $status == "Paused" ]]; then 136 | echo "󱑽" 137 | else 138 | echo "" 139 | fi 140 | ;; 141 | --album) 142 | album=$(playerctl metadata --format "{{ xesam:album }}" 2>/dev/null) 143 | if [[ -n $album ]]; then 144 | echo "$album" 145 | else 146 | status=$(playerctl status 2>/dev/null) 147 | if [[ -n $status ]]; then 148 | echo "Not album" 149 | else 150 | echo "" 151 | fi 152 | fi 153 | ;; 154 | --source) 155 | get_source_info 156 | ;; 157 | *) 158 | echo "Invalid parameter: $2" 159 | echo "Usage: $0 -music --title | --url | --artist | --length | --album | --source" 160 | exit 1 161 | ;; 162 | esac 163 | 164 | else 165 | echo "Invalid option: $1" 166 | echo "Usage: $0 -bat | -music" 167 | exit 1 168 | fi 169 | -------------------------------------------------------------------------------- /hyprlock/music.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder-Blaze/BlazinLock/380089954f89ff5f85b34983a3c015670452a198/hyprlock/music.webp -------------------------------------------------------------------------------- /hyprlock/pfp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thunder-Blaze/BlazinLock/380089954f89ff5f85b34983a3c015670452a198/hyprlock/pfp.jpg -------------------------------------------------------------------------------- /installer.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | HYPR_DIR="$HOME/.config/hypr" 4 | BINARY_DIR="/usr/bin" 5 | 6 | if [[ -s "/usr/bin/figlet" ]]; then 7 | figlet BlazinLock 8 | else 9 | echo "BlazinLock" 10 | fi 11 | 12 | if ! [[ -s "/usr/bin/hyprlock" || -s "/usr/bin/hyprlock-git" ]]; then 13 | echo "Hyprlock Not Found, Installing ..." 14 | sudo pacman -S hyprlock 15 | fi 16 | 17 | echo "" 18 | 19 | if [[ -f "$HYPR_DIR/hyprlock.conf" ]]; then 20 | echo "Found Existing Hyprlock Config File," 21 | read -p "Do you want to backup your old hyprlock config (Y/n) ? " confbackup 22 | if [[ $confbackup == "n" || $confbackup == "N" ]]; then 23 | rm -f "$HYPR_DIR/hyprlock.conf" 24 | else 25 | if [[ -f "$HYPR_DIR/hyprlock.conf.backup" ]]; then 26 | rm -f "$HYPR_DIR/hyprlock.conf.backup" 27 | fi 28 | mv "$HYPR_DIR/hyprlock.conf" "$HYPR_DIR/hyprlock.conf.backup" 29 | echo "Backed Up Successfully" 30 | fi 31 | fi 32 | 33 | if [[ -d "$HYPR_DIR/hyprlock" ]]; then 34 | echo "Found Existing Hyprlock Folder," 35 | read -p "Do you want to backup your old hyprlock config (Y/n) ? " folderbackup 36 | if [[ $folderbackup == "n" || $folderbackup == "N" ]]; then 37 | rm -r "$HYPR_DIR/hyprlock" 38 | else 39 | if [[ -d "$HYPR_DIR/hyprlock.backup" ]]; then 40 | rm -r "$HYPR_DIR/hyprlock.backup" 41 | fi 42 | mv "$HYPR_DIR/hyprlock" "$HYPR_DIR/hyprlock.backup" 43 | echo "Backed Up Successfully" 44 | fi 45 | fi 46 | 47 | chmod +x "hyprlock/blazinscripts.sh" 48 | chmod +x blazinlock 49 | cp -r hyprlock "$HYPR_DIR/" 50 | sudo cp -f blazinlock "$BINARY_DIR/" 51 | 52 | echo "Installation Complete" 53 | echo "" 54 | 55 | read -p "Do you want to Update your Keybind for Blazinlock as Win/Super + L (Y/n) ?" updtkeybind 56 | if [[ $updtkeybind == "n" || $updtkeybind == "N" ]]; then 57 | exit 0 58 | fi 59 | 60 | echo "" 61 | echo "Choose your Config Dotfiles" 62 | echo " 1) End-4" 63 | echo " 2) Hyprdots" 64 | echo " 3) Normal" 65 | read -p "Enter the Respective Number - " USER_DOTS 66 | 67 | while [[ $USER_DOTS -lt 1 || $USER_DOTS -gt 3 ]]; do 68 | read -p "Choose Correct Type - " USER_DOTS 69 | done 70 | 71 | echo "" 72 | echo "Hyprlock Types" 73 | echo " 1) Hyprdots (waybar) Integration Screenshot" 74 | echo " 2) Hyprdots (waybar) Integration Wallpaper" 75 | echo " 3) End 4 Dots (ags) Integration Screenshot" 76 | echo " 4) End 4 Dots (ags) Integration Wallpaper" 77 | echo " 5) Screenshot Type Hyprlock" 78 | echo " 6) User Image Type Hyprlock (Not Available as Default)" 79 | echo "Warning: don't choose incompatible types" 80 | read -p "Choose Your Default Hyprlock Type - " USER_CHOICE 81 | 82 | while [[ $USER_CHOICE -lt 1 || $USER_CHOICE -gt 5 ]]; do 83 | read -p "Choose Correct Type - " USER_CHOICE 84 | done 85 | 86 | COMM="" 87 | 88 | if [[ $USER_CHOICE -eq 1 ]]; then 89 | COMM="blazinlock -hs" 90 | elif [[ $USER_CHOICE -eq 2 ]]; then 91 | COMM="blazinlock -hw" 92 | elif [[ $USER_CHOICE -eq 3 ]]; then 93 | COMM="blazinlock -es" 94 | elif [[ $USER_CHOICE -eq 4 ]]; then 95 | COMM="blazinlock -ew" 96 | elif [[ $USER_CHOICE -eq 5 ]]; then 97 | COMM="blazinlock -s" 98 | fi 99 | 100 | # bind = Super, L, exec, loginctl lock-session 101 | # COMM="bind = Super, L, exec, $COMM # launch lock screen" 102 | 103 | if [[ $USER_DOTS -eq 1 ]]; then 104 | sed -i "s/loginctl lock-session/$COMM/g" "$HYPR_DIR/hyprland/keybinds.conf" 2>/dev/null 105 | echo "An exec line Successfully added for BlazinLock in keybinds.conf" 106 | elif [[ $USER_DOTS -eq 2 ]]; then 107 | sed -i "s/hyprlock/$COMM/g" "$HYPR_DIR/keybindings.conf" 2>/dev/null 108 | sed -i "s/swaylock/$COMM/g" "$HYPR_DIR/keybindings.conf" 2>/dev/null 109 | echo "An exec line Successfully added for BlazinLock in keybindings.conf" 110 | else 111 | sed -i "/exec, hyprlock/d" "$HYPR_DIR/hyprland.conf" 2>/dev/null 112 | echo "bind = Super, L, exec, $COMM # launch lock screen" >> "$HYPR_DIR/hyprland.conf" 113 | echo "An exec line Successfully added for BlazinLock in hyprland.conf" 114 | fi 115 | 116 | echo "Default Hyprlock Type Set Successfully" 117 | echo "After Relogin Press Super Key (Windows) + L to Launch Lockscreen" 118 | --------------------------------------------------------------------------------