18
you are viewing a single comment's thread
view the rest of the comments
[-] shalafi@lemmy.world 5 points 10 months ago* (last edited 10 months ago)

My PC is our entertainment system. Got sick of all the clicking to arrange the TVs, taskbar, etc. Whipped up a PowerShell script that does it all!

Got out my old .22 rifle and did it up right. First gun I ever bought and over the years I did all sorts of ridiculous work on it, made it "tacticool". Also, let it rust a bit and generally abused it. Dawned on me that it was really a diamond in the rough, crazy reliable and fun. Took it apart, oiled and removed rust, put my nice pellet gun scope on it, all that. Can't wait to try it at camp tomorrow!

Code:

Do {
    CLS
    $Mode = Read-Host "`r`n(W)ork, (P)lay, (M)ovie?"
    } until ( 'w', 'p', 'm' -contains $Mode) 

if ($Mode -eq "w"){
# Work Mode
displayswitch.exe /extend
# Display taskbar and restart Explorer
$p='HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3';$v=(Get-ItemProperty -Path $p).Settings;$v[8]=2;&Set-ItemProperty -Path $p -Name Settings -Value $v;&Stop-Process -f -ProcessName explorer
    }

if ($Mode -eq "p"){
# Play Mode
displayswitch.exe /external
# Display taskbar and restart Explorer
$p='HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3';$v=(Get-ItemProperty -Path $p).Settings;$v[8]=2;&Set-ItemProperty -Path $p -Name Settings -Value $v;&Stop-Process -f -ProcessName explorer
    }

if ($Mode -eq "m"){
# Movie Mode
displayswitch.exe /internal
#Hide taskbar and restart Explorer
$p='HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3';$v=(Get-ItemProperty -Path $p).Settings;$v[8]=3;&Set-ItemProperty -Path $p -Name Settings -Value $v;&Stop-Process -f -ProcessName explorer
    }

[-] bionicjoey@lemmy.ca 6 points 10 months ago

Your comment confused me and I thought you somehow kitbashed your gun into a TV remote

this post was submitted on 06 Aug 2024
18 points (100.0% liked)

[Migrated, see pinned post] Casual Conversation

3368 readers
3 users here now

We moved to !casualconversation@piefed.social please look for https://lemm.ee/post/66060114 in your instance search bar

Share a story, ask a question, or start a conversation about (almost) anything you desire. Maybe you'll make some friends in the process.


RULES

  1. Be respectful: no harassment, hate speech, bigotry, and/or trolling.
  2. Encourage conversation in your OP. This means including heavily implicative subject matter when you can and also engaging in your thread when possible.
  3. Avoid controversial topics (e.g. politics or societal debates).
  4. Stay calm: Don’t post angry or to vent or complain. We are a place where everyone can forget about their everyday or not so everyday worries for a moment. Venting, complaining, or posting from a place of anger or resentment doesn't fit the atmosphere we try to foster at all. Feel free to post those on !goodoffmychest@lemmy.world
  5. Keep it clean and SFW
  6. No solicitation such as ads, promotional content, spam, surveys etc.

Casual conversation communities:

Related discussion-focused communities

founded 2 years ago
MODERATORS