diff options
| author | spl3g <spleefer6@yandex.ru> | 2024-04-20 20:24:36 +0300 |
|---|---|---|
| committer | spl3g <spleefer6@yandex.ru> | 2025-05-01 14:58:53 +0300 |
| commit | f5970d988c68ae1d2ac56f0a35324cd442a26be7 (patch) | |
| tree | 3c7fa7d524c7337c3b999fd577081a1230690072 /home-manager/homeModules/attachments | |
| parent | ec0e9896dcc0c88ef49d2b2bf8126498d3c2acec (diff) | |
add modules
Diffstat (limited to 'home-manager/homeModules/attachments')
| -rw-r--r-- | home-manager/homeModules/attachments/basecat.aseprite | bin | 0 -> 730 bytes | |||
| -rw-r--r-- | home-manager/homeModules/attachments/basecat.png | bin | 0 -> 11503 bytes | |||
| -rw-r--r-- | home-manager/homeModules/attachments/cat.png | bin | 0 -> 15467 bytes | |||
| -rwxr-xr-x | home-manager/homeModules/attachments/hypr-scripts/battery-level.sh | 22 | ||||
| -rwxr-xr-x | home-manager/homeModules/attachments/hypr-scripts/hshot | 45 | ||||
| -rwxr-xr-x | home-manager/homeModules/attachments/hypr-scripts/kill | 7 | ||||
| -rwxr-xr-x | home-manager/homeModules/attachments/hypr-scripts/rnew.fish | 8 | ||||
| -rwxr-xr-x | home-manager/homeModules/attachments/hypr-scripts/rofi-modes | 20 | ||||
| -rw-r--r-- | home-manager/homeModules/attachments/rofi-theme.rasi | 79 | ||||
| -rw-r--r-- | home-manager/homeModules/attachments/waybar-style.css | 31 |
10 files changed, 212 insertions, 0 deletions
diff --git a/home-manager/homeModules/attachments/basecat.aseprite b/home-manager/homeModules/attachments/basecat.aseprite Binary files differnew file mode 100644 index 0000000..16caffd --- /dev/null +++ b/home-manager/homeModules/attachments/basecat.aseprite diff --git a/home-manager/homeModules/attachments/basecat.png b/home-manager/homeModules/attachments/basecat.png Binary files differnew file mode 100644 index 0000000..d202c64 --- /dev/null +++ b/home-manager/homeModules/attachments/basecat.png diff --git a/home-manager/homeModules/attachments/cat.png b/home-manager/homeModules/attachments/cat.png Binary files differnew file mode 100644 index 0000000..5657a78 --- /dev/null +++ b/home-manager/homeModules/attachments/cat.png diff --git a/home-manager/homeModules/attachments/hypr-scripts/battery-level.sh b/home-manager/homeModules/attachments/hypr-scripts/battery-level.sh new file mode 100755 index 0000000..cc2d5cd --- /dev/null +++ b/home-manager/homeModules/attachments/hypr-scripts/battery-level.sh @@ -0,0 +1,22 @@ +#!/bin/sh +while true; do + # Check the battery level and charging status + battery_info=$(acpi -b) + + # Extract the battery level from the output of `acpi` + battery_level=$(echo $battery_info | grep -o "[0-9]*%" | sed "s/%//") + + # Check if the laptop is charging + if [[ $battery_info == *"Charging"* ]]; then + # If the laptop is charging, do nothing + : + else + # If the battery level is less than 15%, send a notification + if [ "$battery_level" -lt 15 ]; then + notify-send "Battery Low" "Battery level is at $battery_level%. Charge your laptop." + fi + fi + + # Sleep for 5 minutes before checking the battery level again + sleep 300 +done diff --git a/home-manager/homeModules/attachments/hypr-scripts/hshot b/home-manager/homeModules/attachments/hypr-scripts/hshot new file mode 100755 index 0000000..0d02b9c --- /dev/null +++ b/home-manager/homeModules/attachments/hypr-scripts/hshot @@ -0,0 +1,45 @@ +#!/bin/sh + +declare -a cmd + +usage() { + echo -e "-m | monitor\n-s | slurp\n-w | active window\n-c | add copy" +} + +monitor() { + cmd=("grim -o \"\$(hyprctl -j monitors | jq -r '.[] | select(.focused) | .name')\"") +} + +slurp() { + cmd=("grim -g \"\$(slurp)\"") +} + +window() { + cmd=("grim -g \"\$(hyprctl activewindow -j | jq -j '\"\(.at | .[0]),\(.at | .[1]) \(.size | .[0])x\(.size | .[1])\"')\"") +} + +copy() { + if [[ -n ${cmd[0]} ]]; then + cmd+=("- | wl-copy") + else + usage + fi +} + +while getopts ":mswc" opt; do + case ${opt} in + m) monitor;; + s) slurp;; + w) window;; + c) copy;; + *) usage + exit 1;; + esac +done + +if [[ -z $1 ]]; then + usage + exit 1 +fi + +bash -c "${cmd[*]}" diff --git a/home-manager/homeModules/attachments/hypr-scripts/kill b/home-manager/homeModules/attachments/hypr-scripts/kill new file mode 100755 index 0000000..40ab4a9 --- /dev/null +++ b/home-manager/homeModules/attachments/hypr-scripts/kill @@ -0,0 +1,7 @@ +#!/bin/sh + +if [[ $(hyprctl activewindow -j | jq -r '.class') =~ (kitty) ]]; then + kill $(hyprctl activewindow -j | jq '.pid') -s 9 +else + hyprctl dispatch killactive +fi diff --git a/home-manager/homeModules/attachments/hypr-scripts/rnew.fish b/home-manager/homeModules/attachments/hypr-scripts/rnew.fish new file mode 100755 index 0000000..743d7fd --- /dev/null +++ b/home-manager/homeModules/attachments/hypr-scripts/rnew.fish @@ -0,0 +1,8 @@ +#!/usr/bin/env fish + +ranger $argv +set quit_cd_wd_file "$HOME/.ranger_quit_cd_wd" +if test -s "$quit_cd_wd_file" + kitty -d "$(cat $quit_cd_wd_file)" --detach + true >"$quit_cd_wd_file" +end diff --git a/home-manager/homeModules/attachments/hypr-scripts/rofi-modes b/home-manager/homeModules/attachments/hypr-scripts/rofi-modes new file mode 100755 index 0000000..2d52802 --- /dev/null +++ b/home-manager/homeModules/attachments/hypr-scripts/rofi-modes @@ -0,0 +1,20 @@ +#!/bin/sh + +case $(echo -e "clipboard\nemoji\ncalc" | rofi -dmenu) in + emoji) arg=emoji;; + calc) arg=calc;; + clipboard) cliphist list | rofi -dmenu -display-columns 2 | cliphist decode | wl-copy + exit;; + bitwarden) if [[ $XDG_BACKEND == "wayland" ]]; then + typer=wtype + clip=wl-copy + else + typer=xdotool + clip=xclip + fi + rofi-rbw --typer $typer --clip $clip + exit;; + *)exit;; +esac + +rofi -modi $arg -show $arg diff --git a/home-manager/homeModules/attachments/rofi-theme.rasi b/home-manager/homeModules/attachments/rofi-theme.rasi new file mode 100644 index 0000000..bba4f6c --- /dev/null +++ b/home-manager/homeModules/attachments/rofi-theme.rasi @@ -0,0 +1,79 @@ +/******************************************************************************* + * SNITCHED FROM: + * User : LR-Tech + * Theme Repo : https://github.com/lr-tech/rofi-themes-collection + *******************************************************************************/ + +window { + location: center; + width: 480; + y-offset: -160; + border-radius: 7px; + + background-color: @bg0; +} + +inputbar { + spacing: 8px; + padding: 8px; + + background-color: @bg1; +} + +prompt, entry, element-icon, element-text { + vertical-align: 0.5; +} + +prompt { + text-color: @accent-color; +} + +textbox { + padding: 8px; + background-color: @bg1; +} + +listview { + padding: 4px 0; + lines: 8; + columns: 1; + + fixed-height: false; +} + +element { + padding: 8px; + spacing: 8px; +} + +element normal normal { + text-color: @fg0; +} + +element normal urgent { + text-color: @urgent-color; +} + +element normal active { + text-color: @accent-color; +} + +element selected { + text-color: @bg0; +} + +element selected normal, element selected active { + background-color: @accent-color; +} + +element selected urgent { + background-color: @urgent-color; +} + +element-icon { + size: 0.8em; +} + +element-text { + text-color: inherit; +} diff --git a/home-manager/homeModules/attachments/waybar-style.css b/home-manager/homeModules/attachments/waybar-style.css new file mode 100644 index 0000000..7d0143a --- /dev/null +++ b/home-manager/homeModules/attachments/waybar-style.css @@ -0,0 +1,31 @@ +* { + font-family: Material Design Icons, Rubik Medium; + font-size: 14px; + color: @base05; +} + +window#waybar { + border-radius: 10px; + background: @base01; + border: 3px solid @base02; +} + +#battery { + margin-right: 6px; +} + +#workspaces button label { + font-size: 15px; + color: @base05; + transition: all 100ms ease-out; +} + +#workspaces button.active label { + font-weight: bolder; + color: @base0A; + transition: all 100ms ease-out; +} + +#battery { + color: @base0A; +} |
