aboutsummaryrefslogtreecommitdiff
path: root/sxhkd
diff options
context:
space:
mode:
Diffstat (limited to 'sxhkd')
-rw-r--r--sxhkd/sxhkdrc.bspwm54
-rw-r--r--sxhkd/terminal_bspwm.py46
2 files changed, 0 insertions, 100 deletions
diff --git a/sxhkd/sxhkdrc.bspwm b/sxhkd/sxhkdrc.bspwm
deleted file mode 100644
index aaeb018..0000000
--- a/sxhkd/sxhkdrc.bspwm
+++ /dev/null
@@ -1,54 +0,0 @@
-F12
- python ~/.config/sxhkd/terminal_bspwm.py
-
-mod4 + Return
- alacritty
-mod4 + space
- rofi -show drun
-#mod4 + backslash
-# i3-msg "split h"
-#mod4 + minus
-# i3-msg "split v"
-#mod4 + Tab
-# i3-msg "layout toggle split"
-#mod4 + p
-# i3-msg "focus parent"
-#mod4 + r
-# i3-msg "mode resize"
-
-
-mod4 + {1, 2, 3, 4, a, s, d, f}
- bspc desktop -f {1, 2, 3, 4, a, s, d, f}
-
-mod4 + shift + {1, 2, 3, 4, a, s, d, f}
- bspc node -d {1, 2, 3, 4, a, s, d, f}
-
-
-mod4 + shift + r
- bspc wm -r
-mod4 + shift + e
- bspc quit
-mod4 + shift + q
- bspc node -c
-mod4 + shift + space
- bspc node -t ~floating
-mod4 + shift + Return
- bspc node -t ~fullscreen
-
-mod4 + {h, Left}
- bspc node -f west
-mod4 + {j, Down}
- bspc node -f south
-mod4 + {k, Up}
- bspc node -f north
-mod4 + {l, Right}
- bspc node -f east
-
-mod4 + shift + {h, Left}
- bspc node -s west
-mod4 + shift + {j, Down}
- bspc node -s west
-mod4 + shift + {k, Up}
- bspc node -s west
-mod4 + shift + {l, Right}
- bspc node -s west
diff --git a/sxhkd/terminal_bspwm.py b/sxhkd/terminal_bspwm.py
deleted file mode 100644
index eee7875..0000000
--- a/sxhkd/terminal_bspwm.py
+++ /dev/null
@@ -1,46 +0,0 @@
-import subprocess
-
-
-desktop_name = 'term'
-instance_name = 'tmux_term'
-
-
-def is_term_running():
- p = subprocess.run(['xdo', 'id', '-n', instance_name])
- return p.returncode == 0
-
-
-def run_term():
- subprocess.Popen(['alacritty', '--class', instance_name,
- '-e', 'tmux', 'new-session', '-A', '-s', 'default'])
-
-
-def get_focused_desktop():
- p = subprocess.run(['bspc', 'query', '-D', '--names', '-d', 'focused'],
- capture_output=True,
- check=True)
- return p.stdout.decode('utf-8').strip()
-
-
-def hide_term():
- subprocess.run(['bspc', 'desktop', '-f', 'last.local'], check=True)
-
-
-def show_term():
- subprocess.run(['bspc', 'desktop', 'term', '-m', 'focused'])
- subprocess.run(['bspc', 'desktop', '-f', 'term'], check=True)
-
-
-def main():
- if not is_term_running():
- run_term()
-
- focused_desktop = get_focused_desktop()
- if focused_desktop == desktop_name:
- hide_term()
- else:
- show_term()
-
-
-if __name__ == '__main__':
- main()