Browse Source

simplify config

master
Arti Zirk 5 years ago
parent
commit
6045ead38c
  1. 17
      .bin/swaylock.sh
  2. 2
      .bin/switch_window.py
  3. 1
      .config/rofi/config
  4. 7
      .config/sway/config

17
.bin/swaylock.sh

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
#!/bin/bash
# Uses forked swaylock https://github.com/mortie/swaylock-effects
bg=$1
exec swaylock \
--clock \
--datestr "%Y-%m-%d" \
--indicator \
--tiling \
--hide-keyboard-layout \
--font "Terminus" \
--font-size 28 \
--text-color ffffff \
--inside-color 435366 \
--separator-color 435366 \
--ring-color 435366 \
--line-uses-ring \
--image $bg

2
.bin/switch_window.py

@ -42,6 +42,6 @@ for output in tree['nodes']: @@ -42,6 +42,6 @@ for output in tree['nodes']:
windows_string = '\n'.join([f"<{app_id}> {app_name} --- {app_title}" for app_id, app_name, app_title in windows])
# Call rofi and move focus to the selected window
selection = subprocess.check_output(['rofi', '-dmenu', '-i', '-p', 'window', '-normal-window', '-font', 'Terminus (TTF) Medium 12'], input=windows_string, universal_newlines=True)
selection = subprocess.check_output(['rofi', '-dmenu', '-i', '-p', 'window', '-normal-window'], input=windows_string, universal_newlines=True)
window_id = selection.split(' ')[0][1:-1]
subprocess.call(['swaymsg', f"[con_id=\"{window_id}\"]", 'focus'])

1
.config/rofi/config

@ -1 +1,2 @@ @@ -1 +1,2 @@
rofi.theme: /usr/share/rofi/themes/android_notification.rasi
rofi.font: Terminus 12

7
.config/sway/config

@ -16,19 +16,18 @@ set $right l @@ -16,19 +16,18 @@ set $right l
# Default font
# terminus-font-otb
set $font "Terminus 12"
font pango:Terminus 12
# Background image
set $bg "~/Pildid/background.png"
# Uses forked swaylock https://github.com/mortie/swaylock-effects
set $lockcmd swaylock --clock --datestr "%Y-%m-%d" --indicator --image $bg --tiling --hide-keyboard-layout --font "Terminus" --font-size 28 --text-color ffffff --inside-color 435366 --separator-color 435366 --ring-color 435366 --line-uses-ring
# Lock screen
set $lockcmd ~/.bin/swaylock.sh
# Your preferred terminal emulator
set $term gnome-terminal
# Your preferred application launcher
# None: it's recommended that you pass the final command to sway
set $menu rofi -modi drun -show drun -show-icons -normal-window -font $font
set $menu rofi -modi drun -show drun -show-icons -normal-window
### Output configuration

Loading…
Cancel
Save