]>
apps.delaporte.us Git - dotfiles.git/blob - invoke/setup-linux/tasks.py
3587e7e34df047e93770471df773ccfdec36b1ab
1 from invoke
import task
5 HOME
= os
.path
.expanduser('~')
9 c
.run('update-alternatives --config gnome-www-browser')
11 DOTFILES
=f
'{HOME}/dotfiles'
15 c
.run('sudo apt-get install vim -y')
16 c
.run(f
'ln -s {DOTFILES}/files/vimrc {HOME}/.vimrc')
17 c
.run(f
'ls -al {HOME} | grep vimrc')
18 c
.run(f
'mkdir -p {HOME}/.swp')
25 def install_librewolf(c
):
26 c
.run(f
'$HOME/dotfiles/install/librewolf.sh')
30 c
.run('sudo apt-get install git -y')
32 @task(install_librewolf
, setup_vi
, install_git
)
38 # c.run(f'ssh-keygen')
39 c
.run(f
'librewolf https://codeberg.org/user/settings/keys', asynchronous
=True)
40 c
.run(f
'cat $HOME/.ssh/*.pub')
44 c
.run(f
'sudo apt-get install screen -y')
45 c
.run(f
'$HOME/dotfiles/setup/screen.sh')
49 c
.run('sudo netstat -tunlp')
52 def link_to_home(c
, path
, add_dot
=False):
53 filename
= os
.path
.basename(path
)
55 filename
= f
'.{filename}'
57 if(os
.path
.exists(f
'{HOME}/{filename}')):
58 print(f
'WARNING: {HOME}/{filename} exists.')
60 c
.run(f
'ln -s {HOME}/dotfiles/{path} {HOME}/{filename}')
61 c
.run(f
'ls -la {HOME} | grep {filename}')
66 def link_all_for_invoke(c
):
67 link_to_home(c
, 'files/pc/tasks.py')
68 link_to_home(c
, 'files/pc/bashrc', add_dot
=True)