mirror of
https://github.com/Horhik/dotfiles.git
synced 2024-11-14 12:43:17 +00:00
add sway
This commit is contained in:
parent
3ba9390d3c
commit
75d4850767
|
@ -14,22 +14,20 @@ set $down j
|
|||
set $up k
|
||||
set $right l
|
||||
# Your preferred terminal emulator
|
||||
set $term alacritty
|
||||
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 dmenu_path | dmenu | xargs swaymsg exec --
|
||||
set $menu dmenu_path | dmenu | xargs swaymsg exec --
|
||||
set $menu kickoff
|
||||
|
||||
### Output configuration
|
||||
#
|
||||
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
||||
#output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
|
||||
# Default wallpaper (more resolutions are available in /run/current-system/sw/share/backgrounds/sway/)
|
||||
output * bg /run/current-system/sw/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
#output XWAYLAND0 resolution 1920x1080 position 1920,0
|
||||
|
||||
# output HDMI-A-1 resolution 1920x1080 position 1920,0
|
||||
#
|
||||
# You can get the names of your outputs by running: swaymsg -t get_outputs
|
||||
|
||||
|
@ -39,7 +37,7 @@ set $menu dmenu_path | dmenu | xargs swaymsg exec --
|
|||
#
|
||||
# exec swayidle -w \
|
||||
# timeout 300 'swaylock -f -c 000000' \
|
||||
# timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
|
||||
# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
|
||||
# before-sleep 'swaylock -f -c 000000'
|
||||
#
|
||||
# This will lock your screen after 300 seconds of inactivity, then turn off
|
||||
|
@ -67,17 +65,17 @@ set $menu dmenu_path | dmenu | xargs swaymsg exec --
|
|||
# Start a terminal
|
||||
bindsym $mod+Return exec $term
|
||||
|
||||
# ROFI
|
||||
bindsym $mod+P exec rofi -show drun
|
||||
# FOCUS ON URGENT WINDOW
|
||||
#focus_on_window_activation focus
|
||||
# bindsym $mod+i exec swaymsg 'workspace $(swaymsg -t get_tree | jq '.. | objects | select(.urgent==true).name' | tr -d '"')'
|
||||
|
||||
# ROFI PASS
|
||||
bindsym $mod+Shift+P exec rofi-pass
|
||||
|
||||
# Screenshot
|
||||
bindsym $mod+Shift+S exec flameshot gui
|
||||
bindsym $mod+i exec swaymsg "workspace $(swaymsg -t get_tree | jq '.. | objects | select(.urgent==true).name' | grep -oP '\b\d+\b' | head -n1)"
|
||||
|
||||
# Kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
bindsym $mod+Shift+c kill
|
||||
|
||||
# Start your launcher
|
||||
bindsym $mod+p exec $menu
|
||||
|
||||
# Drag floating windows by holding down $mod and left mouse button.
|
||||
# Resize them with right mouse button + $mod.
|
||||
|
@ -87,10 +85,19 @@ set $menu dmenu_path | dmenu | xargs swaymsg exec --
|
|||
floating_modifier $mod normal
|
||||
|
||||
# Reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
bindsym $mod+Shift+r 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'
|
||||
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'
|
||||
|
||||
|
||||
# Lightness
|
||||
bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
|
||||
bindsym XF86MonBrightnessUp exec brightnessctl set 5%+
|
||||
|
||||
bindsym XF86AudioRaiseVolume exec pulsemixer --change-volume +5
|
||||
bindsym XF86AudioLowerVolume exec pulsemixer --change-volume -5
|
||||
bindsym XF86AudioMute exec pulsemixer --toggle-mute
|
||||
#
|
||||
# Moving around:
|
||||
#
|
||||
|
@ -129,6 +136,8 @@ set $menu dmenu_path | dmenu | xargs swaymsg exec --
|
|||
bindsym $mod+8 workspace number 8
|
||||
bindsym $mod+9 workspace number 9
|
||||
bindsym $mod+0 workspace number 10
|
||||
bindsym $mod+u workspace number 11
|
||||
bindsym $mod+d workspace number 12
|
||||
# Move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace number 1
|
||||
bindsym $mod+Shift+2 move container to workspace number 2
|
||||
|
@ -140,6 +149,10 @@ set $menu dmenu_path | dmenu | xargs swaymsg exec --
|
|||
bindsym $mod+Shift+8 move container to workspace number 8
|
||||
bindsym $mod+Shift+9 move container to workspace number 9
|
||||
bindsym $mod+Shift+0 move container to workspace number 10
|
||||
bindsym $mod+Shift+u move container to workspace number 11
|
||||
bindsym $mod+Shift+d move container to workspace number 12
|
||||
bindsym $mod+Shift+Cyrillic_ghe move container to workspace number 11
|
||||
bindsym $mod+Shift+Cyrillic_ve move to workspace number 12
|
||||
# Note: workspaces can have any name you want, not just numbers.
|
||||
# We just use 1-10 as the default.
|
||||
#
|
||||
|
@ -179,6 +192,8 @@ set $menu dmenu_path | dmenu | xargs swaymsg exec --
|
|||
# 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:
|
||||
#
|
||||
|
@ -204,22 +219,157 @@ mode "resize" {
|
|||
}
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
#
|
||||
mode "screenshot" {
|
||||
bindsym s exec grim -g "$(slurp)" ~/Pictures/Screenshot/$( date +%d-%m-%y-%T.jpg)
|
||||
bindsym c exec grim -g "$(slurp)" - | wl-copy
|
||||
|
||||
# Return to default mode
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+Shift+s mode "screenshot"
|
||||
|
||||
mode "redshift" {
|
||||
bindsym k exec gammastep -O 3000
|
||||
bindsym j exec gammastep -x; gammastep -x
|
||||
bindsym 0 exec gammastep -x
|
||||
bindsym 1 exec gammastep -O 1000
|
||||
bindsym 2 exec gammastep -O 1500
|
||||
bindsym 3 exec gammastep -O 2000
|
||||
bindsym 4 exec gammastep -O 2500
|
||||
bindsym 5 exec gammastep -O 3000
|
||||
bindsym 6 exec gammastep -O 3500
|
||||
bindsym 7 exec gammastep -O 4500
|
||||
bindsym 8 exec gammastep -O 5000
|
||||
bindsym 9 exec gammastep -O 5500
|
||||
|
||||
# Return to default mode
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+ctrl+r mode "redshift"
|
||||
|
||||
|
||||
|
||||
|
||||
# Status Bar:
|
||||
#
|
||||
# Read `man 5 sway-bar` for more information about this section.
|
||||
bar {
|
||||
position top
|
||||
|
||||
# When the status_command prints a new line to stdout, swaybar updates.
|
||||
# The default just shows the current date and time.
|
||||
status_command while date +'%Y-%m-%d %I:%M:%S %p'; do sleep 1; done
|
||||
|
||||
colors {
|
||||
statusline #ffffff
|
||||
background #323232
|
||||
inactive_workspace #32323200 #32323200 #5c5c5c
|
||||
}
|
||||
bar {
|
||||
swaybar_command waybar -c ~/.config/waybar/config
|
||||
}
|
||||
|
||||
|
||||
include /etc/sway/config.d/*
|
||||
|
||||
default_border pixel 2
|
||||
#for_window [title="^.*"] title_format ""
|
||||
#default_floating_border normal 0
|
||||
|
||||
|
||||
|
||||
input "1267:12553:ELAN2204:00_04F3:3109_Touchpad" {
|
||||
dwt enabled
|
||||
tap enabled
|
||||
middle_emulation enabled
|
||||
pointer_accel 0.7
|
||||
accel_profile adaptive
|
||||
}
|
||||
|
||||
input "1267:12553:ELAN2204:00_04F3:3109_Mouse" {
|
||||
pointer_accel 0.7
|
||||
accel_profile adaptive
|
||||
}
|
||||
|
||||
input type:keyboard {
|
||||
xkb_layout us,ru
|
||||
#xkb_layout us,ru
|
||||
xkb_options grp:rctrl_toggle
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#input "1386:890:Wacom_One_by_Wacom_S_Pen" map_to_output HDMI-A-1
|
||||
input "1386:890:Wacom_One_by_Wacom_S_Pen" map_to_output eDP-1
|
||||
|
||||
# HDMI-A-1 eDP-1
|
||||
|
||||
|
||||
#output * background /space/Pictures/Wallpapers/magent.png fill
|
||||
output * background /space/Pictures/Wallpapers/masha_mandala.jpg fill
|
||||
|
||||
|
||||
output HDMI-A-1 pos 0 0
|
||||
output eDP-1 pos 0 1080
|
||||
|
||||
|
||||
set $background #282420
|
||||
set $foreground #e5c6a8
|
||||
set $cursor #f6f6ec
|
||||
set $selection_background #111417
|
||||
set $color0 #111417
|
||||
set $color8 #665e54
|
||||
set $color1 #c84134
|
||||
set $color9 #ff6459
|
||||
set $color2 #84c44b
|
||||
set $color10 #97e035
|
||||
set $color3 #f4ae2e
|
||||
set $color11 #dfd561
|
||||
set $color4 #1397b9
|
||||
set $color12 #5ed9ff
|
||||
set $color5 #d0623c
|
||||
set $color13 #ff9168
|
||||
set $color6 #4f9452
|
||||
set $color14 #83ef88
|
||||
set $color7 #e5c5a9
|
||||
set $color15 #f6f6ec
|
||||
set $selection_foreground #282420
|
||||
|
||||
|
||||
set $active #6f5f5f
|
||||
set $inactive #282420
|
||||
set $urgent #d0623c
|
||||
set $mess $color7
|
||||
set $back #6f5f5f
|
||||
set $fg #e5c5a9
|
||||
## Window decoration
|
||||
# class border backgr text indicator child_border
|
||||
client.focused $back $back $fg $back $back
|
||||
client.focused_inactive $inactive $inactive $fg $inactive $inactive
|
||||
client.unfocused $inactive $inactive $fg $inactive $inactive
|
||||
client.urgent $urgent $back $fg $color9 $fg
|
||||
client.placeholder $mess $back $fg $color7 $fg
|
||||
client.background $mess
|
||||
|
||||
# client.focused $base $base $text $mauve $base
|
||||
# client.focused_inactive $base $base $text $base $base
|
||||
# client.unfocused $base $base $text $base $base
|
||||
# client.urgent $peach $base $peach $overlay0 $peach
|
||||
# client.placeholder $base $base $text $overlay0 $base
|
||||
# client.background $base
|
||||
|
||||
# client.focused $mauve $base $text $lavender $mauve
|
||||
# client.focused_inactive $mantle $base $text $mantle $mantle
|
||||
# client.unfocused $mantle $base $text $mantle $mantle
|
||||
# client.urgent $peach $base $peach $overlay0 $peach
|
||||
# client.placeholder $base $base $text $overlay0 $overlay0
|
||||
# client.background $base
|
||||
# client.focused $mauve $base $text $lavender $mauve
|
||||
|
||||
|
||||
### TRANSPARENTCY COMPOSITING
|
||||
|
||||
set $opacity 0.90
|
||||
#for_window [class=".*"] opacity $opacity
|
||||
for_window [app_id="kitty"] opacity $opacity
|
||||
for_window [app_id="org.pwmt.zathura"] opacity $opacity
|
||||
for_window [app_id="sioyek"] opacity $opacity
|
||||
for_window [class="PatchWindow"] opacity 0.5
|
||||
|
||||
|
||||
focus_follows_mouse yes
|
||||
|
|
143
home/waybar/.config/waybar/config
Normal file
143
home/waybar/.config/waybar/config
Normal file
|
@ -0,0 +1,143 @@
|
|||
{
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"height": 10,
|
||||
"margin-bottom":0,
|
||||
"margin-top":0,
|
||||
|
||||
"modules-left": ["sway/mode","cpu","memory","network","mpd"],
|
||||
"modules-center": ["sway/workspaces","wlr/workspaces"],
|
||||
"modules-right": ["tray","idle_inhibitor","pulseaudio","backlight","battery","clock"],
|
||||
|
||||
"battery": {
|
||||
"states": {
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"format": "{icon} {capacity}%",
|
||||
"format-charging": " {capacity}%",
|
||||
"format-plugged": " {capacity}%",
|
||||
"format-alt": "{icon} {time}",
|
||||
"format-icons": ["", "", "", "", "", "", ""]
|
||||
},
|
||||
|
||||
|
||||
|
||||
"wlr/workspaces": {
|
||||
"sort-by-name": true,
|
||||
"on-click": "activate"
|
||||
},
|
||||
"sway/mode": {
|
||||
"format": "<span style=\"italic\">{}</span>"
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 16,
|
||||
"spacing": 12
|
||||
},
|
||||
"clock": {
|
||||
"locale": "C",
|
||||
"format": " {:%I:%M %p}",
|
||||
"format-alt": " {:%a,%b %d}" // Icon: calendar-alt
|
||||
},
|
||||
"cpu": {
|
||||
"format": " {usage}%",
|
||||
"tooltip": false,
|
||||
"on-click": "kitty -e 'htop'"
|
||||
},
|
||||
"memory": {
|
||||
"interval": 30,
|
||||
"format": " {used:0.2f}GB",
|
||||
"max-length": 10,
|
||||
"tooltip": false,
|
||||
"warning": 70,
|
||||
"critical": 90
|
||||
},
|
||||
"network": {
|
||||
"interval": 2,
|
||||
"format-wifi": " {signalStrength}%",
|
||||
"format-ethernet": "",
|
||||
"format-linked": " {ipaddr}",
|
||||
"format-disconnected": " Disconnected",
|
||||
"format-disabled": "",
|
||||
"tooltip": false,
|
||||
"max-length": 20,
|
||||
"min-length": 6,
|
||||
"format-alt": "{essid}",
|
||||
},
|
||||
"idle_inhibitor": {
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"activated": "",
|
||||
"deactivated": ""
|
||||
}
|
||||
},
|
||||
"backlight": {
|
||||
// "device": "acpi_video1",
|
||||
"format": "{icon} {percent}%",
|
||||
"format-icons": ["", ""],
|
||||
"on-scroll-down": "brightnessctl -c backlight set 1%-",
|
||||
"on-scroll-up": "brightnessctl -c backlight set +1%"
|
||||
},
|
||||
"pulseaudio": {
|
||||
// "scroll-step": 1, // %, can be a float
|
||||
"format": "{icon} {volume}% {format_source}",
|
||||
"format-bluetooth": " {icon} {volume}% {format_source}",
|
||||
"format-bluetooth-muted": " {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"
|
||||
},
|
||||
"mpd": {
|
||||
"format": "{stateIcon} {artist} - {title}",
|
||||
"format-disconnected": "🎶",
|
||||
"format-stopped": "♪",
|
||||
"interval": 10,
|
||||
"consume-icons": {
|
||||
"on": " " // Icon shows only when "consume" is on
|
||||
},
|
||||
"random-icons": {
|
||||
"off": "<span color=\"#f53c3c\"></span> ", // Icon grayed out when "random" is off
|
||||
"on": " "
|
||||
},
|
||||
"repeat-icons": {
|
||||
"on": " "
|
||||
},
|
||||
"single-icons": {
|
||||
"on": "1 "
|
||||
},
|
||||
"state-icons": {
|
||||
"paused": "",
|
||||
"playing": ""
|
||||
},
|
||||
"tooltip-format": "MPD (connected)",
|
||||
"tooltip-format-disconnected": "MPD (disconnected)",
|
||||
"max-length": 35
|
||||
},
|
||||
"custom/recorder": {
|
||||
"format": " Rec",
|
||||
"format-disabled": " Off-air", //An empty format will hide the module.
|
||||
"return-type": "json",
|
||||
"interval": 1,
|
||||
"exec": "echo '{\"class\": \"recording\"}'",
|
||||
"exec-if": "pgrep wf-recorder",
|
||||
},
|
||||
"custom/audiorec": {
|
||||
"format": "♬ Rec",
|
||||
"format-disabled": "♬ Off-air", //An empty format will hide the module.
|
||||
"return-type": "json",
|
||||
"interval": 1,
|
||||
"exec": "echo '{\"class\": \"audio recording\"}'",
|
||||
"exec-if": "pgrep ffmpeg",
|
||||
},
|
||||
}
|
||||
|
52
home/waybar/.config/waybar/style.css
Normal file
52
home/waybar/.config/waybar/style.css
Normal file
|
@ -0,0 +1,52 @@
|
|||
*{
|
||||
font-family: mononoki;
|
||||
font-size: 13px;
|
||||
min-height: 0;
|
||||
color: white;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: #282420;
|
||||
}
|
||||
|
||||
#workspaces{
|
||||
margin-top: 3px;
|
||||
margin-bottom: 4px;
|
||||
margin-right: 10px;
|
||||
margin-left: 25px;
|
||||
}
|
||||
|
||||
#workspaces button{
|
||||
border-radius: 5px;
|
||||
margin-right: 10px;
|
||||
padding: 1px 10px;
|
||||
font-weight: bolder;
|
||||
background-color: #181818;
|
||||
|
||||
}
|
||||
|
||||
#workspaces button.active, #workspaces button.focused{
|
||||
padding: 0 22px;
|
||||
background: rgba(84, 84, 84, 0.5);
|
||||
}
|
||||
|
||||
#tray,
|
||||
#mpd,
|
||||
#custom-weather,
|
||||
#cpu,
|
||||
#temperature,
|
||||
#memory,
|
||||
#sway-mode,
|
||||
#backlight,
|
||||
#pulseaudio,
|
||||
#custom-vpn,
|
||||
#disk,
|
||||
#custom-recorder,
|
||||
#custom-audiorec,
|
||||
#battery,
|
||||
#clock,
|
||||
#network {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in a new issue