making awesome more awesome
This commit is contained in:
parent
0a7fe89729
commit
3643ba277e
361 changed files with 41182 additions and 26 deletions
35
awesome/binaries/profile-image
Executable file
35
awesome/binaries/profile-image
Executable file
|
@ -0,0 +1,35 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Depends: Mugshot
|
||||
# Written by manilarome
|
||||
|
||||
awesome_dir="${HOME}/.config/awesome/"
|
||||
user_profile_dir="${awesome_dir}/configuration/user-profile/"
|
||||
|
||||
accountsservice_user_icons="/var/lib/AccountsService/icons/${USER}"
|
||||
|
||||
# Check if user image exists
|
||||
if [ -f "${user_profile_dir}${USER}.png" ];
|
||||
then
|
||||
if [ -f "${accountsservice_user_icons}" ];
|
||||
then
|
||||
if ! cmp --silent "${user_profile_dir}${USER}.png" "${accountsservice_user_icons}";
|
||||
then
|
||||
cp "${accountsservice_user_icons}" "${user_profile_dir}${USER}.png"
|
||||
fi
|
||||
printf "${user_profile_dir}${USER}.png"
|
||||
else
|
||||
printf "${user_profile_dir}${USER}.png"
|
||||
fi
|
||||
exit;
|
||||
else
|
||||
if [ -f "${accountsservice_user_icons}" ];
|
||||
then
|
||||
cp "${accountsservice_user_icons}" "${user_profile_dir}${USER}.png"
|
||||
printf "${user_profile_dir}${USER}.png"
|
||||
exit;
|
||||
else
|
||||
printf "default"
|
||||
exit;
|
||||
fi
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue