From a5d425e3c80aa4297a7ef14a1cfd8ee20a75733c Mon Sep 17 00:00:00 2001 From: coolnsx Date: Tue, 27 Dec 2022 00:29:41 +0530 Subject: [PATCH] We should delete this crap before shipping. --- .zshrc | 25 +++++++++++++++++++++---- hypr/hyprland.conf | 2 +- hypr/info | 2 +- pcmanfm/default/pcmanfm.conf | 2 +- qt5ct/qt5ct.conf | 2 +- 5 files changed, 25 insertions(+), 8 deletions(-) diff --git a/.zshrc b/.zshrc index 543e8e5..caaa566 100644 --- a/.zshrc +++ b/.zshrc @@ -1,7 +1,7 @@ #user-defined functions gtp(){ [ -z "$*" ] && commit=$(curl -s "https://raw.githubusercontent.com/ngerakines/commitment/master/commit_messages.txt" | shuf -n1) || commit=$* - git add . + git add -p git commit -m "$commit" git push unset commit @@ -18,7 +18,7 @@ url() { curl -s https://0x0.st -F "file=@$*" | wl-copy && notify-send "Link copi gtd () { [ -z "$*" ] && file=$(git diff --name-only | fzf --border=rounded --height=10 --layout=reverse | tr -d ' ') || file=$* - [ -z "$file" ] || git diff $file + [ -z "$file" ] || git diff --name-only --relative --diff-filter=d $file | xargs bat --paging=never --diff unset file } @@ -33,6 +33,23 @@ clshist() { [ "$a" -gt 201 ] && sed -i "1,$((a - 200))d" ~/.histfile } +v() { + [ -z "$*" ] && file=$(fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}' -m) || file=$* + nvim -O $file +} + +help() { + "$@" --help 2>&1 | bat -pp --language=help +} + +addpkg(){ + paru -Ss "$*" | sed -nE 's|^[a-z]*/([^ ]*).*|\1|p' | fzf --preview 'paru -Si {} | bat --language=yaml --color=always -pp' --preview-window right:65%:wrap | paru -S - +} + +rmpkg(){ + paru -Qs "$*" | sed -nE 's|^[a-z]*/([^ ]*).*|\1|p' | fzf --preview 'paru -Si {} | bat --language=yaml --color=always -pp' --preview-window right:65%:wrap | paru -Rcns - +} + # Lines configured by zsh-newuser-install export EDITOR="nvim" export VISUAL="nvim" @@ -41,13 +58,13 @@ export OPENER="xdg-open" export VIDEO="mpv" export WM="hyprland" export IMAGE="nsxiv" -alias v="nvim -O" +alias cat="bat -pp" alias anime="$HOME/lol/ani-cli" alias cp="cp -v" alias rm="rm -v" alias mv="mv -v" alias pgrep="pgrep -a" -alias grep="grep --color=auto -n" +alias grep="grep --color=auto" alias ncdu="ncdu --color dark" alias ll="ls --color=auto -alh" alias ls="ls --color=auto" diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 851600f..bfe50fe 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -61,6 +61,7 @@ dwindle { # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below preserve_split = yes # you probably want this + force_split=2 } master { @@ -164,7 +165,6 @@ windowrulev2=workspace 2,class:^(foot)$ windowrulev2=workspace 3,class:^(pcmanfm)$ windowrulev2=workspace 3,class:^(mpv)$ windowrulev2=workspace 3,class:^([c|C]ode) -windowrulev2=workspace 4,class:^(Skype)$ windowrulev2=workspace 4,class:^(pavucontrol)$ #startup applications diff --git a/hypr/info b/hypr/info index 328e6e5..e4644a1 100755 --- a/hypr/info +++ b/hypr/info @@ -10,7 +10,7 @@ while [ $i -le "5" ];do 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🎵 $(cut -d ">" -f1 $HOME/.cache/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 $HOME/.cache/yt-music/current | cut -d":" -f2)" -r 2 -t 1500 & : $((i+=1)) sleep 1 done diff --git a/pcmanfm/default/pcmanfm.conf b/pcmanfm/default/pcmanfm.conf index ce968ab..c3dfdb1 100644 --- a/pcmanfm/default/pcmanfm.conf +++ b/pcmanfm/default/pcmanfm.conf @@ -23,7 +23,7 @@ close_on_unmount=1 focus_previous=0 side_pane_mode=places view_mode=list -show_hidden=1 +show_hidden=0 sort=name;ascending; columns=name:200;desc:143;size;mtime; toolbar=newtab;navigation;home; diff --git a/qt5ct/qt5ct.conf b/qt5ct/qt5ct.conf index aa0375f..16d7f68 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\a\x80\0\0\0\0\0\0\xe\xff\0\0\x4\x37\0\0\0\0\0\0\0\0\0\0\a\x7f\0\0\x4\x37\0\0\0\x1\x2\x4\0\0\a\x80\0\0\a\x80\0\0\0\0\0\0\xe\xff\0\0\x4\x37) +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\a\x7f\0\0\x4\x37\0\0\0\0\0\0\0\0\0\0\a\x7f\0\0\x4\x37\0\0\0\0\x2\x4\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\a\x7f\0\0\x4\x37) [Troubleshooting] force_raster_widgets=1