From b370921034705e589e69dc6471f86eedd96e9d0a Mon Sep 17 00:00:00 2001 From: coolnsx Date: Tue, 31 Mar 2026 19:07:26 +0530 Subject: [PATCH] We've known each other for so long --- .gitignore | 1 + foot/foot.ini | 8 +- gtk-3.0/bookmarks | 5 +- hypr/bemoji | 20 ++--- hypr/brightness | 2 +- hypr/hyprland.conf | 130 ++++++++++++++++++++++--------- hypr/rungame | 10 ++- hypr/screenshot | 5 +- hypr/volume | 2 +- hypr/workspace | 17 ++-- zed/settings.json | 35 ++++----- zsh/{zsh_functions => functions} | 48 ++++++------ zsh/zshrc | 15 +++- 13 files changed, 183 insertions(+), 115 deletions(-) rename zsh/{zsh_functions => functions} (93%) diff --git a/.gitignore b/.gitignore index 6836856..9a86cc7 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ xpra psysh zoom* .env +systemd diff --git a/foot/foot.ini b/foot/foot.ini index 43c7fd1..72e0278 100644 --- a/foot/foot.ini +++ b/foot/foot.ini @@ -8,7 +8,7 @@ term=xterm-256color # title=foot # locked-title=no -font=Iosevka Term:size=13.5 +font=Iosevka Term:size=14 #font-bold= #font-italic=Victor Mono:style=Italic:size=12 #font-bold-italic= @@ -56,7 +56,7 @@ launch=xdg-open ${url} # uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[] [cursor] -# style=block +style=underline # color= # blink=no # beam-thickness=1.5 @@ -66,7 +66,7 @@ launch=xdg-open ${url} # hide-when-typing=no # alternate-scroll-mode=yes -[colors] +[colors-dark] background=272822 foreground=FCFCFA regular0=403E41 @@ -85,7 +85,7 @@ bright4=FC9867 bright5=AB9DF2 bright6=78DCE8 bright7=FCFCFA -alpha=0.9 +alpha=0.85 ## dimmed colors (see foot.ini(5) man page) # dim0= diff --git a/gtk-3.0/bookmarks b/gtk-3.0/bookmarks index f043aec..9e78a4a 100644 --- a/gtk-3.0/bookmarks +++ b/gtk-3.0/bookmarks @@ -1,2 +1,3 @@ -file:///home/tanveer/Downloads Downloads -file:///home/tanveer/.config/wall +file:///home/tanveer/dls dls +file:///home/tanveer/.config/wall wall +file:///tmp tmp diff --git a/hypr/bemoji b/hypr/bemoji index 957fd92..66b5a55 100755 --- a/hypr/bemoji +++ b/hypr/bemoji @@ -1,30 +1,22 @@ #!/bin/sh -menu() { - bemenu --fn 'IBM Plex Sans 15' -i -c -W "0.${2:-4}" -B 3 -l 20 -p "$1" --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT" -} - notify() { notify-send -e "$1" -h "string:x-canonical-private-synchronous:${0##*/}" -i "$2" -u "${3:-normal}" } download_emoji_file(){ - notify "Downloading Emoji Database..." "downloader" - if curl -sL "https://unicode.org/Public/emoji/latest/emoji-test.txt" | sed -nE 's|.*fully-qualified.*# (.*)|\1|p' > "$1"; then - notify "Emoji Database Downloaded" "downloader" - else - notify "Something Went wrong" "downloader" "critical" - fi + etag_file="$1.etag" + notify "Syncing Emoji Database..." "downloader" + curl -sL "https://unicode.org/Public/emoji/latest/emoji-test.txt" --etag-compare "$etag_file" --etag-save "$etag_file" -o "$1" } - -emoji_file="${XDG_CACHE_DIR:-$HOME/.cache}/${0##*/}" +emoji_file="${XDG_CACHE_DIR:-$HOME/.cache}/.${0##*/}" # check emoji file -[ -f "$emoji_file" ] || download_emoji_file "$emoji_file" +download_emoji_file "$emoji_file" # copy and write emoji to input -emoji=$(menu "EMOJI : " < "$emoji_file" | cut -d' ' -f1 | tr -d '\n') +emoji=$(sed -nE 's|.*fully-qualified.*# (.*)|\1|p' "$emoji_file" | bemenu --fn 'IBM Plex Sans 15' -i -c -W "0.${2:-4}" -B 3 -l 20 -p "EMOJI : " --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT" -R 20 | cut -d' ' -f1 | tr -d '\n') # validation [ -z "$emoji" ] && notify "No Emoji Selected" "" "critical" && exit 1 diff --git a/hypr/brightness b/hypr/brightness index de94850..9282eee 100755 --- a/hypr/brightness +++ b/hypr/brightness @@ -30,7 +30,7 @@ max=$(cat "$root_dir/$backlight_dir/max_brightness") #runtime values opr=$1 # [+|-], required -increment=${2:-1296} # [ default:1296, optional] "around 2% brightness" +increment=${2:-3990} # [ default:1296, optional] "around 2% brightness" #shellcheck disable=SC2004 [ "$opr" = "s" ] && printf "%s" "$((${current}00/${max}))" && exit 0 diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 43602f3..a7dcb8d 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -1,6 +1,12 @@ # See https://wiki.hyprland.org/Configuring/Monitors/ -#monitor=eDP-1,highrr,auto,1,vrr,0,bitdepth,10 -monitor=eDP-1,highrr,auto,1 +monitorv2 { + output = eDP-1 + mode = highrr + position = auto + scale = 1.5 + vrr = 1 + bitdepth = 10 +} $hypr_dir="$HOME/.config/hypr" $accent=6FAAFF @@ -172,11 +178,13 @@ bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow #applications shortcuts -bind = $mainMod, F4, exec, $HOME/repos_scripts/ani-new -bind = $mainMod, return, exec, [workspace 2] foot +bind = $mainMod, F4, exec, $HOME/scripts/ani-new +bind = $mainMod, F5, exec, $hypr_dir/wifi +bind = $mainMod, F6, exec, $hypr_dir/workspace +bind = $mainMod, F11, exec, $hypr_dir/info +bind = $mainMod, F12, exec, $hypr_dir/date bind = $mainMod, Q, exec, $hypr_dir/dmenu_run_history bind = $mainMod, G, exec, $hypr_dir/rungame -bind = $mainMod, SPACE, exec, $hypr_dir/bemoji bind = $mainMod, A, exec, [workspace 1] $browser bind = $mainMod, C, exec, [workspace 3] zeditor bind = $mainMod, E, exec, [workspace 3] pcmanfm @@ -184,12 +192,14 @@ bind = $mainMod, I, exec, $hypr_dir/bkmark bind = $mainMod SHIFT, I, exec, $hypr_dir/bkmark "copy" bind = $mainMod, B, exec, $hypr_dir/bkmark "add" bind = $mainMod SHIFT, B, exec, $hypr_dir/bkmark "rm" -bind = $mainMod SHIFT, L, exit, bind = $mainMod, L, exec, loginctl lock-session -bind = $mainMod SHIFT, Print, exec, $hypr_dir/screenshot 'fullclip' -bind = $mainMod,Print, exec, $hypr_dir/screenshot 'fullsave' -bind = $mainMod, F12, exec, $hypr_dir/date -bind = $mainMod, Delete, exec, $hypr_dir/workspace 'list' +bind = $mainMod SHIFT, L, exit, +bind = $mainMod, return, exec, [workspace 2] foot +bind = $mainMod, SPACE, exec, $hypr_dir/bemoji +bind = , Print, exec, $hypr_dir/screenshot selclip +bind = $mainMod,Print, exec, $hypr_dir/screenshot fullclip +bind = $mainMod SHIFT, Print, exec, $hypr_dir/screenshot fullsave +bind = $mainMod, Delete, exec, $hypr_dir/workspace list bind = $mainMod SHIFT, M, exec, $hypr_dir/pinmpv #xf86 keys @@ -199,34 +209,84 @@ binde =, XF86AudioMute, exec, $hypr_dir/volume set-mute @DEFAULT_SINK@ toggle binde =, XF86AudioMicMute, exec, $hypr_dir/volume set-mute @DEFAULT_SOURCE@ toggle binde =, XF86AudioPlay, exec, echo cycle pause | socat - "/tmp/yt-music/yt-music-mpvsocket" binde =, XF86AudioPause, exec, echo cycle pause | socat - "/tmp/yt-music/yt-music-mpvsocket" -binde = $mainMod, XF86Favorites, exec, $HOME/repos_scripts/yt-music search_play #why not :) -binde =, XF86HangupPhone, exec, flock -n /tmp/yt-music/play_next.lock $HOME/repos_scripts/yt-music play_next -binde =, XF86PickupPhone, exec, flock -n /tmp/yt-music/play_next_menu.lock $HOME/repos_scripts/yt-music play_next menu +binde =, XF86Launch2, exec, $HOME/scripts/yt-music search_play #why not :) +binde =, XF86AudioNext, exec, flock -n /tmp/yt-music/play_next.lock $HOME/scripts/yt-music play_next +binde =, XF86AudioPrev, exec, flock -n /tmp/yt-music/play_next_menu.lock $HOME/scripts/yt-music play_next menu binde =, XF86MonBrightnessUp, exec, $hypr_dir/brightness '+' binde =, XF86MonBrightnessDown, exec, $hypr_dir/brightness '-' -bind = , XF86SelectiveScreenshot, exec, $hypr_dir/screenshot 'selclip' -bind = , XF86Display, exec, $hypr_dir/workspace "toggle" -bind = , XF86NotificationCenter, exec, $hypr_dir/info bind = $mainMod, F8, exec, $hypr_dir/wifi #windows rules -windowrulev2 = workspace 1,class:^(google-chrome)$ -windowrulev2 = workspace 1,class:^(firefox)$ -windowrulev2 = workspace 4,class:^(Google-chrome)$ -windowrulev2 = workspace 3,class:^(mpv)$ -#windowrulev2 = workspace 4,class:^(org.pulseaudio.pavucontrol)$ -windowrulev2 = workspace 4,class:^(org.freedesktop.Xwayland)$ -windowrulev2 = fullscreen,class:^(org.freedesktop.Xwayland)$ -windowrulev2 = workspace 4,class:^(virt-manager)$ -windowrulev2 = bordercolor rgba(64f2a4FF), xwayland: 1 -windowrulev2 = workspace 3,class:^(Waydroid)$ -windowrulev2 = pseudo, class:^(Waydroid)$ -windowrulev2 = workspace 3,title:^(Picture-in-Picture)$ -windowrulev2 = size 640 360, title:(Picture-in-Picture) -windowrulev2 = pin, title:^(Picture-in-Picture)$ -windowrulev2 = move 100%-641 100%-361, title:(Picture-in-Picture) -windowrulev2 = float, title:^(Picture-in-Picture)$ -windowrulev2 = float, class:^(xdg-desktop-portal-gtk)$ +# Browsers +windowrule { + name = google-chrome + match:class = ^(google-chrome)$ + workspace = 1 +} + +windowrule { + name = firefox + match:class = ^(firefox)$ + workspace = 1 +} + +windowrule { + name = google-chrome + match:class = ^(Google-chrome)$ + workspace = 4 +} + +# Media / Utilities +windowrule { + name = mpv + match:class = ^(mpv)$ + workspace = 4 +} + +windowrule { + name = virt-manager + match:class = ^(virt-manager)$ + workspace = 4 +} + +windowrule { + name = waydroid + match:class = ^(Waydroid)$ + workspace = 4 + pseudo = on +} + +# XWayland apps +windowrule { + name = xwayland-apps + match:xwayland = true + border_color = rgba(64f2a4FF) +} + +windowrule { + name = xwayland + match:class = ^(org.freedesktop.Xwayland)$ + workspace = 4 + fullscreen = on +} + +# Picture-in-Picture +windowrule { + name = firefox-pip + match:title = ^(Picture-in-Picture)$ + workspace = 3 + float = on + pin = on + size = 640 360 + move = 100%-641 100%-361 +} + +# Portals / dialogs +windowrule { + name = xdg-desktop-portal + match:class = ^(xdg-desktop-portal-gtk)$ + float = on +} #workspace rules workspace = 1, on-created-empty:$browser @@ -238,8 +298,8 @@ exec-once = systemctl --user import-environment DBUS_SESSION_BUS_ADDRESS WAYLAND exec-once = dbus-update-activation-environment --systemd --all exec-once = hypridle exec-once = ssh-agent -exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 -exec-once = swaybg -i $HOME/.config/wall/4.jpg -m fill +exec-once = systemctl --user start hyprpolkitagent +exec-once = swaybg -i $HOME/.config/wall/1.png -m fill exec-once = $hypr_dir/workspace 'focus' exec-once = $hypr_dir/battery exec-once = $hypr_dir/themes diff --git a/hypr/rungame b/hypr/rungame index e5dfeb6..0a9b9be 100755 --- a/hypr/rungame +++ b/hypr/rungame @@ -5,7 +5,7 @@ gamedir="$HOME/Games" games=$(find "$gamedir" -maxdepth 5 -type f -name '*.exe' -executable | sed "s|$gamedir/||g;/[U|u]nin.*/d") [ -z "$games" ] && notify-send -e -u critical "No games installed" && exit 1 -game=$(printf '%s\n' "$games" | bemenu --fn 'IBM Plex Sans 15' -i -c -W 0.5 -B 3 -p "PLAY GAME: " -l 15 -P ">> " --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT") +game=$(printf '%s\n' "$games" | bemenu --fn 'IBM Plex Sans 15' -i -c -W 0.5 -B 3 -R 20 -p "PLAY GAME: " -l 15 -P ">> " --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT" --accept-single) [ -z "$game" ] && notify-send -e -h "string:x-canonical-private-synchronous:${0##*/}" -u critical "No game selected" && exit 1 @@ -17,8 +17,10 @@ notify-send -e -h "string:x-canonical-private-synchronous:${0##*/}" -i "wine" "L trap 'wineserver -k' INT HUP -#DXVK_CONFIG=dxgi.hideAmdGpu=True WINEFSYNC=1 WINEESYNC=1 MANGOHUD=1 gamescope -W 1280 -H 800 -r 60 -- gamemoderun wine "$gamename" +#DXVK_CONFIG=dxgi.hideAmdGpu=True WINEFSYNC=1 WINEESYNC=1 gamescope --mangoapp -W 1280 -H 800 -r 60 -- gamemoderun wine "$gamename" -#hyprctl keyword monitor "eDP-1",'1280x800@60','auto','1' +hyprctl keyword monitor "eDP-1",'1440x900@60','auto','1' +#WINEFSYNC=1 WINEESYNC=1 MANGOHUD=1 env -u DISPLAY gamemoderun wine "$gamename" +#WINEFSYNC=1 WINEESYNC=1 env -u DISPLAY gamescope --mangoapp -W 1440 -H 900 -r 60 -- gamemoderun wine "$gamename" WINEFSYNC=1 WINEESYNC=1 MANGOHUD=1 env -u DISPLAY gamemoderun wine "$gamename" -#hyprctl keyword monitor "eDP-1",highrr,'auto','1' +hyprctl keyword monitor "eDP-1",highrr,'auto','1' diff --git a/hypr/screenshot b/hypr/screenshot index d28e980..a71b0b6 100755 --- a/hypr/screenshot +++ b/hypr/screenshot @@ -11,9 +11,10 @@ case "$1" in grim - | tee "$tmp_file" | wl-copy -t image/png ;; fullsave) - tmp_file="$HOME/Pictures/$(date -u "+%Y-%m-%d_%H-%M-%S").png" + pics_dir="${XDG_PICTURES_DIR:-$HOME/pics}" + [ -d "$pics_dir" ] || mkdir -p "$pics_dir" + tmp_file="$pics_dir/$(date -u "+%Y-%m-%d_%H-%M-%S").png" message="Screenshot saved." - [ -d "$HOME/Pictures" ] || mkdir -p "$HOME/Pictures" grim "$tmp_file" ;; selclip) diff --git a/hypr/volume b/hypr/volume index 2b9e497..1591ee0 100755 --- a/hypr/volume +++ b/hypr/volume @@ -2,7 +2,7 @@ #shellcheck disable=SC2068 wpctl $@ -vol=$(wpctl get-volume @DEFAULT_AUDIO_SINK@) +vol=$(wpctl get-volume @DEFAULT_SINK@) vol_int=$(printf '%s' "$vol" | tr -cd '[:digit:]') vol_icon="low" [ "$vol_int" -gt 33 ] && vol_icon="medium" diff --git a/hypr/workspace b/hypr/workspace index 2f710d1..c47c36b 100755 --- a/hypr/workspace +++ b/hypr/workspace @@ -1,11 +1,17 @@ #!/bin/sh +menu() { + bemenu --fn 'IBM Plex Sans 15' -i -c -W "0.${2:-2}" -B 3 -l 10 -p "$1" --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT" -R 20 +} + setup_dual_monitor() { - monitor=$(hyprctl monitors | sed -nE 's|.*(HDMI-A-[0-9]).*|\1|p') + monitor="$1" + [ -z "$monitor" ] && monitor=$(hyprctl monitors | sed -nE 's|.*(HDMI-A-[0-9]).*|\1|p') [ -z "$monitor" ] && monitor=$(hyprctl monitors | sed -nE 's|.* (DP-[0-9]).*|\1|p') + position=$(printf "auto\nauto-left" | menu "[$monitor] position:") if [ -n "$monitor" ]; then notify-send -e "Setting up dual monitor workflow" - hyprctl keyword monitor "$monitor",highres,auto,1 + hyprctl keyword monitor "$monitor",highres,"$position",1 hyprctl dispatch moveworkspacetomonitor "1 0" hyprctl dispatch moveworkspacetomonitor "2 0" hyprctl dispatch moveworkspacetomonitor "3 1" @@ -17,13 +23,14 @@ setup_dual_monitor() { handle_it() { [ -z "$1" ] || notify-send -e "$1" - choice=$(printf "Extend\nMirror" | bemenu -R 20 --fn 'IBM Plex Sans 15' -i -c -W 0.2 -B 3 -l 20 -p "what to do??: " -m 1 --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT") + monitor=$(printf '%s' "$1" | sed -nE 's|monitoraddedv2>>[0-9]*,([^,]*),.*|\1|p') + choice=$(printf "Extend\nMirror" | menu "[$monitor] mode:") [ -z "$choice" ] && return 0 notify-send -e "${choice}ing screen" if [ "$choice" = "Extend" ]; then - setup_dual_monitor + setup_dual_monitor "$monitor" else - hyprctl keyword monitor "$(hyprctl monitors | sed -nE 's|.*(HDMI-A-[0-9]).*|\1|p')",preferred, auto, 1, mirror, eDP-1 + hyprctl keyword monitor "$monitor",preferred,auto,1,mirror,eDP-1 fi } diff --git a/zed/settings.json b/zed/settings.json index aac34ff..41958d0 100644 --- a/zed/settings.json +++ b/zed/settings.json @@ -1,4 +1,11 @@ { + "git": { + "inline_blame": { + "show_commit_summary": true + } + }, + "disable_ai": false, + "buffer_line_height": "comfortable", "terminal": { "dock": "bottom" }, @@ -8,24 +15,7 @@ "features": { "edit_prediction_provider": "none" }, - "ssh_connections": [ - { - "host": "se-live", - "projects": [ - { - "paths": ["/var/www/html/student_edge_admin"] - } - ] - }, - { - "host": "se-gcp", - "projects": [ - { - "paths": ["/var/www/qa/student_edge_admin"] - } - ] - } - ], + "ssh_connections": [], "telemetry": { "diagnostics": false, "metrics": false @@ -50,7 +40,14 @@ "format_on_save": "off", }, "JavaScript": { - "tab_size": 4, + "tab_size": 4, + }, + "Python": { + "tab_size": 4, + }, + "yaml": { + "format_on_save": "off", + "tab_size": 4, } }, } diff --git a/zsh/zsh_functions b/zsh/functions similarity index 93% rename from zsh/zsh_functions rename to zsh/functions index 11814da..dd078c6 100644 --- a/zsh/zsh_functions +++ b/zsh/functions @@ -56,7 +56,7 @@ deploy() { clshist() { [ -z "$ZED_TERM" ] || return 0 - tmpfile="${TMPDIR:-/tmp}/histfile" + tmpfile="$(mktemp)" # keep recent entries at bottom tac "$HISTFILE" | awk '!seen[$0]++' | tac | tee "$tmpfile" >/dev/null @@ -84,7 +84,9 @@ help() { # Git Related Functions # ######################### gtp() { - [ -z "$*" ] && commit=$(curl -s "https://raw.githubusercontent.com/ngerakines/commitment/master/commit_messages.txt" | shuf -n1) || commit=$* + cache_file="${XDG_CACHE_HOME:-$HOME/.cache}/.commit_messages" + curl -sL "https://raw.githubusercontent.com/ngerakines/commitment/master/commit_messages.txt" --etag-compare "$cache_file.etag" --etag-save "$cache_file.etag" -o "$cache_file" + [ -z "$*" ] && commit=$(shuf -n1 "$cache_file") || commit=$* git add -p git commit -m "$commit" git push @@ -129,26 +131,6 @@ gtu() { ################################## headless_add() { set -x - #define ur preferred port - for PORT in {11000..11100}; do - ! ss -tln | grep -q ":$PORT" && break - done - - # check existing headless display - [ -z "$1" ] && headless=$(hyprctl monitors | sed -nE 's|.*(HEADLESS-[0-9]*).*|\1|p') - - #create, if not exists - if [ -z "$headless" ]; then - hyprctl output create headless | grep -q "ok" - for i in $(hyprctl monitors | sed -nE 's|.*(HEADLESS-[0-9]*).*|\1|p'); do - pgrep -af "wayvnc --output=$i" && continue - headless=$i - done - printf '\n\nCreate Headless Display: %s' "$headless" - fi - - #there is issue - [ -z "$headless" ] && printf "Something went wrong\n" && return 1 #check for android devices, and select which one u wanna work upon device=$(adb devices | sed '/^\*/d;/^List of devices/d;/^$/d' | cut -f1 | fzf -1) @@ -161,15 +143,29 @@ headless_add() { #device fps for wayvnc device_fps=$(printf '%s' "$RES" | cut -d'@' -f2) - position=$(printf 'auto\nauto-left' | fzf --prompt="Which position? >") + headless="HEADLESS-ANDROID-$device" + + #create, if not exists + if ! hyprctl monitors | grep -q "$headless"; then + hyprctl output create headless "$headless" | grep -q 'ok' && printf '\n\nCreate Headless Display: %s' "$headless" + fi + + #there is issue + [ -z "$headless" ] && printf "Something went wrong\n" && return 1 + # set resolution,fps, and scaling hyprctl keyword monitor $headless,$RES,$position,'1' + #define ur preferred port + for PORT in {11000..11100}; do + ! ss -tln | grep -q ":$PORT" && break + done + # kill existing wayvnc and start a new one #pgrep -af "wayvnc" && killall wayvnc - setsid -f wayvnc --output="$headless" --socket="/tmp/$headless" --max-fps="$device_fps" 0.0.0.0 $PORT + setsid -f wayvnc --output="$headless" --disable-input --socket="/tmp/$headless" --max-fps="$device_fps" 0.0.0.0 $PORT #reverse port forward to device, and start VNC adb -s "$device" reverse tcp:$PORT tcp:$PORT @@ -183,7 +179,7 @@ headless_add() { headless_rm() { set -x - headless=$(hyprctl monitors | sed -nE 's|.*(HEADLESS-[0-9]*).*|\1|p' | fzf --prompt="Select Which Device to Remove >" -0 -1) + headless=$(hyprctl monitors | sed -nE 's|.*(HEADLESS-ANDROID-[^ ]*).*|\1|p' | fzf --prompt="Select Which Device to Remove >" -0 -1) [ -n "$headless" ] && hyprctl output remove $headless pid=$(pgrep -af "wayvnc --output=$headless" | cut -d' ' -f1) kill -9 $pid @@ -317,3 +313,5 @@ vpn() { [ "$query" = "start" ] && ! tailscale status | grep -qi 'tailscale is stopped' && doas tailscale down doas systemctl $query openvpn-client@vpn.service && printf "Openvpn %sed" "$query" } + +# vim: ft=zsh diff --git a/zsh/zshrc b/zsh/zshrc index 0595c88..d0f6569 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -1,11 +1,20 @@ #source user-defined functions -source "${${(%):-%x}:A:h}/zsh_functions" +source "${${(%):-%x}:A:h}/functions" -# Alias and exports +# EXPORTS export MANPAGER="sh -c 'col -bx | bat -l man -p'" export TZ="Asia/Kolkata" export PODMAN_COMPOSE_WARNING_LOGS=false -export PATH="$PATH:$HOME/repos_scripts:$HOME/.local/bin" +export PATH="$PATH:$HOME/scripts:$HOME/.local/bin" + +# XDG SPECS +export XDG_DOWNLOAD_DIR="$HOME/dls" +export XDG_DOCUMENTS_DIR="$HOME/docs" +export XDG_MUSIC_DIR="$HOME/music" +export XDG_PICTURES_DIR="$HOME/pics" +export XDG_VIDEOS_DIR="$HOME/vids" + +# ALIASES alias cat="bat -pp --color=always" alias open="xdg-open" alias cp="cp -v"