aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaroslav <contact@yaroslavps.com>2019-10-08 15:29:59 +0300
committerYaroslav <contact@yaroslavps.com>2019-10-08 15:29:59 +0300
commit5028fa7ea213f435627d867e7ef1f9f19603ac16 (patch)
tree0e5e657b8f7c49793c4b377fd6a03d346c3772ec
parent4fd756b2f2d1c817b5e22a22d8252e5be7b552cb (diff)
downloadswayrice-5028fa7ea213f435627d867e7ef1f9f19603ac16.tar.gz
swayrice-5028fa7ea213f435627d867e7ef1f9f19603ac16.zip
nmtui shortcut, wf-recorder shortcut
-rw-r--r--dotfiles/.config/sway/config18
-rw-r--r--dotfiles/.config/waybar/config5
-rw-r--r--dotfiles/.config/waybar/style.css21
-rwxr-xr-xdotfiles/.scripts/i3barrecstatus8
-rwxr-xr-xdotfiles/.scripts/swayrecord14
5 files changed, 38 insertions, 28 deletions
diff --git a/dotfiles/.config/sway/config b/dotfiles/.config/sway/config
index c3c4253..c1a6c1d 100644
--- a/dotfiles/.config/sway/config
+++ b/dotfiles/.config/sway/config
@@ -65,6 +65,7 @@ set $ws10 10
# Open specific applications in specific modes
for_window [title="alsamixer"] floating enable
for_window [title="ncpamixer"] floating enable
+for_window [title="nmtui"] floating enable
for_window [title="i3_help"] floating enable, sticky enable
for_window [class="Lightdm-settings"] floating enable
for_window [class="Lxappearance"] floating enable, sticky enable
@@ -110,12 +111,7 @@ for_window [title="quakemite"] floating enable, sticky enable
# Outputs
output "*" background ~/.config/wall1.png fill
-output "eDP-1" scale 1.31 pos 960 1080
-output "HDMI-A-2" scale 1 pos 0 0
-output "DP-5" scale 1 pos 0 0
-output "DP-4" scale 1 pos 1920 0
-output "DP-7" scale 1 pos 0 0
-output "DP-6" scale 1 pos 1920 0
+output "eDP-1" scale 1.53 pos 0 0
# Keymaps
input * xkb_layout "us,es,ru"
@@ -192,16 +188,16 @@ bindsym --to-code {
$mod+grave exec --no-startup-id menuducksearch
$mod+Shift+grave exec --no-startup-id menuemoji
$mod+F1 exec --no-startup-id zathura ~/.config/i3/i3guide.pdf
+ $mod+Shift+n exec $term -e 'nmtui'
# Screenshot and recording
Print exec --no-startup-id menugrim -q
- Shift+Print exec --no-startup-id menugrim
- $mod+Print exec --no-startup-id dmenurecord
- $mod+Delete exec $stoprec
+ $mod+Print exec --no-startup-id menugrim
+ Shift+Print exec --no-startup-id swayrecord
# Sound
- $mod+Ctrl+m exec $term -e 'ncpamixer'
- $mod+Shift+m exec --no-startup-id menuoutput
+ $mod+Shift+m exec $term -e 'ncpamixer'
+ $mod+Ctrl+m exec --no-startup-id menuoutput
# Applications that start with no gaps
$mod+g exec --no-startup-id gimp; gaps inner current set 0; gaps outer current set 0
diff --git a/dotfiles/.config/waybar/config b/dotfiles/.config/waybar/config
index 3eb4dae..6ff853e 100644
--- a/dotfiles/.config/waybar/config
+++ b/dotfiles/.config/waybar/config
@@ -142,6 +142,11 @@
},
"on-click": "termite -e ncpamixer"
},
+ "custom/rec-status": {
+ "format": "{}",
+ "signal": 5,
+ "exec": "$HOME/.scripts/i3barrecstatus"
+ },
"custom/weather": {
"format": "{}",
"interval": 900,
diff --git a/dotfiles/.config/waybar/style.css b/dotfiles/.config/waybar/style.css
index 9429e0c..2223844 100644
--- a/dotfiles/.config/waybar/style.css
+++ b/dotfiles/.config/waybar/style.css
@@ -58,20 +58,6 @@ window#waybar {
border-radius: 0;
background: #0C3D27;
}
-#backlight,
-#memory,
-#cpu,
-#battery,
-#network,
-#tray,
-#pulseaudio,
-#mpd,
-#temperature,
-#custom-weather,
-#custom-swaykbd,
-#idle_inhibitor {
- padding: 0 8px;
-}
#tray {
background: #000000;
}
@@ -83,22 +69,23 @@ window#waybar {
#temperature,
#backlight,
#custom-weather,
+#custom-rec-status,
#custom-swaykbd {
color: #000000;
background: #8ec07c;
+ padding: 0 8px;
}
#cpu {
background: #f1fa8c;
}
+#network,
#battery{
background: #191919;
+ padding: 0 8px;
}
#battery.charging {
color: #8ec07c;
}
-#network{
- background: #191919;
-}
#memory, #cpu, #tray {
color: #1E1F23;
}
diff --git a/dotfiles/.scripts/i3barrecstatus b/dotfiles/.scripts/i3barrecstatus
new file mode 100755
index 0000000..5c8160a
--- /dev/null
+++ b/dotfiles/.scripts/i3barrecstatus
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ -f "$HOME/.recordingpid" ]; then
+ printf "rec ⏺"
+ exit
+fi
+
+printf ""
diff --git a/dotfiles/.scripts/swayrecord b/dotfiles/.scripts/swayrecord
new file mode 100755
index 0000000..8b43adb
--- /dev/null
+++ b/dotfiles/.scripts/swayrecord
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+if [ -f "$HOME/.recordingpid" ]; then
+ killall -SIGINT wf-recorder
+ rm -f ~/.recordingpid
+ notify-send "⏺ Screen recording" "Recording stopped"
+ killall -39 waybar
+ exit
+fi
+
+wf-recorder -f "$HOME/Video/recordings/$(date '+%y%m%d-%H%M-%S').mkv" &
+echo $! > ~/.recordingpid
+notify-send "⏺ Screen recording" "Recording started"
+killall -39 waybar