Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use better logic to check for current deskop #6

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,42 @@
"type": "shell",
"command": "make",
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},{
"group": "build"
},
{
"label": "Make Build Directory",
"problemMatcher" : [],
"problemMatcher": [],
"command": "mkdir",
"args" : [
"args": [
"-p",
"${workspaceFolder}/build"
]
},{
},
{
"label": "Fetch Upstream Tarball",
"group": "build",
"problemMatcher" : [],
"problemMatcher": [],
"command": "uscan",
"args" : [
"args": [
"--force-download",
"--destdir",
"${workspaceFolder}/build"
],
"dependsOn": "Make Build Directory"
},{
},
{
"label": "Build Debian Package",
"group": "build",
"problemMatcher": [],
"command": "gbp",
"args" : [
"args": [
"buildpackage",
"--git-debian-branch=main",
"--git-ignore-branch",
"-uc",
"-us",
"--git-tarball-dir=${workspaceFolder}/build",
"--git-export-dir=${workspaceFolder}/build"
],
]
}
]
}
}
34 changes: 19 additions & 15 deletions bin/set-wallpaper
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,25 @@ GSETTINGS=/usr/bin/gsettings
XFCONF=/usr/bin/xfconf-query

# Disable the built in screensaver and show wallpaper
if command -v ${GSETTINGS} &> /dev/null
then
${GSETTINGS} set org.gnome.desktop.background picture-uri \
'file:///usr/share/nsls2/wallpapers/wallpaper.jpg'
${GSETTINGS} set org.cinnamon.desktop.background picture-uri \
'file:///usr/share/nsls2/wallpapers/wallpaper.jpg'
if [ echo "${XDG_CURRENT_DESKTOP}" | grep GNOME ]; then
if [ command -v ${GSETTINGS} &> /dev/null ]; then
echo "Setting Wallpaper for GNOME"
${GSETTINGS} set org.gnome.desktop.background picture-uri \
'file:///usr/share/nsls2/wallpapers/wallpaper.jpg'
${GSETTINGS} set org.cinnamon.desktop.background picture-uri \
'file:///usr/share/nsls2/wallpapers/wallpaper.jpg'
fi
fi

if command -v ${XFCONF} &> /dev/null
then
for item in $(${XFCONF} --channel xfce4-desktop --list | grep 'last-image\|image-path')
do
echo ${item}
${XFCONF} --channel xfce4-desktop \
--property ${item} \
--set /usr/share/nsls2/wallpapers/wallpaper.jpg
done
if [ echo "${XDG_CURRENT_DESKTOP}" | grep XFCE ]; then
if [ command -v ${XFCONF} &> /dev/null ]; then
echo "Setting Wallpaper for XFCE"
for item in $(${XFCONF} --channel xfce4-desktop --list | grep 'last-image\|image-path')
do
echo ${item}
${XFCONF} --channel xfce4-desktop \
--property ${item} \
--set /usr/share/nsls2/wallpapers/wallpaper.jpg
done
fi
fi