Compare commits
No commits in common. "09f26845a0b55c93b09417b6d181a715e2f6a3e4" and "7130c071005e45988dd19614e65329ce98d9d65d" have entirely different histories.
09f26845a0
...
7130c07100
2 changed files with 3 additions and 28 deletions
19
README.md
19
README.md
|
@ -2,22 +2,3 @@
|
|||
|
||||
Convenience script for uploading files to a server via ssh
|
||||
|
||||
### Hmmm
|
||||
|
||||
Apparently GNOME 42 screenshot utility is called via dbus
|
||||
|
||||
```
|
||||
gdbus call
|
||||
--session
|
||||
--dest org.gnome.Shell
|
||||
--object-path /org/gnome/Shell
|
||||
--method org.gnome.Shell.Eval 'Main.screenshotUI.open()'
|
||||
````
|
||||
but it cannot be called unless `global.context.unsafe_mode = false`
|
||||
is set in gnome shell...which is unideal.
|
||||
|
||||
Ideally there would be a way to launch a desired screenshot (or other generative)
|
||||
before running sshare, and for everything that isn't GNOME 42 screenshot it
|
||||
wouldn't be too hard. But unfortunately I want to use GNOME 42 screenshot ;-;
|
||||
What to do...
|
||||
|
||||
|
|
12
sshare
12
sshare
|
@ -3,24 +3,18 @@
|
|||
import getpass
|
||||
import importlib.util
|
||||
import os
|
||||
import pyclip
|
||||
import time
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
def main():
|
||||
config = Config()
|
||||
|
||||
id = time.time_ns()
|
||||
file_name = f"{id}.png"
|
||||
|
||||
pyclip.copy(f"https://{config.ssh_target}/sshare/{file_name}")
|
||||
|
||||
subprocess.run([
|
||||
"scp",
|
||||
"-r",
|
||||
f"-P {config.ssh_port}",
|
||||
f"/home/gnarwhal/Pictures/Screenshots/Screenshot from 2024-07-31 06-34-57.png",
|
||||
f"{config.ssh_user}@{config.ssh_target}:{config.ssh_dir}/{file_name}",
|
||||
f"{config.ssh_user}@{config.ssh_domain}:{config.ssh_dir}",
|
||||
])
|
||||
|
||||
|
||||
|
@ -28,7 +22,7 @@ class Config:
|
|||
def __init__(self):
|
||||
self.ssh_port = 2222
|
||||
self.ssh_user = getpass.getuser()
|
||||
self.ssh_target = "monodon.me"
|
||||
self.ssh_domain = "monodon.me"
|
||||
self.ssh_dir = "~/sshare/"
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue