Added Nix and direnv hooks inside zshrc, heavily modified the set-wallpaper script, changed gtk and rofi icon theme, and added proper support for kdenlive start page
This commit is contained in:
parent
4c99ea1a4d
commit
83116af07b
5 changed files with 69 additions and 9 deletions
|
|
@ -1,6 +1,6 @@
|
|||
[Settings]
|
||||
gtk-theme-name=adw-gtk3-dark
|
||||
gtk-icon-theme-name=Papirus
|
||||
gtk-icon-theme-name=Adwaita
|
||||
gtk-font-name=DejaVu Sans 10
|
||||
gtk-cursor-theme-name=VolantesCursors
|
||||
gtk-cursor-theme-size=24
|
||||
|
|
|
|||
|
|
@ -232,6 +232,18 @@ windowrule {
|
|||
match:class = (Vivado)
|
||||
}
|
||||
|
||||
# Kdenlive
|
||||
windowrule {
|
||||
name = kdenlive-all
|
||||
pseudo = on
|
||||
match:class = (org.kde.kdenlive)
|
||||
}
|
||||
windowrule {
|
||||
name = kdenlive-welcome
|
||||
size = (512) (544)
|
||||
match:class = (org.kde.kdenlive) # initialTitle:^(Kdenlive)$
|
||||
}
|
||||
|
||||
|
||||
# TODO Automatically fullscreen single apps
|
||||
# - Seems impossible for now (try mixing with workspace rules)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ configuration {
|
|||
|
||||
/* Icons */
|
||||
show-icons: true;
|
||||
/* icon-theme: "Gruvbox-Plus-Dark"; */
|
||||
icon-theme: "Papirus";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,27 +1,54 @@
|
|||
#!/bin/sh
|
||||
|
||||
print_help() {
|
||||
echo "Usage: $0 [input-file]"
|
||||
echo "Usage: $program_name INPUT-FILE [OPTION]... "
|
||||
echo
|
||||
echo "Changes your current wallpaper"
|
||||
echo "Please note that this script is made to be used with the Atlas Desktop and will probably not work on most other desktops."
|
||||
echo
|
||||
echo "OPTIONS:"
|
||||
echo " -l also apply wallpaper to lockscreen"
|
||||
echo
|
||||
}
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
# Handle arguments
|
||||
|
||||
## Default options
|
||||
program_name="$0"
|
||||
input_file="$1"
|
||||
opt_l=false
|
||||
|
||||
## No args
|
||||
if [ $# -lt 1 ]; then
|
||||
print_help
|
||||
exit 1
|
||||
fi
|
||||
|
||||
## Parse args
|
||||
shift 2
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
"-l")
|
||||
opt_l=true
|
||||
;;
|
||||
*)
|
||||
print_help
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Check if file exists
|
||||
if [ -e "$1" ]; then
|
||||
if [ -e "$input_file" ]; then
|
||||
|
||||
# Variables declaration
|
||||
wallpaper_config=~/.config/hypr/hyprpaper.conf
|
||||
lockscreen_config=~/.config/hypr/hyprlock.conf
|
||||
wallpaper_path=~/.config/hypr/images/wallpaper # Doesn't contain file extension
|
||||
file_extension="${1##*.}"
|
||||
file_extension="${input_file##*.}"
|
||||
|
||||
# In case file has no extension
|
||||
if [ "${file_extension}" == "$1" ]; then
|
||||
if [ "${file_extension}" == "$input_file" ]; then
|
||||
echo "Error: please provide a file extension (ex: .jpg, .png...)"
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -30,17 +57,31 @@ if [ -e "$1" ]; then
|
|||
rm $wallpaper_path*
|
||||
|
||||
# Copy file
|
||||
cp "$1" "${wallpaper_path}.${file_extension}"
|
||||
cp "$input_file" "${wallpaper_path}.${file_extension}"
|
||||
if [ $? != 0 ]; then
|
||||
echo "Aborted."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Update config
|
||||
## Wallpaper
|
||||
sed -i "s/wallpaper\.[^[:space:]]*/wallpaper.$file_extension/g" $wallpaper_config # Replace current extension by new extension
|
||||
if [ $? != 0 ]; then
|
||||
echo "Aborted."
|
||||
exit 1
|
||||
else
|
||||
echo "Changed wallpaper !"
|
||||
fi
|
||||
## Lockscreen
|
||||
if [ "$opt_l" == true ]; then
|
||||
sed -i "s/wallpaper\.[^[:space:]]*/wallpaper.$file_extension/g" $lockscreen_config # Replace current extension by new extension
|
||||
if [ $? != 0 ]; then
|
||||
echo "Aborted."
|
||||
echo "Note: Previous actions have not been undone"
|
||||
exit 1
|
||||
else
|
||||
echo "Changed lockscreen !"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Reload Hyprpaper
|
||||
|
|
@ -52,6 +93,6 @@ if [ -e "$1" ]; then
|
|||
echo "Done"
|
||||
exit 0
|
||||
else
|
||||
echo "Couldn't find '${1}': No such file or directory"
|
||||
echo "Couldn't find '${input_file}': No such file or directory"
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
|||
7
.zshrc
7
.zshrc
|
|
@ -86,6 +86,7 @@ alias zcfg='$EDITOR ~/.zshrc'
|
|||
alias icat='kitten icat'
|
||||
alias nv='nvim'
|
||||
alias hx='helix'
|
||||
alias zed='zeditor'
|
||||
alias cg='cargo'
|
||||
alias rqr='rust-quick-run.sh'
|
||||
alias vm='quickemu --vm *.conf'
|
||||
|
|
@ -111,6 +112,12 @@ alias cm=" cmake -S . -B build && cmake --build build"
|
|||
# Shell integrations
|
||||
eval "$(fzf --zsh)"
|
||||
eval "$(zoxide init --cmd cd zsh)" # Override cd with zoxide
|
||||
eval "$(direnv hook zsh)"
|
||||
|
||||
# Nix
|
||||
if [ -e /etc/profile.d/nix-daemon.sh ]; then
|
||||
. /etc/profile.d/nix-daemon.sh
|
||||
fi
|
||||
|
||||
# pnpm
|
||||
export PNPM_HOME="/home/guillm/.local/share/pnpm"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue