From 51183654e84b12d38cf72d8581f950269d6b47c1 Mon Sep 17 00:00:00 2001 From: ryukamish Date: Sat, 6 Jun 2026 01:44:49 +0530 Subject: fix: directory and symlink path change --- .local/bin/bemenu-wall | 0 .local/bin/screenshot | 25 +++++++++++++++++++++++++ .local/bin/sway-launch | 31 +++++++++++++++++++++++++++++++ .local/bin/sway-power | 25 +++++++++++++++++++++++++ .local/bin/volume-control | 28 ++++++++++++++++++++++++++++ usr/local/bin/bemenu-wall | 0 usr/local/bin/sway-launch | 31 ------------------------------- usr/local/bin/sway-lid | 5 ----- usr/local/bin/sway-power | 25 ------------------------- usr/local/bin/volume-control | 28 ---------------------------- 10 files changed, 109 insertions(+), 89 deletions(-) create mode 100755 .local/bin/bemenu-wall create mode 100755 .local/bin/screenshot create mode 100755 .local/bin/sway-launch create mode 100755 .local/bin/sway-power create mode 100755 .local/bin/volume-control delete mode 100755 usr/local/bin/bemenu-wall delete mode 100755 usr/local/bin/sway-launch delete mode 100755 usr/local/bin/sway-lid delete mode 100755 usr/local/bin/sway-power delete mode 100755 usr/local/bin/volume-control diff --git a/.local/bin/bemenu-wall b/.local/bin/bemenu-wall new file mode 100755 index 0000000..e69de29 diff --git a/.local/bin/screenshot b/.local/bin/screenshot new file mode 100755 index 0000000..7328c10 --- /dev/null +++ b/.local/bin/screenshot @@ -0,0 +1,25 @@ +#!/bin/sh + +filename='screenshot_%Y-%m-%d-%H%M%S.png' + +case "$1" in + "region") + slurp | grim -t png -g - $HOME/pictures/Screenshots/$(date +$filename) + ;; + "window") + swaymsg -t get_tree \ + | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' \ + | slurp \ + | grim -t png -g - $HOME/pictures/Screenshots/$(date +$filename) + ;; + "screen-internal") + grim -o eDP-1 -t png $HOME/pictures/Screenshots/$(date +$filename) + ;; + "screen-external") + grim -o HDMI-A-1 -t png $HOME/pictures/Screenshots/$(date +$filename) + ;; + *) + grim -t png $HOME/pictures/Screenshots/$(date +$filename) + ;; +esac + diff --git a/.local/bin/sway-launch b/.local/bin/sway-launch new file mode 100755 index 0000000..ed1e71f --- /dev/null +++ b/.local/bin/sway-launch @@ -0,0 +1,31 @@ +#!/bin/sh + +export LANG="en_US.UTF-8" +export LC_ALL="en_US.UTF-8" + +# XDG dirs +export XDG_CONFIG_HOME="${HOME}/.config" +export XDG_CACHE_HOME="${HOME}/.cache" +export XDG_DATA_HOME="${HOME}/.local/share" +export XDG_DESKTOP_DIR="${HOME}/desktop" +export XDG_DOWNLOAD_DIR="${HOME}/downloads" +export XDG_DOCUMENT_DIR="${HOME}/documents" +export XDG_PICTURES_DIR="${HOME}/pictures" +export XDG_PUBLICSHARE_DIR="${HOME}/public" +export XDG_MUSIC_DIR="${HOME}/music" +export XDG_VIDEOS_DIR="${HOME}/videos" + +export EDITOR="nvim" + +export PATH="${PATH}:${HOME}/.local/bin" + +export ELECTRON_OZONE_PLATFORM_HINT="auto" + +export TZ=Asia/Kolkata + +# Qt apps +export QT_QPA_PLATFORM="wayland-egl" +export QT_QPA_PLATFORMTHEME="qt5ct" + +# Launch sway +exec dbus-launch --exit-with-session sway diff --git a/.local/bin/sway-power b/.local/bin/sway-power new file mode 100755 index 0000000..82088ad --- /dev/null +++ b/.local/bin/sway-power @@ -0,0 +1,25 @@ +#!/bin/sh + +_have() { + command -v "$1" +} + +PWR_OPTS=$(printf '%b' 'Lock\nReboot\nShutdown\nSuspend\nHibernate' | bemenu -l 5 -i -p 'Power menu:') + +case "$PWR_OPTS" in + Hibernate) + systemctl hibernate + ;; + Lock) + _have swaylock && swaylock --daemonize && swaymsg 'output * power off' + ;; + Reboot) + systemctl reboot + ;; + Shutdown) + systemctl poweroff + ;; + Suspend) + systemctl suspend + ;; +esac diff --git a/.local/bin/volume-control b/.local/bin/volume-control new file mode 100755 index 0000000..f47bfd1 --- /dev/null +++ b/.local/bin/volume-control @@ -0,0 +1,28 @@ +#!/bin/sh + +# Taken from: https://github.com/salanpro/hyprland/tree/047f998e710b0ffe8d841a89fb7749b50c931b2c/.config/hypr/scripts + +# Volume up and down +if [[ "$1" == "up" ]]; then + wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ \ + && wpctl get-volume @DEFAULT_AUDIO_SINK@ | \ + awk '{print int($2*100)}' | xargs -I[] \ + notify-send -e -u low -h string:x-canonical-private-synchronous:volume_notif -h \ + int:value:[] "󰓃 Volume []" +elif [[ "$1" == "down" ]]; then + wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%- \ + && wpctl get-volume @DEFAULT_AUDIO_SINK@ | \ + awk '{print int($2*100)}' | xargs -I[] \ + notify-send -e -u low -h string:x-canonical-private-synchronous:volume_notif -h \ + int:value:[] "󰓃 Volume []" +elif [[ "$1" == "mute" ]]; then + wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle \ + && (wpctl get-volume @DEFAULT_AUDIO_SINK@ \ + | grep -q MUTED && \ + notify-send -e -u low -h \ + string:x-canonical-private-synchronous:volume_notif \ + "󰝟 Muted" || wpctl get-volume @DEFAULT_AUDIO_SINK@ | \ + awk '{print int($2*100)}' | xargs -I[] \ + notify-send -e -u low -h string:x-canonical-private-synchronous:volume_notif -h \ + int:value:[] "󰓃 Volume []") +fi diff --git a/usr/local/bin/bemenu-wall b/usr/local/bin/bemenu-wall deleted file mode 100755 index e69de29..0000000 diff --git a/usr/local/bin/sway-launch b/usr/local/bin/sway-launch deleted file mode 100755 index ed1e71f..0000000 --- a/usr/local/bin/sway-launch +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -export LANG="en_US.UTF-8" -export LC_ALL="en_US.UTF-8" - -# XDG dirs -export XDG_CONFIG_HOME="${HOME}/.config" -export XDG_CACHE_HOME="${HOME}/.cache" -export XDG_DATA_HOME="${HOME}/.local/share" -export XDG_DESKTOP_DIR="${HOME}/desktop" -export XDG_DOWNLOAD_DIR="${HOME}/downloads" -export XDG_DOCUMENT_DIR="${HOME}/documents" -export XDG_PICTURES_DIR="${HOME}/pictures" -export XDG_PUBLICSHARE_DIR="${HOME}/public" -export XDG_MUSIC_DIR="${HOME}/music" -export XDG_VIDEOS_DIR="${HOME}/videos" - -export EDITOR="nvim" - -export PATH="${PATH}:${HOME}/.local/bin" - -export ELECTRON_OZONE_PLATFORM_HINT="auto" - -export TZ=Asia/Kolkata - -# Qt apps -export QT_QPA_PLATFORM="wayland-egl" -export QT_QPA_PLATFORMTHEME="qt5ct" - -# Launch sway -exec dbus-launch --exit-with-session sway diff --git a/usr/local/bin/sway-lid b/usr/local/bin/sway-lid deleted file mode 100755 index 6300fb2..0000000 --- a/usr/local/bin/sway-lid +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -# lid.sh -if swaymsg -t get_outputs | grep -q '"HDMI-A-1"'; then - swaymsg output eDP-1 disable -fi diff --git a/usr/local/bin/sway-power b/usr/local/bin/sway-power deleted file mode 100755 index 82088ad..0000000 --- a/usr/local/bin/sway-power +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -_have() { - command -v "$1" -} - -PWR_OPTS=$(printf '%b' 'Lock\nReboot\nShutdown\nSuspend\nHibernate' | bemenu -l 5 -i -p 'Power menu:') - -case "$PWR_OPTS" in - Hibernate) - systemctl hibernate - ;; - Lock) - _have swaylock && swaylock --daemonize && swaymsg 'output * power off' - ;; - Reboot) - systemctl reboot - ;; - Shutdown) - systemctl poweroff - ;; - Suspend) - systemctl suspend - ;; -esac diff --git a/usr/local/bin/volume-control b/usr/local/bin/volume-control deleted file mode 100755 index f47bfd1..0000000 --- a/usr/local/bin/volume-control +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -# Taken from: https://github.com/salanpro/hyprland/tree/047f998e710b0ffe8d841a89fb7749b50c931b2c/.config/hypr/scripts - -# Volume up and down -if [[ "$1" == "up" ]]; then - wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ \ - && wpctl get-volume @DEFAULT_AUDIO_SINK@ | \ - awk '{print int($2*100)}' | xargs -I[] \ - notify-send -e -u low -h string:x-canonical-private-synchronous:volume_notif -h \ - int:value:[] "󰓃 Volume []" -elif [[ "$1" == "down" ]]; then - wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%- \ - && wpctl get-volume @DEFAULT_AUDIO_SINK@ | \ - awk '{print int($2*100)}' | xargs -I[] \ - notify-send -e -u low -h string:x-canonical-private-synchronous:volume_notif -h \ - int:value:[] "󰓃 Volume []" -elif [[ "$1" == "mute" ]]; then - wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle \ - && (wpctl get-volume @DEFAULT_AUDIO_SINK@ \ - | grep -q MUTED && \ - notify-send -e -u low -h \ - string:x-canonical-private-synchronous:volume_notif \ - "󰝟 Muted" || wpctl get-volume @DEFAULT_AUDIO_SINK@ | \ - awk '{print int($2*100)}' | xargs -I[] \ - notify-send -e -u low -h string:x-canonical-private-synchronous:volume_notif -h \ - int:value:[] "󰓃 Volume []") -fi -- cgit v1.3