sysetup 1.0.3__tar.gz → 1.0.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sysetup
3
- Version: 1.0.3
3
+ Version: 1.0.4
4
4
  Author-email: Quinten Roets <qdr2104@columbia.edu>
5
5
  License: MIT
6
6
  Project-URL: Source Code, https://github.com/quintenroets/sysetup
@@ -25,10 +25,11 @@ Requires-Dist: pytest; extra == "test"
25
25
 
26
26
  ## Setup steps
27
27
  1) Set display size (1920 x 1080)
28
- 2) Execute setup command: password will need to be given once again for gpg decryption
28
+ 2) Run
29
29
  ```shell
30
30
  curl https://raw.githubusercontent.com/quintenroets/sysetup/main/bin/setup | bash
31
31
  ```
32
+ password will need to be given once again for gpg decryption
32
33
  3) Change wallpaper
33
34
  4) Appearance
34
35
  * Select We10XOS cursors
@@ -6,10 +6,11 @@
6
6
 
7
7
  ## Setup steps
8
8
  1) Set display size (1920 x 1080)
9
- 2) Execute setup command: password will need to be given once again for gpg decryption
9
+ 2) Run
10
10
  ```shell
11
11
  curl https://raw.githubusercontent.com/quintenroets/sysetup/main/bin/setup | bash
12
12
  ```
13
+ password will need to be given once again for gpg decryption
13
14
  3) Change wallpaper
14
15
  4) Appearance
15
16
  * Select We10XOS cursors
@@ -1,7 +1,7 @@
1
1
 
2
2
  [project]
3
3
  name = "sysetup"
4
- version = "1.0.3"
4
+ version = "1.0.4"
5
5
  description = ""
6
6
  authors = [{name = "Quinten Roets", email = "qdr2104@columbia.edu"}]
7
7
  license = {text = "MIT"}
@@ -7,7 +7,7 @@ from .path import Path
7
7
 
8
8
 
9
9
  def setup():
10
- if "pw" not in os.environ:
10
+ if "SUDO_ASKPASS" not in os.environ:
11
11
  path = Path(".bash_profile")
12
12
  Backup(quiet=False, path=path).pull()
13
13
  cli.env.load()
@@ -0,0 +1,36 @@
1
+ import cli
2
+ from backup.backups import Backup
3
+ from backup.utils import Path as BackupPath
4
+
5
+ from .path import Path
6
+
7
+
8
+ def setup():
9
+ sub_check_path = BackupPath.script_assets
10
+ kwargs_mapper = {
11
+ "Script assets": dict(sub_check_path=sub_check_path),
12
+ "environment": dict(
13
+ filter_rules=["+ /etc/environment", "- *"], sync_remote=False
14
+ ),
15
+ }
16
+ for name, kwargs in kwargs_mapper.items():
17
+ print(f"Downloading {name}..")
18
+ Backup(quiet=False, confirm=False, **kwargs).pull()
19
+
20
+ move_crontab()
21
+ # trust_keyboard()
22
+ # seems to work without this command for now
23
+
24
+
25
+ def move_crontab():
26
+ src = Path.assets / "crontab" / "crontab"
27
+ cli.run("crontab -", input=src.text)
28
+
29
+
30
+ def trust_keyboard():
31
+ keyboard = cli.get("bluetoothctl devices | grep Keyboard", shell=True)
32
+ cli.run("bluetoothctl trust", keyboard, wait=False) # blocks if not found
33
+
34
+
35
+ if __name__ == "__main__":
36
+ setup()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sysetup
3
- Version: 1.0.3
3
+ Version: 1.0.4
4
4
  Author-email: Quinten Roets <qdr2104@columbia.edu>
5
5
  License: MIT
6
6
  Project-URL: Source Code, https://github.com/quintenroets/sysetup
@@ -25,10 +25,11 @@ Requires-Dist: pytest; extra == "test"
25
25
 
26
26
  ## Setup steps
27
27
  1) Set display size (1920 x 1080)
28
- 2) Execute setup command: password will need to be given once again for gpg decryption
28
+ 2) Run
29
29
  ```shell
30
30
  curl https://raw.githubusercontent.com/quintenroets/sysetup/main/bin/setup | bash
31
31
  ```
32
+ password will need to be given once again for gpg decryption
32
33
  3) Change wallpaper
33
34
  4) Appearance
34
35
  * Select We10XOS cursors
@@ -1,31 +0,0 @@
1
- import cli
2
- from backup.backups import backup
3
-
4
- from .path import Path
5
-
6
-
7
- def setup():
8
- kwargs_list = [
9
- dict(folder=Path.script_assets),
10
- dict(filter_rules=[f"- {Path.HOME}/**"]), # need /etc/environment
11
- ]
12
- for kwargs in kwargs_list:
13
- backup.Backup(quiet=False, confirm=False, **kwargs).pull()
14
-
15
- move_crontab()
16
- # trust_keyboard()
17
- # seems to work without this command for now
18
-
19
-
20
- def move_crontab():
21
- src = Path.assets / "crontab" / "crontab"
22
- cli.run("crontab -", input=src.text)
23
-
24
-
25
- def trust_keyboard():
26
- keyboard = cli.get("bluetoothctl devices | grep Keyboard", shell=True)
27
- cli.run("bluetoothctl trust", keyboard, wait=False) # blocks if not found
28
-
29
-
30
- if __name__ == "__main__":
31
- setup()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes