![]() ![]() Some of these we only use once, but saving them to a variable helps keep the code shorter and more readable. So what is this doing? Let’s break it down.įirst off, I save variables for various system paths. ![]() " `n $new_wallpaper is already set as our wallpaper" The path to this collection of wallpapers (hopefully on a server!) is what we’ll give to the following function: Setting the wallpaperįunction set_wallpaper( $new_wallpaper_path) Then place those in a folder called ‘4k’ alongside your 1080p img0.jpg. To ensure your custom wallpaper displays well on all monitors, you should generate versions of it at these named resolutions: Instead an image most closely matching the resolution of the monitor in ‘C:\Windows\Web\4k\Wallpaper\Windows’ will be used. If the monitor is a non-standard (1080p) resolution, then good old img0.jpg is not the default wallpaper. I say path because Windows 10 is tricky with the default wallpaper. Using these variables we determine exactly which wallpaper path to use. In my own collection machines have names containing their department and location info, and we save all that data in environment variables. $screen_ratio = $screen_width / $screen_height return $screen_ratio -ge 2.2 $screen_info = $vid_con.VideoModeDescription -split "+" $screen_width, $screen_height = $screen_info | Select-Object -First 2 $vid_con = ( Get-WmiObject -Class Win32_VideoController) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |