We've known each other for so long

This commit is contained in:
2026-03-31 19:07:26 +05:30
parent 65c507d603
commit b370921034
13 changed files with 183 additions and 115 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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'

View File

@@ -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)

View File

@@ -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"

View File

@@ -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
}