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

Cicle wallpaper and theme #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Davi-S
Copy link

@Davi-S Davi-S commented Dec 1, 2024

Pull Request

Description

This pull aims to append two new scripts that can cycle through all installed wallpapers and themes and set them for the desktop and SDDM Corners theme. This is useful for those who want to see all wallpapers and themes they have installed or just is undecided on which one to use; for the latter, the user can set a cronjob to run the script periodically, thus having a new look on its PC from time to time.

(SDDM wallpaper will match the one on the desktop)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (non-breaking change; modified files are limited to the documentations)
  • Technical debt (a code change that does not fix a bug or add a feature but makes something clearer for devs)
  • Other (provide details below)

Checklist

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My commit message follows the commit guidelines.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added a changelog entry.
  • I have added necessary comments/documentation to my code.
  • I have added tests to cover my changes.
  • I have tested my code locally and it works as expected.
  • All new and existing tests passed.

Add script to cycle through and set wallpaper and themes for desktop and login screen
The whole file was remade. Original output and use stays the same.
@kRHYME7
Copy link
Contributor

kRHYME7 commented Dec 2, 2024

Thank you for using snake_case! I need to rework some scripts to follow this convention. Will test it later. Looks like you hardcode some paths.

Comment on lines 1 to 2
#!/usr/bin/env sh

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use bash in your shebang if the script is not POSIX (sh) at all, so the linters won't scream.

Suggested change
#!/usr/bin/env sh
#!/usr/bin/env bash

Comment on lines 4 to 13
WALL_SCRIPT="$HOME/.local/share/bin/swwwallpaper.sh"
THEME_SCRIPT="$HOME/.local/share/bin/themeswitch.sh"
#SDDM_SCRIPT="$HOME/bin/setsddmwallpaper"
SDDM_SCRIPT="$HOME/.local/share/bin/setsddmwallpaper.sh"
LOG_FILE="$HOME/.local/share/cyclewallpaperandtheme.log"
WALL_CYCLE_FILE="$HOME/.local/share/cyclewallpapercount"
THEME_CYCLE_FILE="$HOME/.local/share/cyclethemecount"
THEME_CHANGE_FLAG_FILE="$HOME/.local/share/cyclethemeflag"
THEMES_DIR="$HOME/.config/hyde/themes"
HYDE_CONFIG="$HOME/.config/hyde/hyde.conf"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too hardcoded, I will expose a global variables later and will use it so global stuff can be source/imported. Also don't put logs in .local/share.

Add the path to the script itself and source the global control to update the variable paths
@Davi-S
Copy link
Author

Davi-S commented Dec 3, 2024

@kRHYME7, I made changes based on your comments. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants