mirror of
https://github.com/CoolnsX/hyprdots.git
synced 2026-04-17 18:39:54 +05:30
We've known each other for so long
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -24,3 +24,4 @@ xpra
|
|||||||
psysh
|
psysh
|
||||||
zoom*
|
zoom*
|
||||||
.env
|
.env
|
||||||
|
systemd
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ term=xterm-256color
|
|||||||
# title=foot
|
# title=foot
|
||||||
# locked-title=no
|
# locked-title=no
|
||||||
|
|
||||||
font=Iosevka Term:size=13.5
|
font=Iosevka Term:size=14
|
||||||
#font-bold=
|
#font-bold=
|
||||||
#font-italic=Victor Mono:style=Italic:size=12
|
#font-italic=Victor Mono:style=Italic:size=12
|
||||||
#font-bold-italic=<bold+italic variant of regular font>
|
#font-bold-italic=<bold+italic variant of regular font>
|
||||||
@@ -56,7 +56,7 @@ launch=xdg-open ${url}
|
|||||||
# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]
|
# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]
|
||||||
|
|
||||||
[cursor]
|
[cursor]
|
||||||
# style=block
|
style=underline
|
||||||
# color=<inverse foreground/background>
|
# color=<inverse foreground/background>
|
||||||
# blink=no
|
# blink=no
|
||||||
# beam-thickness=1.5
|
# beam-thickness=1.5
|
||||||
@@ -66,7 +66,7 @@ launch=xdg-open ${url}
|
|||||||
# hide-when-typing=no
|
# hide-when-typing=no
|
||||||
# alternate-scroll-mode=yes
|
# alternate-scroll-mode=yes
|
||||||
|
|
||||||
[colors]
|
[colors-dark]
|
||||||
background=272822
|
background=272822
|
||||||
foreground=FCFCFA
|
foreground=FCFCFA
|
||||||
regular0=403E41
|
regular0=403E41
|
||||||
@@ -85,7 +85,7 @@ bright4=FC9867
|
|||||||
bright5=AB9DF2
|
bright5=AB9DF2
|
||||||
bright6=78DCE8
|
bright6=78DCE8
|
||||||
bright7=FCFCFA
|
bright7=FCFCFA
|
||||||
alpha=0.9
|
alpha=0.85
|
||||||
|
|
||||||
## dimmed colors (see foot.ini(5) man page)
|
## dimmed colors (see foot.ini(5) man page)
|
||||||
# dim0=<not set>
|
# dim0=<not set>
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
file:///home/tanveer/Downloads Downloads
|
file:///home/tanveer/dls dls
|
||||||
file:///home/tanveer/.config/wall
|
file:///home/tanveer/.config/wall wall
|
||||||
|
file:///tmp tmp
|
||||||
|
|||||||
20
hypr/bemoji
20
hypr/bemoji
@@ -1,30 +1,22 @@
|
|||||||
#!/bin/sh
|
#!/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() {
|
||||||
notify-send -e "$1" -h "string:x-canonical-private-synchronous:${0##*/}" -i "$2" -u "${3:-normal}"
|
notify-send -e "$1" -h "string:x-canonical-private-synchronous:${0##*/}" -i "$2" -u "${3:-normal}"
|
||||||
}
|
}
|
||||||
|
|
||||||
download_emoji_file(){
|
download_emoji_file(){
|
||||||
notify "Downloading Emoji Database..." "downloader"
|
etag_file="$1.etag"
|
||||||
if curl -sL "https://unicode.org/Public/emoji/latest/emoji-test.txt" | sed -nE 's|.*fully-qualified.*# (.*)|\1|p' > "$1"; then
|
notify "Syncing Emoji Database..." "downloader"
|
||||||
notify "Emoji Database Downloaded" "downloader"
|
curl -sL "https://unicode.org/Public/emoji/latest/emoji-test.txt" --etag-compare "$etag_file" --etag-save "$etag_file" -o "$1"
|
||||||
else
|
|
||||||
notify "Something Went wrong" "downloader" "critical"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
emoji_file="${XDG_CACHE_DIR:-$HOME/.cache}/.${0##*/}"
|
||||||
emoji_file="${XDG_CACHE_DIR:-$HOME/.cache}/${0##*/}"
|
|
||||||
|
|
||||||
# check emoji file
|
# check emoji file
|
||||||
[ -f "$emoji_file" ] || download_emoji_file "$emoji_file"
|
download_emoji_file "$emoji_file"
|
||||||
|
|
||||||
# copy and write emoji to input
|
# 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
|
# validation
|
||||||
[ -z "$emoji" ] && notify "No Emoji Selected" "" "critical" && exit 1
|
[ -z "$emoji" ] && notify "No Emoji Selected" "" "critical" && exit 1
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ max=$(cat "$root_dir/$backlight_dir/max_brightness")
|
|||||||
|
|
||||||
#runtime values
|
#runtime values
|
||||||
opr=$1 # [+|-], required
|
opr=$1 # [+|-], required
|
||||||
increment=${2:-1296} # [ default:1296, optional] "around 2% brightness"
|
increment=${2:-3990} # [ default:1296, optional] "around 2% brightness"
|
||||||
|
|
||||||
#shellcheck disable=SC2004
|
#shellcheck disable=SC2004
|
||||||
[ "$opr" = "s" ] && printf "%s" "$((${current}00/${max}))" && exit 0
|
[ "$opr" = "s" ] && printf "%s" "$((${current}00/${max}))" && exit 0
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||||
#monitor=eDP-1,highrr,auto,1,vrr,0,bitdepth,10
|
monitorv2 {
|
||||||
monitor=eDP-1,highrr,auto,1
|
output = eDP-1
|
||||||
|
mode = highrr
|
||||||
|
position = auto
|
||||||
|
scale = 1.5
|
||||||
|
vrr = 1
|
||||||
|
bitdepth = 10
|
||||||
|
}
|
||||||
|
|
||||||
$hypr_dir="$HOME/.config/hypr"
|
$hypr_dir="$HOME/.config/hypr"
|
||||||
$accent=6FAAFF
|
$accent=6FAAFF
|
||||||
@@ -172,11 +178,13 @@ bindm = $mainMod, mouse:272, movewindow
|
|||||||
bindm = $mainMod, mouse:273, resizewindow
|
bindm = $mainMod, mouse:273, resizewindow
|
||||||
|
|
||||||
#applications shortcuts
|
#applications shortcuts
|
||||||
bind = $mainMod, F4, exec, $HOME/repos_scripts/ani-new
|
bind = $mainMod, F4, exec, $HOME/scripts/ani-new
|
||||||
bind = $mainMod, return, exec, [workspace 2] foot
|
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, Q, exec, $hypr_dir/dmenu_run_history
|
||||||
bind = $mainMod, G, exec, $hypr_dir/rungame
|
bind = $mainMod, G, exec, $hypr_dir/rungame
|
||||||
bind = $mainMod, SPACE, exec, $hypr_dir/bemoji
|
|
||||||
bind = $mainMod, A, exec, [workspace 1] $browser
|
bind = $mainMod, A, exec, [workspace 1] $browser
|
||||||
bind = $mainMod, C, exec, [workspace 3] zeditor
|
bind = $mainMod, C, exec, [workspace 3] zeditor
|
||||||
bind = $mainMod, E, exec, [workspace 3] pcmanfm
|
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 SHIFT, I, exec, $hypr_dir/bkmark "copy"
|
||||||
bind = $mainMod, B, exec, $hypr_dir/bkmark "add"
|
bind = $mainMod, B, exec, $hypr_dir/bkmark "add"
|
||||||
bind = $mainMod SHIFT, B, exec, $hypr_dir/bkmark "rm"
|
bind = $mainMod SHIFT, B, exec, $hypr_dir/bkmark "rm"
|
||||||
bind = $mainMod SHIFT, L, exit,
|
|
||||||
bind = $mainMod, L, exec, loginctl lock-session
|
bind = $mainMod, L, exec, loginctl lock-session
|
||||||
bind = $mainMod SHIFT, Print, exec, $hypr_dir/screenshot 'fullclip'
|
bind = $mainMod SHIFT, L, exit,
|
||||||
bind = $mainMod,Print, exec, $hypr_dir/screenshot 'fullsave'
|
bind = $mainMod, return, exec, [workspace 2] foot
|
||||||
bind = $mainMod, F12, exec, $hypr_dir/date
|
bind = $mainMod, SPACE, exec, $hypr_dir/bemoji
|
||||||
bind = $mainMod, Delete, exec, $hypr_dir/workspace 'list'
|
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
|
bind = $mainMod SHIFT, M, exec, $hypr_dir/pinmpv
|
||||||
|
|
||||||
#xf86 keys
|
#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 =, XF86AudioMicMute, exec, $hypr_dir/volume set-mute @DEFAULT_SOURCE@ toggle
|
||||||
binde =, XF86AudioPlay, exec, echo cycle pause | socat - "/tmp/yt-music/yt-music-mpvsocket"
|
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 =, 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 =, XF86Launch2, exec, $HOME/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 =, XF86AudioNext, exec, flock -n /tmp/yt-music/play_next.lock $HOME/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 =, 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 =, XF86MonBrightnessUp, exec, $hypr_dir/brightness '+'
|
||||||
binde =, XF86MonBrightnessDown, 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
|
bind = $mainMod, F8, exec, $hypr_dir/wifi
|
||||||
|
|
||||||
#windows rules
|
#windows rules
|
||||||
windowrulev2 = workspace 1,class:^(google-chrome)$
|
# Browsers
|
||||||
windowrulev2 = workspace 1,class:^(firefox)$
|
windowrule {
|
||||||
windowrulev2 = workspace 4,class:^(Google-chrome)$
|
name = google-chrome
|
||||||
windowrulev2 = workspace 3,class:^(mpv)$
|
match:class = ^(google-chrome)$
|
||||||
#windowrulev2 = workspace 4,class:^(org.pulseaudio.pavucontrol)$
|
workspace = 1
|
||||||
windowrulev2 = workspace 4,class:^(org.freedesktop.Xwayland)$
|
}
|
||||||
windowrulev2 = fullscreen,class:^(org.freedesktop.Xwayland)$
|
|
||||||
windowrulev2 = workspace 4,class:^(virt-manager)$
|
windowrule {
|
||||||
windowrulev2 = bordercolor rgba(64f2a4FF), xwayland: 1
|
name = firefox
|
||||||
windowrulev2 = workspace 3,class:^(Waydroid)$
|
match:class = ^(firefox)$
|
||||||
windowrulev2 = pseudo, class:^(Waydroid)$
|
workspace = 1
|
||||||
windowrulev2 = workspace 3,title:^(Picture-in-Picture)$
|
}
|
||||||
windowrulev2 = size 640 360, title:(Picture-in-Picture)
|
|
||||||
windowrulev2 = pin, title:^(Picture-in-Picture)$
|
windowrule {
|
||||||
windowrulev2 = move 100%-641 100%-361, title:(Picture-in-Picture)
|
name = google-chrome
|
||||||
windowrulev2 = float, title:^(Picture-in-Picture)$
|
match:class = ^(Google-chrome)$
|
||||||
windowrulev2 = float, class:^(xdg-desktop-portal-gtk)$
|
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 rules
|
||||||
workspace = 1, on-created-empty:$browser
|
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 = dbus-update-activation-environment --systemd --all
|
||||||
exec-once = hypridle
|
exec-once = hypridle
|
||||||
exec-once = ssh-agent
|
exec-once = ssh-agent
|
||||||
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
exec-once = systemctl --user start hyprpolkitagent
|
||||||
exec-once = swaybg -i $HOME/.config/wall/4.jpg -m fill
|
exec-once = swaybg -i $HOME/.config/wall/1.png -m fill
|
||||||
exec-once = $hypr_dir/workspace 'focus'
|
exec-once = $hypr_dir/workspace 'focus'
|
||||||
exec-once = $hypr_dir/battery
|
exec-once = $hypr_dir/battery
|
||||||
exec-once = $hypr_dir/themes
|
exec-once = $hypr_dir/themes
|
||||||
|
|||||||
10
hypr/rungame
10
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")
|
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
|
[ -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
|
[ -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
|
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"
|
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'
|
||||||
|
|||||||
@@ -11,9 +11,10 @@ case "$1" in
|
|||||||
grim - | tee "$tmp_file" | wl-copy -t image/png
|
grim - | tee "$tmp_file" | wl-copy -t image/png
|
||||||
;;
|
;;
|
||||||
fullsave)
|
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."
|
message="Screenshot saved."
|
||||||
[ -d "$HOME/Pictures" ] || mkdir -p "$HOME/Pictures"
|
|
||||||
grim "$tmp_file"
|
grim "$tmp_file"
|
||||||
;;
|
;;
|
||||||
selclip)
|
selclip)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#shellcheck disable=SC2068
|
#shellcheck disable=SC2068
|
||||||
wpctl $@
|
wpctl $@
|
||||||
vol=$(wpctl get-volume @DEFAULT_AUDIO_SINK@)
|
vol=$(wpctl get-volume @DEFAULT_SINK@)
|
||||||
vol_int=$(printf '%s' "$vol" | tr -cd '[:digit:]')
|
vol_int=$(printf '%s' "$vol" | tr -cd '[:digit:]')
|
||||||
vol_icon="low"
|
vol_icon="low"
|
||||||
[ "$vol_int" -gt 33 ] && vol_icon="medium"
|
[ "$vol_int" -gt 33 ] && vol_icon="medium"
|
||||||
|
|||||||
@@ -1,11 +1,17 @@
|
|||||||
#!/bin/sh
|
#!/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() {
|
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')
|
[ -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
|
if [ -n "$monitor" ]; then
|
||||||
notify-send -e "Setting up dual monitor workflow"
|
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 "1 0"
|
||||||
hyprctl dispatch moveworkspacetomonitor "2 0"
|
hyprctl dispatch moveworkspacetomonitor "2 0"
|
||||||
hyprctl dispatch moveworkspacetomonitor "3 1"
|
hyprctl dispatch moveworkspacetomonitor "3 1"
|
||||||
@@ -17,13 +23,14 @@ setup_dual_monitor() {
|
|||||||
|
|
||||||
handle_it() {
|
handle_it() {
|
||||||
[ -z "$1" ] || notify-send -e "$1"
|
[ -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
|
[ -z "$choice" ] && return 0
|
||||||
notify-send -e "${choice}ing screen"
|
notify-send -e "${choice}ing screen"
|
||||||
if [ "$choice" = "Extend" ]; then
|
if [ "$choice" = "Extend" ]; then
|
||||||
setup_dual_monitor
|
setup_dual_monitor "$monitor"
|
||||||
else
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,11 @@
|
|||||||
{
|
{
|
||||||
|
"git": {
|
||||||
|
"inline_blame": {
|
||||||
|
"show_commit_summary": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"disable_ai": false,
|
||||||
|
"buffer_line_height": "comfortable",
|
||||||
"terminal": {
|
"terminal": {
|
||||||
"dock": "bottom"
|
"dock": "bottom"
|
||||||
},
|
},
|
||||||
@@ -8,24 +15,7 @@
|
|||||||
"features": {
|
"features": {
|
||||||
"edit_prediction_provider": "none"
|
"edit_prediction_provider": "none"
|
||||||
},
|
},
|
||||||
"ssh_connections": [
|
"ssh_connections": [],
|
||||||
{
|
|
||||||
"host": "se-live",
|
|
||||||
"projects": [
|
|
||||||
{
|
|
||||||
"paths": ["/var/www/html/student_edge_admin"]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"host": "se-gcp",
|
|
||||||
"projects": [
|
|
||||||
{
|
|
||||||
"paths": ["/var/www/qa/student_edge_admin"]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"telemetry": {
|
"telemetry": {
|
||||||
"diagnostics": false,
|
"diagnostics": false,
|
||||||
"metrics": false
|
"metrics": false
|
||||||
@@ -50,7 +40,14 @@
|
|||||||
"format_on_save": "off",
|
"format_on_save": "off",
|
||||||
},
|
},
|
||||||
"JavaScript": {
|
"JavaScript": {
|
||||||
"tab_size": 4,
|
"tab_size": 4,
|
||||||
|
},
|
||||||
|
"Python": {
|
||||||
|
"tab_size": 4,
|
||||||
|
},
|
||||||
|
"yaml": {
|
||||||
|
"format_on_save": "off",
|
||||||
|
"tab_size": 4,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ deploy() {
|
|||||||
|
|
||||||
clshist() {
|
clshist() {
|
||||||
[ -z "$ZED_TERM" ] || return 0
|
[ -z "$ZED_TERM" ] || return 0
|
||||||
tmpfile="${TMPDIR:-/tmp}/histfile"
|
tmpfile="$(mktemp)"
|
||||||
|
|
||||||
# keep recent entries at bottom
|
# keep recent entries at bottom
|
||||||
tac "$HISTFILE" | awk '!seen[$0]++' | tac | tee "$tmpfile" >/dev/null
|
tac "$HISTFILE" | awk '!seen[$0]++' | tac | tee "$tmpfile" >/dev/null
|
||||||
@@ -84,7 +84,9 @@ help() {
|
|||||||
# Git Related Functions #
|
# Git Related Functions #
|
||||||
#########################
|
#########################
|
||||||
gtp() {
|
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 add -p
|
||||||
git commit -m "$commit"
|
git commit -m "$commit"
|
||||||
git push
|
git push
|
||||||
@@ -129,26 +131,6 @@ gtu() {
|
|||||||
##################################
|
##################################
|
||||||
headless_add() {
|
headless_add() {
|
||||||
set -x
|
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
|
#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)
|
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 for wayvnc
|
||||||
device_fps=$(printf '%s' "$RES" | cut -d'@' -f2)
|
device_fps=$(printf '%s' "$RES" | cut -d'@' -f2)
|
||||||
|
|
||||||
position=$(printf 'auto\nauto-left' | fzf --prompt="Which position? >")
|
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
|
# set resolution,fps, and scaling
|
||||||
hyprctl keyword monitor $headless,$RES,$position,'1'
|
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
|
# kill existing wayvnc and start a new one
|
||||||
#pgrep -af "wayvnc" && killall wayvnc
|
#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
|
#reverse port forward to device, and start VNC
|
||||||
adb -s "$device" reverse tcp:$PORT tcp:$PORT
|
adb -s "$device" reverse tcp:$PORT tcp:$PORT
|
||||||
@@ -183,7 +179,7 @@ headless_add() {
|
|||||||
|
|
||||||
headless_rm() {
|
headless_rm() {
|
||||||
set -x
|
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
|
[ -n "$headless" ] && hyprctl output remove $headless
|
||||||
pid=$(pgrep -af "wayvnc --output=$headless" | cut -d' ' -f1)
|
pid=$(pgrep -af "wayvnc --output=$headless" | cut -d' ' -f1)
|
||||||
kill -9 $pid
|
kill -9 $pid
|
||||||
@@ -317,3 +313,5 @@ vpn() {
|
|||||||
[ "$query" = "start" ] && ! tailscale status | grep -qi 'tailscale is stopped' && doas tailscale down
|
[ "$query" = "start" ] && ! tailscale status | grep -qi 'tailscale is stopped' && doas tailscale down
|
||||||
doas systemctl $query openvpn-client@vpn.service && printf "Openvpn %sed" "$query"
|
doas systemctl $query openvpn-client@vpn.service && printf "Openvpn %sed" "$query"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# vim: ft=zsh
|
||||||
15
zsh/zshrc
15
zsh/zshrc
@@ -1,11 +1,20 @@
|
|||||||
#source user-defined functions
|
#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 MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
||||||
export TZ="Asia/Kolkata"
|
export TZ="Asia/Kolkata"
|
||||||
export PODMAN_COMPOSE_WARNING_LOGS=false
|
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 cat="bat -pp --color=always"
|
||||||
alias open="xdg-open"
|
alias open="xdg-open"
|
||||||
alias cp="cp -v"
|
alias cp="cp -v"
|
||||||
|
|||||||
Reference in New Issue
Block a user