Browse Source

initial commit

main
Evelyn Alicke 3 years ago
commit
932aace00c
  1. 1079
      kitty/kitty.conf
  2. 8
      mako/config
  3. 222
      sway/config
  4. 5
      sway/config.d/borders
  5. 6
      sway/config.d/colors-titlebar
  6. 9
      sway/config.d/exec
  7. 1
      sway/config.d/input
  8. 18
      sway/config.d/misc-keybinds
  9. 26
      sway/config.d/swaybar
  10. 3
      sway/config.d/tools
  11. 1
      sway/config.d/window-rules
  12. 1
      sway/config.d/workspaces
  13. 2
      sway/env
  14. 38
      sway/other/wofi.css
  15. 9
      sway/scripts.d/battery.sh
  16. 45
      sway/scripts.d/status.py
  17. 5
      sway/scripts.d/status.sh
  18. 5
      sway/status.sh
  19. 120
      waybar/config
  20. 272
      waybar/style.css

1079
kitty/kitty.conf

File diff suppressed because it is too large Load Diff

8
mako/config

@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
font=Victor Mono 9
text-color=#ffffffff
background-color=#000000cd
width=300
border-size=2
border-radius=10
border-color=#00000000
default-timeout=3000

222
sway/config

@ -0,0 +1,222 @@ @@ -0,0 +1,222 @@
# vim: :set filetype=i3config
# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.
### Variables
#
# Logo key. Use Mod1 for Alt.
set $mod Mod4
# Home row direction keys, like vim
set $left Left
set $down Down
set $up Up
set $right Right
# Your preferred terminal emulator
set $term kitty
# Your preferred application launcher
# Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on.
# set $menu rofi -show drun
set $menu wofi --show drun -s .config/sway/other/wofi.css -W 600 -H 300
### Output configuration
#
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg /usr/share/backgrounds/tom-barrett--bSucp2nUdQ-unsplash.jpg fill
#
# Example configuration:
default_border none
title_align center
smart_borders on
set $laptop eDP-1
bindswitch --reload --locked lid:on output $laptop disable
bindswitch --reload --locked lid:off output $laptop enable
font Victor Mono Bold 9
titlebar_border_thickness 1
titlebar_padding 2 2
mouse_warping none
# You can get the names of your outputs by running: swaymsg -t get_outputs
### Idle configuration
#
# Example configuration:
#
exec swayidle -w \
timeout 120 'notify-send -c device -u normal -t 60000 -i /usr/share/icons/Adwaita/48x48/legacy/system-lock-screen.png "Screen lock activating soon"' \
timeout 180 'swaylock -i /usr/share/backgrounds/tom-barrett--bSucp2nUdQ-unsplash.jpg' \
timeout 300 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
bindsym $mod+l exec swaylock -i /usr/share/backgrounds/tom-barrett--bSucp2nUdQ-unsplash.jpg
# This will lock your screen after 300 seconds of inactivity, then turn off
# 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
#
# Basics:
#
# Start a terminal
bindsym $mod+Return exec $term
bindsym $mod+Shift+Return exec cool-retro-term
# Kill focused window
bindsym $mod+Shift+q kill
# Start your launcher
bindsym $mod+d exec $menu
# 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.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# Reload the configuration file
bindsym $mod+Shift+c reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
#
# Moving around:
#
# Move your focus around
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#
# 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.
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+b splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# Make the current focus fullscreen
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
# Move focus to the parent container
bindsym $mod+a focus parent
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# Include the custom config files
include ~/.config/sway/config.d/*
include /etc/sway/config.d/*
#exec "systemctl --user import-environment; systemctl --user start sway-session.target"
#exec systemd-cat --identifier=sway sway

5
sway/config.d/borders

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
for_window [floating] {
border pixel 1
title_align center
smart_borders off
}

6
sway/config.d/colors-titlebar

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
# Type Border Background Text
client.background #000000cd
client.focused #000000cd #000000cd #fca9e9ff
client.focused_inactive #000000cd #000000cd #fca9e9ff
client.urgent #ffff00cd #000000cd #ffffffff
client.unfocused #000000cd #000000cd #ffffff80

9
sway/config.d/exec

@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
exec kanshi
exec mako
# exec ~/.config/sway/bat.sh
# Replaced by:
exec swaynag-battery
exec gammastep -t 6500:3000 -l 51.233333:6.783333 -m wayland
exec export PAGER=most
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
exec systemctl --user restart xdg-desktop-portal.service

1
sway/config.d/input

@ -0,0 +1 @@ @@ -0,0 +1 @@
input "9094:17208:Raydium_Corporation_Raydium_Touch_System" map_to_output eDP-1

18
sway/config.d/misc-keybinds

@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
bindsym XF86AudioPlay exec playerctl play-pause
# Screen Brightness
bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym XF86MonBrightnessUp exec brightnessctl set +5%
# Screen Saver
bindsym XF86ScreenSaver exec swaylock -i /usr/share/backgrounds/laptop_unbenutzbar.png
# Screenshot
bindsym Print exec grimshot copy area

26
sway/config.d/swaybar

@ -0,0 +1,26 @@ @@ -0,0 +1,26 @@
# Status Bar:
#
# Read `man 5 sway-bar` for more information about this section.
#bar {
# position top
# icon_theme candy
# # The default just shows the current date and time.
# # status_command python3 ~/.config/sway/scripts.d/status.py
# status_command while bash ~/.config/sway/status.sh; do sleep 1; done
#
# colors {
# statusline #ffffff
# background #000000cd
# inactive_workspace #000000cd #000000cd #ffffff80
# focused_workspace #000000cd #000000cd #fca9e9ff
# urgent_workspace #ffa000cd #000000cd #ffffffff
# }
#}
exec waybar
#bar {
# swaybar_command waybar -s ~/.config/waybar/styles.css
#}

3
sway/config.d/tools

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
bindsym $mod+p exec $term -x python -t "Python3 Interactive"
bindsym $mod+g exec $term -x ghci -t "ghci"
bindsym $mod+q exec qalculate-gtk

1
sway/config.d/window-rules

@ -0,0 +1 @@ @@ -0,0 +1 @@
for_window [title="Qalculate!"] floating enable

1
sway/config.d/workspaces

@ -0,0 +1 @@ @@ -0,0 +1 @@

2
sway/env

@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
_JAVA_AWT_WM_NONREPARENTING=1
CLUTTER_BACKEND=wayland

38
sway/other/wofi.css

@ -0,0 +1,38 @@ @@ -0,0 +1,38 @@
window {
margin: 5px;
border: 2px solid rgba(0,0,0,0.8);
background-color: rgba(0,0,0,0.8);
border-radius: 10px;
}
#input {
margin: 5px;
border: 2px solid transparent;
background-color: transparent;
border-radius: 5px;
}
#inner-box {
margin: 5px;
border: 2px solid transparent;
background-color: transparent;
}
#outer-box {
margin: 5px;
border: 2px solid transparent;
background-color: transparent;
}
#scroll {
margin: 5px;
border: 2px solid transparent;
background-color: transparent;
border-radius: 5px;
}
#text {
margin: 5px;
border: 2px solid transparent;
background-color: transparent;
}

9
sway/scripts.d/battery.sh

@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
#!/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

@ -0,0 +1,45 @@ @@ -0,0 +1,45 @@
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

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
#!/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

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
#!/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

120
waybar/config

@ -0,0 +1,120 @@ @@ -0,0 +1,120 @@
// add to git
{
// "layer": "top", // Waybar at top layer
// "position": "bottom", // Waybar position (top|bottom|left|right)
"height": 20, // Waybar height (to be removed for auto height)
// "width": 1280, // Waybar width
// Choose the order of the modules
"modules-left": ["sway/workspaces", "sway/mode", "custom/media"],
"modules-center": [],
"modules-right": ["idle_inhibitor", "network", "bluetooth", "battery", "battery#bat2", "clock", "tray"],
// Modules configuration
// "sway/workspaces": {
// "disable-scroll": true,
// "all-outputs": true,
// "format": "{name}: {icon}",
// "format-icons": {
// "1": "",
// "2": "",
// "3": "",
// "4": "",
// "5": "",
// "urgent": "",
// "focused": "",
// "default": ""
// }
// },
"sway/mode": {
"format": "<span style=\"italic\">{}</span>"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"tray": {
// "icon-size": 21,
"spacing": 10
},
"clock": {
// "timezone": "Europe/Berlin",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:%Y-%m-%d}"
},
"cpu": {
"format": "{usage}% ",
"tooltip": false
},
"memory": {
"format": "{}% "
},
"temperature": {
// "thermal-zone": 2,
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
"critical-threshold": 80,
// "format-critical": "{temperatureC}°C {icon}",
"format": "{temperatureC}°C {icon}",
"format-icons": ["", "", ""]
},
"backlight": {
// "device": "acpi_video1",
"format": "{percent}% {icon}",
"format-icons": ["", ""]
},
"battery": {
"states": {
// "good": 95,
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% ",
"format-plugged": "{capacity}% ",
"format-alt": "{time} {icon}",
// "format-good": "", // An empty format will hide the module
// "format-full": "",
"format-icons": ["", "", "", "", ""]
},
"battery#bat2": {
"bat": "BAT2"
},
"network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "{ifname}: {ipaddr}/{cidr} ",
"format-linked": "{ifname} (No IP) ",
"format-disconnected": "Disconnected ⚠",
"format-alt": "{ifname}: {ipaddr}/{cidr}"
},
"pulseaudio": {
// "scroll-step": 1, // %, can be a float
"format": "{volume}% {icon} {format_source}",
"format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": " {icon} {format_source}",
"format-muted": " {format_source}",
"format-source": "{volume}% ",
"format-source-muted": "",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"on-click": "pavucontrol"
},
"bluetooth": {
"format": "{icon}",
"format-alt": "bluetooth: {status}",
"on-click": "blueman-manager",
"format-icons": {
"enabled": "",
"disabled": ""
},
"tooltip-format": "{}"
},
}

272
waybar/style.css

@ -0,0 +1,272 @@ @@ -0,0 +1,272 @@
* {
border: none;
border-radius: 0;
/* `otf-font-awesome` is required to be installed for icons */
font-family: Victor Mono Medium ,Roboto, Helvetica, Arial, sans-serif;
font-size: 12px;
min-height: 0;
}
window#waybar {
background-color: rgba(0,0,0, 0.8);
color: white;
transition-property: all;
transition-duration: 200ms;
transition-timing-function: ease-in-out;
}
window#waybar.hidden {
opacity: 0.8;
}
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: rgba(0,0,0,0.8);
}
window#waybar.termite {
background-color: #3F3F3F;
}
window#waybar.chromium {
background-color: #000000;
border: none;
}
#workspaces button {
padding: 0 5px;
background-color: transparent;
min-width: 10px;
color: white;
/* Use box-shadow instead of border so the text isn't offset */
transition-property: box-shadow, color;
transition-duration: 200ms;
transition-timing-function: ease-in-out;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
#workspaces button:hover {
background: rgba(0, 0, 0, 0.2);
color: rgba(100,50,255,1);
/* box-shadow: inset 0 -3px #ffffff; */
}
#workspaces button.focused {
background-color: transparent;
color: #ff00aa;
}
#workspaces button.urgent {
background-color: #eb4d4b;
}
#mode {
background-color: #64727D;
}
#clock{
}
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#custom-media,
#tray,
#mode,
#idle_inhibitor{
padding: 0 10px;
margin: 0 4px;
color: #222;
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
}
#mpd {
padding: 0 10px;
margin: 0 4px;
color: #ffffff;
}
#window {
transition-property: color;
transition-duration: 1s;
}
#workspaces {
margin: 0 1px;
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
#clock {
background-color: rgba(20,20,20,0.6);
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
color: white;
padding: 0 10px;
margin: 0 4px;
}
#battery {
background-color: rgba(20,20,20,0.6);
color: #fff;
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
transition-property: background-color;
transition-duration: 500ms;
}
#battery.charging, #battery.plugged {
color: #ffffff;
background-color: #689948;
}
@keyframes blink {
to {
background-color: #ffffff;
color: #000000;
}
}
#battery.critical:not(.charging) {
background-color: #e54c4c;
color: #ffffff;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
label:focus {
background-color: #000000;
}
#cpu {
background-color: #2ecc71;
color: #000000;
}
#memory {
background-color: #9b59b6;
}
#disk {
background-color: #964B00;
}
#backlight {
background-color: #90b1b1;
}
#network {
background-color: rgba(110, 178, 179, 0.6);
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
transition-property: background-color;
transition-duration: 500ms;
color: white;
}
#network.disconnected {
background-color: rgba(141, 110, 179, 0.6);
}
#bluetooth {
background-color: rgba(170, 110, 180, 0.6);
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
transition-property: background-color;
transition-duration: 500ms;
padding: 0 10px;
margin: 0 4px;
color: white;
}
#pulseaudio {
background-color: #f1c40f;
color: #000000;
}
#pulseaudio.muted {
background-color: #90b1b1;
color: #2a5c45;
}
#custom-media {
background-color: #66cc99;
color: #2a5c45;
min-width: 100px;
}
#custom-media.custom-spotify {
background-color: #66cc99;
}
#custom-media.custom-vlc {
background-color: #ffa000;
}
#temperature {
background-color: #f0932b;
}
#temperature.critical {
background-color: #eb4d4b;
}
#tray {
background-color: rgba(20,20,20,0.6);
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
}
#idle_inhibitor {
background-color: rgba(20,20,20, 0.6);
color: rgba(200,200,200, 0.6);
}
#idle_inhibitor.activated {
background-color: #ecf0f1;
color: #2d3436;
}
#mpd {
background-color: #66cc99;
color: #2a5c45;
}
#mpd.disconnected {
background-color: #f53c3c;
}
#mpd.stopped {
background-color: #90b1b1;
}
#mpd.paused {
background-color: #51a37a;
}
#language {
background: #00b093;
color: #740864;
padding: 0 5px;
margin: 0 5px;
min-width: 16px;
}
Loading…
Cancel
Save