logo

dotfiles

My dotfiles, one branch per machine
commit: 25f60a4c554cad9feadec415201e61e4c7b265e2
parent: 6fdeb9675d5b40429619da3cdb6c20ab40aa40ff
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri, 21 Jun 2019 06:25:42 +0200

Initial Sway+Waybar Commit

Diffstat:

A.config/sway/config165+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.config/waybar/config79+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.config/waybar/style.css30++++++++++++++++++++++++++++++
3 files changed, 274 insertions(+), 0 deletions(-)

diff --git a/.config/sway/config b/.config/sway/config @@ -0,0 +1,165 @@ +# Default config for sway +# See sway(5) + +set $mod Mod4 +set $left h +set $down j +set $up k +set $right l +set $term st +set $menu dmenu_path | dmenu | xargs swaymsg exec -- + +exec swayidle -w \ + timeout 30 'swaymsg "output * dpms off"' \ + resume 'swaymsg "output * dpms on"' \ + timeout 60 'swaylock -f -c 000000' # \ +# before-sleep 'swaylock -f -c 000000' +# swayidle without elogind/systemd cannot have before-sleep (FUCK) + +# Keybindings + +bindsym $mod+Shift+Return exec $term +bindsym $mod+Shift+c kill +bindsym $mod+p exec $menu +# 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+r reload + +# exit sway (logs you out of your Wayland session) +bindsym $mod+Shift+q 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' + +# Move your focus around +bindsym $mod+$left focus left +bindsym $mod+$down focus down +bindsym $mod+$up focus up +bindsym $mod+$right focus right +# 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 +bindsym $mod+Shift+$left move left +bindsym $mod+Shift+$down move down +bindsym $mod+Shift+$up move up +bindsym $mod+Shift+$right move right +# 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. + +# Layouting +# 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 + bindsym $left resize shrink width 10px + bindsym $down resize grow height 10px + bindsym $up resize shrink height 10px + bindsym $right resize grow width 10px + + # 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" + +bar { + swaybar_command waybar +} + +bindsym $mod+w focus output left +bindsym $mod+e focus output right + +default_border pixel 1 +default_floating_border normal + +focus_follows_mouse no +focus_wrapping no + +font 'Monospace-7' +# Do not steal focus +#no_focus [class=".*"] + +# == custom XMonad stuff == +bindsym $mod+b bar hidden_state toggle +for_window [window_role="Browser"] move workspace 2 diff --git a/.config/waybar/config b/.config/waybar/config @@ -0,0 +1,79 @@ +{ + "layer": "bottom", // Allow dmenu to be on top + "modules-left": [ "sway/workspaces", "sway/mode" ], "modules-center": [ "sway/window" ], + "modules-right": + [ + "tray", + "mpd", + "network", + "cpu", + "memory", + "temperature", + "backlight", + "battery", + "clock", + "idle_inhibitor" + ], + "sway/workspaces": {"all-outputs": true}, "mpd": { + "format": + "{stateIcon} {artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})", + "format-disconnected": "Disconnected", + "format-stopped": "Stopped", + "unknown-tag": "N/A", + "interval": 2, + "state-icons": {"paused": "", "playing": ""} + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": {"activated": "", "deactivated": ""} + }, + "tray": { + // "icon-size": 21, + "spacing": 10 + }, + "clock": {"tooltip-format": "{:%A %d %B, %Y}", "format": "{:%FT%T%z}"}, + "cpu": {"format": "CPU: {usage}%"}, "memory": {"format": "RAM: {}%"}, + "temperature": { + "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", + "critical-threshold": 62, + // "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": "{ifname}: {essid} ({signalStrength}%) {bandwidthUpBits:3}⇅{bandwidthDownBits:3}", + "format-ethernet": "{ifname}: {bandwidthUpBits:3}⇅{bandwidthDownBits:3}", + "format-linked": "{ifname} (No IP)", + "format-disconnected": "Disconnected", + "format-alt": "{ifname}: {ipaddr}/{cidr}" + //}, + //"custom/media": { + // "format": "{icon} {}", + // "return-type": "json", + // "max-length": 40, + // "format-icons": {"spotify": "", "default": "🎜"}, + // "escape": true, + // "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder + } +} diff --git a/.config/waybar/style.css b/.config/waybar/style.css @@ -0,0 +1,30 @@ +* { + border: none; + border-radius: 0; + font-family: monospace; + font-size: 9pt; + min-height: 0; +} + +window { + background: #32302f; + color: #ebdbb2; +} + +#workspaces button { + padding: 0 0.25em; + border: 1px solid transparent; +} +#workspaces button.visible { border: 1px solid #a89984; } +#workspaces button.focused { border: 1px solid #8ec07c; } +#workspaces button.urgent { border: 1px solid #cc241d; } + +#workspaces, #window, #mpd, #clock, #battery, #cpu, #memory, #temperature, #backlight, #network, #pulseaudio, #custom-media, #tray, #mode, #idle_inhibitor { + background: #282828; + margin: 0 0.5em; +} + +#window { + margin: 0 1em; + border-bottom: 1px solid #8ec07c; +}