This commit is contained in:
sankalp committed 2024-08-03 22:22:41 +05:45
1 parent 434fe2034d
commit 0b4914b07b
5 files changed
+26 -129

No files matched your search

+5 -5
View File
@@ -29,14 +29,16 @@ bind = $mainMod SHIFT, G, exec, $RunCMD gamemode #! @description: "Toggle anim
bind = ALT, F3, exec, $RunCMD kb_changer #! @description: "Change Keyboard Layout"; @actions;
bind = $mainMod, space, exec, $RunCMD change_layout #! @description: "Change Layout(master/dwindle)"; @actions;
bind = SHIFT ALT,W, exec, python -O $scriptsDir/wallpaper.py -R #! @description: "Random wallpaper"; @actions;
bind = $mainMod, Z, exec, $scriptsDir/ScreenShot.sh --area #! @description: "Window screenshot"; @actions;
bind = ,Print, exec, $scriptsDir/ScreenShot.sh --now #! @description: "Screenshot"; @actions;
bind = $mainMod CTRL, L, exec, pidof hyprlock || hyprlock -q #! @description: "Lock screen"; @actions;
bind = $mainMod CTRL, P, exec, systemctl poweroff #! @description: "ShutDown"; @actions;
bind = $mainMod CTRL, R, exec, systemctl reboot #! @description: "Restart"; @actions;
bind = $mainMod CTRL, Q, exec, loginctl kill-session $XDG_SESSION_ID #! @description: "LogOut"; @actions;
bind = $mainMod, Z, exec, $scriptsDir/ScreenShot.sh #! @description: "Screenshot"; @actions;
bind = ALT SHIFT, S, exec, $scriptsDir/ScreenShot.sh --window #! @description: "Window screenshot"; @actions;
bind = ,Print, exec, $scriptsDir/ScreenShot.sh --active #! @description: "Active screen screenshot"; @actions;
bind = CTRL SHIFT, R, exec, pkill ags ; ags #! @description: "Reload AGS" @actions;
# Tools
bind = $mainMod, D, exec, ags -r "toggleAppsWindow()" #! @description: "App Launcher"; @tools;
bind = $mainMod SHIFT, Z, exec, ags -r "toggleMediaWindow()" #! @description: "Players"; @tools;
@@ -48,9 +50,7 @@ bind = $mainMod, W, exec, ags -r "OpenSettings('wallpaper')" #! @descrip
bind = $mainMod SHIFT, S, exec, ags -r 'OpenSettings()' #! @description: "Setting"; @tools;
bind = ALT, F1, exec, ags -t cheatsheet #! @description: "List of keybindings"; @tools;
# Misc
# misc
bind = $mainMod ALT, P, submap, passthru #! @description: "Passthrough mainMod key to Virtual Machine"; @misc;
submap = passthru
bind = $mainMod ALT, Escape, submap, reset #! @description: "Cancel passthrough"; @misc;
-39
View File
@@ -1,39 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 512 512" xml:space="preserve">
<path style="fill:#FF6465;" d="M256.002,503.671c136.785,0,247.671-110.886,247.671-247.672S392.786,8.329,256.002,8.329
S8.33,119.215,8.33,256.001S119.216,503.671,256.002,503.671z"/>
<path style="opacity:0.1;enable-background:new ;" d="M74.962,256.001c0-125.485,93.327-229.158,214.355-245.434
c-10.899-1.466-22.016-2.238-33.316-2.238C119.216,8.329,8.33,119.215,8.33,256.001s110.886,247.672,247.671,247.672
c11.3,0,22.417-0.772,33.316-2.238C168.289,485.159,74.962,381.486,74.962,256.001z"/>
<path style="fill:#FFFFFF;" d="M311.525,256.001l65.206-65.206c4.74-4.74,4.74-12.425,0-17.163l-38.36-38.36
c-4.74-4.74-12.425-4.74-17.164,0l-65.206,65.206l-65.206-65.206c-4.74-4.74-12.425-4.74-17.163,0l-38.36,38.36
c-4.74,4.74-4.74,12.425,0,17.163l65.206,65.206l-65.206,65.206c-4.74,4.74-4.74,12.425,0,17.164l38.36,38.36
c4.74,4.74,12.425,4.74,17.163,0l65.206-65.206l65.206,65.206c4.74,4.74,12.425,4.74,17.164,0l38.36-38.36
c4.74-4.74,4.74-12.425,0-17.164L311.525,256.001z"/>
<path d="M388.614,182.213c0-5.467-2.129-10.607-5.995-14.471l-38.36-38.36c-3.865-3.865-9.004-5.994-14.471-5.994
s-10.605,2.129-14.471,5.994l-59.316,59.316l-59.316-59.316c-3.865-3.865-9.004-5.994-14.471-5.994
c-5.467,0-10.606,2.129-14.471,5.994l-38.36,38.36c-7.979,7.979-7.979,20.962,0,28.943l59.316,59.316l-59.316,59.316
c-7.979,7.979-7.979,20.962,0,28.943l38.36,38.36c3.865,3.865,9.004,5.993,14.471,5.993c5.467,0,10.606-2.129,14.471-5.993
l59.316-59.316l59.316,59.316c3.865,3.865,9.004,5.993,14.471,5.993s10.605-2.129,14.471-5.993l38.36-38.36
c3.866-3.865,5.995-9.004,5.995-14.471c0-5.467-2.129-10.607-5.995-14.471l-59.315-59.316l59.315-59.315
C386.485,192.818,388.614,187.68,388.614,182.213z M370.84,184.905l-65.204,65.206c-3.253,3.253-3.253,8.527,0,11.778l65.204,65.207
c0.971,0.971,1.115,2.103,1.115,2.692c0,0.589-0.144,1.721-1.115,2.692l-38.36,38.36c-0.971,0.971-2.103,1.115-2.692,1.115
c-0.589,0-1.722-0.144-2.692-1.115l-65.206-65.206c-1.626-1.626-3.758-2.44-5.889-2.44c-2.131,0-4.263,0.813-5.889,2.44
l-65.206,65.206c-0.971,0.971-2.103,1.115-2.692,1.115c-0.59,0-1.722-0.144-2.693-1.115l-38.36-38.36
c-1.484-1.485-1.484-3.9,0-5.385l65.206-65.206c3.253-3.253,3.253-8.527,0-11.778l-65.206-65.206c-1.484-1.485-1.484-3.9,0-5.385
l38.359-38.36c0.971-0.971,2.104-1.115,2.693-1.115s1.722,0.144,2.692,1.115l65.206,65.206c3.253,3.253,8.527,3.253,11.778,0
l65.206-65.206c0.971-0.971,2.103-1.115,2.692-1.115c0.589,0,1.722,0.144,2.692,1.115l38.36,38.36
c0.971,0.971,1.115,2.103,1.115,2.692S371.811,183.934,370.84,184.905z"/>
<path d="M423.9,73.756c-3.229,3.276-3.191,8.55,0.086,11.778c46.016,45.349,71.358,105.89,71.358,170.466
c0,63.931-24.896,124.035-70.102,169.241s-105.31,70.102-169.241,70.102c-35.385,0-69.471-7.555-101.311-22.455
c-4.166-1.95-9.124-0.153-11.074,4.013c-1.95,4.166-0.153,9.124,4.013,11.074C181.695,503.917,218.156,512,255.999,512
c68.381,0,132.668-26.629,181.019-74.982c48.352-48.352,74.98-112.64,74.98-181.019c0-69.072-27.106-133.825-76.323-182.331
C432.401,70.44,427.128,70.478,423.9,73.756z"/>
<path d="M116.34,470.563c1.405,0.916,2.982,1.354,4.542,1.354c2.72,0,5.387-1.332,6.984-3.78c2.513-3.852,1.427-9.013-2.426-11.526
c-68.115-44.424-108.78-119.419-108.78-200.611c0-63.931,24.896-124.035,70.102-169.24c45.206-45.206,105.31-70.102,169.241-70.102
c52.234,0,101.864,16.528,143.525,47.796c3.679,2.761,8.9,2.017,11.66-1.662c2.761-3.679,2.017-8.9-1.662-11.661
C364.958,17.681,311.87,0,256.002,0c-68.38,0-132.668,26.629-181.019,74.98C26.63,123.333,0.001,187.62,0.001,255.999
C0.001,342.841,43.493,423.051,116.34,470.563z"/>
</svg>

Before

Width:  |  Height:  |  Size: 3.8 KiB

-7
View File
@@ -1,7 +0,0 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Transformed by: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="-4.8 -4.8 57.60 57.60" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="SVGRepo_bgCarrier" stroke-width="0"/>
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round" stroke="#CCCCCC" stroke-width="0.9600000000000002"/>
<g id="SVGRepo_iconCarrier"> <path d="M16 6H8C6.89543 6 6 6.89543 6 8V16" stroke="#f6f5f4" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/> <path d="M16 42H8C6.89543 42 6 41.1046 6 40V32" stroke="#f6f5f4" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/> <path d="M32 42H40C41.1046 42 42 41.1046 42 40V32" stroke="#f6f5f4" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/> <path d="M32 6H40C41.1046 6 42 6.89543 42 8V16" stroke="#f6f5f4" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/> <rect x="14" y="14" width="20" height="20" rx="2" fill="#e01b24" stroke="#f6f5f4" stroke-width="4"/> </g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

+11 -69
View File
@@ -1,73 +1,15 @@
#!/bin/bash
DIR="$HOME/Pictures/screenshots/"
NAME="screenshot_$(date +%d%m%Y_%H%M%S).png"
# Screenshots scripts
iDIR="$HOME/dotfiles/hypr/assets"
# hyprshot -z -m region -o "/tmp" -f "$NAME" -s
notify_cmd_shot="notify-send -h string:x-canonical-private-synchronous:shot-notify -u low -i ${iDIR}/screenshot.svg"
dir="$(xdg-user-dir PICTURES)/Screenshots"
[[ ! -d "$dir" ]] && mkdir -p "$dir"
if [[ "$1" == "--window" ]]; then
hyprshot -z -m window -o "/tmp" -f "$NAME" -s
elif [[ "$1" == "--active" ]]; then
hyprshot -z -m active -m output -o "/tmp" -f "$NAME" -s
else
hyprshot -z -m region -o "/tmp" -f "$NAME" -s --
fi
notify_view() {
local msg="Screenshot Saved."
if [[ "$1" == "active" && ! -e "$active_window_path" ]]; then
msg="Screenshot NOT Saved."
fi
$notify_cmd_shot "$msg"
}
countdown() {
for ((sec=$1; sec>0; sec--)); do
notify-send -h string:x-canonical-private-synchronous:shot-notify -t 1000 -i "$iDIR/timer.png" "Taking shot in: $sec"
sleep 1
done
}
take_shot() {
local time=$(date "+%d-%b_%H-%M-%S")
local file="Screenshot_${time}_${RANDOM}.png"
cd "$dir" && grim - | tee "$file" | wl-copy
sleep 2
notify_view "$1"
}
shot_timer() {
local time=$(date "+%d-%b_%H-%M-%S")
local file="Screenshot_${time}_${RANDOM}.png"
countdown "$1"
sleep 1
take_shot "$2"
}
shotarea() {
local time=$(date "+%d-%b_%H-%M-%S")
local tmpfile=$(mktemp)
local area=$(slurp)
if [[ -z "$area" ]]; then
notify-send -u low -i "$iDIR/cancel.svg" 'No area selected'
rm "$tmpfile"
return
fi
grim -g "$area" - > "$tmpfile" && [[ -s "$tmpfile" ]] && {
wl-copy < "$tmpfile"
mv "$tmpfile" "$dir/Screenshot_${time}_${RANDOM}.png"
notify_view
}
rm "$tmpfile"
}
shotactive() {
local time=$(date "+%d-%b_%H-%M-%S")
local active_window_path="${dir}/Screenshot_${time}_$(hyprctl -j activewindow | jq -r '.class').png"
hyprctl -j activewindow | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' | grim -g - "$active_window_path"
sleep 1
notify_view "active"
}
case "$1" in
--now) take_shot ;;
--in5) shot_timer 5 ;;
--in10) shot_timer 10 ;;
--area) shotarea ;;
--active) shotactive ;;
*) echo "Available Options: --now --in5 --in10 --area --active" ;;
esac
swappy -f "/tmp/$NAME" -o "$DIR$NAME"
+10 -9
View File
@@ -10,15 +10,16 @@ notif="$HOME/dotfiles/hypr/assets/bell.png"
######################################
toggle_animation() {
STATE=$(hyprctl -j getoption animations:enabled | jq ".int")
if [ "${STATE}" = "1" ]; then
hyprctl keyword animations:enabled 0
noti_n "Disable animation"
else
hyprctl keyword animations:enabled 1
noti_n "Enable animation"
fi
cache_file="/tmp/toggle_animation"
if [ -f $cache_file ]; then
hyprctl keyword animations:enabled true
ags -r 'enableAnimations(true)'
rm $cache_file
else
hyprctl keyword animations:enabled false
ags -r 'enableAnimations(false)'
touch $cache_file
fi
}
################################################