Score:0

Commands in custom shortcuts

cn flag

When I went from Ubuntu 20.04 to 22.04, I lost the ability to do screen shots the way I'm used to. I want a keyboard combo that lets me select a section of screen and have it saved as a file. So I created a custom shortcut. But since it's a screen shot, I want each file to have a unique name. From the terminal, I can

gnome-screenshot -a -f Pictures/Screenshots/"Screenshot from $(date "+%Y-%m-%d %H-%M-%S").png"

However, if I do that in the custom shortcut, the 'date' command is never executed.

How do I wind up with a file name that's unique>

Score:3
cn flag

Shell expansions and variable expansions do not work when launching a command from a hotkey. Instead run your command as follows, i.e., explicitly starting a shell to run it in:

sh -c 'gnome-screenshot -a -f Pictures/Screenshots/"Screenshot from $(date "+%Y-%m-%d %H-%M-%S").png'
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.