dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

exec.py (530B)


      1 import os
      2 import subprocess
      3 
      4 from talon import Module
      5 
      6 mod = Module()
      7 
      8 
      9 @mod.action_class
     10 class Actions:
     11     def system_command(cmd: str):
     12         """execute a command on the system"""
     13         os.system(cmd)
     14 
     15     def system_command_nb(cmd: str):
     16         """execute a command on the system without blocking"""
     17         subprocess.Popen(cmd, shell=True)
     18 
     19     def system_path_command(cmd: str):
     20         """execute a command on the system with PATH set"""
     21         os.system('. ~/.dotfiles/shell/env; . ~/.dotfiles/shell/paths;' + cmd)