Prevent Windows Terminal from displaying the current directory - windows-terminal

Is it possible to prevent Windows Terminal from displaying the current directory?
In this example PS C:\Users\User\Desktop\projects>.
If so, how?

yes, you can customise your prompt to what you want
see https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_prompts?view=powershell-7.1
also see https://github.com/Jaykul/PowerLine for more advance options

Related

Ubuntu 19.10 shell script only opens from /Desktop/ directory

I have a shell script file on my Desktop, and I have my preferences set so that when I double-click it, I'll be prompted for if I want to open it for edit, or run it. This works fine when double-clicking the file in my /home/[user]/Desktop folder, but when I double-click the file on my actual Desktop, it doesn't work.
Why is this and how can I run the file from my Desktop?
There can be a number of things that could be wrong in your environment. Could you provide us with the contents of the shell script and a screenshot of your preferences? Could you also expand on what doesn't work? What is the behavior you received after you attempted to run the shell script?
There are a lot of information that was left out that is preventing a large number of our community from helping you.
You can reference the FAQ on asking a question here: https://stackoverflow.com/help/how-to-ask
P.S. Welcome to the community!

Need unix command to disable the popup window

I am very much glad if anyone help me. am fairly new to Unix scripting side. I am trying to get into one url, but before that am getting one popup window(asking for customer details). So, i need to block/disable/ auto close the popup window. Please help me with the command
In Unix environment shell command plays differently. It can launch your browser but it can not set utility inside a browser application. You need to fix it inside your browser window by using tool option. Just search in google like how to block popup in yourbrowserName.

How to change default Terminal in Source Tree on windows

I am working on Windows 7 with Source Tree. Because I don't like the default cmd.exe I want to change it to Console2 such that Source Tree will open Command2 instead of Cmd as terminal.
It appears you can't do it, at least in any obvious way. There are a couple of solutions/workarounds that you can use here:
Pick a different favorite terminal. ConEmu is a wrapper for CMD.exe that will act as your default terminal if you tell it to [I thought Console2 could do this as well]. Also - forgive the editorial - ConEmu is way, way, better than Console2.
You can add a custom action in the menu. From the global options go to Custom Actions tab and add an action to Open in Terminal using the console you want. This isn't quite as cool as just hitting the terminal icon, but you can easily accomplish the same outcome.
Unfortunately, these are the best there are for now.
Note: Based upon the link that #sendmoreinfo posted, waiting for Atlassian to add this by default may be better way to go for your purposes. Only problem with that may be is that according to some the newest updates to Source tree are terrible, so I haven't updated as of yet.
Note 2: Though this won't do what you want, there is an Option in the settings under the Git Tab that allows you to Set Git Bash as default prompt. That may or may not get you closer to where you want to be.
You may add Windows Terminal as Custom Action. You may run custom action in context of selected file. Define a new custom action as shown below.

automatically filling directories while typing

I am writing an application in VC++(unmanaged) which is going to run in xp and above PC's. I need to add an functionality which will allow the user to see the directories being suggested as the user types the path in a stext box. This is similar to the behaviour of the run dialog in vista/7.
Thanks in advance,
John.
SHAutoComplete

Update desktop "show window contents while dragging" setting programatically

One of my programs seems to be changing the Display Properties > Appearance > Effects > Show window contents while dragging setting to off every few hours.
I'm not sure exactly which program, or when it happens. I have a number of programs that seem like likely culprits - wallpaper rotators, software for multiple monitors, multiple virual desktops and switching, and a few others.
I am just thinking to create a little batch script to run periodically and set the setting back to on.
Does anyone know how to do this in windows? I'm using xp pro sp3.
Thanks!
The best option is to do this programmatically using the supported API. i haven't tested this, but it should do the trick:
SystemParametersInfo(SPI_SETDRAGFULLWINDOWS,
TRUE,
NULL,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE)
You can use SPI_GETDRAGFULLWINDOWS to see if the the bit has been flipped to avoid unnecessarily triggering a WM_SETTINGCHANGE.
You can use RegMon to find the program that keeps changing your settings. Maybe that's a better start than hacking around it.
There is a simple and effective solution to this problem. In Notepad type the following lines :
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Desktop] "DragFullWindows"="1"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\DragFullWindows] "CheckedValue"=dword:00000001 "UncheckedValue"=dword:00000001
Save the file as "Show Window Contents.reg" Double clicking this file and restarting will cure the problem permanently. Post a message if you find this useful.
Aravind Banerjee
It seems the registry setting which controls that preference is HKCU\Control Panel\Desktop\DragFullWindows. You can read more about it here. However, trying it on my own computer does not register the change right away, so a batch script won't do it. You'll probably have to write a program to manipulate it using SystemParametersInfo(). You can pass it the SPI_SETDRAGFULLWINDOWS parameter. Here's a page explaining it more. Here's a page showing how to call it, albeit not for the same parameter.
I suspect it's kept in the registry - maybe [HKEY_CURRENT_USER\Control Panel\Desktop] - "DragFullWindows"?
It would be easy to flip the registry setting back to "1" every hour or so with a batch file.

Resources