.
This commit is contained in:
1 parent
9ab0307538
commit
3fd5fcc825
15 files changed
+433
-209
No files matched your search
+79
-13
@@ -188,7 +188,7 @@ repo_dir="$HOME/dotfiles"
|
||||
rm -rf "$repo_dir"
|
||||
fi
|
||||
|
||||
# Clona el repositorio
|
||||
# Cloning the repository
|
||||
printf "Cloning dotfiles from %s\n" "$repo_url"
|
||||
git clone --depth=1 "$repo_url" "$repo_dir"
|
||||
|
||||
@@ -224,12 +224,12 @@ sleep 5
|
||||
logo "Installing dotfiles.."
|
||||
printf "Copying files to respective directories..\n"
|
||||
|
||||
[ ! -d ~/.config ] && mkdir -p ~/.config
|
||||
[ ! -d ~/dotfiles ] && mkdir -p ~/dotfiles
|
||||
[ ! -d ~/.local/bin ] && mkdir -p ~/.local/bin
|
||||
[ ! -d ~/Pictures/wallpapers ] && mkdir -p ~/Pictures/wallpapers
|
||||
|
||||
for archivos in ~/dotfiles/config/*; do
|
||||
cp -R "${archivos}" ~/.config/
|
||||
cp -R "${archivos}" ~/dotfiles/
|
||||
if [ $? -eq 0 ]; then
|
||||
printf "%s%s%s folder copied succesfully!%s\n" "${BLD}" "${CGR}" "${archivos}" "${CNC}"
|
||||
sleep 1
|
||||
@@ -250,16 +250,6 @@ for archivos in ~/dotfiles/misc/bin/*; do
|
||||
fi
|
||||
done
|
||||
|
||||
for archivos in ~/dotfiles/misc/.zshenv; do
|
||||
cp -R "${archivos}" ~/
|
||||
if [ $? -eq 0 ]; then
|
||||
printf "%s%s%s file copied succesfully!%s\n" "${BLD}" "${CGR}" "${archivos}" "${CNC}"
|
||||
sleep 1
|
||||
else
|
||||
printf "%s%s%s failed to been copied, you must copy it manually%s\n" "${BLD}" "${CRE}" "${archivos}" "${CNC}"
|
||||
sleep 1
|
||||
fi
|
||||
done
|
||||
|
||||
for archivos in ~/dotfiles/wallpapers/*; do
|
||||
cp -R "${archivos}" ~/Pictures/wallpapers
|
||||
@@ -275,6 +265,80 @@ done
|
||||
printf "%s%sFiles copied succesfully!!%s\n" "${BLD}" "${CGR}" "${CNC}"
|
||||
sleep 3
|
||||
|
||||
########## --------- Installng .config directores ---------- ##########
|
||||
|
||||
logo "Installing .config directores(making symlink)"
|
||||
|
||||
DOTFILES_DIR="$HOME/dotfiles"
|
||||
|
||||
CONFIG_DIRS=(
|
||||
"nvim"
|
||||
"cava"
|
||||
"geany"
|
||||
"keyb"
|
||||
"Kvantum"
|
||||
"mpv"
|
||||
"neofetch"
|
||||
"npm"
|
||||
"qimgv"
|
||||
"qt5ct"
|
||||
"qt6ct"
|
||||
"starship"
|
||||
"Thunar"
|
||||
"VSCodium"
|
||||
"yazi"
|
||||
"zathura"
|
||||
"zsh"
|
||||
"kitty"
|
||||
"wlogout"
|
||||
"hypr"
|
||||
"rofi"
|
||||
"swaync"
|
||||
"waybar"
|
||||
)
|
||||
|
||||
CONFIG_FILES=(
|
||||
".zshenv"
|
||||
)
|
||||
|
||||
|
||||
# Install .config directories
|
||||
for dir in "${CONFIG_DIRS[@]}"; do
|
||||
source_path="$DOTFILES_DIR/config/$dir"
|
||||
target_path="$HOME/.config/$dir"
|
||||
|
||||
# Create symlink
|
||||
ln -sf "$source_path" "$target_path"
|
||||
|
||||
# Check if the symlink creation was successful
|
||||
if [ $? -eq 0 ]; then
|
||||
printf "%s%sCreated symlink for .config/%s\n" "$dir" "${BLD}" "${CGR}" "${CNC}"
|
||||
else
|
||||
printf "%s%sFailed to create symlink for .config/%s. Please check and fix the issue.\n" "$dir" "${BLD}" "${CGR}" "${CNC}"
|
||||
# You can choose to exit or handle the error in another way based on your requirements.
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Install individual files
|
||||
for file in "${CONFIG_FILES[@]}"; do
|
||||
source_path="$DOTFILES_DIR/config/$file"
|
||||
target_path="$HOME/$file"
|
||||
|
||||
# Create symlink
|
||||
ln -sf "$source_path" "$target_path"
|
||||
|
||||
# Check if the symlink creation was successful
|
||||
if [ $? -eq 0 ]; then
|
||||
printf "%s%sCreated symlink for %s\n" "$file" "${BLD}" "${CGR}" "${CNC}"
|
||||
else
|
||||
printf "%s%sFailed to create symlink for %s. Please check and fix the issue.\n" "$file" "${BLD}" "${CGR}" "${CNC}"
|
||||
# You can choose to exit or handle the error in another way based on your requirements.
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
printf "%s%sSymlink creation is successful!!%S\n\n" "${BLD}" "${CGR}" "${CNC}"
|
||||
|
||||
########## ---------- Enabling Bluetooth service ---------- ##########
|
||||
|
||||
@@ -333,3 +397,5 @@ logo "Changing default shell to zsh"
|
||||
printf "%s%sYour shell is already zsh\nGood bye! installation finished, now reboot%s\n" "${BLD}" "${CGR}" "${CNC}"
|
||||
fi
|
||||
zsh
|
||||
|
||||
|
||||
File renamed without changes.
@@ -1,4 +1,3 @@
|
||||
# This is where you put your own keybinds. Be Mindful to check as well ~/.config/hypr/configs/Keybinds.conf to avoid conflict
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more settings and variables
|
||||
# See also Laptops.conf for laptops keybinds
|
||||
@@ -7,14 +6,15 @@ $mainMod = SUPER
|
||||
$files = thunar
|
||||
$term = kitty
|
||||
$browser = firefox
|
||||
$scriptsDir = $HOME/.config/hypr/scripts
|
||||
$scriptsDir = $HOME/dotfiles/hypr/scripts
|
||||
|
||||
$RunCMD = $scriptsDir/RunCMD.sh
|
||||
|
||||
|
||||
# RunCMD App launcher
|
||||
#bindr = $mainMod, $mainMod_L, exec, pkill rofi || rofi -show drun -modi drun,filebrowser,run,window -config ~/.config/rofi/launcher.rasi
|
||||
bind = $mainMod, D, exec, pkill rofi || rofi -show drun -modi drun,filebrowser,run,window -config ~/.config/rofi/launcher.rasi
|
||||
bind = $mainMod, D, exec, pkill rofi || rofi -show drun -modi drun,filebrowser,run,window
|
||||
bind = CTRL, mouse:273, exec, killall rofi || rofi -show drun
|
||||
bind = ALT, D, exec, pkill rofi || $scriptsDir/Xmenu.sh
|
||||
|
||||
# Terminals
|
||||
@@ -33,7 +33,7 @@ bind = $mainMod_SHIFT, Slash, exec, codium --disable-gpu
|
||||
bind = SHIFT_ALT, R, exec, $RunCMD reload_all
|
||||
bind = $mainMod_SHIFT, D, exec, $RunCMD toggle_touchpad
|
||||
bind = $mainMod_SHIFT, A, exec, $RunCMD gamemode
|
||||
bind = ALT, slash, exec, $RunCMD emoji
|
||||
bind = $mainMod, PERIOD, exec, $RunCMD emoji
|
||||
bind = ALT, F1, exec, $RunCMD kb_changer
|
||||
bind = $mainMod_SHIFT, Q, exec, $RunCMD toggle_blur
|
||||
bind = $mainMod, space, exec, $RunCMD change_layout
|
||||
@@ -44,8 +44,9 @@ bind = SHIFT_ALT,W, exec, $RunCMD random_wall
|
||||
bind = $mainMod, F1, exec, $RunCMD keybind
|
||||
bind = ALT, T, exec, $RunCMD tmux
|
||||
bind = $mainMod, R, exec, $RunCMD sr
|
||||
bind = $mainMod, escape, exec, wlogout
|
||||
bind = $mainMod_SHIFT, N, exec, swaync-client -C
|
||||
bind = $mainMod, escape, exec, wlogout
|
||||
bind = $mainMod, COMMA, exec, $RunCMD cz
|
||||
|
||||
# Online Music related keybinds
|
||||
bind = ALT, M, exec, $RunCMD music -m # open rofi music
|
||||
@@ -60,3 +61,6 @@ bind = $mainMod, H, exec, killall -SIGUSR1 waybar
|
||||
bind = ALT, W, exec, $RunCMD waybar_layout
|
||||
|
||||
|
||||
# ScreenShot
|
||||
bind = $mainMod, Z, exec, grim -g "$(slurp)" ~/Pictures/Screenshots/screenshot.png && wl-copy < ~/Pictures/Screenshots/screenshot.png && notify-send -u low -i "$HOME/dotfiles/swaync/icons/screenshot.png" "Screenshot Saved."
|
||||
bind = , Print, exec, grim ~/Pictures/Screenshots/screenshot.png && wl-copy < ~/Pictures/Screenshots/screenshot.png && notify-send -u low -i "$HOME/dotfiles/swaync/icons/screenshot.png" "Screenshot Saved."
|
||||
@@ -1,16 +1,8 @@
|
||||
# _ _ _ _
|
||||
# | |__ _ _ _ __ _ __(_) __| | | ___
|
||||
# | '_ \| | | | '_ \| '__| |/ _` | |/ _ \
|
||||
# | | | | |_| | |_) | | | | (_| | | __/
|
||||
# |_| |_|\__, | .__/|_| |_|\__,_|_|\___|
|
||||
# |___/|_|
|
||||
#
|
||||
|
||||
general {
|
||||
# lock_cmd = notify-send "lock!" # dbus/sysd lock command (loginctl lock-session)
|
||||
# unlock_cmd = notify-send "unlock!" # same as above, but unlock
|
||||
# before_sleep_cmd = notify-send "Zzz" # command ran before sleep
|
||||
# after_sleep_cmd = notify-send "Awake!" # command ran after sleep
|
||||
lock_cmd = notify-send "lock!" # dbus/sysd lock command (loginctl lock-session)
|
||||
unlock_cmd = notify-send "unlock!" # same as above, but unlock
|
||||
before_sleep_cmd = notify-send "Zzz" # command ran before sleep
|
||||
after_sleep_cmd = notify-send "Awake!" # command ran after sleep
|
||||
ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam)
|
||||
}
|
||||
|
||||
@@ -18,12 +10,12 @@ general {
|
||||
listener {
|
||||
timeout = 600 # in seconds
|
||||
on-timeout = hyprlock # command to run when timeout has passed
|
||||
# on-resume = notify-send "Welcome back to your desktop!" # command to run when activity is detected after timeout has fired.
|
||||
on-resume = notify-send "Welcome back to your desktop!" # command to run when activity is detected after timeout has fired.
|
||||
}
|
||||
|
||||
# Suspend
|
||||
listener {
|
||||
timeout = 660 # in seconds
|
||||
on-timeout = systemctl suspend # command to run when timeout has passed
|
||||
# on-resume = notify-send "Welcome back to your desktop!" # command to run when activity is detected after timeout has fired.
|
||||
on-resume = notify-send "Welcome back to your desktop!" # command to run when activity is detected after timeout has fired.
|
||||
}
|
||||
+37
-53
@@ -1,50 +1,56 @@
|
||||
# _ _ _
|
||||
# | |__ _ _ _ __ _ __| | ___ ___| | __
|
||||
# | '_ \| | | | '_ \| '__| |/ _ \ / __| |/ /
|
||||
# | | | | |_| | |_) | | | | (_) | (__| <
|
||||
# |_| |_|\__, | .__/|_| |_|\___/ \___|_|\_\
|
||||
# |___/|_|
|
||||
#
|
||||
general {
|
||||
grace = 5
|
||||
}
|
||||
|
||||
background {
|
||||
monitor =
|
||||
path = $HOME/dotfiles/rofi/.current_wallpaper
|
||||
color = rgba(130F0F77)
|
||||
blur_passes = 3
|
||||
blur_size = 5
|
||||
blur_size = 4
|
||||
blur_passes = 3 # 0 disables blurring
|
||||
noise = 0.0117
|
||||
contrast = 1.3000 # Vibrant!!!
|
||||
brightness = 0.8000
|
||||
vibrancy = 0.2100
|
||||
vibrancy_darkness = 0.0
|
||||
}
|
||||
|
||||
input-field {
|
||||
monitor =
|
||||
size = 250, 50
|
||||
outline_thickness = 2
|
||||
dots_size = 0.1
|
||||
dots_spacing = 0.3
|
||||
outer_color = rgb(a08c8955)
|
||||
inner_color = rgb(130F0F11)
|
||||
font_color = rgb(d8c2bfFF)
|
||||
# fade_on_empty = true
|
||||
outline_thickness = 3
|
||||
dots_size = 0.2
|
||||
dots_spacing = 0.64
|
||||
dots_center = true
|
||||
outer_color = rgba(0, 0, 0, 0)
|
||||
inner_color = rgba(0, 0, 0, 0.5)
|
||||
font_color = rgb(200, 200, 200)
|
||||
fade_on_empty = true
|
||||
placeholder_text = <i>Password...</i>
|
||||
hide_input = false
|
||||
position = 0, 20
|
||||
position = 0, 50
|
||||
halign = center
|
||||
valign = center
|
||||
valign = bottom
|
||||
}
|
||||
|
||||
label { # Clock
|
||||
# Current time
|
||||
label {
|
||||
monitor =
|
||||
text = $TIME
|
||||
color = $text_color
|
||||
text = cmd[update:1000] echo "<b><big> $(date +"%-I:%M%p") </big></b>"
|
||||
color = rgba(ede0deFF)
|
||||
font_size = 65
|
||||
font_family = CaskaydiaCove Nerd Font
|
||||
font_family = JetBrains Mono Nerd Font Mono ExtraBold
|
||||
|
||||
position = 0, 300
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
label { # Greeting
|
||||
# User label
|
||||
label {
|
||||
monitor =
|
||||
text = Hi $USER !!!
|
||||
color = $text_color
|
||||
text = Hey <span text_transform="capitalize" size="larger">$USER</span>
|
||||
color = rgba(ede0deFF)
|
||||
font_size = 20
|
||||
font_family = CaskaydiaCove Nerd Font Italic
|
||||
|
||||
@@ -53,37 +59,15 @@ label { # Greeting
|
||||
valign = center
|
||||
}
|
||||
|
||||
label { # lock icon
|
||||
# Type to unlock
|
||||
label {
|
||||
monitor =
|
||||
text = lock
|
||||
text = Type to unlock!
|
||||
color = rgba(ede0deFF)
|
||||
font_size = 21
|
||||
font_family = CaskaydiaCove Nerd Font Italic
|
||||
|
||||
position = 0, 65
|
||||
halign = center
|
||||
valign = bottom
|
||||
}
|
||||
label { # "locked" text
|
||||
monitor =
|
||||
text = locked
|
||||
color = rgba(ede0deFF)
|
||||
font_size = 14
|
||||
font_family = CaskaydiaCove Nerd Font Italic
|
||||
|
||||
position = 0, 50
|
||||
font_size = 16
|
||||
font_family = JetBrains Mono Nerd Font 10
|
||||
position = 0, 30
|
||||
halign = center
|
||||
valign = bottom
|
||||
}
|
||||
|
||||
label { # Status
|
||||
monitor =
|
||||
text = cmd[update:5000] status.sh
|
||||
color = rgba(ede0deFF)
|
||||
font_size = 14
|
||||
font_family = CaskaydiaCove Nerd Font Italic
|
||||
|
||||
position = 30, -30
|
||||
halign = left
|
||||
valign = top
|
||||
}
|
||||
@@ -6,12 +6,12 @@ DIR=$HOME/.cache
|
||||
STATUS_FILE="$DIR/touchpad.status"
|
||||
|
||||
# For Notification icon
|
||||
notif="$HOME/.config/swaync/images/bell.png"
|
||||
iDIR="$HOME/.config/swaync/icons"
|
||||
notif="$HOME/dotfiles/swaync/images/bell.png"
|
||||
iDIR="$HOME/dotfiles/swaync/icons"
|
||||
|
||||
# Scripts DIR
|
||||
SCRIPTSDIR="$HOME/.config/hypr/scripts"
|
||||
UserSCRIPTSDIR="$HOME/.config/hypr/UserScripts"
|
||||
SCRIPTSDIR="$HOME/dotfiles/hypr/scripts"
|
||||
UserSCRIPTSDIR="$HOME/dotfiles/hypr/UserScripts"
|
||||
linker="$SCRIPTSDIR/RunCMD.sh linker"
|
||||
|
||||
|
||||
@@ -39,30 +39,17 @@ SWWW_PARAMS1="--transition-fps $FPS1 --transition-type $TYPE1 --transition-durat
|
||||
|
||||
# For Keyboard Layout Switcher
|
||||
layout_f="$HOME/.cache/kb_layout"
|
||||
settings_file="$HOME/.config/hypr/UserConfigs/UserSettings.conf"
|
||||
settings_file="$HOME/dotfiles/hypr/UserConfigs/UserSettings.conf"
|
||||
|
||||
|
||||
# For Quickedit
|
||||
configs="$HOME/.config/hypr/configs"
|
||||
UserConfigs="$HOME/.config/hypr/UserConfigs"
|
||||
|
||||
|
||||
# For TODO
|
||||
file="$HOME/Documents/Notes/.rofi_todo"
|
||||
touch "$file"
|
||||
prompt="Add/delete a task: "
|
||||
height=$(wc -l "$file" | awk '{print $1}')
|
||||
|
||||
configs="$HOME/dotfiles/hypr/configs"
|
||||
UserConfigs="$HOME/dotfiles/hypr/UserConfigs"
|
||||
|
||||
# For Waybar Layout
|
||||
config_dir="$HOME/.config/waybar/configs"
|
||||
waybar_config="$HOME/.config/waybar/config"
|
||||
config_dir="$HOME/dotfiles/waybar/configs"
|
||||
waybar_config="$HOME/dotfiles/waybar/config"
|
||||
RunCMD="$SCRIPTSDIR/RunCMD.sh"
|
||||
|
||||
|
||||
# For Note
|
||||
NOTES_AUTHOR="$(whoami)"
|
||||
NOTES_FOLDER="$HOME/Documents/Notes"
|
||||
NOTES_EDITOR="kitty --class fly_is_kitty -e nvim"
|
||||
|
||||
|
||||
@@ -128,6 +128,179 @@ lock_screen() {
|
||||
}
|
||||
|
||||
|
||||
######################################
|
||||
# #
|
||||
# Volume Controller #
|
||||
# #
|
||||
######################################
|
||||
|
||||
volume() {
|
||||
get_volume() {
|
||||
volume=$(pamixer --get-volume)
|
||||
if [[ "$volume" -eq "0" ]]; then
|
||||
echo "Muted"
|
||||
else
|
||||
echo "$volume%"
|
||||
fi
|
||||
}
|
||||
get_icon() {
|
||||
current=$(get_volume)
|
||||
if [[ "$current" == "Muted" ]]; then
|
||||
echo "$iDIR/volume-mute.png"
|
||||
elif [[ "${current%\%}" -le 30 ]]; then
|
||||
echo "$iDIR/volume-low.png"
|
||||
elif [[ "${current%\%}" -le 60 ]]; then
|
||||
echo "$iDIR/volume-mid.png"
|
||||
else
|
||||
echo "$iDIR/volume-high.png"
|
||||
fi
|
||||
}
|
||||
notify_user() {
|
||||
if [[ "$(get_volume)" == "Muted" ]]; then
|
||||
notify-send -e -h string:x-canonical-private-synchronous:volume_notif -u low -i "$(get_icon)" "Volume: Muted"
|
||||
else
|
||||
notify-send -e -h int:value:"$(get_volume | sed 's/%//')" -h string:x-canonical-private-synchronous:volume_notif -u low -i "$(get_icon)" "Volume: $(get_volume)"
|
||||
fi
|
||||
}
|
||||
inc_volume() {
|
||||
if [ "$(pamixer --get-mute)" == "true" ]; then
|
||||
pamixer -u && notify_user
|
||||
fi
|
||||
pamixer -i 5 && notify_user
|
||||
}
|
||||
dec_volume() {
|
||||
if [ "$(pamixer --get-mute)" == "true" ]; then
|
||||
pamixer -u && notify_user
|
||||
fi
|
||||
pamixer -d 5 && notify_user
|
||||
}
|
||||
toggle_mute() {
|
||||
if [ "$(pamixer --get-mute)" == "false" ]; then
|
||||
pamixer -m && notify-send -e -u low -i "$iDIR/volume-mute.png" "Volume Switched OFF"
|
||||
elif [ "$(pamixer --get-mute)" == "true" ]; then
|
||||
pamixer -u && notify-send -e -u low -i "$(get_icon)" "Volume Switched ON"
|
||||
fi
|
||||
}
|
||||
toggle_mic() {
|
||||
if [ "$(pamixer --default-source --get-mute)" == "false" ]; then
|
||||
pamixer --default-source -m && notify-send -e -u low -i "$iDIR/microphone-mute.png" "Microphone Switched OFF"
|
||||
elif [ "$(pamixer --default-source --get-mute)" == "true" ]; then
|
||||
pamixer -u --default-source u && notify-send -e -u low -i "$iDIR/microphone.png" "Microphone Switched ON"
|
||||
fi
|
||||
}
|
||||
get_mic_icon() {
|
||||
current=$(pamixer --default-source --get-volume)
|
||||
if [[ "$current" -eq "0" ]]; then
|
||||
echo "$iDIR/microphone-mute.png"
|
||||
else
|
||||
echo "$iDIR/microphone.png"
|
||||
fi
|
||||
}
|
||||
get_mic_volume() {
|
||||
volume=$(pamixer --default-source --get-volume)
|
||||
if [[ "$volume" -eq "0" ]]; then
|
||||
echo "Muted"
|
||||
else
|
||||
echo "$volume%"
|
||||
fi
|
||||
}
|
||||
notify_mic_user() {
|
||||
volume=$(get_mic_volume)
|
||||
icon=$(get_mic_icon)
|
||||
notify-send -e -h int:value:"$volume" -h "string:x-canonical-private-synchronous:volume_notif" -u low -i "$icon" "Mic-Level: $volume"
|
||||
}
|
||||
inc_mic_volume() {
|
||||
if [ "$(pamixer --default-source --get-mute)" == "true" ]; then
|
||||
pamixer --default-source -u && notify_mic_user
|
||||
fi
|
||||
pamixer --default-source -i 5 && notify_mic_user
|
||||
}
|
||||
dec_mic_volume() {
|
||||
if [ "$(pamixer --default-source --get-mute)" == "true" ]; then
|
||||
pamixer --default-source -u && notify_mic_user
|
||||
fi
|
||||
pamixer --default-source -d 5 && notify_mic_user
|
||||
}
|
||||
if [[ "$1" == "--get" ]]; then
|
||||
get_volume
|
||||
elif [[ "$1" == "--inc" ]]; then
|
||||
inc_volume
|
||||
elif [[ "$1" == "--dec" ]]; then
|
||||
dec_volume
|
||||
elif [[ "$1" == "--toggle" ]]; then
|
||||
toggle_mute
|
||||
elif [[ "$1" == "--toggle-mic" ]]; then
|
||||
toggle_mic
|
||||
elif [[ "$1" == "--get-icon" ]]; then
|
||||
get_icon
|
||||
elif [[ "$1" == "--get-mic-icon" ]]; then
|
||||
get_mic_icon
|
||||
elif [[ "$1" == "--mic-inc" ]]; then
|
||||
inc_mic_volume
|
||||
elif [[ "$1" == "--mic-dec" ]]; then
|
||||
dec_mic_volume
|
||||
else
|
||||
get_volume
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
############################################################
|
||||
# #
|
||||
# Brightness Controller both keyboard & screen #
|
||||
# #
|
||||
############################################################
|
||||
|
||||
brightness() {
|
||||
notification_timeout=1000
|
||||
get_backlight() {
|
||||
echo $(brightnessctl -m | cut -d, -f4)
|
||||
}
|
||||
get_kbd_backlight() {
|
||||
brightnessctl -d '*::kbd_backlight' -m | cut -d, -f4 | tr -d '%'
|
||||
}
|
||||
get_icon() {
|
||||
current=$(get_backlight | sed 's/%//')
|
||||
[ "$current" -le "20" ] && icon="$iDIR/brightness-20.png" ||
|
||||
[ "$current" -le "40" ] && icon="$iDIR/brightness-40.png" ||
|
||||
[ "$current" -le "60" ] && icon="$iDIR/brightness-60.png" ||
|
||||
[ "$current" -le "80" ] && icon="$iDIR/brightness-80.png" ||
|
||||
icon="$iDIR/brightness-100.png"
|
||||
}
|
||||
notify_user() {
|
||||
notify-send -e -h string:x-canonical-private-synchronous:brightness_notif -h int:value:$current -u low -i "$icon" "Brightness: $current%"
|
||||
}
|
||||
change_backlight() {
|
||||
brightnessctl set "$1" && get_icon && notify_user
|
||||
}
|
||||
change_kbd_backlight() {
|
||||
brightnessctl -d '*::kbd_backlight' set "$1" && get_icon && notify_user
|
||||
}
|
||||
case "$1" in
|
||||
"--get")
|
||||
get_backlight
|
||||
;;
|
||||
"--inc")
|
||||
change_backlight "+5%"
|
||||
;;
|
||||
"--dec")
|
||||
change_backlight "5%-"
|
||||
;;
|
||||
"--get-kbd")
|
||||
get_kbd_backlight
|
||||
;;
|
||||
"--inc-kbd")
|
||||
change_kbd_backlight "+30%"
|
||||
;;
|
||||
"--dec-kbd")
|
||||
change_kbd_backlight "30%-"
|
||||
;;
|
||||
*)
|
||||
get_backlight
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
######################################
|
||||
# #
|
||||
# Battery Notifer #
|
||||
|
||||
@@ -271,7 +271,7 @@ ln_success=false # Initialize a flag to determine if the ln command was execute
|
||||
for cache_file in "${monitor_outputs[@]}"; do # Loop through monitor outputs
|
||||
if [ -f "$cache_file" ]; then # Check if the cache file exists for the current monitor output
|
||||
wallpaper_path=$(<"$cache_file") # Get the wallpaper path from the cache file
|
||||
if ln -sf "$wallpaper_path" "$HOME/.config/rofi/.current_wallpaper"; then # Copy the wallpaper to the location Rofi can access
|
||||
if ln -sf "$wallpaper_path" "$HOME/dotfiles/rofi/.current_wallpaper"; then # Copy the wallpaper to the location Rofi can access
|
||||
ln_success=true # Set the flag to true upon successful execution
|
||||
break # Exit the loop after processing the first found monitor output
|
||||
fi
|
||||
@@ -373,3 +373,18 @@ while read -r line; do # Read the playerctl o/p via its fifo pipe
|
||||
fi
|
||||
done < $playerctl_waybar_pipe
|
||||
}
|
||||
|
||||
|
||||
######################################
|
||||
# #
|
||||
# Cursor Zoom #
|
||||
# #
|
||||
######################################
|
||||
|
||||
cz() {
|
||||
if [ $(hyprctl -j getoption misc:cursor_zoom_factor | jq '.float' | sed 's/\..*$//') == 1 ]; then
|
||||
$(hyprctl keyword misc:cursor_zoom_factor 2) &> /dev/null
|
||||
else
|
||||
$(hyprctl keyword misc:cursor_zoom_factor 1) &> /dev/null
|
||||
fi
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Source the configuration file.
|
||||
CONFIG_FILE=~/.config/hypr/scripts/Ref.sh
|
||||
CONFIG_FILE=~/dotfiles/hypr/scripts/Ref.sh
|
||||
source "$CONFIG_FILE"
|
||||
|
||||
# Note: You can add more options below with the following format:
|
||||
@@ -40,7 +40,7 @@ declare -A menu_options=(
|
||||
#System
|
||||
["qq Shutdown"]="$RunCMD sys_poweroff"
|
||||
["rr Reboot"]="$RunCMD sys_reboot"
|
||||
["pm Powermenu"]="$RunCMD powermenu"
|
||||
["SS Wlogout"]="wlogout"
|
||||
["cn Close Notifactions"]="swaync-client -C"
|
||||
["dm0 disable monitor"]="$RunCMD disable_edp1"
|
||||
["dm1 enable monitor"]="$RunCMD enable_edp1"
|
||||
@@ -57,6 +57,7 @@ declare -A menu_options=(
|
||||
["vi Nvim"]="kitty nvim"
|
||||
["yz Yazi"]="kitty yazi"
|
||||
["cd Codium"]="codium --disable-gpu"
|
||||
["tg Telegram"]="telegram-desktop"
|
||||
)
|
||||
|
||||
# Main function
|
||||
|
||||
@@ -1 +1 @@
|
||||
/home/sankalp/.config/waybar/configs/[TOP & BOT] summitsplit
|
||||
/home/sankalp/dotfiles/waybar/configs/[TOP & BOT] summitsplit
|
||||
@@ -52,7 +52,7 @@
|
||||
"phone": "📞",
|
||||
"portable": "📞",
|
||||
"car": "🚘",
|
||||
"default": ["🔈", "🔉", "🔊"],
|
||||
"default": ["🔈", "🔉", "🔊"]
|
||||
},
|
||||
"on-click": "pamixer --toggle-mute",
|
||||
"on-click-right": "pavucontrol",
|
||||
@@ -89,7 +89,7 @@
|
||||
"format-time": "{H}h {M}min",
|
||||
"tooltip": true,
|
||||
"tooltip-format": "{capacity}%",
|
||||
"on-click-middle": "~/.config/hypr/scripts/RunCMD.sh blur",
|
||||
"on-click-middle": "~/dotfiles/hypr/scripts/RunCMD.sh blur",
|
||||
"on-click-right": "wlogout",
|
||||
},
|
||||
|
||||
|
||||
@@ -44,10 +44,10 @@
|
||||
"wireplumber#peony": {
|
||||
"format": "{icon} {volume}",
|
||||
"format-muted": " Mute",
|
||||
"on-click": "~/.config/hypr/scripts/Volume.sh --toggle",
|
||||
"on-click": "~/dotfiles/hypr/scripts/Volume.sh --toggle",
|
||||
"on-click-right": "pavucontrol -t 3",
|
||||
"on-scroll-up": "~/.config/hypr/scripts/Volume.sh --inc",
|
||||
"on-scroll-down": "~/.config/hypr/scripts/Volume.sh --dec",
|
||||
"on-scroll-up": "~/dotfiles/hypr/scripts/Volume.sh --inc",
|
||||
"on-scroll-down": "~/dotfiles/hypr/scripts/Volume.sh --dec",
|
||||
"default": ["🔈", "🔉", "🔊"],
|
||||
},
|
||||
|
||||
@@ -94,8 +94,8 @@
|
||||
"format-time": "{H}h {M}min",
|
||||
"tooltip": true,
|
||||
"tooltip-format": "{timeTo} {power}w",
|
||||
"on-click-middle": "~/.config/hypr/scripts/RunCMD.sh lur",
|
||||
"on-click-right": "~/.config/hypr/scripts/RunCMD.sh powermenu",
|
||||
"on-click-middle": "~/dotfiles/hypr/scripts/RunCMD.sh lur",
|
||||
"on-click-right": "~/dotfiles/hypr/scripts/RunCMD.sh powermenu",
|
||||
},
|
||||
|
||||
"tray#peony": {
|
||||
|
||||
+41
-41
@@ -119,13 +119,12 @@
|
||||
"2": "",
|
||||
"3": "",
|
||||
"4": "",
|
||||
"5": "",
|
||||
"6": "",
|
||||
"7": "",
|
||||
"8": "",
|
||||
"9": "",
|
||||
"5": "",
|
||||
"6": " ",
|
||||
"7": "",
|
||||
"8": "",
|
||||
"9": "",
|
||||
"10": "",
|
||||
"urgent": "",
|
||||
"focused": "",
|
||||
"default": "",
|
||||
},
|
||||
@@ -175,8 +174,8 @@
|
||||
"on-click-middle": "",
|
||||
"on-click-right": "",
|
||||
"on-update": "",
|
||||
"on-scroll-up": "~/.config/hypr/scripts/RunCMD.sh brightness --inc",
|
||||
"on-scroll-down": "~/.config/hypr/scripts/RunCMD.sh brightness --dec",
|
||||
"on-scroll-up": "~/dotfiles/hypr/scripts/RunCMD.sh brightness --inc",
|
||||
"on-scroll-down": "~/dotfiles/hypr/scripts/RunCMD.sh brightness --dec",
|
||||
"smooth-scrolling-threshold": 1,
|
||||
},
|
||||
|
||||
@@ -198,12 +197,12 @@
|
||||
"format-plugged": "",
|
||||
"format-full": "{icon}",
|
||||
"format-alt": "{icon}",
|
||||
"format-icons": [" ", " ", " ", " ", " "],
|
||||
"format-icons": ["","","","","","","","","","",""],
|
||||
"format-time": "{H}h {M}min",
|
||||
"tooltip": true,
|
||||
//"tooltip-format": "{timeTo} {power}w",
|
||||
"tooltip-format": "{capacity}%",
|
||||
"on-click-middle": "~/.config/hypr/scripts/RunCMD.sh toggle_blur",
|
||||
"on-click-middle": "~/dotfiles/hypr/scripts/RunCMD.sh toggle_blur",
|
||||
},
|
||||
|
||||
"bluetooth": {
|
||||
@@ -360,10 +359,10 @@
|
||||
"ignored-sinks": ["Easy Effects Sink"],
|
||||
},
|
||||
"scroll-step": 5.0,
|
||||
"on-click": "~/.config/hypr/scripts/RunCMD.sh volume --toggle",
|
||||
"on-click": "~/dotfiles/hypr/scripts/RunCMD.sh volume --toggle",
|
||||
"on-click-right": "pavucontrol -t 3",
|
||||
"on-scroll-up": "~/.config/hypr/scripts/RunCMD.sh volume --inc",
|
||||
"on-scroll-down": "~/.config/hypr/scripts/RunCMD.sh volume --dec",
|
||||
"on-scroll-up": "~/dotfiles/hypr/scripts/RunCMD.sh volume --inc",
|
||||
"on-scroll-down": "~/dotfiles/hypr/scripts/RunCMD.sh volume --dec",
|
||||
"smooth-scrolling-threshold": 1,
|
||||
"tooltip-format": "{volume}%",
|
||||
},
|
||||
@@ -372,10 +371,10 @@
|
||||
"format": "{format_source}",
|
||||
"format-source": " {volume}%",
|
||||
"format-source-muted": "",
|
||||
"on-click": "~/.config/hypr/scripts/RunCMD.sh volume --toggle-mic",
|
||||
"on-click": "~/dotfiles/hypr/scripts/RunCMD.sh volume --toggle-mic",
|
||||
"on-click-right": "pavucontrol -t 4",
|
||||
"on-scroll-up": "~/.config/hypr/scripts/RunCMD.sh volume --mic-inc",
|
||||
"on-scroll-down": "~/.config/hypr/scripts/RunCMD.sh volume --mic-dec",
|
||||
"on-scroll-up": "~/dotfiles/hypr/scripts/RunCMD.sh volume --mic-inc",
|
||||
"on-scroll-down": "~/dotfiles/hypr/scripts/RunCMD.sh volume --mic-dec",
|
||||
"tooltip-format":"{source_volume}%",
|
||||
"scroll-step": 5,
|
||||
},
|
||||
@@ -388,10 +387,10 @@
|
||||
"wireplumber": {
|
||||
"format": "{icon} {volume} %",
|
||||
"format-muted": "🔇",
|
||||
"on-click": "~/.config/hypr/scripts/RunCMD.sh volume --toggle",
|
||||
"on-click": "~/dotfiles/hypr/scripts/RunCMD.sh volume --toggle",
|
||||
"on-click-right": "pavucontrol -t 3",
|
||||
"on-scroll-up": "~/.config/hypr/scripts/RunCMD.sh volume --inc",
|
||||
"on-scroll-down": "~/.config/hypr/scripts/RunCMD.sh volume --dec",
|
||||
"on-scroll-up": "~/dotfiles/hypr/scripts/RunCMD.sh volume --inc",
|
||||
"on-scroll-down": "~/dotfiles/hypr/scripts/RunCMD.sh volume --dec",
|
||||
"default": ["🔈", "🔉", "🔊"],
|
||||
},
|
||||
|
||||
@@ -403,8 +402,8 @@
|
||||
"on-click-middle": "playerctl previous",
|
||||
"on-click-right": "playerctl next",
|
||||
"scroll-step": 5.0,
|
||||
"on-scroll-up": "~/.config/hypr/scripts/RunCMD.sh volume --inc",
|
||||
"on-scroll-down": "~/.config/hypr/scripts/RunCMD.sh volume --dec",
|
||||
"on-scroll-up": "~/dotfiles/hypr/scripts/RunCMD.sh volume --inc",
|
||||
"on-scroll-down": "~/dotfiles/hypr/scripts/RunCMD.sh volume --dec",
|
||||
"smooth-scrolling-threshold": 1,
|
||||
"player-icons": {
|
||||
"chromium": "",
|
||||
@@ -428,8 +427,8 @@
|
||||
"custom/clip": {
|
||||
"format": "📋",
|
||||
"exec": "echo ; echo 📋 Copying List Menu",
|
||||
"on-click": "~/.config/hypr/scripts/RunCMD.sh clip",
|
||||
"on-click-right": "~/.config/hypr/scripts/RunCMD.sh clip",
|
||||
"on-click": "~/dotfiles/hypr/scripts/RunCMD.sh clip",
|
||||
"on-click-right": "~/dotfiles/hypr/scripts/RunCMD.sh clip",
|
||||
"interval" : 86400, // once every day
|
||||
"tooltip": true,
|
||||
|
||||
@@ -445,7 +444,7 @@
|
||||
},
|
||||
"escape": true,
|
||||
"tooltip": true,
|
||||
"exec": "~/.config/hypr/scripts/RunCMD.sh caway -b 10",
|
||||
"exec": "~/dotfiles/hypr/scripts/RunCMD.sh caway -b 10",
|
||||
"return-type": "json",
|
||||
"on-click": "playerctl play-pause",
|
||||
"on-click-middle": "playerctl previous",
|
||||
@@ -500,8 +499,8 @@
|
||||
"custom/cycle_wall":{
|
||||
"format":" ",
|
||||
"exec": "echo ; echo wallpaper select",
|
||||
"on-click": "~/.config/hypr/scripts/RunCMD.sh selectwall",
|
||||
"on-click-right": "~/.config/hypr/scripts/RunCMD.sh randomwall",
|
||||
"on-click": "~/dotfiles/hypr/scripts/RunCMD.sh selectwall",
|
||||
"on-click-right": "~/dotfiles/hypr/scripts/RunCMD.sh randomwall",
|
||||
"interval" : 86400, // once every day
|
||||
"tooltip": true,
|
||||
},
|
||||
@@ -511,14 +510,14 @@
|
||||
"exec": "echo ; echo Key Hints SUPER F1",
|
||||
"interval": 86400, // once every day
|
||||
"tooltip": false,
|
||||
"on-click": "~/.config/hypr/scripts/RunCMD.sh keybind",
|
||||
"on-click": "~/dotfiles/hypr/scripts/RunCMD.sh keybind",
|
||||
},
|
||||
|
||||
"custom/keyboard": {
|
||||
"exec": "cat ~/.cache/kb_layout",
|
||||
"interval": 1,
|
||||
"format": " {}",
|
||||
"on-click": "~/.config/hypr/scripts/RunCMD.sh kb",
|
||||
"on-click": "~/dotfiles/hypr/scripts/RunCMD.sh kb",
|
||||
"tooltip": false,
|
||||
},
|
||||
|
||||
@@ -531,12 +530,13 @@
|
||||
},
|
||||
|
||||
"custom/menu": {
|
||||
"format": " {}",
|
||||
//"format": " {}",
|
||||
"format": " {}",
|
||||
"exec": "echo ; echo app launcher",
|
||||
"interval" : 86400, // once every day
|
||||
"tooltip": false,
|
||||
"on-click": "pkill rofi || rofi -show drun -modi drun,filebrowser,run,window -config ~/.config/rofi/launcher.rasi",
|
||||
"on-click-right": "~/.config/hypr/scripts/RunCMD.sh waybarl",
|
||||
"on-click": "pkill rofi || rofi -show drun -modi drun,filebrowser,run,window",
|
||||
"on-click-right": "~/dotfiles/hypr/scripts/RunCMD.sh waybarl",
|
||||
},
|
||||
|
||||
|
||||
@@ -546,7 +546,7 @@
|
||||
"interval": 86400,
|
||||
"tooltip": false,
|
||||
"on-click": "wlogout",
|
||||
"on-click-right": "~/.config/hypr/scripts/RunCMD.sh blur",
|
||||
"on-click-right": "~/dotfiles/hypr/scripts/RunCMD.sh blur",
|
||||
},
|
||||
|
||||
// NOTE:! This is only for Arch and Arch Based Distros
|
||||
@@ -624,8 +624,8 @@
|
||||
"on-click-middle": "",
|
||||
"on-click-right": "",
|
||||
"on-update": "",
|
||||
"on-scroll-up": "~/.config/hypr/scripts/RunCMD.sh brightness --inc",
|
||||
"on-scroll-down": "~/.config/hypr/scripts/RunCMD.sh brightness --dec",
|
||||
"on-scroll-up": "~/dotfiles/hypr/scripts/RunCMD.sh brightness --inc",
|
||||
"on-scroll-down": "~/dotfiles/hypr/scripts/RunCMD.sh brightness --dec",
|
||||
"smooth-scrolling-threshold": 1,
|
||||
"tooltip-format": "{percent}%",
|
||||
},
|
||||
@@ -680,10 +680,10 @@
|
||||
"ignored-sinks": ["Easy Effects Sink"],
|
||||
},
|
||||
"scroll-step": 5.0,
|
||||
"on-click": "~/.config/hypr/scripts/RunCMD.sh volume --toggle",
|
||||
"on-click": "~/dotfiles/hypr/scripts/RunCMD.sh volume --toggle",
|
||||
"on-click-right": "pavucontrol -t 3",
|
||||
"on-scroll-up": "~/.config/hypr/scripts/RunCMD.sh volume --inc",
|
||||
"on-scroll-down": "~/.config/hypr/scripts/RunCMD.sh volume --dec",
|
||||
"on-scroll-up": "~/dotfiles/hypr/scripts/RunCMD.sh volume --inc",
|
||||
"on-scroll-down": "~/dotfiles/hypr/scripts/RunCMD.sh volume --dec",
|
||||
"tooltip-format":"{volume}%",
|
||||
"smooth-scrolling-threshold": 1,
|
||||
},
|
||||
@@ -693,9 +693,9 @@
|
||||
"format-source": "",
|
||||
"format-source-muted": "",
|
||||
"on-click-right": "pavucontrol",
|
||||
"on-click": "~/.config/hypr/scripts/RunCMD.sh volume --toggle-mic",
|
||||
"on-scroll-up": "~/.config/hypr/scripts/RunCMD.sh volume --mic-inc",
|
||||
"on-scroll-down": "~/.config/hypr/scripts/RunCMD.sh volume --mic-dec",
|
||||
"on-click": "~/dotfiles/hypr/scripts/RunCMD.sh volume --toggle-mic",
|
||||
"on-scroll-up": "~/dotfiles/hypr/scripts/RunCMD.sh volume --mic-inc",
|
||||
"on-scroll-down": "~/dotfiles/hypr/scripts/RunCMD.sh volume --mic-dec",
|
||||
"max-volume": 100,
|
||||
"tooltip": true,
|
||||
"tooltip-format": "{volume}%",
|
||||
@@ -706,7 +706,7 @@
|
||||
"custom/power_vertical": {
|
||||
"format": "⏻",
|
||||
"exec": "echo ; echo power // blur",
|
||||
"on-click-right": "~/.config/hypr/scripts/RunCMD.sh blur",
|
||||
"on-click-right": "~/dotfiles/hypr/scripts/RunCMD.sh blur",
|
||||
"on-click":"wlogout",
|
||||
"interval": 86400, // once every day
|
||||
"tooltip": false,
|
||||
|
||||
+52
-28
@@ -2,40 +2,71 @@
|
||||
## Aliases
|
||||
##
|
||||
|
||||
alias run='pnpm run'
|
||||
#List
|
||||
alias ls="eza --color=auto --icons"
|
||||
alias l="ls -l"
|
||||
alias ll="ls -a"
|
||||
alias lla="ls -la"
|
||||
alias lt="ls --tree"
|
||||
|
||||
#pacman unlock
|
||||
alias unlock="sudo rm /var/lib/pacman/db.lck"
|
||||
alias rmpacmanlock="sudo rm /var/lib/pacman/db.lck"
|
||||
|
||||
#cache clean
|
||||
alias clean="paru -Scc"
|
||||
|
||||
# paru as aur helper - updates everything
|
||||
alias parsua="paru -Syu --noconfirm"
|
||||
alias upall="paru -Syu --noconfirm"
|
||||
|
||||
# pacman or pm
|
||||
alias pacman='sudo pacman --color auto'
|
||||
alias update='sudo pacman -Syyu'
|
||||
alias upgrade='paru -Syyu'
|
||||
|
||||
#ps
|
||||
alias psa="ps auxf"
|
||||
alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e"
|
||||
|
||||
#add new fonts
|
||||
alias update-fc='sudo fc-cache -fv'
|
||||
|
||||
#switch between bash and zsh
|
||||
alias tobash="sudo chsh $USER -s /bin/bash && echo 'Now log out.'"
|
||||
alias tozsh="sudo chsh $USER -s /bin/zsh && echo 'Now log out.'"
|
||||
alias tofish="sudo chsh $USER -s /bin/fish && echo 'Now log out.'"
|
||||
|
||||
#Cleanup orphaned packages
|
||||
alias cleanup='sudo pacman -Rns $(pacman -Qtdq)'
|
||||
|
||||
|
||||
#fix obvious typo's
|
||||
alias c="clear"
|
||||
alias q="exit"
|
||||
alias cleanram="sudo sh -c 'sync; echo 3 > /proc/sys/vm/drop_caches'"
|
||||
alias trim_all="sudo fstrim -va"
|
||||
alias mkgrub='sudo grub-mkconfig -o /boot/grub/grub.cfg'
|
||||
alias mtar='tar -zcvf' # mtar <archive_compress>
|
||||
alias utar='tar -zxvf' # utar <archive_decompress> <file_list>
|
||||
alias z='zip -r' # z <archive_compress> <file_list>
|
||||
alias uz='unzip' # uz <archive_decompress> -d <dir>
|
||||
alias sr='source ~/.config/zsh/env.zsh'
|
||||
alias ..="cd .."
|
||||
alias psg="ps aux | grep -v grep | grep -i -e VSZ -e"
|
||||
alias mkdir="mkdir -p"
|
||||
alias pacin="pacman -Slq | fzf -m --preview 'cat <(pacman -Si {1}) <(pacman -Fl {1} | awk \"{print \$2}\")' | xargs -ro sudo pacman -S"
|
||||
alias paruin="paru -Slq | fzf -m --preview 'cat <(paru -Si {1}) <(paru -Fl {1} | awk \"{print \$2}\")' | xargs -ro paru -S"
|
||||
alias pacrem="pacman -Qq | fzf --multi --preview 'pacman -Qi {1}' | xargs -ro sudo pacman -Rns"
|
||||
alias pac="pacman -Q | fzf"
|
||||
alias parucom="paru -Gc"
|
||||
alias parupd="paru -Qua"
|
||||
alias pacupd="pacman -Qu"
|
||||
alias parucheck="paru -Gp"
|
||||
alias installed="grep -i installed /var/log/pacman.log"
|
||||
alias clean="sudo pacman -Scc"
|
||||
alias ls="exa --color=auto --icons"
|
||||
alias l="ls -l"
|
||||
alias ll="ls -a"
|
||||
alias lla="ls -la"
|
||||
alias lt="ls --tree"
|
||||
alias cat="bat --color always --plain"
|
||||
alias grep='grep --color=auto'
|
||||
alias mv='mv -v'
|
||||
alias cp='cp -vr'
|
||||
alias rm='rm -vr'
|
||||
|
||||
#clean caches
|
||||
alias cleanram="sudo sh -c 'sync; echo 3 > /proc/sys/vm/drop_caches'"
|
||||
|
||||
#grub update
|
||||
alias mkgrub='sudo grub-mkconfig -o /boot/grub/grub.cfg'
|
||||
|
||||
# other
|
||||
alias py='python'
|
||||
alias wifi="nmtui-connect"
|
||||
|
||||
# git Aliases
|
||||
alias commit="git add . && git commit -m"
|
||||
alias push="git push"
|
||||
@@ -216,12 +247,5 @@ alias gupav='git pull --rebase --autostash -v'
|
||||
alias gupv='git pull --rebase -v'
|
||||
alias gwch='git whatchanged -p --abbrev-commit --pretty=medium'
|
||||
alias gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign -m "--wip-- [skip ci]"'
|
||||
# my aliases
|
||||
alias vi='nvim'
|
||||
alias py='python'
|
||||
alias paclean="paru -Scc"
|
||||
alias n="neofetch"
|
||||
alias pacupg="sudo pacman -Syu"
|
||||
alias update="paru -Syu"
|
||||
alias wifi="nmtui-connect"
|
||||
|
||||
# vim:ft=zsh
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
############ Variables ############
|
||||
enable_battery=false
|
||||
|
||||
####### Check availability ########
|
||||
for battery in /sys/class/power_supply/*BAT*; do
|
||||
if [[ -f "$battery/uevent" ]]; then
|
||||
enable_battery=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
############# Output #############
|
||||
if [[ $enable_battery == true ]]; then
|
||||
if [[ $(cat /sys/class/power_supply/*/status | head -1) == "Charging" ]]; then
|
||||
echo -n "(+) "
|
||||
fi
|
||||
echo -n "$(cat /sys/class/power_supply/*/capacity | head -1)"% remaining
|
||||
fi
|
||||
|
||||
echo ''
|
||||
Reference in new issue
Block a user