diff --git a/.gitignore b/.gitignore index 24b105f..7c77419 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ skypeforlinux user-dirs.dirs user-dirs.locale xfce4 +libvirt diff --git a/.zshrc b/.zshrc index a65f09a..543e8e5 100644 --- a/.zshrc +++ b/.zshrc @@ -14,7 +14,7 @@ gtb () { } b64 () { printf "%s" "$1" | base64 $2; } -url() { curl -s https://0x0.st -F "file=@$*" | xclip -sel clip && notify-send "Link copied to clipboard"; } +url() { curl -s https://0x0.st -F "file=@$*" | wl-copy && notify-send "Link copied to clipboard"; } gtd () { [ -z "$*" ] && file=$(git diff --name-only | fzf --border=rounded --height=10 --layout=reverse | tr -d ' ') || file=$* @@ -22,19 +22,9 @@ gtd () { unset file } -connectvnc () { - ssh -N -T -L 5900:localhost:5900 -L 9873:localhost:9873 root@45.32.230.158 & - temp=$! - sleep 4 - vncviewer :0 - kill $temp - unset temp - sleep 1 -} - gtc () { [ -z "$*" ] && [ -p "/dev/stdin" ] && read -r query diff --git a/htop/htoprc b/htop/htoprc index 559a469..77f54bd 100644 --- a/htop/htoprc +++ b/htop/htoprc @@ -29,7 +29,7 @@ update_process_names=0 account_guest_in_cpu_meter=0 color_scheme=0 enable_mouse=1 -delay=15 +delay=10 hide_function_bar=0 header_layout=two_50_50 column_meters_0=LeftCPUs Memory Swap @@ -37,14 +37,14 @@ column_meter_modes_0=1 1 1 column_meters_1=RightCPUs Tasks LoadAverage Uptime column_meter_modes_1=1 2 2 2 tree_view=0 -sort_key=46 +sort_key=47 tree_sort_key=0 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_CPU +.sort_key=PERCENT_MEM .tree_sort_key=PID .tree_view=0 .tree_view_always_by_pid=0 diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 1ddbd99..8103df5 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -1,23 +1,7 @@ -# This is an example Hyprland config file. -# -# Refer to the wiki for more information. - -# -# Please note not all available settings / options are set here. -# For a full list, see the wiki -# - # See https://wiki.hyprland.org/Configuring/Monitors/ -monitor=,preferred,auto,1,mirror,eDP-1 +monitor=,preferred,auto,1 # See https://wiki.hyprland.org/Configuring/Keywords/ for more - -# Execute your favorite apps at launch -# exec-once = waybar & hyprpaper & firefox - -# Source a file (multi-file configs) -# source = ~/.config/hypr/myColors.conf - # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { kb_layout = us @@ -95,13 +79,6 @@ device:epic mouse V1 { sensitivity = -0.5 } -# Example windowrule v1 -# windowrule = float, ^(kitty)$ -# Example windowrule v2 -# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ -# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more - - # See https://wiki.hyprland.org/Configuring/Keywords/ for more $mainMod = SUPER @@ -117,8 +94,8 @@ bind = $mainMod, left, movefocus, l bind = $mainMod, right, movefocus, r bind = $mainMod, up, movefocus, u bind = $mainMod, down, movefocus, d -bind = SUPER,Tab,cyclenext, -bind = SUPER,Tab,bringactivetotop, +bind = $mainMod,Tab,cyclenext, +bind = $mainMod,Tab,bringactivetotop, bind = ALT,Tab,cyclenext, bind = ALT,Tab,bringactivetotop, @@ -133,6 +110,10 @@ bind = $mainMod SHIFT, 1, movetoworkspace, 1 bind = $mainMod SHIFT, 2, movetoworkspace, 2 bind = $mainMod SHIFT, 3, movetoworkspace, 3 bind = $mainMod SHIFT, 4, movetoworkspace, 4 +bind = $mainMod SHIFT, up, movewindow, u +bind = $mainMod SHIFT, down, movewindow, d +bind = $mainMod SHIFT, left, movewindow, l +bind = $mainMod SHIFT, right, movewindow, r # Scroll through existing workspaces with mainMod + scroll bind = $mainMod, mouse_down, workspace, e+1 @@ -143,6 +124,8 @@ bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow #applications shortcuts +bind = $mainMod, F4, exec, $HOME/repos_scripts/ani-new +bind = $mainMod, F5, exec, $HOME/.config/hypr/wifi bind = $mainMod, return, exec, foot #bind = $mainMod, Q, exec, wofi --show drun bind = $mainMod, Q, exec, dmenu_run_history @@ -151,14 +134,18 @@ bind = $mainMod, C, exec, code bind = $mainMod, E, exec, pcmanfm bind = $mainMod, B, exec, $HOME/repos_scripts/bkmark "add" bind = $mainMod, I, exec, $HOME/repos_scripts/bkmark -bind = SUPERSHIFT, B, exec, $HOME/repos_scripts/bkmark "rm" +bind = $mainMod SHIFT, B, exec, $HOME/repos_scripts/bkmark "rm" #bind = $mainMod, S, exec, skypeforlinux +#bind = SUPER_L, P, exec, $HOME/.config/hypr/workspace bind = $mainMod, F11, exec, $HOME/.config/hypr/info -bind = $mainMod, F6, exec, $HOME/.config/hypr/bluetooth +bind = $mainMod, F10, exec, $HOME/.config/hypr/bluetooth +bind = $mainMod, F6, exec, $HOME/.config/hypr/workspace +bind = $mainMod SHIFT, F6, exec, $HOME/.config/hypr/workspace "toggle" bind = $mainMod, F1, exec, $HOME/.config/hypr/screenshot 'selclip' -bind = $mainMod, Print, exec, $HOME/.config/hypr/screenshot 'fullclip' +bind = $mainMod SHIFT, F1, exec, $HOME/.config/hypr/screenshot 'fullclip' +bind = ,Print, exec, $HOME/.config/hypr/screenshot 'fullsave' bind = $mainMod, F12, exec, $HOME/.config/hypr/date -bind = $mainMod, Delete, exec, $HOME/.config/hypr/workspace +bind = $mainMod, Delete, exec, $HOME/.config/hypr/workspace 'list' #media keys binde=, XF86AudioRaiseVolume, exec, pamixer -i 2 && $HOME/.config/hypr/volume @@ -169,8 +156,9 @@ binde=, XF86MonBrightnessUp, exec, light -A 5 && notify-send -h int:value:$(ligh #windows rules windowrulev2=workspace 1,class:^(google-chrome)$ +windowrulev2=workspace 4,class:^(Google-chrome)$ windowrulev2=workspace 2,class:^(foot)$ -windowrulev2=workspace 3,class:^(Pcmanfm)$ +windowrulev2=workspace 3,class:^(pcmanfm)$ windowrulev2=workspace 3,class:^(mpv)$ windowrulev2=workspace 3,class:^([c|C]ode) windowrulev2=workspace 4,class:^(Skype)$ @@ -178,8 +166,9 @@ windowrulev2=workspace 4,class:^(pavucontrol)$ #startup applications exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP -exec-once=dunst exec-once=ssh-agent -exec-once=swaybg -i ~/wall/2.jpg +exec-once=swaybg -i ~/wall/8.png +exec-once=$HOME/.config/hypr/workspace 'focus' +exec-once=sleep 5 && $HOME/.config/hypr/workspace #exec-once=skypeforlinux exec-once=google-chrome-stable 'https://web.skype.com/?openPstnPage=true' diff --git a/hypr/power b/hypr/power deleted file mode 100755 index ea77d75..0000000 --- a/hypr/power +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -$HOME/.config/hypr/workspace & -case "$(printf "lock\\nsuspend\\nlogout\\nreboot\\npoweroff" | bemenu --fn 'Roboto 15' -i -c -W 0.6 -B 3 -l 5 -p "⏻ " -H 40)" in - #lock) $HOME/.config/bspwm/screenlock.sh ;; - suspend) systemctl suspend ;; - logout) systemctl logout ;; - reboot) systemctl reboot ;; - poweroff) systemctl poweroff ;; -esac diff --git a/hypr/screenshot b/hypr/screenshot index ae9e79f..f35e6a6 100755 --- a/hypr/screenshot +++ b/hypr/screenshot @@ -1,8 +1,8 @@ #!/bin/sh x="Screenshot copied to clipboard" -[ "$*" = "fullclip" ] && grim - | xclip -selection clipboard -t image/png +[ "$*" = "fullclip" ] && grim - | wl-copy -t image/png [ "$*" = "fullsave" ] && grim && x="Screenshot saved" -[ "$*" = "selclip" ] && grim -g "$(slurp)" - | xclip -selection clipboard -t image/png +[ "$*" = "selclip" ] && grim -g "$(slurp)" - | wl-copy -t image/png notify-send "$x" diff --git a/hypr/wifi b/hypr/wifi index 814dd14..77203e1 100755 --- a/hypr/wifi +++ b/hypr/wifi @@ -1,9 +1,7 @@ #!/bin/bash -if rfkill list wifi | grep -q 'yes$' ; then - doas rfkill unblock wifi - notify-send "wifi on" -r 1 +if nmcli radio wifi | grep -q 'enabled' ; then + nmcli radio wifi off else - doas rfkill block wifi - notify-send "wifi off" -r 1 + nmcli radio wifi on fi - +notify-send "wifi $(nmcli radio wifi)" -r 1 diff --git a/hypr/workspace b/hypr/workspace index 3927480..626e790 100755 --- a/hypr/workspace +++ b/hypr/workspace @@ -1,10 +1,48 @@ #!/bin/sh -if [ -z "$*" ];then - for i in $(seq 4);do - notify-send "$(hyprctl clients | sed -nE 's_.*class: ([^ ]*).*_\1_p;s_.*workspace: ([^ ]*).*_workspace \1 : _p' | sed 'N;s/\n/ /')" -r 3 -t 1200 - sleep 1 - done -else - socat - UNIX-CONNECT:/tmp/hypr/$(echo $HYPRLAND_INSTANCE_SIGNATURE)/.socket2.sock | while read line; do notify-send "$(printf "$line" | sed -nE 's_^(.*workspace)>>([^ ]*)_\1 \2_p')" -r 1 -t 700 2>/dev/null ;notify-send "$(printf "$line" | sed -nE 's_activewindow>>([^,]*).*_\1_p')" -r 2 -t 700 2>/dev/null; done -fi +setup_dual_monitor(){ + sed -i "s/monitor=,preferred,0x0,1,mirror,eDP-1/monitor=,preferred,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 '1920x1080' + for i in $(seq 3);do + hyprctl dispatch moveworkspacetomonitor "$i 0" + done + hyprctl dispatch moveworkspacetomonitor "4 1" + fi + notify-send "done" +} + +handle_it(){ + [ -z "$1" ] || notify-send "$1" + choice=$(printf "Mirror\nExtend" | bemenu --fn 'Roboto 15' -i -c -W 0.2 -B 3 -l 20 -p "what to do??: " -m 1) + [ -z "$choice" ] && exit 0 || notify-send "${choice}ing screen" + if [ "$choice" = "Extend" ];then + setup_dual_monitor + else + sed -i "s/monitor=,preferred,auto,1/monitor=,preferred,0x0,1,mirror,eDP-1/g" $HOME/.config/hypr/hyprland.conf + fi +} + +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 "$(hyprctl clients | sed -nE 's_.*class: ([^ ]*).*_\1_p;s_.*workspace: ([^ ]*).*_workspace \1 : _p' | sed 'N;s/\n/ /')" -r 3 -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 line;do + printf "%s" "$line" | grep -q "monitoradded" && handle_it "$line" + printf "%s" "$line" | grep -q "monitorremoved" && sed -i "s/monitor=,preferred,0x0,1,mirror,eDP-1/monitor=,preferred,auto,1/g" $HOME/.config/hypr/hyprland.conf + notify-send "$(printf "$line" | sed -nE 's_^(workspace)>>([^ ]*)_\1 \2_p')" -r 1 -t 700 2>/dev/null + done ;; + toggle) + #toggle between mirror and extend setup. this function should be keybinded + handle_it ;; + *) + #to be executed once after booting to setup dual montiors by default if the monitor is connected + setup_dual_monitor ;; +esac diff --git a/pcmanfm/LXDE/desktop-items-0.conf b/pcmanfm/LXDE/desktop-items-0.conf deleted file mode 100644 index cf49a91..0000000 --- a/pcmanfm/LXDE/desktop-items-0.conf +++ /dev/null @@ -1,14 +0,0 @@ -[*] -wallpaper_mode=crop -wallpaper_common=1 -wallpaper=/home/tanveer/wallpapers/3.jpg -desktop_bg=#000000 -desktop_fg=#ffffff -desktop_shadow=#000000 -desktop_font=Sans 12 -show_wm_menu=0 -sort=mtime;ascending; -show_documents=1 -show_trash=0 -show_mounts=1 - diff --git a/pcmanfm/LXDE/pcmanfm.conf b/pcmanfm/LXDE/pcmanfm.conf deleted file mode 100644 index a055c9f..0000000 --- a/pcmanfm/LXDE/pcmanfm.conf +++ /dev/null @@ -1,26 +0,0 @@ -[config] -bm_open_method=0 - -[volume] -mount_on_startup=1 -mount_removable=1 -autorun=1 - -[ui] -always_show_tabs=0 -max_tab_chars=32 -win_width=640 -win_height=480 -splitter_pos=150 -media_in_new_tab=0 -desktop_folder_new_win=0 -change_tab_on_drop=1 -close_on_unmount=1 -focus_previous=0 -side_pane_mode=places -view_mode=icon -show_hidden=0 -sort=name;ascending; -toolbar=newtab;navigation;home; -show_statusbar=1 -pathbar_mode_buttons=0 diff --git a/pcmanfm/default/pcmanfm.conf b/pcmanfm/default/pcmanfm.conf index 4ee2b18..6568e6a 100644 --- a/pcmanfm/default/pcmanfm.conf +++ b/pcmanfm/default/pcmanfm.conf @@ -12,8 +12,9 @@ x-content/win32-software=pcmanfm [ui] always_show_tabs=0 max_tab_chars=32 -win_width=1906 +win_width=948 win_height=1066 +maximized=1 splitter_pos=152 media_in_new_tab=0 desktop_folder_new_win=0 diff --git a/qt5ct/qt5ct.conf b/qt5ct/qt5ct.conf index f3b8459..0ed05fe 100644 --- a/qt5ct/qt5ct.conf +++ b/qt5ct/qt5ct.conf @@ -25,7 +25,7 @@ underline_shortcut=1 wheel_scroll_lines=3 [SettingsWindow] -geometry="@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\x14\0\0\aq\0\0\x4=\0\0\0\0\0\0\0\x14\0\0\x2\xde\0\0\x2\x9a\0\0\0\0\x2\0\0\0\a\x80\0\0\0\0\0\0\0\x14\0\0\aq\0\0\x4=)" +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\x14\0\0\x2\xae\0\0\x2\x9a\0\0\0\0\0\0\0\x14\0\0\x2\xde\0\0\x2\x9a\0\0\0\0\x2\0\0\0\a\x80\0\0\0\0\0\0\0\x14\0\0\x2\xae\0\0\x2\x9a) [Troubleshooting] force_raster_widgets=1