diff options
Diffstat (limited to 'home-manager/homeModules/attachments')
| -rw-r--r-- | home-manager/homeModules/attachments/basecat.aseprite | bin | 730 -> 0 bytes | |||
| -rw-r--r-- | home-manager/homeModules/attachments/basecat.png | bin | 11503 -> 0 bytes | |||
| -rw-r--r-- | home-manager/homeModules/attachments/cat.png | bin | 15467 -> 0 bytes | |||
| -rwxr-xr-x | home-manager/homeModules/attachments/hypr-scripts/bitwarden-float.sh | 21 | ||||
| -rwxr-xr-x | home-manager/homeModules/attachments/hypr-scripts/hshot.sh | 45 | ||||
| -rwxr-xr-x | home-manager/homeModules/attachments/hypr-scripts/switch-sink.py | 49 | ||||
| -rwxr-xr-x | home-manager/homeModules/attachments/hypr-scripts/toggle-tg.sh | 14 | ||||
| -rwxr-xr-x | home-manager/homeModules/attachments/hypr-scripts/toggle-vpn.sh | 93 | ||||
| -rw-r--r-- | home-manager/homeModules/attachments/rofi-theme.rasi | 79 | ||||
| -rw-r--r-- | home-manager/homeModules/attachments/waybar-style.css | 30 |
10 files changed, 0 insertions, 331 deletions
diff --git a/home-manager/homeModules/attachments/basecat.aseprite b/home-manager/homeModules/attachments/basecat.aseprite Binary files differdeleted file mode 100644 index 16caffd..0000000 --- a/home-manager/homeModules/attachments/basecat.aseprite +++ /dev/null diff --git a/home-manager/homeModules/attachments/basecat.png b/home-manager/homeModules/attachments/basecat.png Binary files differdeleted file mode 100644 index d202c64..0000000 --- a/home-manager/homeModules/attachments/basecat.png +++ /dev/null diff --git a/home-manager/homeModules/attachments/cat.png b/home-manager/homeModules/attachments/cat.png Binary files differdeleted file mode 100644 index 5657a78..0000000 --- a/home-manager/homeModules/attachments/cat.png +++ /dev/null diff --git a/home-manager/homeModules/attachments/hypr-scripts/bitwarden-float.sh b/home-manager/homeModules/attachments/hypr-scripts/bitwarden-float.sh deleted file mode 100755 index 7edd5f2..0000000 --- a/home-manager/homeModules/attachments/hypr-scripts/bitwarden-float.sh +++ /dev/null @@ -1,21 +0,0 @@ -windowtitlev2() { - IFS=',' read -r -a args <<< "$1" - args[0]="${args[0]#*>>}" - - if [[ ${args[1]} =~ "Extension: (Bitwarden Password Manager)" ]]; then - hyprctl --batch "\ - dispatch setfloating address:0x${args[0]}; \ - dispatch resizewindowpixel exact 20% 50%, address:0x${args[0]}; \ - dispatch centerwindow; \ - " - fi -} - -handle() { - case $1 in - windowtitlev2\>*) windowtitlev2 "$1" ;; - esac -} - -socat -U - UNIX-CONNECT:"/$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" \ - | while read -r line; do handle "$line"; done diff --git a/home-manager/homeModules/attachments/hypr-scripts/hshot.sh b/home-manager/homeModules/attachments/hypr-scripts/hshot.sh deleted file mode 100755 index 0d02b9c..0000000 --- a/home-manager/homeModules/attachments/hypr-scripts/hshot.sh +++ /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/homeModules/attachments/hypr-scripts/switch-sink.py b/home-manager/homeModules/attachments/hypr-scripts/switch-sink.py deleted file mode 100755 index aa7eec1..0000000 --- a/home-manager/homeModules/attachments/hypr-scripts/switch-sink.py +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env python3 - -import subprocess - -status = subprocess.run(["wpctl", "status"], stdout=subprocess.PIPE).stdout.decode('utf-8') -status_lines = status.split('\n') -sink_line = 0 -sinks = [] -sink_names = [] - -# Get sink line -for i in range(len(status_lines) - 1): - if 'Sinks:' in status_lines[i]: - sink_line = i + 1 - break - -# Find unused sinks -for line in status_lines[sink_line:]: - if line == ' │ ': - break - line = line.split('.') - nums = line[0] - name = line[1] - end_name = line[1].index('[') - sink = nums[2:].strip() - if nums[4] == '*': - continue - - sinks.append(sink) - sink_names.append(name[:end_name].strip()) - -if (len(sinks) == 0): - subprocess.run(["notify-send", "Pipewire sink", "No sinks to switch to"]) - exit(0) - -selected_sink = subprocess.run(["rofi", "-dmenu"], input="\n".join(sink_names), capture_output=True, text=True).stdout[:-1] - -if len(selected_sink) == 0: - exit(0) - -try: - next_sink = sink_names.index(selected_sink) -except Exception: - subprocess.run(["notify-send", "Pipewire sink", "Sink not found"]) - exit(1) - -subprocess.run(["wpctl", "set-default", sinks[next_sink]]) - -subprocess.run(["notify-send", "Pipewire sink", "Selected " + selected_sink]) diff --git a/home-manager/homeModules/attachments/hypr-scripts/toggle-tg.sh b/home-manager/homeModules/attachments/hypr-scripts/toggle-tg.sh deleted file mode 100755 index 44ed52d..0000000 --- a/home-manager/homeModules/attachments/hypr-scripts/toggle-tg.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -TG_CLASS=org.telegram.desktop - -tg_workspace=$(hyprctl clients -j | jq -e ".[] | select((.class | contains(\"${TG_CLASS}\"))) | .workspace.id") -if [[ -z $tg_workspace ]]; then - telegram-desktop -elif [[ $tg_workspace -eq $(hyprctl activeworkspace -j | jq -e '.id') ]]; then - hyprctl dispatch pin class:$TG_CLASS - hyprctl dispatch movetoworkspacesilent special:magic,class:$TG_CLASS -else - hyprctl dispatch movetoworkspacesilent +0,class:$TG_CLASS - hyprctl dispatch pin class:$TG_CLASS - hyprctl dispatch focuswindow -fi diff --git a/home-manager/homeModules/attachments/hypr-scripts/toggle-vpn.sh b/home-manager/homeModules/attachments/hypr-scripts/toggle-vpn.sh deleted file mode 100755 index 8775f39..0000000 --- a/home-manager/homeModules/attachments/hypr-scripts/toggle-vpn.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/sh - -ROFI_CMD="rofi -dmenu -theme-str listview{enabled:false;} -p" -LOCAL_STORAGE=~/.local/share/toggle -TMP_PATH=/tmp/vpn-status -V2RAYA_URL="http://localhost:2017" - -DBUS_INTERFACE="com.vpn_status" -DBUS_MEMBER="StatusChanged" - -set_token() { - login=$(echo "" | $ROFI_CMD "Enter login > ") - password=$(echo "" | $ROFI_CMD "Enter password > " -theme-str 'entry {enabled: false;}') - response=$(curl -s -X POST \ - "${V2RAYA_URL}/api/login" \ - -d "{\"username\": \"${login}\", \"password\": \"${password}\"}") - - code=$(echo $response | jq -r ".code") - echo "${response}" | jq ".data.token" -r > "${LOCAL_STORAGE}/token" -} - -get_status() { - token=$1 - response=$(curl -s -X GET \ - "${V2RAYA_URL}/api/touch" \ - -H "Authorization: ${token}") - echo $response | jq ".data.running" -r -} - -toggle() { - token=$1 - method=$2 - response=$(curl -s -X ${method} \ - "${V2RAYA_URL}/api/v2ray" \ - -H "Authorization: ${token}") - code=$(echo $response | jq ".code" -r) - echo $response | jq ".data.running" -r -} - -check_status() { - case $(cat $TMP_PATH) in - true) - output='{"text": ""}' - ;; - *) - output='{"text": ""}' - ;; - esac - echo $output | jq --unbuffered --compact-output -} - - -if [[ ! -d "${LOCAL_STORAGE}" ]]; then - mkdir "${LOCAL_STORAGE}" -fi - -if [[ ! -e "${LOCAL_STORAGE}/token" ]]; then - touch "${LOCAL_STORAGE}/token" -fi - -TOKEN=$(cat "${LOCAL_STORAGE}/token") -if [[ -z "${TOKEN}" ]]; then - set_token - TOKEN=$(cat "${LOCAL_STORAGE}/token") -fi - -STATUS=$(get_status $TOKEN) - -if [[ $1 == "waybar" ]]; then - echo $STATUS > $TMP_PATH - check_status - - dbus-monitor --profile "interface='${DBUS_INTERFACE}',member='${DBUS_MEMBER}'" | - while read -r line; do - check_status - done -else - if [[ $STATUS == "true" ]]; then - NEW_STATUS=$(toggle $TOKEN DELETE) - else - NEW_STATUS=$(toggle $TOKEN POST) - fi - - if [[ $NEW_STATUS == "null" ]]; then - set_token - exit 0 - fi - - echo $NEW_STATUS > $TMP_PATH - dbus-send --type=signal / "${DBUS_INTERFACE}.${DBUS_MEMBER}" - - notify-send v2rayA "running: ${NEW_STATUS}" -fi diff --git a/home-manager/homeModules/attachments/rofi-theme.rasi b/home-manager/homeModules/attachments/rofi-theme.rasi deleted file mode 100644 index bba4f6c..0000000 --- a/home-manager/homeModules/attachments/rofi-theme.rasi +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - * 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 deleted file mode 100644 index 214c779..0000000 --- a/home-manager/homeModules/attachments/waybar-style.css +++ /dev/null @@ -1,30 +0,0 @@ -* { - font-family: Material Design Icons, Rubik Medium; - font-size: 14px; - color: @base05; -} - -window#waybar { - background: @base01; - border-bottom: 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; -} |
