From 4f37509c2a8d88cf9436b3ed55fc5ba2a1ed36d6 Mon Sep 17 00:00:00 2001 From: Evelyn Alicke Date: Sun, 11 Jul 2021 23:08:46 +0200 Subject: [PATCH] general cleanup --- sway/config | 29 ++---------------------- sway/config.d/input | 29 ++++++++++++++++++++++++ sway/config.d/window-rules | 1 + sway/config.d/workspaces | 27 ++++++++++++++++++++++- sway/scripts.d/battery.sh | 9 -------- sway/scripts.d/status.py | 45 -------------------------------------- sway/scripts.d/status.sh | 5 ----- sway/status.sh | 5 ----- 8 files changed, 58 insertions(+), 92 deletions(-) delete mode 100755 sway/scripts.d/battery.sh delete mode 100755 sway/scripts.d/status.py delete mode 100755 sway/scripts.d/status.sh delete mode 100755 sway/status.sh diff --git a/sway/config b/sway/config index 7feb83b..bc94df4 100644 --- a/sway/config +++ b/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 # 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 # @@ -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 # set $menu exec sakura -e sway-launcher-desktop -t "launcher" -r 20 -c 60 --class="launcher" --name="launcher" # bindsym $mod+d exec $menu - for_window [class="wofi"] opacity 0.8 # Drag floating windows by holding down $mod and left mouse button. # Resize them with right mouse button + $mod. diff --git a/sway/config.d/input b/sway/config.d/input index 616b470..4653517 100644 --- a/sway/config.d/input +++ b/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 "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 +} \ No newline at end of file diff --git a/sway/config.d/window-rules b/sway/config.d/window-rules index 672d55c..8ebdf71 100644 --- a/sway/config.d/window-rules +++ b/sway/config.d/window-rules @@ -1 +1,2 @@ for_window [title="Qalculate!"] floating enable +for_window [class="wofi"] opacity 0.8 \ No newline at end of file diff --git a/sway/config.d/workspaces b/sway/config.d/workspaces index 8b13789..fb1a81e 100644 --- a/sway/config.d/workspaces +++ b/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. \ No newline at end of file diff --git a/sway/scripts.d/battery.sh b/sway/scripts.d/battery.sh deleted file mode 100755 index 967c5ee..0000000 --- a/sway/scripts.d/battery.sh +++ /dev/null @@ -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 diff --git a/sway/scripts.d/status.py b/sway/scripts.d/status.py deleted file mode 100755 index ac33fc3..0000000 --- a/sway/scripts.d/status.py +++ /dev/null @@ -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() - diff --git a/sway/scripts.d/status.sh b/sway/scripts.d/status.sh deleted file mode 100755 index 588b3bd..0000000 --- a/sway/scripts.d/status.sh +++ /dev/null @@ -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 diff --git a/sway/status.sh b/sway/status.sh deleted file mode 100755 index 588b3bd..0000000 --- a/sway/status.sh +++ /dev/null @@ -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