This commit is contained in:
pws1453 2023-04-24 22:37:22 -04:00
commit 47386d72bd
3 changed files with 407 additions and 0 deletions

234
sway/config Normal file
View file

@ -0,0 +1,234 @@
### Sway Configuration
### Variables
set $mod Mod4
# Home row direction keys, like vim
set $left h
set $down j
set $up k
set $right l
# Sursor movement
set $fast 50
set $slow 10
# Preferred terminal emulator
set $term alacritty
# Screensaver
# ScreenSaver preferences
set $screensave_time 1800
set $sleep_time 2700
### Apperance
# Wallpaper
output * bg $HOME/.local/share/backgrounds/2023-01-03-23-13-24-DSC_2417.jpg fill
focus_wrapping no
# Window colors
# Class border Backgr Text indicator child_border
client.focused #C71585 #ffffff #C71585 #C71585 #C71585
client.unfocused #B941FF #4080bf #B941FF #B941FF #B941FF
client.urgent #9F00C5 #33ccff #33ccff #33ccff #9F00C5
# Gaps
gaps inner 10
gaps outer 4
default_border pixel 3
for_window [app_id="gnome-calendar"] floating enable
### Idle configuration
exec swayidle -w \
timeout $screensave_time 'swaylock -f -C /home/dg/.config/swaylock/config' \
timeout $sleep_time 'systemctl suspend' \
resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -f -C /home/dg/.config/swaylock/config'
### Key bindings
## Volume
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
# Media playerctl
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
bindsym XF86AudioPlay exec playerctl play-pause
# Calculator
bindsym XF86Calculator exec gnome-calculator
# Backlight
bindsym XF86MonBrightnessUp exec light -A 5
bindsym XF86MonBrightnessDown exec light -U 5
# Screenshot
bindsym $mod+Shift+s exec grim -g "$(slurp)" $HOME/Pictures/Screenshots/$(date +'screenshot_%y-%m-%d-%H:%M.png')
bindsym XF86Pictures exec grim -g "$(slurp)" - | swappy -f -
# Leds
bindsym XF86KbdBrightnessUp exec light -A 5 -s sysfs/leds/smc::kbd_backlight
bindsym XF86KbdBrightnessDown exec light -U 5 -s sysfs/leds/smc::kbd_backlight
# Screenshot
bindsym XF86LaunchA exec grim -g "$(slurp)" $HOME/Pictures/Screenshots/$(date +'screenshot_%y-%m-%d-%H:%M.png')
# Kill focused window
bindsym $mod+Shift+q kill
# mouse button for dragging.
floating_modifier $mod normal
# Lock screen
bindsym $mod+Shift+backspace exec swaylock -C $HOME/.swaylock/config
# Reload the configuration file
bindsym $mod+Shift+r reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'Do you really want to exit sway?' -b 'Yes, exit sway' 'swaymsg exit' --background=#005566 --button-background=#009999 --button-border=#002b33 --border-bottom=#002b33 --button-margin-right=10px
### Applications shortcuts
# Launcher
# bindsym $mod+space exec --no-startup-id wofi --show drun -I -i
bindsym $mod+space exec "rofi -show drun"
# 1password Quick Access
bindsym $mod+Shift+p exec 1password --quick-access
# Start a terminal
bindsym $mod+Return exec $term
# Browsers
bindsym $mod+Shift+f exec firefox
# Explorer
bindsym $mod+n exec alacritty --class=ranger sh -c "source ~/.zshrc & source ranger"
# spotify-tui
bindsym $mod+s exec alacritty --class=spotify -e "spt"
### Moving around:
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus 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
### Workspaces:
# Switch to workspace
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 10
# 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
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
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
### Layout stuff:
# toggle next window split direction
bindsym $mod+backspace split toggle
# set current floating window to sticky
bindsym $mod+Shift+Up sticky toggle
#bindsym $mod+s layout stacking
bindsym $mod+t layout tabbed
bindsym $mod+e layout toggle split
bindsym $mod+f fullscreen
bindsym $mod+Shift+space floating toggle
bindsym $mod+ctrl+space focus mode_toggle
### Scratchpad:
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show
# Move cursor
mode "mouse" {
bindsym KP_Left seat - cursor move -10 0
bindsym KP_Down seat - cursor move 0 10
bindsym KP_Up seat - cursor move 0 -10
bindsym KP_Right seat - cursor move 10 0
bindsym Shift+KP_Left seat - cursor move -50 0
bindsym Shift+KP_Down seat - cursor move 0 50
bindsym Shift+KP_Up seat - cursor move 0 -50
bindsym Shift+KP_Right seat - cursor move 50 0
bindsym --release KP_Begin seat - cursor press button1, seat - cursor release button1
bindsym --release KP_DELETE seat - cursor press button3, seat - cursor release button3
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Shift+m mode "mouse"
### Resizing containers:
mode "resize" {
bindsym $left resize shrink width 40px
bindsym $down resize grow height 40px
bindsym $up resize shrink height 40px
bindsym $right resize grow width 40px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
### Status Bar:
bar {
swaybar_command waybar
workspace_buttons yes
}
### Startup commands
exec GDK_BACKEND=wayland
exec CLUTTER_BACKEND=wayland
exec --no-startup-id gammastep-indicator -l 38.89511:-77.03637
exec mako
exec nm-applet --indicator
exec /usr/bin/blueman-applet
exec $HOME/.local/bin/autotiling
exec dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus
exec /home/dg/.cargo/bin/sworkstyle &> /tmp/sworkstyle.log
exec /usr/bin/1password --silent
### Input/Output devices
output HDMI-A-1 {
resolution 1920x1080
scale 1.0
pos 1600 0
scale_filter linear
}
input type:keyboard {
xkb_layout "us"
xkb_numlock enable
}
# Browser picture-in-picture mode
for_window [app_id="firefox" title="^Picture-in-Picture$"] \
floating enable, move position 1400 700, resize set width 20 ppt height 22 ppt, sticky enable

81
waybar/config Normal file
View file

@ -0,0 +1,81 @@
{
"modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["clock"],
/* "modules-right": ["tray", "custom/scratchpad-indicator", "pulseaudio", "custom/power"], */
"modules-right": ["tray", "custom/scratchpad-indicator", "network","battery","pulseaudio", "custom/power"],
"sway/mode": {
"format": "<span style=\"italic\">{}</span>"
},
"network": {
//"format-wifi": "{essid} ({signalStrength}%) ",
"format-wifi": "",
"format-ethernet": "{ifname} ",
"format-disconnected": "",
"max-length": 50,
"on-click": "kitty -e 'nmtui'"
},
"battery": {
"states": {
"good": 95,
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon} ",
"format-icons": [
"",
"",
"",
"",
""
]
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
},
"on-click": "toggleRemote"
},
"tray": {
"icon-size": 15,
"spacing": 10
},
"clock": {
// "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
// "format-alt": "{:%Y-%m-%d}"
"on-click": "gnome-calendar"
},
"pulseaudio": {
"format": "{volume}% {icon} ",
"format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": " {icon} {format_source}",
"format-muted": "0% {icon} ",
"format-source": "{volume}% ",
"format-source-muted": "",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"on-click": "pavucontrol"
},
"custom/power": {
"format": " ",
"on-click": "swaynag -t warning -m 'Power Menu Options' -b 'Logout' 'swaymsg exit' -b 'Restart' 'shutdown -r now' -b 'Shutdown' 'shutdown -h now' --background=#C71585 --button-background=#C71585 --button-border=#C71585 --border-bottom=#C71585 --button-text=#FFFFFF --text=#FFFFFF"
},
"custom/scratchpad-indicator": {
"format-text": "{}",
"return-type": "json",
"interval": 3,
"exec": "~/.local/bin/scratchpad-indicator 2> /dev/null",
"exec-if": "exit 0",
"on-click": "swaymsg 'scratchpad show'",
"on-click-right": "swaymsg 'move scratchpad'"
}
}

92
waybar/style.css Normal file
View file

@ -0,0 +1,92 @@
* {
border: none;
font-family: Font Awesome, Roboto, Arial, sans-serif;
font-size: 13px;
color: #ffffff;
border-radius: 20px;
}
window {
/*font-weight: bold;*/
}
window#waybar {
background: rgba(0, 0, 0, 0);
}
/*-----module groups----*/
.modules-right {
background-color: rgba(199, 21, 133,0.85);
margin: 2px 10px 0 0;
}
.modules-center {
background-color: rgba(199, 21, 133,0.85);
margin: 2px 0 0 0;
}
.modules-left {
margin: 2px 0 0 5px;
background-color: rgba(204,0,204,0.6);
}
/*-----modules indv----*/
#workspaces button {
padding: 1px 5px;
background-color: transparent;
}
#workspaces button:hover {
box-shadow: inherit;
background-color: rgba(0,153,153,1);
}
#workspaces button.focused {
background-color: rgba(199,21,133,0.85);
}
#clock,
#battery,
#cpu,
#memory,
#temperature,
#network,
#pulseaudio,
#custom-media,
#tray,
#mode,
#custom-power,
#custom-menu,
#idle_inhibitor {
padding: 0 10px;
}
#mode {
color: #CC00CC;
font-weight: bold;
}
#custom-power {
background-color: rgba(199,21,133,0.6);
border-radius: 100px;
margin: 5px 5px;
padding: 1px 1px 1px 6px;
}
/*-----Indicators----*/
#idle_inhibitor.activated {
color: #2dcc36;
}
#pulseaudio.muted {
color: #cc3436;
}
#battery.charging {
color: #2dcc36;
}
#battery.warning:not(.charging) {
color: #e6e600;
}
#battery.critical:not(.charging) {
color: #cc3436;
}
#temperature.critical {
color: #cc3436;
}
/*-----Colors----*/
/*
*rgba(0,85,102,1),#005566 --> Indigo(dye)
*rgba(0,43,51,1),#002B33 --> Dark Green
*rgba(0,153,153,1),#009999 --> Persian Green
*
*/