Merge branch 'development' into 'main'

Merge into 2.1

See merge request stephan-raabe/dotfiles!4
This commit is contained in:
Stephan Raabe 2023-09-12 13:13:48 +00:00
commit 0966a8f79d
15 changed files with 230 additions and 74 deletions

29
.bashrc
View File

@ -21,27 +21,24 @@ alias c='clear'
alias nf='neofetch' alias nf='neofetch'
alias pf='pfetch' alias pf='pfetch'
alias ls='exa -al' alias ls='exa -al'
alias mutt='neomutt'
alias m='neomutt'
alias shutdown='systemctl poweroff' alias shutdown='systemctl poweroff'
alias v='nvim' alias v='nvim'
alias r='ranger'
alias t='sudo timeshift --list'
alias ts='~/dotfiles/scripts/snapshot.sh' alias ts='~/dotfiles/scripts/snapshot.sh'
alias matrix='cmatrix' alias matrix='cmatrix'
alias shot='scrot -d 3 -c -z -u'
alias shotsel='scrot -s'
alias wifi='nmtui' alias wifi='nmtui'
alias od='~/private/onedrive.sh' alias od='~/private/onedrive.sh'
alias rw='~/dotfiles/waybar/reload.sh' alias rw='~/dotfiles/waybar/reload.sh'
alias winclass="xprop | grep 'CLASS'" alias winclass="xprop | grep 'CLASS'"
# -----------------------------------------------------
# Window Managers # Window Managers
# -----------------------------------------------------
alias Qtile='startx' alias Qtile='startx'
# alias Hyprland="~/dotfiles/hypr/starthypr.sh"
# -----------------------------------------------------
# GIT # GIT
# -----------------------------------------------------
alias gs="git status" alias gs="git status"
alias ga="git add" alias ga="git add"
@ -50,8 +47,11 @@ alias gp="git push"
alias gpl="git pull" alias gpl="git pull"
alias gst="git stash" alias gst="git stash"
alias gsp="git stash; git pull" alias gsp="git stash; git pull"
alias gcheck="git checkout"
# -----------------------------------------------------
# SCRIPTS # SCRIPTS
# -----------------------------------------------------
alias w='~/dotfiles/scripts/updatewal.sh' alias w='~/dotfiles/scripts/updatewal.sh'
alias gr='python ~/dotfiles/scripts/growthrate.py' alias gr='python ~/dotfiles/scripts/growthrate.py'
@ -59,24 +59,32 @@ alias ChatGPT='python ~/mychatgpt/mychatgpt.py'
alias chat='python ~/mychatgpt/mychatgpt.py' alias chat='python ~/mychatgpt/mychatgpt.py'
alias ascii='~/dotfiles/scripts/figlet.sh' alias ascii='~/dotfiles/scripts/figlet.sh'
# -----------------------------------------------------
# VIRTUAL MACHINE # VIRTUAL MACHINE
# -----------------------------------------------------
alias vm='~/private/launchvm.sh' alias vm='~/private/launchvm.sh'
alias lg='~/dotfiles/scripts/looking-glass.sh' alias lg='~/dotfiles/scripts/looking-glass.sh'
alias vmstart='virsh --connect qemu:///system start win11' alias vmstart='virsh --connect qemu:///system start win11'
alias vmstop='virsh --connect qemu:///system destroy win11' alias vmstop='virsh --connect qemu:///system destroy win11'
# -----------------------------------------------------
# EDIT CONFIG FILES # EDIT CONFIG FILES
# -----------------------------------------------------
alias confq='nvim ~/dotfiles/qtile/config.py' alias confq='nvim ~/dotfiles/qtile/config.py'
alias confp='nvim ~/dotfiles/picom/picom.conf' alias confp='nvim ~/dotfiles/picom/picom.conf'
alias confb='nvim ~/dotfiles/.bashrc' alias confb='nvim ~/dotfiles/.bashrc'
# -----------------------------------------------------
# EDIT NOTES # EDIT NOTES
# -----------------------------------------------------
alias notes='vim ~/notes.txt' alias notes='vim ~/notes.txt'
# -----------------------------------------------------
# SYSTEM # SYSTEM
# -----------------------------------------------------
alias update-grub='sudo grub-mkconfig -o /boot/grub/grub.cfg' alias update-grub='sudo grub-mkconfig -o /boot/grub/grub.cfg'
alias setkb='setxkbmap de;echo "Keyboard set back to de."' alias setkb='setxkbmap de;echo "Keyboard set back to de."'
@ -84,11 +92,14 @@ alias setkb='setxkbmap de;echo "Keyboard set back to de."'
# ----------------------------------------------------- # -----------------------------------------------------
# SCREEN RESOLUTINS # SCREEN RESOLUTINS
# ----------------------------------------------------- # -----------------------------------------------------
# Qtile
alias res1='xrandr --output DisplayPort-0 --mode 2560x1440 --rate 120' alias res1='xrandr --output DisplayPort-0 --mode 2560x1440 --rate 120'
alias res2='xrandr --output DisplayPort-0 --mode 1920x1080 --rate 120' alias res2='xrandr --output DisplayPort-0 --mode 1920x1080 --rate 120'
alias r1='hyprctl keyword monitor ,preferred,auto,1'
alias r2='hyprctl keyword monitor ,1920x1080,auto,1'
#Hyprland
alias r1='hyprctl keyword monitor ,2560x1440@120,auto,1'
alias r2='hyprctl keyword monitor ,1920x1080@120,auto,1'
export PATH="/usr/lib/ccache/bin/:$PATH" export PATH="/usr/lib/ccache/bin/:$PATH"

View File

@ -74,16 +74,13 @@ echo ""
echo "-> Install main packages" echo "-> Install main packages"
packagesPacman=( packagesPacman=(
"picom" "pacman-contrib"
"alacritty" "alacritty"
"rofi" "rofi"
"rofi-calc"
"chromium" "chromium"
"scrot"
"nitrogen" "nitrogen"
"dunst" "dunst"
"starship" "starship"
"slock"
"neovim" "neovim"
"mpv" "mpv"
"freerdp" "freerdp"
@ -152,7 +149,7 @@ while true; do
read -p "Do you want to install the custom login promt? (Yy/Nn): " yn read -p "Do you want to install the custom login promt? (Yy/Nn): " yn
case $yn in case $yn in
[Yy]* ) [Yy]* )
sudo cp ~/dotfiles/issue /etc/issue sudo cp ~/dotfiles/login/issue /etc/issue
echo "Login promt installed." echo "Login promt installed."
break;; break;;
[Nn]* ) [Nn]* )

View File

@ -48,6 +48,9 @@ echo "-> Install main packages"
packagesPacman=( packagesPacman=(
"qtile" "qtile"
"polybar" "polybar"
"picom"
"scrot"
"slock"
); );
# ------------------------------------------------------ # ------------------------------------------------------

View File

86
scripts/installupdates.sh Executable file
View File

@ -0,0 +1,86 @@
#!/bin/bash
# ___ _ _ _ _ _ _ _
# |_ _|_ __ ___| |_ __ _| | | | | | |_ __ __| | __ _| |_ ___ ___
# | || '_ \/ __| __/ _` | | | | | | | '_ \ / _` |/ _` | __/ _ \/ __|
# | || | | \__ \ || (_| | | | | |_| | |_) | (_| | (_| | || __/\__ \
# |___|_| |_|___/\__\__,_|_|_| \___/| .__/ \__,_|\__,_|\__\___||___/
# |_|
# by Stephan Raabe (2023)
# -----------------------------------------------------
# Required: yay trizen timeshift btrfs-grub
# -----------------------------------------------------
sleep 1
source ~/dotfiles/scripts/library.sh
clear
echo "-----------------------------------------------------"
echo "Check for updates"
echo "-----------------------------------------------------"
echo ""
if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then
updates_arch=0
fi
if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then
updates_aur=0
fi
updates=$(("$updates_arch" + "$updates_aur"))
if [ "$updates" -gt 0 ]; then
echo "-> Pacman:"
checkupdates
echo ""
echo "-> AUR"
trizen -Su --aur
echo ""
echo "-> $updates updates available."
echo ""
else
echo "-> NO updates available"
exit
fi
# ------------------------------------------------------
# Confirm Start
# ------------------------------------------------------
while true; do
read -p "DO YOU WANT TO START THE UPDATE NOW? (Yy/Nn): " yn
case $yn in
[Yy]* )
echo "Update process started."
break;;
[Nn]* )
exit;
break;;
* ) echo "Please answer yes or no.";;
esac
done
if [[ $(_isInstalledYay "Timeshift") == 1 ]];
then
echo ""
echo "-----------------------------------------------------"
echo "Create a snapshot"
echo "-----------------------------------------------------"
echo ""
read -p "Enter a comment for the snapshot: " c
sudo timeshift --create --comments "$c"
sudo timeshift --list
sudo grub-mkconfig -o /boot/grub/grub.cfg
echo "DONE. Snapshot $c created!"
echo ""
fi
echo "-----------------------------------------------------"
echo "Start update"
echo "-----------------------------------------------------"
echo ""
yay

View File

@ -8,6 +8,19 @@
# #
# by Stephan Raabe (2023) # by Stephan Raabe (2023)
# ----------------------------------------------------- # -----------------------------------------------------
# Requires pacman-contrib trizen
# -----------------------------------------------------
# Define threshholds for color indicators
# -----------------------------------------------------
threshhold_green=0
threshhold_yellow=25
threshhold_red=100
# -----------------------------------------------------
# Calculate available updates pacman and aur (with trizen)
# -----------------------------------------------------
if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then
updates_arch=0 updates_arch=0
@ -19,8 +32,24 @@ fi
updates=$(("$updates_arch" + "$updates_aur")) updates=$(("$updates_arch" + "$updates_aur"))
if [ "$updates" -gt 0 ]; then # -----------------------------------------------------
echo " $updates" # Output in JSON format for Waybar Module custom-updates
else # -----------------------------------------------------
echo " 0"
css_class="green"
# test classes
# printf '{"text": "0", "alt": "0", "tooltip": "0 Updates", "class": "red"}'
# exit
if [ "$updates" -gt $threshhold_yellow ]; then
css_class="yellow"
fi
if [ "$updates" -gt $threshhold_red ]; then
css_class="red"
fi
if [ "$updates" -gt $threshhold_green ]; then
printf '{"text": "%s", "alt": "%s", "tooltip": "%s Updates", "class": "%s"}' "$updates" "$updates" "$updates" "$css_class"
else
printf '{"text": "0", "alt": "0", "tooltip": "0 Updates", "class": "green"}'
fi fi

View File

@ -20,9 +20,8 @@ wal -q -i ~/wallpaper/
source "$HOME/.cache/wal/colors.sh" source "$HOME/.cache/wal/colors.sh"
# ----------------------------------------------------- # -----------------------------------------------------
# Copy color file to waybar folder # Copy selected wallpaper into .cache folder
# ----------------------------------------------------- # -----------------------------------------------------
cp ~/.cache/wal/colors-waybar.css ~/dotfiles/waybar/
cp $wallpaper ~/.cache/current_wallpaper.jpg cp $wallpaper ~/.cache/current_wallpaper.jpg
# ----------------------------------------------------- # -----------------------------------------------------

View File

@ -28,9 +28,8 @@ if [ "$selected" ]; then
source "$HOME/.cache/wal/colors.sh" source "$HOME/.cache/wal/colors.sh"
# ----------------------------------------------------- # -----------------------------------------------------
# Copy color file to waybar folder # Copy selected wallpaper into .cache folder
# ----------------------------------------------------- # -----------------------------------------------------
cp ~/.cache/wal/colors-waybar.css ~/dotfiles/waybar/
cp $wallpaper ~/.cache/current_wallpaper.jpg cp $wallpaper ~/.cache/current_wallpaper.jpg
newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g") newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g")

View File

@ -1,20 +0,0 @@
@define-color foreground #bfbfc0;
@define-color background #020103;
@define-color cursor #bfbfc0;
@define-color color0 #020103;
@define-color color1 #FBBA52;
@define-color color2 #4B3E81;
@define-color color3 #705E91;
@define-color color4 #9575A6;
@define-color color5 #CB7B96;
@define-color color6 #AB8EAC;
@define-color color7 #bfbfc0;
@define-color color8 #414042;
@define-color color9 #FBBA52;
@define-color color10 #4B3E81;
@define-color color11 #705E91;
@define-color color12 #9575A6;
@define-color color13 #CB7B96;
@define-color color14 #AB8EAC;
@define-color color15 #bfbfc0;

View File

@ -18,7 +18,7 @@ killall waybar
# ----------------------------------------------------- # -----------------------------------------------------
if [[ $USER = "raabe" ]] if [[ $USER = "raabe" ]]
then then
waybar -c ~/dotfiles/waybar/myconfig & waybar -c ~/dotfiles/waybar/myconfig & -s ~/dotfiles/waybar/style.css
else else
waybar & waybar &
fi fi

View File

@ -67,10 +67,13 @@
// Updates Count // Updates Count
"custom/updates": { "custom/updates": {
"format": " {}", "format": " {}",
"tooltip-format": "{}",
"escape": true,
"return-type": "json",
"exec": "~/dotfiles/scripts/updates.sh", "exec": "~/dotfiles/scripts/updates.sh",
"restart-interval": 600, "restart-interval": 60,
"on-click": "alacritty -e yay", "on-click": "alacritty -e ~/dotfiles/scripts/installupdates.sh",
"tooltip": false "tooltip": false
}, },

View File

@ -13,7 +13,7 @@
/* ----------------------------------------------------- /* -----------------------------------------------------
* Import Pywal colors * Import Pywal colors
* ----------------------------------------------------- */ * ----------------------------------------------------- */
@import 'colors-waybar.css'; @import '../../.cache/wal/colors-waybar.css';
/* ----------------------------------------------------- /* -----------------------------------------------------
* General * General
@ -117,7 +117,7 @@ window#waybar.empty #window {
* ----------------------------------------------------- */ * ----------------------------------------------------- */
#taskbar { #taskbar {
background: transparent; background: @color11;
margin: 3px 15px 3px 0px; margin: 3px 15px 3px 0px;
padding: 2px 3px 1px 3px; padding: 2px 3px 1px 3px;
border-radius: 14px; border-radius: 14px;
@ -191,6 +191,20 @@ window#waybar.empty #window {
opacity:0.8; opacity:0.8;
} }
#custom-updates.green {
background-color: #FFFFFF;
}
#custom-updates.yellow {
background-color: #ff9a3c;
color: #ffffff;
}
#custom-updates.red {
background-color: #dc2f2f;
color: #ffffff;
}
/* ----------------------------------------------------- /* -----------------------------------------------------
* Custom Youtube * Custom Youtube
* ----------------------------------------------------- */ * ----------------------------------------------------- */

View File

@ -1,35 +1,36 @@
{ {
"label" : "lock", "label" : "lock",
"action" : "swaylock", "action" : "swaylock",
"text" : "Lock" "text" : "Lock",
"keybind" : "l"
} }
{ {
"label" : "hibernate", "label" : "hibernate",
"action" : "systemctl hibernate", "action" : "systemctl hibernate",
"text" : "Hibernate" "text" : "Hibernate",
"keybind" : "h"
} }
{ {
"label" : "logout", "label" : "logout",
"action" : "hyprctl dispatch exit 0", "action" : "loginctl terminate-user $USER",
"text" : "Logout" "text" : "Logout",
"keybind" : "e"
} }
{ {
"label" : "shutdown", "label" : "shutdown",
"action" : "systemctl poweroff", "action" : "systemctl poweroff",
"text" : "Shutdown" "text" : "Shutdown",
"keybind" : "s"
} }
{ {
"label" : "suspend", "label" : "suspend",
"action" : "systemctl suspend", "action" : "systemctl suspend",
"text" : "Suspend" "text" : "Suspend",
"keybind" : "u"
} }
{ {
"label" : "reboot", "label" : "reboot",
"action" : "systemctl reboot", "action" : "systemctl reboot",
"text" : "Reboot" "text" : "Reboot",
} "keybind" : "r"
}

BIN
wlogout/noise.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

View File

@ -1,44 +1,78 @@
/*
_ _
__ _| | ___ __ _ ___ _ _| |_
\ \ /\ / / |/ _ \ / _` |/ _ \| | | | __|
\ V V /| | (_) | (_| | (_) | |_| | |_
\_/\_/ |_|\___/ \__, |\___/ \__,_|\__|
|___/
by Stephan Raabe (2023)
-----------------------------------------------------
*/
* { * {
background-image: none; background-image: none;
transition: 0ms;
} }
window { window {
background-color: rgba(12, 12, 12, 0.5); background-color: rgba(12, 12, 12, 0.1);
background-image: url('./noise.png');
} }
button { button {
color: #FFFFFF; color: #FFFFFF;
background-color: #1E1E1E;
border-style: solid; border-style: solid;
border-width: 0px; border-width: 2px;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
background-size: 25%; background-size: 25%;
background-color: rgba(108, 112, 134, 0.4);
border: 1px solid rgba(108, 112, 134, 0.3);
border-top: 1px solid rgba(108, 112, 134, 0.3);
} }
button:focus, button:active, button:hover { button:focus,
background-color: #3700B3; button:active,
outline-style: none; button:hover {
background-color: rgba(156, 161, 192, 0.5);
border: 1px solid rgba(108, 112, 134, 0.15);
border-top: 1px solid rgba(108, 112, 134, 0.15);
} }
#lock { #lock {
background-image: image(url("/usr/share/wlogout/icons/lock.png"), url("/usr/local/share/wlogout/icons/lock.png")); margin: 10px;
border-radius: 20px;
background-image: image(url("/usr/share/wlogout/icons/lock.png"), url("/usr/local/share/wlogout/icons/lock.png"));
} }
#logout { #logout {
background-image: image(url("/usr/share/wlogout/icons/logout.png"), url("/usr/local/share/wlogout/icons/logout.png")); margin: 10px;
border-radius: 20px;
background-image: image(url("/usr/share/wlogout/icons/logout.png"), url("/usr/local/share/wlogout/icons/logout.png"));
} }
#suspend { #suspend {
background-image: image(url("/usr/share/wlogout/icons/suspend.png"), url("/usr/local/share/wlogout/icons/suspend.png")); margin: 10px;
border-radius: 20px;
background-image: image(url("/usr/share/wlogout/icons/suspend.png"), url("/usr/local/share/wlogout/icons/suspend.png"));
} }
#hibernate { #hibernate {
background-image: image(url("/usr/share/wlogout/icons/hibernate.png"), url("/usr/local/share/wlogout/icons/hibernate.png")); margin: 10px;
border-radius: 20px;
background-image: image(url("/usr/share/wlogout/icons/hibernate.png"), url("/usr/local/share/wlogout/icons/hibernate.png"));
} }
#shutdown { #shutdown {
background-image: image(url("/usr/share/wlogout/icons/shutdown.png"), url("/usr/local/share/wlogout/icons/shutdown.png")); margin: 10px;
border-radius: 20px;
background-image: image(url("/usr/share/wlogout/icons/shutdown.png"), url("/usr/local/share/wlogout/icons/shutdown.png"));
} }
#reboot { #reboot {
background-image: image(url("/usr/share/wlogout/icons/reboot.png"), url("/usr/local/share/wlogout/icons/reboot.png")); margin: 10px;
border-radius: 20px;
background-image: image(url("/usr/share/wlogout/icons/reboot.png"), url("/usr/local/share/wlogout/icons/reboot.png"));
} }