Use Rofi for workspace management, simplify config
This commit is contained in:
parent
2648a30f42
commit
0ff8f3030e
@ -34,11 +34,7 @@ bindsym $mod+Shift+e exec thunderbird
|
|||||||
bindsym Mod1+Mod4+s exec /home/adam/.bin/lock.sh suspend # suspend
|
bindsym Mod1+Mod4+s exec /home/adam/.bin/lock.sh suspend # suspend
|
||||||
bindsym Mod1+Control+l exec /home/adam/.bin/lock.sh lock # lock screen
|
bindsym Mod1+Control+l exec /home/adam/.bin/lock.sh lock # lock screen
|
||||||
bindsym Mod1+Control+Delete exec /home/adam/.bin/lock.sh pick # power menu
|
bindsym Mod1+Control+Delete exec /home/adam/.bin/lock.sh pick # power menu
|
||||||
|
|
||||||
set $rofiOptions -i -bg '#222222' -fg '#cccccc' -fg-active '#ffffff'
|
|
||||||
|
|
||||||
bindsym $mod+p exec --no-startup-id ~/.bin/killPanel.sh
|
bindsym $mod+p exec --no-startup-id ~/.bin/killPanel.sh
|
||||||
bindsym $mod+space exec --no-startup-id "rofi $rofiOptions -modi 'drun,run,workspace:/home/adam/.bin/i3_switch_workspace.sh,window' -sidebar-mode -show drun"
|
|
||||||
|
|
||||||
mode "launch" {
|
mode "launch" {
|
||||||
bindsym e exec /home/adam/.bin/emacsclient-tmpFix; mode "default"
|
bindsym e exec /home/adam/.bin/emacsclient-tmpFix; mode "default"
|
||||||
@ -50,9 +46,11 @@ mode "launch" {
|
|||||||
}
|
}
|
||||||
bindsym $mod+x mode "launch"
|
bindsym $mod+x mode "launch"
|
||||||
|
|
||||||
# Workspace Mangement
|
# Rofi
|
||||||
bindsym $mod+t exec ~/.config/i3/get_workspace_options.py | dmenu -i -dim 0.7 | ~/.config/i3/go_to_workspace.py
|
set $rofiOptions -i -bg '#222222' -fg '#cccccc' -fg-active '#ffffff' -modi 'drun,run,sworkspace:/home/adam/.config/i3/switch_workspace.sh,mworkspace:/home/adam/.config/i3/move_to_workspace.sh,window' -sidebar-mode
|
||||||
bindsym $mod+Shift+t exec ~/.config/i3/get_workspace_options.py | dmenu -i -dim 0.7 | ~/.config/i3/move_to_workspace.py
|
bindsym $mod+space exec --no-startup-id "rofi $rofiOptions -show drun"
|
||||||
|
bindsym $mod+t exec --no-startup-id "rofi $rofiOptions -show sworkspace"
|
||||||
|
bindsym $mod+Shift+t exec --no-startup-id "rofi $rofiOptions -show mworkspace"
|
||||||
bindsym $mod+n exec ~/.config/i3/rename_workspace.sh
|
bindsym $mod+n exec ~/.config/i3/rename_workspace.sh
|
||||||
|
|
||||||
# Brighness Control
|
# Brighness Control
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
#!/usr/bin/python3
|
|
||||||
import subprocess
|
|
||||||
import json
|
|
||||||
|
|
||||||
test = subprocess.Popen(["i3-msg","-t","get_workspaces"], stdout=subprocess.PIPE)
|
|
||||||
output = test.communicate()[0]
|
|
||||||
data = json.loads(output.decode())
|
|
||||||
data = sorted(data, key=lambda k: k['name'])
|
|
||||||
for i in data:
|
|
||||||
print(i['name'])
|
|
@ -1,6 +0,0 @@
|
|||||||
#!/usr/bin/python3
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
|
|
||||||
data = sys.stdin.readlines()[0]
|
|
||||||
test = subprocess.Popen(["i3-msg","workspace "+data], stdout=subprocess.PIPE)
|
|
9
.config/i3/move_to_workspace.sh
Executable file
9
.config/i3/move_to_workspace.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -z "$1" ]
|
||||||
|
then
|
||||||
|
i3-msg -t get_workspaces | tr ',' '\n' | grep "name" | sed 's/"name":"\(.*\)"/\1/g' | sort -n
|
||||||
|
else
|
||||||
|
i3-msg move to workspace "$1" 1>2
|
||||||
|
fi
|
||||||
|
|
9
.config/i3/switch_workspace.sh
Executable file
9
.config/i3/switch_workspace.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -z "$1" ]
|
||||||
|
then
|
||||||
|
i3-msg -t get_workspaces | tr ',' '\n' | grep "name" | sed 's/"name":"\(.*\)"/\1/g' | sort -n
|
||||||
|
else
|
||||||
|
i3-msg workspace "$1" 1>2
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user