summaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
Diffstat (limited to 'sway')
-rw-r--r--sway/.config/sway/config204
-rwxr-xr-xsway/.config/sway/statusbar67
2 files changed, 0 insertions, 271 deletions
diff --git a/sway/.config/sway/config b/sway/.config/sway/config
deleted file mode 100644
index 508cb5f..0000000
--- a/sway/.config/sway/config
+++ /dev/null
@@ -1,204 +0,0 @@
1# pryr's sway config
2
3font pango: Input Mono 10
4smart_gaps on
5gaps inner 8
6focus_follows_mouse yes
7
8set $mod Mod4
9set $left h
10set $down j
11set $up k
12set $right l
13set $term foot
14set $menu dmenu_path | wofi --show drun -i | xargs swaymsg exec --
15
16default_border pixel 2
17default_floating_border normal
18hide_edge_borders smart
19
20output * bg /home/pryr/Downloads/walls/jpn.jpg fill
21
22input type:touchpad {
23 events disabled
24}
25
26# hide cursor
27seat *
28{
29 hide_cursor 2000
30}
31
32exec swayidle -w \
33 timeout 200 'swaylock -f -c 000000' \
34 timeout 210 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
35 before-sleep 'swaylock -f -c 000000'
36
37# Exit
38set $mode_system System (l) lock, (e) logout, (s) suspend, (r) reboot, (Shift+s) shutdown
39mode "$mode_system" {
40 bindsym l exec --no-startup-id swaylock -f -c 000000, mode "default"
41 bindsym e exec --no-startup-id swaymsg exit, mode "default"
42 bindsym s exec --no-startup-id systemctl suspend, mode "default"
43 bindsym r exec --no-startup-id systemctl reboot, mode "default"
44 bindsym Shift+s exec --no-startup-id systemctl poweroff, mode "default"
45
46 bindsym Return mode "default"
47 bindsym Escape mode "default"
48}
49bindsym $mod+shift+e mode "$mode_system"
50
51floating_modifier $mod normal
52bindsym $mod+Return exec $term
53bindsym $mod+Shift+Return exec --no-startup-id foot -T floating_term
54bindsym $mod+w kill
55bindsym $mod+d exec $menu
56bindsym $mod+Shift+c reload
57#moving
58bindsym $mod+$left focus left
59bindsym $mod+$down focus down
60bindsym $mod+$up focus up
61bindsym $mod+$right focus right
62bindsym $mod+Left focus left
63bindsym $mod+Down focus down
64bindsym $mod+Up focus up
65bindsym $mod+Right focus right
66bindsym $mod+Shift+$left move left
67bindsym $mod+Shift+$down move down
68bindsym $mod+Shift+$up move up
69bindsym $mod+Shift+$right move right
70bindsym $mod+Shift+Left move left
71bindsym $mod+Shift+Down move down
72bindsym $mod+Shift+Up move up
73bindsym $mod+Shift+Right move right
74# Switch to workspace
75bindsym $mod+1 workspace number 1
76bindsym $mod+2 workspace number 2
77bindsym $mod+3 workspace number 3
78bindsym $mod+4 workspace number 4
79bindsym $mod+5 workspace number 5
80bindsym $mod+6 workspace number 6
81bindsym $mod+7 workspace number 7
82bindsym $mod+8 workspace number 8
83bindsym $mod+9 workspace number 9
84bindsym $mod+0 workspace number 10
85# Move focused container to workspace
86bindsym $mod+Shift+1 move container to workspace number 1
87bindsym $mod+Shift+2 move container to workspace number 2
88bindsym $mod+Shift+3 move container to workspace number 3
89bindsym $mod+Shift+4 move container to workspace number 4
90bindsym $mod+Shift+5 move container to workspace number 5
91bindsym $mod+Shift+6 move container to workspace number 6
92bindsym $mod+Shift+7 move container to workspace number 7
93bindsym $mod+Shift+8 move container to workspace number 8
94bindsym $mod+Shift+9 move container to workspace number 9
95bindsym $mod+Shift+0 move container to workspace number 10
96# Layout stuff
97bindsym $mod+b splith
98bindsym $mod+v splitv
99# Switch the current container between different layout styles
100bindsym $mod+s layout stacking
101bindsym $mod+t layout tabbed
102bindsym $mod+e layout toggle split
103bindsym $mod+f fullscreen
104bindsym $mod+Shift+space floating toggle
105bindsym $mod+space focus mode_toggle
106bindsym $mod+a focus parent
107# Move the currently focused window to the scratchpad
108bindsym $mod+Shift+minus move scratchpad
109bindsym $mod+minus scratchpad show
110# Resizing containers
111mode "resize" {
112 bindsym $left resize shrink width 10px
113 bindsym $down resize grow height 10px
114 bindsym $up resize shrink height 10px
115 bindsym $right resize grow width 10px
116 bindsym Left resize shrink width 10px
117 bindsym Down resize grow height 10px
118 bindsym Up resize shrink height 10px
119 bindsym Right resize grow width 10px
120 bindsym Return mode "default"
121 bindsym Escape mode "default"
122}
123bindsym $mod+r mode "resize"
124
125bindsym $mod+Shift+w exec brave --enable-features=UseOzonePlatform --ozone-platform=wayland
126bindsym $mod+Shift+f exec foot ranger
127bindsym $mod+n exec foot nvim ~/.cache/bujo/todo.md
128bindsym XF86AudioRaiseVolume exec --no-startup-id pulsemixer --change-volume +5
129bindsym XF86AudioLowerVolume exec --no-startup-id pulsemixer --change-volume -5
130bindsym XF86AudioMute exec --no-startup-id pulsemixer --toggle-mute
131bindsym XF86AudioMicMute exec --no-startup-id pulsemixer --toggle-mute --id source-47
132bindsym XF86MonBrightnessDown exec --no-startup-id sudo ~/.bin/light d
133bindsym XF86MonBrightnessUp exec --no-startup-id sudo ~/.bin/light u
134bindsym ctrl+space exec makoctl dismiss
135bindsym ctrl+Mod1+l exec --no-startup-id swaylock -f -c 000000
136bindsym ctrl+Print exec --no-startup-id slurp | grim -t png -g - ~/screens/$(date '+%d-%m-%Y_%s_grim.png')
137bindsym Print exec --no-startup-id grim -t png ~/screens/$(date '+%d-%m-%Y_%s_grim.png')
138
139# color defines for zenburn styled i3
140set $bg #171a1f
141set $fg #e5e5e5
142set $hi #efef8f
143set $ac #909090
144set $tx #040404
145set $ia #8f8f8f
146set $be #76bfa4
147set $yw #ccdc90
148set $gn #88b090
149set $rd #e89393
150
151# set some nice colors border background text
152client.focused $ac $ac $tx
153client.unfocused $bg $bg $ia
154client.focused_inactive $bg $bg $ac
155client.urgent $rd $rd $tx
156
157# Read `man 5 sway-bar` for more information about this section.
158bar
159{
160 height 20
161 position top
162 wrap_scroll no
163 tray_output none
164 strip_workspace_name no
165 strip_workspace_numbers yes
166 status_padding 0
167 status_edge_padding 0
168 status_command exec ~/.config/sway/statusbar
169 pango_markup on
170 colors
171 {
172 separator $hi
173 statusline $fg
174 background $bg
175 active_workspace $hi $hi $bg
176 inactive_workspace $ac $ac $bg
177 focused_workspace $fg $fg $bg
178 urgent_workspace $yw $yw $bg
179 }
180}
181
182assign [app_id="Brave"] 2
183for_window [app_id="Brave"] inhibit_idle fullscreen
184for_window [title=floating_term] floating enable
185for_window [app_id="zathura"] floating enable
186for_window [class="^.*"] border pixel 5
187for_window [shell="xwayland"] title_format "<span>[X] %title</span>"
188for_window [title=".+[Ss]haring (Indicator|your screen)"] floating enable, move to scratchpad, nofocus
189for_window [class="Slack"] move window to workspace $ws4
190
191# gtk
192set $gnome-schema org.gnome.desktop.interface
193exec_always {
194 gsettings set $gnome-schema font-name 'Input Mono 10'
195}
196
197#autostart
198exec --no-startup-id ~/.bin/bat_check
199exec --no-startup-id sudo rtcwake -m mem -s 1
200exec --no-startup-id autotiling
201exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
202exec_always pkill kanshi; exec kanshi
203
204include /etc/sway/config.d/*
diff --git a/sway/.config/sway/statusbar b/sway/.config/sway/statusbar
deleted file mode 100755
index ba6dfa9..0000000
--- a/sway/.config/sway/statusbar
+++ /dev/null
@@ -1,67 +0,0 @@
1#!/bin/bash
2# Color definitions.
3export BLK="\e[30m"
4export RED="\e[31m"
5export GRN="\e[32m"
6export YLW="\e[33m"
7export BLU="\e[34m"
8export PUR="\e[35m"
9export CYN="\e[36m"
10export RST="\e[0m"
11
12vol(){
13 vol=$(pulsemixer --get-volume | awk '{print $1}')
14 mute=$(pulsemixer --get-mute)
15 if [ "$mute" == 1 ]; then
16 echo -e "<span color='gray'>muted</span>"
17 else
18 echo -e "<span color='gray'>vol</span> $vol%"
19 fi
20}
21
22bat() {
23 power=$(cat /sys/class/power_supply/BAT0/capacity)
24 status=$(cat /sys/class/power_supply/BAT0/status)
25 if [ "$status" == "Charging" ]; then
26 echo -e "<span color='gray'>+bat</span> $power%"
27 else
28 echo -e "<span color='gray'>bat</span> $power%"
29 fi
30}
31
32dte() {
33 dte=$(date +"%a, %b %d")
34 echo -e "<span color='gray'>date</span> $dte"
35}
36
37tie() {
38 tme=$(date +"%I:%M %p")
39 echo -e "<span color='gray'>time</span> $tme"
40}
41
42prepend_zero () {
43 seq -f "%02g" $1 $1
44}
45
46cmus () {
47 artist=$(echo -n $(cmus-remote -C status | grep "tag artist" | cut -c 12-))
48 if [[ $artist = *[!\ ]* ]]; then
49 song=$(echo -n $(cmus-remote -C status | grep title | cut -c 11-))
50 position=$(cmus-remote -C status | grep position | cut -c 10-)
51 minutes1=$(prepend_zero $(($position / 60)))
52 seconds1=$(prepend_zero $(($position % 60)))
53 duration=$(cmus-remote -C status | grep duration | cut -c 10-)
54 minutes2=$(prepend_zero $(($duration / 60)))
55 seconds2=$(prepend_zero $(($duration % 60)))
56 # echo -n "$artist - $song [$minutes1:$seconds1/$minutes2:$seconds2]"
57 echo -e "<span color='#a1efd3'>$song [$minutes1:$seconds1/$minutes2:$seconds2]</span>"
58 else
59 echo
60 fi
61}
62
63while :; do
64 echo " $(cmus) $(vol) $(bat) $(tie) $(dte) "
65 sleep 2
66done
67