Browse Source

general cleanup

main
Evelyn Alicke 4 years ago
parent
commit
4f37509c2a
  1. 29
      sway/config
  2. 29
      sway/config.d/input
  3. 1
      sway/config.d/window-rules
  4. 27
      sway/config.d/workspaces
  5. 9
      sway/scripts.d/battery.sh
  6. 45
      sway/scripts.d/status.py
  7. 5
      sway/scripts.d/status.sh
  8. 5
      sway/status.sh

29
sway/config

@ -57,32 +57,8 @@ bindsym $mod+l exec swaylock -i /usr/share/backgrounds/tom-barrett--bSucp2nUdQ-u
# your displays after another 300 seconds, and turn your screens back on when # your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep. # resumed. It will also lock your screen before your computer goes to sleep.
### Input configuration
#
# Example configuration:
#
# input "2:14:SynPS/2_Synaptics_TouchPad" {
# dwt enabled
# tap enabled
# natural_scroll enabled
# middle_emulation enabled
# }
#
input type:keyboard {
xkb_layout de
xkb_variant us
#xkb_options grp:alt_shift_toggle
}
input "2:10:TPPS/2_IBM_TrackPoint" pointer_accel 0.5
input type:touch map_to_output LVDS-1
input "1133:16507:Logitech_MX_Vertical" pointer_accel -0.8
input "1133:45088:MX_Vertical_Mouse" pointer_accel -0.8
input "1133:49290:Logitech_MX_Vertical_Advanced_Ergonomic_Mouse" pointer_accel -0.8
input "1386:38:Wacom_Intuos5_touch_S_Pen" map_to_output VGA-1
input "1386:38:Wacom_Intuos5_touch_S_Pad" map_to_output VGA-1
input "1386:38:Wacom_Intuos5_touch_S_Finger" map_to_output VGA-1
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
### Key bindings ### Key bindings
# #
@ -99,7 +75,6 @@ input "1386:38:Wacom_Intuos5_touch_S_Finger" map_to_output VGA-1
# for_window [title="launcher"] floating enable, border pixel 10, sticky enable # for_window [title="launcher"] floating enable, border pixel 10, sticky enable
# set $menu exec sakura -e sway-launcher-desktop -t "launcher" -r 20 -c 60 --class="launcher" --name="launcher" # set $menu exec sakura -e sway-launcher-desktop -t "launcher" -r 20 -c 60 --class="launcher" --name="launcher"
# bindsym $mod+d exec $menu # bindsym $mod+d exec $menu
for_window [class="wofi"] opacity 0.8
# Drag floating windows by holding down $mod and left mouse button. # Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod. # Resize them with right mouse button + $mod.

29
sway/config.d/input

@ -1 +1,30 @@
### Input configuration
#
# Example configuration:
#
# input "2:14:SynPS/2_Synaptics_TouchPad" {
# dwt enabled
# tap enabled
# natural_scroll enabled
# middle_emulation enabled
# }
#
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
input "9094:17208:Raydium_Corporation_Raydium_Touch_System" map_to_output eDP-1 input "9094:17208:Raydium_Corporation_Raydium_Touch_System" map_to_output eDP-1
input "2:10:TPPS/2_IBM_TrackPoint" pointer_accel 0.5
# input type:touch map_to_output LVDS-1 we don't do that here
input "1133:16507:Logitech_MX_Vertical" pointer_accel -0.8
input "1133:45088:MX_Vertical_Mouse" pointer_accel -0.8
input "1133:49290:Logitech_MX_Vertical_Advanced_Ergonomic_Mouse" pointer_accel -0.8
input "1386:38:Wacom_Intuos5_touch_S_Pen" map_to_output DP-3
input "1386:38:Wacom_Intuos5_touch_S_Pad" map_to_output DP-3
input "1386:38:Wacom_Intuos5_touch_S_Finger" map_to_output DP-3
input type:keyboard {
xkb_layout de
xkb_variant us
#xkb_options grp:alt_shift_toggle
}

1
sway/config.d/window-rules

@ -1 +1,2 @@
for_window [title="Qalculate!"] floating enable for_window [title="Qalculate!"] floating enable
for_window [class="wofi"] opacity 0.8

27
sway/config.d/workspaces

@ -1 +1,26 @@
# Workspaces:
#
# Switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+7 move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.

9
sway/scripts.d/battery.sh

@ -1,9 +0,0 @@
#!/bin/bash
while (true); do
percentage=acpi | awk '{split($4,a,"%"); print a[1]}'
if [ $percentage > 6 ]; then
swaynag -m "Battery is almost empty" -e bottom
break
fi
sleep 30
done

45
sway/scripts.d/status.py

@ -1,45 +0,0 @@
import json
import time
import sys
def Compose():
header = {"version": 1}
tim = Time()
bat = Battery()
# body = json.dumps(tim) +","+ json.dumps(bat)
body = json.dumps(tim)
sys.stdout.write(body)
def Time():
t = time.localtime()
tstr = str(t.tm_hour) + ":" + str(t.tm_min)
tstrl = tstr + ":" + str(t.tm_sec)
dstr = str(t.tm_mday) + "." + str(t.tm_mon) + "." + str(t.tm_year)
b = {
"full_text": tstrl + " " + dstr,
"short_text": tstr,
"name": "clock",
"align": "center"
}
return b
def Battery():
bat = open("/sys/class/power_supply/BAT0/capacity")
level = int(bat.read())
bat.close
state = open("/sys/class/power_supply/BAT0/status")
sstring = str(state.read())
state.close
b = {
"full_text": str(level),
"short_text": str(level),
"name": "battery"
}
if sstring == "Charging":
b['color'] = "#a1fcbcff"
if sstring == "Discharging" and level <= 15:
b['color'] = "#ea6069ff"
return b
Compose()

5
sway/scripts.d/status.sh

@ -1,5 +0,0 @@
#!/bin/sh
time=$(date | awk '{ print $4}')
year=$(date +'%Y-%m-%d')
bat=$(acpi | head -n 1 | awk '{ print $3 " " $4}')
echo $year $time $bat

5
sway/status.sh

@ -1,5 +0,0 @@
#!/bin/sh
time=$(date | awk '{ print $4}')
year=$(date +'%Y-%m-%d')
bat=$(acpi | head -n 1 | awk '{ print $3 " " $4}')
echo $year $time $bat
Loading…
Cancel
Save