Programmatically create shortcut keys combo for desktop "shortcut"
Tag : chash , By : acolomba
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , You can use the IShellLink interface, HotKey method to define a hotkey.
|
Java JNLP Desktop Shortcut and Icon
Tag : java , By : mobi phil
Date : March 29 2020, 07:55 AM
Hope this helps To open an associated file with a Java Web Start launch, use the second element of the parameter array passed to main(String[] args). The first element will be "-open" when you launch the application by double-clicking a file and args[1] stores the file path of the file we want to open on startup. This feature really makes the Java app feel like a native desktop application. I couldn't find this in the JNLP documentation. public static void main(String[] args) {
GUI win = new GUI(null);
if(args.length==2) {
win = new GUI(null);
StringBuilder params = new StringBuilder();
for(String s : args) {
params.append(s);
params.append("\n");
}
JOptionPane.showMessageDialog(null, params);
try {
FileFunction.loadList(new FileInputStream(new File(args[1])));
}
catch(IOException ioe) {
FileFunction.showFileError(ioe);
}
}
|
How does Windows force "minimized" state from a desktop shortcut?
Tag : chash , By : Aki Björklund
Date : March 29 2020, 07:55 AM
Hope that helps Windows is starting the process with parameters to minimize the main window. In C#, you can do the same by setting WindowStyle (MSDN) at ProcessStartInfo for use in Process.Start().
|
Ubuntu 19.04, Make custom shortcut like SUPER + NUM (favorite app create | show) shortcut in same desktop
Date : March 29 2020, 07:55 AM
it helps some times Create show or hide any window that I want in same desktop instead of default SUPER + NUM functionality. , Removing default shortcuts: Via Terminal Command gsettings set org.gnome.shell.extensions.dash-to-dock hot-keys false
gsettings set org.gnome.shell.keybindings switch-to-application-1 []
gsettings set org.gnome.shell.keybindings switch-to-application-2 []
gsettings set org.gnome.shell.keybindings switch-to-application-3 []
gsettings set org.gnome.shell.keybindings switch-to-application-4 []
gsettings set org.gnome.shell.keybindings switch-to-application-5 []
gsettings set org.gnome.shell.keybindings switch-to-application-6 []
gsettings set org.gnome.shell.keybindings switch-to-application-7 []
gsettings set org.gnome.shell.keybindings switch-to-application-8 []
gsettings set org.gnome.shell.keybindings switch-to-application-9 []
# !/bin/bash
# Window manager script
# Show, hide or create window in the current workspace with It's WM_CLASS
# $1, WM_CLASS
# $2, Optional command
# Copyright © ~ Yunus Emre Ak
# Suppose that these script written in '~/Tools/ywm.sh'
# # Need permission to work as shurtcut
# chmod u+x '~/Tools/ywm.sh'
# Getting windows id if exist
if [ ${#1} -gt 0 ]; then
# Work only in the current workspace
WID=$(xdotool search --desktop $(xdotool get_desktop) --classname $1)
if [ ${#WID} -gt 0 ]; then
# If opened more, find focused one and hide
if [[ "$WID" =~ "$(xdotool getwindowfocus)" ]]; then
xdotool windowminimize $(xdotool getwindowfocus)
else
# Open first windows if not, then try second
let "WID1 = $(echo $WID | awk '{print $1}')"
let "WID2 = $(echo $WID | awk '{print $2}')"
xdotool windowactivate $WID1 || xdotool windowactivate $WID2
fi
else
# If optional exec not exist, execute WM_CLASS
if [ ${#2} -gt 0 ]; then
$2
else
$1
fi
fi
else
echo "Need to get parameter which are 'WM_CLASS' and optional Exec"
echo "Ex: 'bash ywm.sh chrome google-chrome'"
fi
# Shortcuts for favorite app
# bash -c "bash ~/Tools/ywm.sh gnome-terminal" # SUPER + 1
# bash -c "bash ~/Tools/ywm.sh google-chrome" # SUPER + 2
# bash -c "bash ~/Tools/ywm.sh code" # SUPER + 3
# bash -c "bash ~/Tools/ywm.sh nautilus" # SUPER + 4
# bash -c "bash ~/Tools/ywm.sh gedit" # SUPER + 4
|
How to create a desktop shortcut (link), but with own shortcut file extension (e.g. .appfolder) instead of .lnk programm
Tag : chash , By : Sandip
Date : March 29 2020, 07:55 AM
wish help you to fix your issue I solved it: My registration of .appfolder wasn't completely correct to work exactly like .lnk shortcut file. Follow this instruction. After that both methods in C# mentioned above work.
|