this is Spartaaaaaaaa
This commit is contained in:
parent
0ff84c7ded
commit
f6fe2d9c2d
5 changed files with 378 additions and 29 deletions
83
bash/.bashrc
83
bash/.bashrc
|
|
@ -17,8 +17,15 @@ export HISTSIZE=500
|
||||||
export HISTCONTROL=erasedups:ignoredups:ignorespace
|
export HISTCONTROL=erasedups:ignoredups:ignorespace
|
||||||
|
|
||||||
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
||||||
|
export MANROFFOPT="-c"
|
||||||
|
|
||||||
shopt -s checkwinsize
|
shopt -s autocd # change to named directory
|
||||||
|
shopt -s cdspell # autocorrects cd misspellings
|
||||||
|
shopt -s cmdhist # save multi-line commands in history as single line
|
||||||
|
shopt -s dotglob
|
||||||
|
shopt -s histappend # do not overwrite history
|
||||||
|
shopt -s expand_aliases # expand aliases
|
||||||
|
shopt -s checkwinsize # checks term size when bash regains control
|
||||||
shopt -s histappend
|
shopt -s histappend
|
||||||
PROMPT_COMMAND='history -a'
|
PROMPT_COMMAND='history -a'
|
||||||
|
|
||||||
|
|
@ -33,6 +40,7 @@ if [[ $iatest -gt 0 ]]; then bind "set show-all-if-ambiguous on"; fi
|
||||||
# Default editor
|
# Default editor
|
||||||
export EDITOR=nvim
|
export EDITOR=nvim
|
||||||
export VISUAL=nvim
|
export VISUAL=nvim
|
||||||
|
export SHELL_ICON=
|
||||||
alias edit='nvim'
|
alias edit='nvim'
|
||||||
alias pico='edit'
|
alias pico='edit'
|
||||||
alias spico='sedit'
|
alias spico='sedit'
|
||||||
|
|
@ -42,22 +50,23 @@ alias vim='nvim'
|
||||||
alias cat='bat'
|
alias cat='bat'
|
||||||
alias browser='librewolf'
|
alias browser='librewolf'
|
||||||
|
|
||||||
|
export LESS="--RAW-CONTROL-CHARS"
|
||||||
|
|
||||||
# To have colors for ls and all grep commands such as grep, egrep and zgrep
|
# To have colors for ls and all grep commands such as grep, egrep and zgrep
|
||||||
export CLICOLOR=1
|
export CLICOLOR=1
|
||||||
export LS_COLORS='no=00:fi=00:di=00;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:*.xml=00;31:'
|
export LS_COLORS='no=00:fi=00:di=00;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:*.xml=00;31:'
|
||||||
#export GREP_OPTIONS='--color=auto' #deprecated
|
#export GREP_OPTIONS='--color=auto' #deprecated
|
||||||
alias grep="/usr/bin/grep $GREP_OPTIONS"
|
#alias grep="/usr/bin/grep $GREP_OPTIONS"
|
||||||
unset GREP_OPTIONS
|
#unset GREP_OPTIONS
|
||||||
|
|
||||||
# Color for manpages in less makes manpages a little easier to read
|
# Color for manpages in less makes manpages a little easier to read
|
||||||
export LESS_TERMCAP_mb=$'\E[01;31m'
|
#export LESS_TERMCAP_mb=$'\E[01;31m'
|
||||||
export LESS_TERMCAP_md=$'\E[01;31m'
|
#export LESS_TERMCAP_md=$'\E[01;31m'
|
||||||
export LESS_TERMCAP_me=$'\E[0m'
|
#export LESS_TERMCAP_me=$'\E[0m'
|
||||||
export LESS_TERMCAP_se=$'\E[0m'
|
#export LESS_TERMCAP_se=$'\E[0m'
|
||||||
export LESS_TERMCAP_so=$'\E[01;44;33m'
|
#export LESS_TERMCAP_so=$'\E[01;44;33m'
|
||||||
export LESS_TERMCAP_ue=$'\E[0m'
|
#export LESS_TERMCAP_ue=$'\E[0m'
|
||||||
export LESS_TERMCAP_us=$'\E[01;32m'
|
#export LESS_TERMCAP_us=$'\E[01;32m'
|
||||||
|
|
||||||
#######################################################
|
#######################################################
|
||||||
# GENERAL ALIAS'S
|
# GENERAL ALIAS'S
|
||||||
|
|
@ -83,7 +92,7 @@ alias cp='cp -i'
|
||||||
alias mv='mv -i'
|
alias mv='mv -i'
|
||||||
alias rm='trash -v'
|
alias rm='trash -v'
|
||||||
alias mkdir='mkdir -pv'
|
alias mkdir='mkdir -pv'
|
||||||
alias ps='ps auxf'
|
alias psa='ps auxf'
|
||||||
alias ping='ping -c 10'
|
alias ping='ping -c 10'
|
||||||
alias less='less -R'
|
alias less='less -R'
|
||||||
alias cls='clear'
|
alias cls='clear'
|
||||||
|
|
@ -108,20 +117,30 @@ alias bd='cd "$OLDPWD"'
|
||||||
alias rmd='trash --recursive --force --verbose '
|
alias rmd='trash --recursive --force --verbose '
|
||||||
|
|
||||||
# Alias's for multiple directory listing commands
|
# Alias's for multiple directory listing commands
|
||||||
alias la='ls -Alh' # show hidden files
|
if type -fP eza &> /dev/null; then
|
||||||
alias ls='ls -aFh --color=always' # add colors and file type extensions
|
alias ls='eza -al --icons --color=always --group-directories-first' # my preferred listing
|
||||||
alias lx='ls -lXBh' # sort by extension
|
alias la='eza -a --icons --color=always --group-directories-first' # all files and dirs
|
||||||
alias lk='ls -lSrh' # sort by size
|
alias ll='eza -l --icons --color=always --group-directories-first' # long format
|
||||||
alias lc='ls -lcrh' # sort by change time
|
alias lt='eza -aT --color=always --group-directories-first' # tree listing
|
||||||
alias lu='ls -lurh' # sort by access time
|
alias l.='eza -a | egrep "^\."'
|
||||||
alias lr='ls -lRh' # recursive ls
|
else
|
||||||
alias lt='ls -ltrh' # sort by date
|
alias la='ls -Alh' # show hidden files
|
||||||
alias lm='ls -alh |more' # pipe through 'more'
|
alias ls='ls -aFh --color=always' # add colors and file type extensions
|
||||||
alias lw='ls -xAh' # wide listing format
|
alias lx='ls -lXBh' # sort by extension
|
||||||
alias ll='ls -Fls' # long listing format
|
alias lk='ls -lSrh' # sort by size
|
||||||
alias labc='ls -lap' #alphabetical sort
|
alias lc='ls -lcrh' # sort by change time
|
||||||
alias lf="ls -l | grep -E -v '^d'" # files only
|
alias lu='ls -lurh' # sort by access time
|
||||||
alias ldir="ls -l | grep -E '^d'" # directories only
|
alias lr='ls -lRh' # recursive ls
|
||||||
|
alias lt='ls -ltrh' # sort by date
|
||||||
|
alias lm='ls -alh |more' # pipe through 'more'
|
||||||
|
alias lw='ls -xAh' # wide listing format
|
||||||
|
alias ll='ls -Fls' # long listing format
|
||||||
|
alias labc='ls -lap' #alphabetical sort
|
||||||
|
alias lf="ls -l | grep -E -v '^d'" # files only
|
||||||
|
alias ldir="ls -l | grep -E '^d'" # directories only
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# alias chmod commands
|
# alias chmod commands
|
||||||
alias mx='chmod a+x'
|
alias mx='chmod a+x'
|
||||||
|
|
@ -135,8 +154,10 @@ alias 777='chmod -R 777'
|
||||||
alias hs="history | fzf "
|
alias hs="history | fzf "
|
||||||
|
|
||||||
# Search running processes
|
# Search running processes
|
||||||
alias p="ps aux | grep "
|
alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e"
|
||||||
alias topcpu="/bin/ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10"
|
alias topcpu="/bin/ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10"
|
||||||
|
alias psmem="ps auxf | sort -nf -k 4"
|
||||||
|
alias pscpu="ps auxf | sort -nf -k 3"
|
||||||
|
|
||||||
# Search files in the current folder
|
# Search files in the current folder
|
||||||
alias f="find . | grep "
|
alias f="find . | grep "
|
||||||
|
|
@ -159,8 +180,9 @@ alias rebootforce='sudo shutdown -r -n now'
|
||||||
alias diskspace="du -S | sort -n -r |more"
|
alias diskspace="du -S | sort -n -r |more"
|
||||||
alias folders='du -h --max-depth=1'
|
alias folders='du -h --max-depth=1'
|
||||||
alias folderssort='find . -maxdepth 1 -type d -print0 | xargs -0 du -sk | sort -rn'
|
alias folderssort='find . -maxdepth 1 -type d -print0 | xargs -0 du -sk | sort -rn'
|
||||||
alias tree='tree -CAhF --dirsfirst'
|
if type -fP tree &> /dev/null; then
|
||||||
alias treed='tree -CAFd'
|
alias tree='tree -ahC --dirsfirst -I .git'
|
||||||
|
fi
|
||||||
alias mountedinfo='df -hT'
|
alias mountedinfo='df -hT'
|
||||||
|
|
||||||
# Alias's for archives
|
# Alias's for archives
|
||||||
|
|
@ -445,7 +467,10 @@ if [[ "$(distribution)" = "arch" ]]; then
|
||||||
pacreps='pacman -Ss' \
|
pacreps='pacman -Ss' \
|
||||||
pacrmorphans='sudo pacman -Rs $(pacman -Qtdq)' \
|
pacrmorphans='sudo pacman -Rs $(pacman -Qtdq)' \
|
||||||
pacupd='sudo pacman -Sy' \
|
pacupd='sudo pacman -Sy' \
|
||||||
pacupg='sudo pacman -Syu'
|
pacupg='sudo pacman -Syu' \
|
||||||
|
rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl" \
|
||||||
|
big="expac -H M '%m\t%n' | sort -h | nl" \
|
||||||
|
gitpkg="pacman -Q | grep -i "\-git" | wc -l"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# GitHub Titus Additions
|
# GitHub Titus Additions
|
||||||
|
|
|
||||||
153
hypr/.config/rofi/clipboard.rasi
Normal file
153
hypr/.config/rofi/clipboard.rasi
Normal file
|
|
@ -0,0 +1,153 @@
|
||||||
|
/*****----- Configuration -----*****/
|
||||||
|
configuration {
|
||||||
|
modi: "dmenu";
|
||||||
|
show-icons: true;
|
||||||
|
display-dmenu: "Powermenu :";
|
||||||
|
window-format: "{w} · {c} · {t}";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Global Properties -----*****/
|
||||||
|
@import "colors.rasi"
|
||||||
|
|
||||||
|
* {
|
||||||
|
border-colour: var(selected);
|
||||||
|
background-colour: var(background-transparent);
|
||||||
|
foreground-colour: var(foreground);
|
||||||
|
alternate-background: var(selected);
|
||||||
|
alternate-foreground: var(background);
|
||||||
|
|
||||||
|
font: "JetBrains Mono Nerd Font 10";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Main Window -----*****/
|
||||||
|
window {
|
||||||
|
/* properties for window widget */
|
||||||
|
transparency: "real";
|
||||||
|
location: center;
|
||||||
|
|
||||||
|
fullscreen: true;
|
||||||
|
width: 1366px;
|
||||||
|
height: 768px;
|
||||||
|
x-offset: 0px;
|
||||||
|
y-offset: 0px;
|
||||||
|
|
||||||
|
/* properties for all widgets */
|
||||||
|
enabled: true;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 50px;
|
||||||
|
location: center;
|
||||||
|
border: 0px solid;
|
||||||
|
border-radius: 0px;
|
||||||
|
border-color: @border-colour;
|
||||||
|
cursor: "default";
|
||||||
|
background-color: @background-colour;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Main Box -----*****/
|
||||||
|
mainbox {
|
||||||
|
enabled: true;
|
||||||
|
spacing: 10px;
|
||||||
|
margin: 0px;
|
||||||
|
border: 0px solid;
|
||||||
|
border-radius: 0px 0px 0px 0px;
|
||||||
|
border-color: @border-colour;
|
||||||
|
background-color: transparent;
|
||||||
|
children: [ "inputbar", "listview" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Inputbar -----*****/
|
||||||
|
inputbar {
|
||||||
|
enabled: true;
|
||||||
|
spacing: 10px;
|
||||||
|
location: center;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
border: 0px;
|
||||||
|
border-radius: 0px;
|
||||||
|
border-color: @border-colour;
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: @foreground-colour;
|
||||||
|
children: [ "prompt", "entry" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt {
|
||||||
|
enabled: true;
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: inherit;
|
||||||
|
}
|
||||||
|
textbox-prompt-colon {
|
||||||
|
enabled: true;
|
||||||
|
expand: false;
|
||||||
|
str: "::";
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: inherit;
|
||||||
|
}
|
||||||
|
entry {
|
||||||
|
enabled: true;
|
||||||
|
background-color: inherit;
|
||||||
|
text-color: inherit;
|
||||||
|
cursor: text;
|
||||||
|
placeholder: "";
|
||||||
|
placeholder-color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Listview -----*****/
|
||||||
|
listview {
|
||||||
|
enabled: true;
|
||||||
|
columns: 1;
|
||||||
|
lines: 128;
|
||||||
|
cycle: false;
|
||||||
|
dynamic: false;
|
||||||
|
scrollbar: false;
|
||||||
|
layout: vertical;
|
||||||
|
reverse: false;
|
||||||
|
height: 800px;
|
||||||
|
|
||||||
|
spacing: 5px;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
border: 0px solid;
|
||||||
|
border-radius: 0px;
|
||||||
|
border-color: @border-colour;
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: @foreground-colour;
|
||||||
|
cursor: "default";
|
||||||
|
}
|
||||||
|
scrollbar {
|
||||||
|
handle-width: 5px ;
|
||||||
|
handle-color: @handle-color;
|
||||||
|
border-radius: 0px;
|
||||||
|
background-color: @alternate-background;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****----- Elements -----*****/
|
||||||
|
element {
|
||||||
|
enabled: true;
|
||||||
|
spacing: 5px;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 5px;
|
||||||
|
border: 0px solid;
|
||||||
|
border-radius: 8px;
|
||||||
|
border-color: @border-colour;
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: @foreground-colour;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
element selected.normal {
|
||||||
|
background-color: var(alternate-background);
|
||||||
|
text-color: var(foreground-alt);
|
||||||
|
}
|
||||||
|
element-icon {
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: inherit;
|
||||||
|
size: 10px;
|
||||||
|
cursor: inherit;
|
||||||
|
}
|
||||||
|
element-text {
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: inherit;
|
||||||
|
highlight: inherit;
|
||||||
|
cursor: inherit;
|
||||||
|
vertical-align: 0.5;
|
||||||
|
horizontal-align: 0.0;
|
||||||
|
}
|
||||||
7
hypr/.config/rofi/clipboard.sh
Executable file
7
hypr/.config/rofi/clipboard.sh
Executable file
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
theme="$HOME/.config/rofi/clipboard.rasi"
|
||||||
|
|
||||||
|
cliphist list | rofi -dmenu -i -p "Clipboard:" \
|
||||||
|
-theme ${theme} \
|
||||||
|
| cliphist decode | wl-copy
|
||||||
106
hypr/.config/rofi/wallSelect.rasi
Normal file
106
hypr/.config/rofi/wallSelect.rasi
Normal file
|
|
@ -0,0 +1,106 @@
|
||||||
|
// # z0mbi3 - https://github.com/gh0stzk/dotfiles
|
||||||
|
|
||||||
|
configuration {
|
||||||
|
modi: "drun";
|
||||||
|
show-icons: true;
|
||||||
|
drun-display-format: "{name}";
|
||||||
|
font: "JetBrainsMono NF Bold 11";
|
||||||
|
|
||||||
|
//hover-select: true;
|
||||||
|
//me-select-entry: "";
|
||||||
|
//me-accept-entry: "MousePrimary";
|
||||||
|
}
|
||||||
|
|
||||||
|
//----- Global Properties -----//
|
||||||
|
|
||||||
|
* {
|
||||||
|
main-bg: #282828E6;
|
||||||
|
main-fg: #fbf1c7;
|
||||||
|
select-bg: #d79921;
|
||||||
|
select-fg: #282828;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----- Main Window -----//
|
||||||
|
|
||||||
|
window {
|
||||||
|
enabled: true;
|
||||||
|
fullscreen: false;
|
||||||
|
width: 100%;
|
||||||
|
transparency: "real";
|
||||||
|
cursor: "default";
|
||||||
|
spacing: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
border: 0px;
|
||||||
|
border-radius: 0px;
|
||||||
|
border-color: transparent;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----- Main Box -----//
|
||||||
|
|
||||||
|
mainbox {
|
||||||
|
enabled: true;
|
||||||
|
children: [ "listview" ];
|
||||||
|
background-color: @main-bg;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----- Listview -----//
|
||||||
|
|
||||||
|
listview {
|
||||||
|
enabled: true;
|
||||||
|
columns: 6;
|
||||||
|
lines: 1;
|
||||||
|
spacing: 50px;
|
||||||
|
padding: 20px 30px;
|
||||||
|
cycle: true;
|
||||||
|
dynamic: false;
|
||||||
|
scrollbar: false;
|
||||||
|
layout: vertical;
|
||||||
|
reverse: true;
|
||||||
|
fixed-height: true;
|
||||||
|
fixed-columns: true;
|
||||||
|
cursor: "default";
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: @main-fg;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----- Elements -----//
|
||||||
|
|
||||||
|
element {
|
||||||
|
enabled: true;
|
||||||
|
orientation: horizontal;
|
||||||
|
spacing: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
border-radius: 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: @main-fg;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media(max-aspect-ratio: 1.8) {
|
||||||
|
element {
|
||||||
|
orientation: vertical;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
element selected.normal {
|
||||||
|
background-color: @select-bg;
|
||||||
|
text-color: @select-fg;
|
||||||
|
}
|
||||||
|
|
||||||
|
element-icon {
|
||||||
|
size: 33%;
|
||||||
|
cursor: inherit;
|
||||||
|
border-radius: 0px;
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
element-text {
|
||||||
|
vertical-align: 0.5;
|
||||||
|
horizontal-align: 0.5;
|
||||||
|
padding: 20px;
|
||||||
|
cursor: inherit;
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: inherit;
|
||||||
|
}
|
||||||
58
hypr/.config/rofi/wallpaper-launcher.sh
Executable file
58
hypr/.config/rofi/wallpaper-launcher.sh
Executable file
|
|
@ -0,0 +1,58 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# ██╗ ██╗ █████╗ ██╗ ██╗ ██████╗ █████╗ ██████╗ ███████╗██████╗
|
||||||
|
# ██║ ██║██╔══██╗██║ ██║ ██╔══██╗██╔══██╗██╔══██╗██╔════╝██╔══██╗
|
||||||
|
# ██║ █╗ ██║███████║██║ ██║ ██████╔╝███████║██████╔╝█████╗ ██████╔╝
|
||||||
|
# ██║███╗██║██╔══██║██║ ██║ ██╔═══╝ ██╔══██║██╔═══╝ ██╔══╝ ██╔══██╗
|
||||||
|
# ╚███╔███╔╝██║ ██║███████╗███████╗██║ ██║ ██║██║ ███████╗██║ ██║
|
||||||
|
# ╚══╝╚══╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝ ╚═╝╚═╝ ╚══════╝╚═╝ ╚═╝
|
||||||
|
#
|
||||||
|
# ██╗ █████╗ ██╗ ██╗███╗ ██╗ ██████╗██╗ ██╗███████╗██████╗
|
||||||
|
# ██║ ██╔══██╗██║ ██║████╗ ██║██╔════╝██║ ██║██╔════╝██╔══██╗
|
||||||
|
# ██║ ███████║██║ ██║██╔██╗ ██║██║ ███████║█████╗ ██████╔╝
|
||||||
|
# ██║ ██╔══██║██║ ██║██║╚██╗██║██║ ██╔══██║██╔══╝ ██╔══██╗
|
||||||
|
# ███████╗██║ ██║╚██████╔╝██║ ╚████║╚██████╗██║ ██║███████╗██║ ██║
|
||||||
|
# ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
||||||
|
# originally written by: gh0stzk - https://github.com/gh0stzk/dotfiles
|
||||||
|
# rewritten for hyprland by : develcooking - https://github.com/develcooking/hyprland-dotfiles
|
||||||
|
# Info - This script runs the rofi launcher, to select
|
||||||
|
# the wallpapers included in the theme you are in.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Set some variables
|
||||||
|
wall_dir="${HOME}/Pictures/wallpapers/"
|
||||||
|
cacheDir="${HOME}/.cache/images/${theme}"
|
||||||
|
rofi_command="rofi -x11 -dmenu -theme ${HOME}/.config/rofi/wallSelect.rasi -theme-str ${rofi_override}"
|
||||||
|
|
||||||
|
# Create cache dir if not exists
|
||||||
|
if [ ! -d "${cacheDir}" ] ; then
|
||||||
|
mkdir -p "${cacheDir}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
physical_monitor_size=24
|
||||||
|
monitor_res=$(hyprctl monitors |grep -A2 Monitor |head -n 2 |awk '{print $1}' | grep -oE '^[0-9]+')
|
||||||
|
dotsperinch=$(echo "scale=2; $monitor_res / $physical_monitor_size" | bc | xargs printf "%.0f")
|
||||||
|
monitor_res=$(( $monitor_res * $physical_monitor_size / $dotsperinch ))
|
||||||
|
|
||||||
|
rofi_override="element-icon{size:${monitor_res}px;border-radius:0px;}"
|
||||||
|
|
||||||
|
# Convert images in directory and save to cache dir
|
||||||
|
for imagen in "$wall_dir"/*.{jpg,jpeg,png,webp}; do
|
||||||
|
if [ -f "$imagen" ]; then
|
||||||
|
nombre_archivo=$(basename "$imagen")
|
||||||
|
if [ ! -f "${cacheDir}/${nombre_archivo}" ] ; then
|
||||||
|
imagick -strip "$imagen" -thumbnail 500x500^ -gravity center -extent 500x500 "${cacheDir}/${nombre_archivo}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Select a picture with rofi
|
||||||
|
wall_selection=$(find "${wall_dir}" -maxdepth 1 -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" -o -iname "*.webp" \) -exec basename {} \; | sort | while read -r A ; do echo -en "$A\x00icon\x1f""${cacheDir}"/"$A\n" ; done | $rofi_command)
|
||||||
|
|
||||||
|
# Set the wallpaper
|
||||||
|
[[ -n "$wall_selection" ]] || exit 1
|
||||||
|
swww img ${wall_dir}/${wall_selection}
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
Loading…
Add table
Reference in a new issue