It's time to go home

This commit is contained in:
coolnsx
2023-07-24 12:04:11 +05:30
parent f9dc5f8759
commit ec0e3d17c1
16 changed files with 90 additions and 82 deletions

5
.zshrc
View File

@@ -40,10 +40,8 @@ gtb () {
holidays(){
printf 'Day Date Holiday
Wednesday 8th March Holi
Friday 7th April Good Friday
Wednesday 30th August Rakshabandhan
Tuesday 15th August Independence Day
Wednesday 30th August Rakshabandhan
Monday 2nd October Gandhi Jayanti
Tuesday 24th October Dussehra
Sunday-Tuesday 12-14 November Diwali & Bhai dooj\n' | bat -pp -l tsv
@@ -125,6 +123,7 @@ alias ll="ls --color=auto -alh"
alias ls="ls --color=auto"
alias fetch='/bin/*fetch'
alias nchh="nvim ~/.config/hypr/hyprland.conf"
alias shfmt="shfmt -ci -d -w"
clshist
HISTFILE=~/.histfile

View File

@@ -1,7 +1,7 @@
[FileDialog]
history=@Invalid()
lastVisited=file:///home/tanveer
qtVersion=5.15.7
lastVisited=file:///dev
qtVersion=5.15.10
shortcuts=file:, file:///home/tanveer
sidebarWidth=84
treeViewHeader=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x1\xb8\0\0\0\x4\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x4\0\0\0\xe8\0\0\0\x1\0\0\0\0\0\0\0\x36\0\0\0\x1\0\0\0\0\0\0\0:\0\0\0\x1\0\0\0\0\0\0\0`\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\xff\xff\xff\xff\0\0\0\0)

View File

@@ -33,6 +33,7 @@
origin = top-center
# Offset from the origin
#offset = -14x50
offset = 10x50
# Scale factor. It is auto-detected if value is 0.

View File

@@ -11,7 +11,7 @@
/** Generic window ***********************************/
.genwin {
//background-color: rgba(39, 40, 34, 0.5);
//background-color: rgba(39, 40, 34, 0.7);
background-color: rgba(0,0,0,0);
border-radius: 16px;
}

View File

@@ -44,7 +44,7 @@
:monitor 0
:geometry (geometry :x "50"
:y "50"
:width "35%"
:width "30%"
:height "40px"
:anchor "bottom left")
:stacking "bg"
@@ -57,7 +57,7 @@
:monitor 1
:geometry (geometry :x "50"
:y "50"
:width "35%"
:width "30%"
:height "40px"
:anchor "bottom left")
:stacking "bg"
@@ -76,7 +76,7 @@
(box :class "genwin" :orientation "h" :space-evenly "false" :vexpand "true" :hexpand "false"
(box :class "album_art" :vexpand "false" :hexpand "false" :style "background-image: url('${COVER}');")
(box :orientation "v" :spacing 20 :space-evenly "false" :vexpand "false" :hexpand "false"
(label :halign "center" :class "song" :wrap "false" :limit-width 40 :text SONG)
(label :halign "center" :class "song" :wrap "false" :limit-width 25 :text SONG)
(label :halign "center" :class "artist" :wrap "false" :text ARTIST)
(box :orientation "h" :spacing 20 :halign "center" :space-evenly "true" :vexpand "false" :hexpand "false"
(button :class "btn_prev" :onclick "./script prev" "玲")
@@ -85,6 +85,6 @@
(button :class "btn_next" :onclick "./script seek '1'" "")
(button :class "btn_next" :onclick "./script next" "怜"))
(box :class "music_bar" :halign "center" :vexpand "false" :hexpand "false" :space-evenly "false"
(scale :min 0 :active "true" :max 100 :value CURRENT))
)
))
(scale :min 0 :active "true" :max 100 :value CURRENT)))))

View File

@@ -8,9 +8,9 @@ term=xterm-256color
# title=foot
# locked-title=no
font=Iosevka Term Nerd Font Mono:size=10
font=Iosevka Term Nerd Font Mono:size=15
#font-bold=
font-italic=Victor Mono:style=Italic:size=9
font-italic=Victor Mono:style=Italic:size=12
#font-bold-italic=<bold+italic variant of regular font>
# line-height=<font metrics>
# letter-spacing=0

View File

@@ -38,20 +38,20 @@ column_meters_0=LeftCPUs Memory Swap
column_meter_modes_0=1 1 1
column_meters_1=RightCPUs Tasks LoadAverage Uptime
column_meter_modes_1=1 2 2 2
tree_view=1
sort_key=47
tree_sort_key=47
tree_view=0
sort_key=46
tree_sort_key=46
sort_direction=-1
tree_sort_direction=1
tree_sort_direction=-1
tree_view_always_by_pid=0
all_branches_collapsed=0
screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
.sort_key=PERCENT_MEM
.tree_sort_key=PERCENT_MEM
.tree_view=1
.sort_key=PERCENT_CPU
.tree_sort_key=PERCENT_CPU
.tree_view=0
.tree_view_always_by_pid=0
.sort_direction=-1
.tree_sort_direction=1
.tree_sort_direction=-1
.all_branches_collapsed=0
screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE PERCENT_SWAP_DELAY PERCENT_IO_DELAY Command
.sort_key=IO_RATE

View File

@@ -28,7 +28,12 @@ case $1 in
sed '/^$/d' "$file" "$oshi_file" | sed -E 's/.*DL: ([^|]*).*/\1/g' | bemenu --fn 'Roboto 15' -i -c -W 0.6 -B 3 -l 30 -p "Put-bookmark :" | tr '\`' '\n' | wl-copy && notify-send "Copied to clipboard" -i "com.github.davidmhewitt.clipped"
;;
*)
wtype -d 10 "$(sed '/^$/d' "$file" "$oshi_file" | sed -E 's/.*DL: ([^|]*).*/\1/g' | bemenu --fn 'Roboto 15' -i -c -W 0.6 -B 3 -l 30 -p "Put-bookmark :" | tr '\`' '\n')"
result="$(sed '/^$/d' "$file" "$oshi_file" | sed -E 's/.*DL: ([^|]*).*/\1/g' | bemenu --fn 'Roboto 15' -i -c -W 0.6 -B 3 -l 30 -p "Put-bookmark :" | tr '\`' '\n')"
if printf '%s' "$result" | grep -q 'B>';then
google-chrome-stable "$(printf '%s' "$result" | cut -d'>' -f2- | tr -d '\n ')"
else
wtype -d 10 "$result"
fi
;;
esac

View File

@@ -1,6 +1,8 @@
#!/bin/sh
for i in $(seq 5);do
notify-send -i "/usr/share/icons/Papirus/16x16/panel/clockify-blue.svg" "$(date)" -r 3 -t 1200 &
i=5
while [ $i -gt 0 ];do
notify-send -i "/usr/share/icons/Papirus/16x16/panel/clockify-blue.svg" "$(date)" -h "string:x-canonical-private-synchronous:date" -t 1200 &
sleep 1
: $((i-=1))
done

View File

@@ -1,5 +1,5 @@
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,1
monitor=,highres,auto,1
$hypr_dir="$HOME/.config/hypr"
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
@@ -149,14 +149,16 @@ bind = $mainMod, F12, exec, $hypr_dir/date
bind = $mainMod, Delete, exec, $hypr_dir/workspace 'list'
#media keys
binde=, XF86AudioRaiseVolume, exec, pamixer -i 2 && $hypr_dir/volume
#binde=, XF86AudioRaiseVolume, exec, pamixer -i 2 && $hypr_dir/volume
binde=$mainMod, F2, exec, pamixer -d 2 && $hypr_dir/volume #my XF86AudioLowerVolume doesn't work
binde=$mainMod, F3, exec, pamixer -i 2 && $hypr_dir/volume #my XF86AudioLowerVolume doesn't work,So I don't use XF86AudioRaiseVolume, gives me confusion
#binde=, XF86AudioMute, exec, pamixer -t && $hypr_dir/volume #doesn't work either
binde=$mainMod, F8, exec, echo cycle pause | socat - "/tmp/mpvsocket"
binde=$mainMod SHIFT, F8, exec, $HOME/repos_scripts/yt-music search_play
binde=$mainMod, F9, exec, $HOME/repos_scripts/yt-music play_next
binde=$mainMod SHIFT, F9, exec, $HOME/repos_scripts/yt-music play_next menu
binde=, XF86MonBrightnessDown, exec, light -U 2 && notify-send -i "lol" "☀️ $(light -G | cut -d'.' -f1)" -t 1000 -r 1
binde=, XF86MonBrightnessUp, exec, light -A 2 && notify-send -i "lol" "☀️ $(light -G | cut -d'.' -f1)" -t 1000 -r 1
binde=, XF86MonBrightnessDown, exec, light -U 2 && notify-send -i "lol" "☀️ $(light -G | cut -d'.' -f1)" -t 1000 -h "string:x-canonical-private-synchronous:brightness"
binde=, XF86MonBrightnessUp, exec, light -A 2 && notify-send -i "lol" "☀️ $(light -G | cut -d'.' -f1)" -t 1000 -h "string:x-canonical-private-synchronous:brightness"
#windows rules
windowrulev2=workspace 1,class:^(google-chrome)$

View File

@@ -1,17 +1,16 @@
#!/bin/sh
i=1
while [ $i -le "5" ];do
while [ $i -le 5 ];do
mem=$(sed -nE 's_.*MemAvailable:[[:space:]]*(.*) kB_\1_p' /proc/meminfo)
mem=$(((7919488 - mem)/1000))
mem="$(((7919488 - mem)/1000))"
temp=$(cat /sys/class/thermal/thermal_zone0/temp)
temp=$((temp / 1000))
bat_stats=$(cat /sys/class/power_supply/BAT*/status)
vol_stats=$(pamixer --get-mute)
[ "$bat_stats" = "Discharging" ] && bat_icon=🔋 || bat_icon=🔌
[ "$vol_stats" = "true" ] && vol_icon=🔇 || vol_icon=🔊
notify-send -i "lol" "<----------(STATS)---------->" "🧠 CPU usage : $(top -ibn1 | sed -nE 's_%Cpu\(s\):(.*)us.*_\1_p' | cut -d' ' -f2-3) %\n🌡 Cpu Temp : $temp °C\n🔳 RAM : $mem MB / 7733 MB\n$bat_icon Battery : $(cat /sys/class/power_supply/BAT*/capacity) (${bat_stats})\n☀ Brightness : $(light -G | cut -d'.' -f1)%\n$vol_icon Volume : $(pamixer --get-volume-human)\n🎵 $(pgrep -af mpvsocket >/dev/null && cut -d ">" -f1 /tmp/yt-music/current | cut -d":" -f2)" -r 2 -t 1500 &
notify-send -i "lol" "<----------(STATS)---------->" "🧠 CPU usage : $(top -ibn1 | sed -nE 's_%Cpu\(s\):(.*)us.*_\1_p' | cut -d' ' -f2-3) %\n🌡 Cpu Temp : $temp °C\n🔳 RAM : $mem MB / 7733 MB\n$bat_icon Battery : $(cat /sys/class/power_supply/BAT*/capacity) (${bat_stats})\n☀ Brightness : $(light -G | cut -d'.' -f1)%\n$vol_icon Volume : $(pamixer --get-volume-human)\n🎵 $(pgrep -af mpvsocket >/dev/null && cut -d ">" -f1 /tmp/yt-music/current | cut -d":" -f2)" -h "string:x-canonical-private-synchronous:stats" -t 1500 &
: $((i+=1))
sleep 1
done

View File

@@ -2,7 +2,8 @@
vol_int=$(pamixer --get-volume)
vol_icon="low"
[ "$vol_int" -gt 0 ] && pamixer -u || pamixer -m
[ "$vol_int" -gt 33 ] && vol_icon="medium"
[ "$vol_int" -gt 66 ] && vol_icon="high"
pamixer --get-mute | sh && vol_icon="muted"
notify-send -i "/usr/share/icons/Papirus/16x16/panel/audio-volume-$vol_icon.svg" "$vol_int %" -t 1000 -r 1
notify-send -i "/usr/share/icons/Papirus/16x16/panel/audio-volume-$vol_icon.svg" "$vol_int %" -h "string:x-canonical-private-synchronous:volume" -t 1000

View File

@@ -6,4 +6,4 @@ else
nmcli radio wifi on
wifi_icon="acquiring"
fi
notify-send -i "/usr/share/icons/Papirus/16x16/panel/network-wireless-$wifi_icon.svg" "wifi $(nmcli radio wifi)" -r 1
notify-send -i "/usr/share/icons/Papirus/16x16/panel/network-wireless-$wifi_icon.svg" "wifi $(nmcli radio wifi)" -h "string:x-canonical-private-synchronous:wifi"

View File

@@ -1,11 +1,10 @@
#!/bin/sh
setup_dual_monitor(){
sed -i "s/monitor=,1920x1080,0x0,1,mirror,eDP-1/monitor=,preferred,auto,1/g" "$HOME/.config/hypr/hyprland.conf"
sed -i "s/monitor=,1920x1080,0x0,1,mirror,eDP-1/monitor=,highres,auto,1/g" "$HOME/.config/hypr/hyprland.conf"
sleep 2
if hyprctl monitors | grep -q "HDMI-A-1";then
notify-send "Setting up dual monitor workflow"
wlr-randr --output 'HDMI-A-1' --custom-mode '1900x1080@60'
for i in $(seq 2 4);do
hyprctl dispatch moveworkspacetomonitor "$i 0"
done
@@ -23,7 +22,7 @@ handle_it(){
if [ "$choice" = "Extend" ];then
setup_dual_monitor
else
sed -i "s/monitor=,preferred,auto,1/monitor=,1920x1080,0x0,1,mirror,eDP-1/g" "$HOME/.config/hypr/hyprland.conf"
sed -i "s/monitor=,highres,auto,1/monitor=,1920x1080,0x0,1,mirror,eDP-1/g" "$HOME/.config/hypr/hyprland.conf"
fi
}
@@ -31,21 +30,21 @@ case $1 in
list)
#only lists the open applications with their workspace number so u can safely close them
for i in $(seq 4);do
notify-send -i "lol" "$(hyprctl clients | sed -nE 's_.*class: ([^ ]*).*_\1_p;s_.*workspace: ([^ ]*).*_workspace \1 : _p' | sed 'N;s/\n/ /')" -r 3 -t 1500
notify-send -i "lol" "$(hyprctl clients | sed -nE 's_.*class: ([^ ]*).*_\1_p;s_.*workspace: ([^ ]*).*_workspace \1 : _p' | sed 'N;s/\n/ /')" -h "string:x-canonical-private-synchronous:workspace" -t 1500
sleep 1
done ;;
focus)
#shows the workspace number as notification whenever u switch workspaces and also handles the dual monitor setup on the fly(perfect for laptop users)
socat - "UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" | while read -r line;do
printf "%s" "$line" | grep -q "monitoradded" && handle_it "$line"
printf "%s" "$line" | grep -q "monitorremoved" && sed -i "s/monitor=,1920x1080,0x0,1,mirror,eDP-1/monitor=,preferred,auto,1/g" "$HOME/.config/hypr/hyprland.conf" && eww kill && eww open_many time_0 music_0
printf "%s" "$line" | grep -q "monitorremoved" && sed -i "s/monitor=,1920x1080,0x0,1,mirror,eDP-1/monitor=,highres,auto,1/g" "$HOME/.config/hypr/hyprland.conf" && eww kill && eww open_many time_0 music_0
#recent workspace switcher
current=$(printf "%s" "$line" | sed -nE 's_^(workspace)>>([^ ]*)_\1 \2_p')
if [ -n "$current" ];then
cat /tmp/workcurr > /tmp/workprev
printf "%s" "$current" > /tmp/workcurr
fi
notify-send -i "lol" "$(printf "%s" "$line" | sed -nE 's_^(workspace)>>([^ ]*)_\1 \2_p')" -r 1 -t 700 2>/dev/null
notify-send -i "lol" "$(printf "%s" "$line" | sed -nE 's_^(workspace)>>([^ ]*)_\1 \2_p')" -h 'string:x-canonical-private-synchronous:monitor' -t 700 2>/dev/null
done ;;
toggle)
#toggle between mirror and extend setup. this function should be keybinded

View File

@@ -1,26 +1,26 @@
{
"LuaSnip": { "branch": "master", "commit": "9b5be5e9b460fad7134991d3fd0434466959db08" },
"LuaSnip": { "branch": "master", "commit": "0b4950a237ce441a6a3a947d501622453f6860ea" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "8fcc934a52af96120fe26358985c10c035984b53" },
"cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" },
"cmp-nvim-lua": { "branch": "main", "commit": "f3491638d123cfd2c8048aefaf66d246ff250ca6" },
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
"friendly-snippets": { "branch": "main", "commit": "009887b76f15d16f69ae1341f86a7862f61cf2a1" },
"laravel.nvim": { "branch": "main", "commit": "e04d31dae87ea24211658e1f42a73e5e582602bb" },
"lazy.nvim": { "branch": "main", "commit": "0e230caab9466ae352e9aaa6a4327ebd3e72302a" },
"lualine.nvim": { "branch": "master", "commit": "e99d733e0213ceb8f548ae6551b04ae32e590c80" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "e4badf7984f7a5f0ac7dc10657dbedbd99a82f94" },
"mason.nvim": { "branch": "main", "commit": "c400270804059087e2d0041893a95c6bab4df3c1" },
"friendly-snippets": { "branch": "main", "commit": "4aed1a0ca605cb1c87f59799a0cc4afe00a40272" },
"laravel.nvim": { "branch": "main", "commit": "23d6cba80e03d16a18034a54b2b0be1f57400bd3" },
"lazy.nvim": { "branch": "main", "commit": "3ad55ae678876516156cca2f361c51f7952a924b" },
"lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "e86a4c84ff35240639643ffed56ee1c4d55f538e" },
"mason.nvim": { "branch": "main", "commit": "3f6b544c75c01549f7a2a9e395e0f1cea42b25dd" },
"monokai-pro.nvim": { "branch": "main", "commit": "826d028edbcc7a8aadc0f7a32b32747d97575615" },
"nvim-autopairs": { "branch": "master", "commit": "ab49517cfd1765b3f3de52c1f0fda6190b44e27b" },
"nvim-cmp": { "branch": "main", "commit": "feed47fd1da7a1bad2c7dca456ea19c8a5a9823a" },
"nvim-autopairs": { "branch": "master", "commit": "ae5b41ce880a6d850055e262d6dfebd362bb276e" },
"nvim-cmp": { "branch": "main", "commit": "c4e491a87eeacf0408902c32f031d802c7eafce8" },
"nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" },
"nvim-dap": { "branch": "master", "commit": "c1bfcd89ef440a44d02ade7e71befb1e5aa358ca" },
"nvim-dap-python": { "branch": "master", "commit": "65ccab83fb3d0b29ead6c765c1c52a1ed49592e8" },
"nvim-lspconfig": { "branch": "master", "commit": "1a2d5f5224c65b0709bf5da0ccd9cad29272083a" },
"nvim-parinfer": { "branch": "master", "commit": "82bce5798993f4fe5ced20e74003b492490b4fe8" },
"nvim-treesitter": { "branch": "master", "commit": "980f0816cc28c20e45715687a0a21b5b39af59eb" },
"nvim-dap": { "branch": "master", "commit": "d17d1bba23ec72a157bd183c57840c39e323f515" },
"nvim-dap-python": { "branch": "master", "commit": "37b4cba02e337a95cb62ad1609b3d1dccb2e5d42" },
"nvim-lspconfig": { "branch": "master", "commit": "dd11ba7b3c8f82d51b6d4dd7d68fce2d78bf78a0" },
"nvim-parinfer": { "branch": "master", "commit": "c0d95d9f4c5f921872ba11790b76efbb02cc8af5" },
"nvim-treesitter": { "branch": "master", "commit": "7b04e8b67eec7d92daadf9f0717dd272ddfc81a3" },
"packer.nvim": { "branch": "master", "commit": "1d0cf98a561f7fd654c970c49f917d74fafe1530" },
"telescope.nvim": { "branch": "master", "commit": "a3f17d3baf70df58b9d3544ea30abe52a7a832c2" }
"telescope.nvim": { "branch": "master", "commit": "7bb2fcecdcfe7d7975c0e59c276033740cd45d38" }
}

View File

@@ -25,7 +25,7 @@ focus_previous=0
side_pane_mode=places
view_mode=list
show_hidden=0
sort=name;descending;
sort=name;ascending;
columns=name:200;desc:143;size;mtime:870;
toolbar=newtab;navigation;home;
show_statusbar=1