From ec0e9896dcc0c88ef49d2b2bf8126498d3c2acec Mon Sep 17 00:00:00 2001 From: spl3g Date: Sat, 20 Apr 2024 20:19:52 +0300 Subject: delete old hm configuration --- .../laptop/hyprland/scripts/battery-level.sh | 22 ----------- home-manager/laptop/hyprland/scripts/hshot | 45 ---------------------- home-manager/laptop/hyprland/scripts/kill | 7 ---- home-manager/laptop/hyprland/scripts/rnew.fish | 8 ---- home-manager/laptop/hyprland/scripts/rofi-modes | 20 ---------- 5 files changed, 102 deletions(-) delete mode 100755 home-manager/laptop/hyprland/scripts/battery-level.sh delete mode 100755 home-manager/laptop/hyprland/scripts/hshot delete mode 100755 home-manager/laptop/hyprland/scripts/kill delete mode 100755 home-manager/laptop/hyprland/scripts/rnew.fish delete mode 100755 home-manager/laptop/hyprland/scripts/rofi-modes (limited to 'home-manager/laptop/hyprland/scripts') diff --git a/home-manager/laptop/hyprland/scripts/battery-level.sh b/home-manager/laptop/hyprland/scripts/battery-level.sh deleted file mode 100755 index cc2d5cd..0000000 --- a/home-manager/laptop/hyprland/scripts/battery-level.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/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/laptop/hyprland/scripts/hshot b/home-manager/laptop/hyprland/scripts/hshot deleted file mode 100755 index 0d02b9c..0000000 --- a/home-manager/laptop/hyprland/scripts/hshot +++ /dev/null @@ -1,45 +0,0 @@ -#!/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/laptop/hyprland/scripts/kill b/home-manager/laptop/hyprland/scripts/kill deleted file mode 100755 index 40ab4a9..0000000 --- a/home-manager/laptop/hyprland/scripts/kill +++ /dev/null @@ -1,7 +0,0 @@ -#!/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/laptop/hyprland/scripts/rnew.fish b/home-manager/laptop/hyprland/scripts/rnew.fish deleted file mode 100755 index 743d7fd..0000000 --- a/home-manager/laptop/hyprland/scripts/rnew.fish +++ /dev/null @@ -1,8 +0,0 @@ -#!/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/laptop/hyprland/scripts/rofi-modes b/home-manager/laptop/hyprland/scripts/rofi-modes deleted file mode 100755 index 2d52802..0000000 --- a/home-manager/laptop/hyprland/scripts/rofi-modes +++ /dev/null @@ -1,20 +0,0 @@ -#!/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 -- cgit v1.2.3