commit
cdc6752b9c
40 changed files with 743 additions and 0 deletions
@ -0,0 +1,13 @@
|
||||
alias c='tput reset' |
||||
alias grep='grep --color=auto' |
||||
alias hd='hexdump -C' |
||||
alias hf-d2h='printf "%x\n"' |
||||
alias hf-freemem='echo 3 | sudo tee /proc/sys/vm/drop_caches' |
||||
alias hf-h2d='printf "%d\n"' |
||||
alias hf-myip='curl ip1.dynupdate.no-ip.com; echo' |
||||
alias hf-netstat='netstat -ap | grep -v "^unix"' |
||||
alias hf-update-alias='alias > ~/.bash_aliases' |
||||
alias hf-update-grub='sudo grub-mkconfig -o /boot/grub/grub.cfg' |
||||
alias hf-ytmp3='youtube-dl --config-location "/home/emanuele/Documenti/Configurazioni/youtube-dl/audio.conf"' |
||||
alias lk='ls -lahF' |
||||
alias ls='ls --color=auto' |
@ -0,0 +1,20 @@
|
||||
# |
||||
# ~/.bashrc |
||||
# |
||||
|
||||
# If not running interactively, don't do anything |
||||
[[ $- != *i* ]] && return |
||||
|
||||
COLOR_CLEAN='\[\033[00m\]' |
||||
COLOR_BLUE='\[\033[01;34m\]' |
||||
COLOR_GREEN='\[\033[01;32m\]' |
||||
|
||||
#PS1='[\u@\h \W]\$ ' |
||||
PS1="[${COLOR_GREEN}\u@\h${COLOR_CLEAN} ${COLOR_BLUE}\W${COLOR_CLEAN}]\$ " |
||||
PATH="${PATH}:${HOME}/Documenti/Programmi/bin" |
||||
|
||||
set -o noclobber |
||||
|
||||
source /usr/share/doc/pkgfile/command-not-found.bash |
||||
source ~/.bash_aliases |
||||
[ -e "~/.bashrc_local" ] && source ~/.bashrc_local |
@ -0,0 +1,185 @@
|
||||
# This file has been auto-generated by i3-config-wizard(1). |
||||
# It will not be overwritten, so edit it as you like. |
||||
# |
||||
# Should you change your keyboard layout some time, delete |
||||
# this file and re-run i3-config-wizard(1). |
||||
# |
||||
|
||||
# i3 config file (v4) |
||||
# |
||||
# Please see https://i3wm.org/docs/userguide.html for a complete reference! |
||||
|
||||
set $mod Mod4 |
||||
|
||||
# Font for window titles. Will also be used by the bar unless a different font |
||||
# is used in the bar {} block below. |
||||
font pango:monospace 8 |
||||
|
||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left |
||||
# text rendering and scalability on retina/hidpi displays (thanks to pango). |
||||
#font pango:DejaVu Sans Mono 8 |
||||
|
||||
# The combination of xss-lock, nm-applet and pactl is a popular choice, so |
||||
# they are included here as an example. Modify as you see fit. |
||||
|
||||
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the |
||||
# screen before suspend. Use loginctl lock-session to lock your screen. |
||||
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork |
||||
|
||||
# NetworkManager is the most popular way to manage wireless networks on Linux, |
||||
# and nm-applet is a desktop environment-independent system tray GUI for it. |
||||
exec --no-startup-id nm-applet |
||||
|
||||
# Use pactl to adjust volume in PulseAudio. |
||||
set $refresh_i3status killall -SIGUSR1 i3status |
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status |
||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status |
||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status |
||||
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status |
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position |
||||
floating_modifier $mod |
||||
|
||||
# start a terminal |
||||
bindsym $mod+Return exec i3-sensible-terminal |
||||
|
||||
# kill focused window |
||||
bindsym $mod+Shift+q kill |
||||
|
||||
# start dmenu (a program launcher) |
||||
bindsym $mod+d exec dmenu_run |
||||
# There also is the (new) i3-dmenu-desktop which only displays applications |
||||
# shipping a .desktop file. It is a wrapper around dmenu, so you need that |
||||
# installed. |
||||
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop |
||||
|
||||
# change focus |
||||
bindsym $mod+j focus left |
||||
bindsym $mod+k focus down |
||||
bindsym $mod+l focus up |
||||
bindsym $mod+ograve focus right |
||||
|
||||
# alternatively, you can use the cursor keys: |
||||
bindsym $mod+Left focus left |
||||
bindsym $mod+Down focus down |
||||
bindsym $mod+Up focus up |
||||
bindsym $mod+Right focus right |
||||
|
||||
# move focused window |
||||
bindsym $mod+Shift+j move left |
||||
bindsym $mod+Shift+k move down |
||||
bindsym $mod+Shift+l move up |
||||
bindsym $mod+Shift+ograve move right |
||||
|
||||
# alternatively, you can use the cursor 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 |
||||
|
||||
# split in horizontal orientation |
||||
bindsym $mod+h split h |
||||
|
||||
# split in vertical orientation |
||||
bindsym $mod+v split v |
||||
|
||||
# enter fullscreen mode for the focused container |
||||
bindsym $mod+f fullscreen toggle |
||||
|
||||
# change container layout (stacked, tabbed, toggle split) |
||||
bindsym $mod+s layout stacking |
||||
bindsym $mod+w layout tabbed |
||||
bindsym $mod+e layout toggle split |
||||
|
||||
# toggle tiling / floating |
||||
bindsym $mod+Shift+space floating toggle |
||||
|
||||
# change focus between tiling / floating windows |
||||
bindsym $mod+space focus mode_toggle |
||||
|
||||
# focus the parent container |
||||
bindsym $mod+a focus parent |
||||
|
||||
# focus the child container |
||||
#bindsym $mod+d focus child |
||||
|
||||
# Define names for default workspaces for which we configure key bindings later on. |
||||
# We use variables to avoid repeating the names in multiple places. |
||||
set $ws1 "1" |
||||
set $ws2 "2" |
||||
set $ws3 "3" |
||||
set $ws4 "4" |
||||
set $ws5 "5" |
||||
set $ws6 "6" |
||||
set $ws7 "7" |
||||
set $ws8 "8" |
||||
set $ws9 "9" |
||||
set $ws10 "10" |
||||
|
||||
# switch to workspace |
||||
bindsym $mod+1 workspace number $ws1 |
||||
bindsym $mod+2 workspace number $ws2 |
||||
bindsym $mod+3 workspace number $ws3 |
||||
bindsym $mod+4 workspace number $ws4 |
||||
bindsym $mod+5 workspace number $ws5 |
||||
bindsym $mod+6 workspace number $ws6 |
||||
bindsym $mod+7 workspace number $ws7 |
||||
bindsym $mod+8 workspace number $ws8 |
||||
bindsym $mod+9 workspace number $ws9 |
||||
bindsym $mod+0 workspace number $ws10 |
||||
|
||||
# move focused container to workspace |
||||
bindsym $mod+Shift+1 move container to workspace number $ws1 |
||||
bindsym $mod+Shift+2 move container to workspace number $ws2 |
||||
bindsym $mod+Shift+3 move container to workspace number $ws3 |
||||
bindsym $mod+Shift+4 move container to workspace number $ws4 |
||||
bindsym $mod+Shift+5 move container to workspace number $ws5 |
||||
bindsym $mod+Shift+6 move container to workspace number $ws6 |
||||
bindsym $mod+Shift+7 move container to workspace number $ws7 |
||||
bindsym $mod+Shift+8 move container to workspace number $ws8 |
||||
bindsym $mod+Shift+9 move container to workspace number $ws9 |
||||
bindsym $mod+Shift+0 move container to workspace number $ws10 |
||||
|
||||
# reload the configuration file |
||||
bindsym $mod+Shift+c reload |
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) |
||||
bindsym $mod+Shift+r restart |
||||
# exit i3 (logs you out of your X session) |
||||
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" |
||||
|
||||
# resize window (you can also use the mouse for that) |
||||
mode "resize" { |
||||
# These bindings trigger as soon as you enter the resize mode |
||||
|
||||
# Pressing left will shrink the window’s width. |
||||
# Pressing right will grow the window’s width. |
||||
# Pressing up will shrink the window’s height. |
||||
# Pressing down will grow the window’s height. |
||||
bindsym j resize shrink width 10 px or 10 ppt |
||||
bindsym k resize grow height 10 px or 10 ppt |
||||
bindsym l resize shrink height 10 px or 10 ppt |
||||
bindsym ograve resize grow width 10 px or 10 ppt |
||||
|
||||
# same bindings, but for the arrow keys |
||||
bindsym Left resize shrink width 10 px or 10 ppt |
||||
bindsym Down resize grow height 10 px or 10 ppt |
||||
bindsym Up resize shrink height 10 px or 10 ppt |
||||
bindsym Right resize grow width 10 px or 10 ppt |
||||
|
||||
# back to normal: Enter or Escape or $mod+r |
||||
bindsym Return mode "default" |
||||
bindsym Escape mode "default" |
||||
bindsym $mod+r mode "default" |
||||
} |
||||
|
||||
bindsym $mod+r mode "resize" |
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status |
||||
# finds out, if available) |
||||
bar { |
||||
status_command i3status |
||||
} |
||||
|
||||
bindsym $mod+g exec --no-startup-id "i3lock" |
||||
exec --no-startup-id feh --bg-scale -d Immagini/Sfondi/10-12.jpg |
||||
exec --no-startup-id redshift -l geoclue2 |
@ -0,0 +1,37 @@
|
||||
general { |
||||
colors = true |
||||
interval = 5 |
||||
} |
||||
|
||||
order += "load" |
||||
order += "memory" |
||||
order += "ethernet _first_" |
||||
order += "volume master" |
||||
order += "tztime local" |
||||
|
||||
load { |
||||
format = "C: %5min" |
||||
} |
||||
|
||||
memory { |
||||
format = "M: %used" |
||||
format_degraded = "M: %used (!!)" |
||||
threshold_degraded = "10%" |
||||
threshold_critical = "5%" |
||||
} |
||||
|
||||
ethernet _first_ { |
||||
format_up = "E: %ip (%speed)" |
||||
format_down = "E: down" |
||||
} |
||||
|
||||
volume master { |
||||
format = "♪: %volume" |
||||
format_muted = "♪: muted" |
||||
device = "pulse:1" |
||||
} |
||||
|
||||
tztime local { |
||||
format = "%Y-%m-%d %H:%M:%S" |
||||
timezone = "Europe/Rome" |
||||
} |
@ -0,0 +1,7 @@
|
||||
[user] |
||||
email = hackfront@protonmail.ch |
||||
name = Hackfront |
||||
[color] |
||||
ui = auto |
||||
[alias] |
||||
cloner = clone --recursive |
@ -0,0 +1,7 @@
|
||||
[Desktop Entry] |
||||
Comment=Avvia WhatsApp Web in Chromium |
||||
Terminal=false |
||||
Name=WhatsApp Web |
||||
Exec=chromium --user-data-dir="/home/emanuele/Documenti/Profili Chromium/WhatsApp Web" --app="https://web.whatsapp.com" |
||||
Type=Application |
||||
Icon=/home/emanuele/Documenti/Profili Chromium/WhatsApp Web/icon.png |
@ -0,0 +1,14 @@
|
||||
[Desktop Entry] |
||||
Version=1.0 |
||||
Name=Telegram Desktop |
||||
Comment=Official desktop version of Telegram messaging app |
||||
TryExec=/home/emanuele/Documenti/Programmi/local/telegram-desktop/Telegram |
||||
Exec=/home/emanuele/Documenti/Programmi/local/telegram-desktop/Telegram -- %u |
||||
Icon=telegram |
||||
Terminal=false |
||||
StartupWMClass=TelegramDesktop |
||||
Type=Application |
||||
Categories=Chat;Network;InstantMessaging;Qt; |
||||
MimeType=x-scheme-handler/tg; |
||||
Keywords=tg;chat;im;messaging;messenger;sms;tdesktop; |
||||
X-GNOME-UsesNotifications=true |
@ -0,0 +1,18 @@
|
||||
const Main = imports.ui.main; |
||||
|
||||
function init() { |
||||
} |
||||
|
||||
function enable() { |
||||
// Add transparency
|
||||
Main.panel.actor.add_style_class_name('panel-transparency'); |
||||
Main.panel._leftCorner.actor.add_style_class_name('corner-transparency'); |
||||
Main.panel._rightCorner.actor.add_style_class_name('corner-transparency'); |
||||
} |
||||
|
||||
function disable() { |
||||
// Restore opacity
|
||||
Main.panel.actor.remove_style_class_name('panel-transparency'); |
||||
Main.panel._leftCorner.actor.remove_style_class_name('corner-transparency'); |
||||
Main.panel._rightCorner.actor.remove_style_class_name('corner-transparency'); |
||||
} |
@ -0,0 +1,15 @@
|
||||
{ |
||||
"_generated": "Generated by SweetTooth, do not edit", |
||||
"description": "Make GNOME top panel transparent!", |
||||
"name": "Transparent GNOME panel", |
||||
"shell-version": [ |
||||
"3.12", |
||||
"3.14", |
||||
"3.16", |
||||
"3.18", |
||||
"3.20" |
||||
], |
||||
"url": "https://github.com/ttomovcik/transparent-gnome-panel", |
||||
"uuid": "transparent-gnome-panel@ttomovcik.com", |
||||
"version": 1 |
||||
} |
@ -0,0 +1,8 @@
|
||||
.panel-transparency { |
||||
background-color: rgba(0,0,0,0.5); |
||||
} |
||||
|
||||
.corner-transparency { |
||||
-panel-corner-background-color: rgba(0,0,0,0.5); |
||||
-panel-corner-border-color: transparent; |
||||
} |
@ -0,0 +1,93 @@
|
||||
/* -*- mode: js; js-basic-offset: 4; indent-tabs-mode: nil -*- */ |
||||
/* |
||||
Copyright (c) 2011-2012, Giovanni Campagna <scampa.giovanni@gmail.com> |
||||
|
||||
Redistribution and use in source and binary forms, with or without |
||||
modification, are permitted provided that the following conditions are met: |
||||
* Redistributions of source code must retain the above copyright |
||||
notice, this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
notice, this list of conditions and the following disclaimer in the |
||||
documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the GNOME nor the |
||||
names of its contributors may be used to endorse or promote products |
||||
derived from this software without specific prior written permission. |
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY |
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
*/ |
||||
|
||||
const Gettext = imports.gettext; |
||||
const Gio = imports.gi.Gio; |
||||
|
||||
const Config = imports.misc.config; |
||||
const ExtensionUtils = imports.misc.extensionUtils; |
||||
|
||||
/** |
||||
* initTranslations: |
||||
* @domain: (optional): the gettext domain to use |
||||
* |
||||
* Initialize Gettext to load translations from extensionsdir/locale. |
||||
* If @domain is not provided, it will be taken from metadata['gettext-domain'] |
||||
*/ |
||||
function initTranslations(domain) { |
||||
let extension = ExtensionUtils.getCurrentExtension(); |
||||
|
||||
domain = domain || extension.metadata['gettext-domain']; |
||||
|
||||
// check if this extension was built with "make zip-file", and thus
|
||||
// has the locale files in a subfolder
|
||||
// otherwise assume that extension has been installed in the
|
||||
// same prefix as gnome-shell
|
||||
let localeDir = extension.dir.get_child('locale'); |
||||
if (localeDir.query_exists(null)) |
||||
Gettext.bindtextdomain(domain, localeDir.get_path()); |
||||
else |
||||
Gettext.bindtextdomain(domain, Config.LOCALEDIR); |
||||
} |
||||
|
||||
/** |
||||
* getSettings: |
||||
* @schema: (optional): the GSettings schema id |
||||
* |
||||
* Builds and return a GSettings schema for @schema, using schema files |
||||
* in extensionsdir/schemas. If @schema is not provided, it is taken from |
||||
* metadata['settings-schema']. |
||||
*/ |
||||
function getSettings(schema) { |
||||
let extension = ExtensionUtils.getCurrentExtension(); |
||||
|
||||
schema = schema || extension.metadata['settings-schema']; |
||||
|
||||
const GioSSS = Gio.SettingsSchemaSource; |
||||
|
||||
// check if this extension was built with "make zip-file", and thus
|
||||
// has the schema files in a subfolder
|
||||
// otherwise assume that extension has been installed in the
|
||||
// same prefix as gnome-shell (and therefore schemas are available
|
||||
// in the standard folders)
|
||||
let schemaDir = extension.dir.get_child('schemas'); |
||||
let schemaSource; |
||||
if (schemaDir.query_exists(null)) |
||||
schemaSource = GioSSS.new_from_directory(schemaDir.get_path(), |
||||
GioSSS.get_default(), |
||||
false); |
||||
else |
||||
schemaSource = GioSSS.get_default(); |
||||
|
||||
let schemaObj = schemaSource.lookup(schema, true); |
||||
if (!schemaObj) |
||||
throw new Error('Schema ' + schema + ' could not be found for extension ' |
||||
+ extension.metadata.uuid + '. Please check your installation.'); |
||||
|
||||
return new Gio.Settings({ settings_schema: schemaObj }); |
||||
} |
||||
|
@ -0,0 +1,150 @@
|
||||
const Tweener = imports.ui.tweener; |
||||
const Meta = imports.gi.Meta; |
||||
const GLib = imports.gi.GLib; |
||||
|
||||
const ExtensionUtils = imports.misc.extensionUtils; |
||||
const Me = ExtensionUtils.getCurrentExtension(); |
||||
const Convenience = Me.imports.convenience; |
||||
|
||||
let _settings = null; |
||||
let _WindowState; |
||||
|
||||
let _on_window_grab_begin, _on_window_grab_end; |
||||
let _on_move_changed, _on_resize_changed; |
||||
|
||||
let _allowed_grab_operations = []; |
||||
let _grab_moving_operations = [ |
||||
Meta.GrabOp.MOVING, |
||||
Meta.GrabOp.KEYBOARD_MOVING |
||||
]; |
||||
|
||||
let _grab_resizing_operations = [ |
||||
Meta.GrabOp.RESIZING_NW, |
||||
Meta.GrabOp.RESIZING_N, |
||||
Meta.GrabOp.RESIZING_NE, |
||||
Meta.GrabOp.RESIZING_E, |
||||
Meta.GrabOp.RESIZING_SW, |
||||
Meta.GrabOp.RESIZING_S, |
||||
Meta.GrabOp.RESIZING_SE, |
||||
Meta.GrabOp.RESIZING_W, |
||||
Meta.GrabOp.KEYBOARD_RESIZING_UNKNOWN, |
||||
Meta.GrabOp.KEYBOARD_RESIZING_NW, |
||||
Meta.GrabOp.KEYBOARD_RESIZING_N, |
||||
Meta.GrabOp.KEYBOARD_RESIZING_NE, |
||||
Meta.GrabOp.KEYBOARD_RESIZING_E, |
||||
Meta.GrabOp.KEYBOARD_RESIZING_SW, |
||||
Meta.GrabOp.KEYBOARD_RESIZING_S, |
||||
Meta.GrabOp.KEYBOARD_RESIZING_SE, |
||||
Meta.GrabOp.KEYBOARD_RESIZING_W |
||||
]; |
||||
|
||||
function init_grab_operations() { |
||||
_allowed_grab_operations = []; |
||||
if (_settings.get_boolean('transparent-on-moving')) { |
||||
_allowed_grab_operations.push(..._grab_moving_operations); |
||||
} |
||||
|
||||
if (_settings.get_boolean('transparent-on-resizing')) { |
||||
_allowed_grab_operations.push(..._grab_resizing_operations); |
||||
} |
||||
} |
||||
|
||||
function is_grab_operation_allowed(grab_op) { |
||||
return _allowed_grab_operations.indexOf(grab_op) > -1;
|
||||
} |
||||
|
||||
function set_opacity(window_actor, target_opacity, on_complete, check_if_completed) { |
||||
let transition_time = _settings.get_double('transition-time'); |
||||
|
||||
let state = _WindowState[window_actor.meta_window.get_pid()]; |
||||
let thread = Date.now(); |
||||
state.thread = thread; |
||||
|
||||
let complete_func = function() {
|
||||
state.thread = 0; |
||||
if (on_complete) {
|
||||
on_complete();
|
||||
} |
||||
}; |
||||
|
||||
if (transition_time < 0.001) {
|
||||
window_actor.opacity = target_opacity; |
||||
complete_func(); |
||||
} else { |
||||
Tweener.addTween(window_actor, { |
||||
time: transition_time, |
||||
transition: 'easeOutQuad', |
||||
opacity: target_opacity, |
||||
onComplete: complete_func |
||||
}); |
||||
if (check_if_completed) { |
||||
set_timeout(function() {
|
||||
if (state && state.thread == thread){ |
||||
window_actor.opacity = target_opacity; |
||||
complete_func(); |
||||
} |
||||
}, transition_time * 1000 + 100); // repair opacity if the Tween was canceled
|
||||
} |
||||
} |
||||
} |
||||
|
||||
function set_timeout(func, time){ |
||||
GLib.timeout_add(GLib.PRIORITY_DEFAULT, time, function() { |
||||
func(); |
||||
return false; |
||||
}); |
||||
} |
||||
|
||||
function window_grab_begin(meta_display, meta_screen, meta_window, meta_grab_op, gpointer) { |
||||
if (!meta_window || !is_grab_operation_allowed(meta_grab_op)) { |
||||
return; |
||||
} |
||||
|
||||
let window_actor = meta_window.get_compositor_private(); |
||||
let pid = meta_window.get_pid(); |
||||
|
||||
let state = _WindowState[pid]; |
||||
if (!state) { |
||||
state = { thread: -1, original_opacity: window_actor.opacity } |
||||
_WindowState[pid] = state; |
||||
} |
||||
|
||||
let opacity_value = _settings.get_int('window-opacity'); |
||||
set_opacity(window_actor, opacity_value); |
||||
} |
||||
|
||||
function window_grab_end(meta_display, meta_screen, meta_window, meta_grab_op, gpointer) { |
||||
if (!meta_window || !is_grab_operation_allowed(meta_grab_op)) { |
||||
return; |
||||
} |
||||
|
||||
let window_actor = meta_window.get_compositor_private(); |
||||
let pid = meta_window.get_pid(); |
||||
|
||||
let state = _WindowState[pid]; |
||||
set_opacity(window_actor, state.original_opacity, function() { delete _WindowState[pid]; }, true); |
||||
} |
||||
|
||||
function enable() { |
||||
_settings = Convenience.getSettings(); |
||||
init_grab_operations(); |
||||
_WindowState = {}; |
||||
_on_window_grab_begin = global.display.connect('grab-op-begin', window_grab_begin); |
||||
_on_window_grab_end = global.display.connect('grab-op-end', window_grab_end); |
||||
_on_move_changed = _settings.connect('changed::transparent-on-moving', init_grab_operations); |
||||
_on_resize_changed = _settings.connect('changed::transparent-on-resizing', init_grab_operations); |
||||
} |
||||
|
||||
function disable() { |
||||
global.display.disconnect(_on_window_grab_begin); |
||||
global.display.disconnect(_on_window_grab_end); |
||||
_settings.disconnect(_on_move_changed); |
||||
_settings.disconnect(_on_resize_changed); |
||||
|
||||
_WindowState = {}; |
||||
_settings.run_dispose(); |
||||
} |
||||
|
||||
function init() { |
||||
Convenience.initTranslations(); |
||||
} |
@ -0,0 +1,16 @@
|
||||
{ |
||||
"description": "Makes the window semi-transparent when moving or resizing", |
||||
"extension-id": "transparent-window-moving", |
||||
"gettext-domain": "gnome-shell-extensions", |
||||
"name": "Transparent Window Moving", |
||||
"settings-schema": "org.gnome.shell.extensions.transparent-window-moving", |
||||
"shell-version": [ |
||||
"3.26", |
||||
"3.28", |
||||
"3.30", |
||||
"3.32" |
||||
], |
||||
"url": "https://github.com/Noobsai/transparent-window-moving", |
||||
"uuid": "transparent-window-moving@noobsai.github.com", |
||||
"version": 3 |
||||
} |
@ -0,0 +1,75 @@
|
||||
// -*- mode: js2; indent-tabs-mode: nil; js2-basic-offset: 4 -*-
|
||||
|
||||
const Gio = imports.gi.Gio; |
||||
const GObject = imports.gi.GObject; |
||||
const Gtk = imports.gi.Gtk; |
||||
|
||||
const Gettext = imports.gettext.domain('gnome-shell-extensions'); |
||||
const _ = Gettext.gettext; |
||||
|
||||
const ExtensionUtils = imports.misc.extensionUtils; |
||||
const Me = ExtensionUtils.getCurrentExtension(); |
||||
const Convenience = Me.imports.convenience; |
||||
|
||||
|
||||
function init() { |
||||
Convenience.initTranslations(); |
||||
} |
||||
|
||||
const TransparentWindowMovingSettings = GObject.registerClass( |
||||
class TransparentWindowMovingSettings extends Gtk.Grid { |
||||
_init(params) { |
||||
super._init(params); |
||||
|
||||
this.margin = 24; |
||||
this.row_spacing = 6; |
||||
this.column_spacing = 6; |
||||
this.orientation = Gtk.Orientation.VERTICAL; |
||||
|
||||
this._settings = Convenience.getSettings(); |
||||
|
||||
this.opacity_label = new Gtk.Label({label: _("Opacity (0..255):"), halign: Gtk.Align.START}); |
||||
this.opacity_control = new Gtk.SpinButton({ |
||||
adjustment: new Gtk.Adjustment({ |
||||
lower: 0, |
||||
upper: 255, |
||||
step_increment: 1 |
||||
}) |
||||
}); |
||||
this.attach(this.opacity_label, 1, 1, 1, 1); |
||||
this.attach(this.opacity_control, 2, 1, 1, 1); |
||||
this._settings.bind('window-opacity', this.opacity_control, 'value', Gio.SettingsBindFlags.DEFAULT); |
||||
|
||||
this.transition_label = new Gtk.Label({label: _("Animation time:"), halign: Gtk.Align.START}); |
||||
this.transition_control = new Gtk.SpinButton({ |
||||
digits: 2, |
||||
adjustment: new Gtk.Adjustment({ |
||||
lower: 0, |
||||
upper: 1, |
||||
step_increment: 0.1 |
||||
}) |
||||
}); |
||||
this.attach(this.transition_label, 1, 2, 1, 1); |
||||
this.attach(this.transition_control, 2, 2, 1, 1); |
||||
this._settings.bind('transition-time', this.transition_control, 'value', Gio.SettingsBindFlags.DEFAULT); |
||||
|
||||
this.transparent_move_label = new Gtk.Label({label: _("Transparent on moving:"), halign: Gtk.Align.START}); |
||||
this.transparent_move_control = new Gtk.Switch(); |
||||
this.attach(this.transparent_move_label, 1, 3, 1, 1); |
||||
this.attach(this.transparent_move_control, 2, 3, 1, 1); |
||||
this._settings.bind('transparent-on-moving', this.transparent_move_control, 'active', Gio.SettingsBindFlags.DEFAULT); |
||||
|
||||
this.transparent_resize_label = new Gtk.Label({label: _("Transparent on resizing:"), halign: Gtk.Align.START}); |
||||
this.transparent_resize_control = new Gtk.Switch(); |
||||
this.attach(this.transparent_resize_label, 1, 4, 1, 1); |
||||
this.attach(this.transparent_resize_control, 2, 4, 1, 1); |
||||
this._settings.bind('transparent-on-resizing', this.transparent_resize_control, 'active', Gio.SettingsBindFlags.DEFAULT); |
||||
} |
||||
}); |
||||
|
||||
function buildPrefsWidget() { |
||||
let widget = new TransparentWindowMovingSettings(); |
||||
widget.show_all(); |
||||
|
||||
return widget; |
||||
} |
Binary file not shown.
@ -0,0 +1,24 @@
|
||||
<schemalist gettext-domain="gnome-shell-extensions"> |
||||
<schema id="org.gnome.shell.extensions.transparent-window-moving" path="/org/gnome/shell/extensions/transparent-window-moving/"> |
||||
<key name="window-opacity" type="i"> |
||||
<default>128</default> |
||||
<summary>Opacity</summary> |
||||
<description>This will decide how transparent dragged window.</description> |
||||
</key> |
||||
<key name="transition-time" type="d"> |
||||
<default>0.1</default> |
||||
<summary>Transition Time</summary> |
||||
<description>Animation time.</description> |
||||
</key> |
||||
<key name="transparent-on-moving" type="b"> |
||||
<default>true</default> |
||||
<summary>Transparent on moving</summary> |
||||
<description>Transparent on moving.</description> |
||||
</key> |
||||
<key name="transparent-on-resizing" type="b"> |
||||
<default>true</default> |
||||
<summary>Transparent on resizing</summary> |
||||
<description>Transparent on resizing.</description> |
||||
</key> |
||||
</schema> |
||||
</schemalist> |
After Width: | Height: | Size: 21 KiB |
@ -0,0 +1,3 @@
|
||||
[4F96D1932A9F858E] |
||||
Default=/home/emanuele/Documenti/Profili Firefox/Predefinito |
||||
Locked=1 |
@ -0,0 +1,13 @@
|
||||
[Install4F96D1932A9F858E] |
||||
Default=/home/emanuele/Documenti/Profili Firefox/Predefinito |
||||
Locked=1 |
||||
|
||||
[Profile0] |
||||
Name=Predefinito |
||||
IsRelative=0 |
||||
Path=/home/emanuele/Documenti/Profili Firefox/Predefinito |
||||
Default=1 |
||||
|
||||
[General] |
||||
StartWithLastProfile=1 |
||||
Version=2 |
@ -0,0 +1,27 @@
|
||||
SendEnv LANG |
||||
|
||||
Host UniFi-sala |
||||
HostName 192.168.1.2 |
||||
IdentityFile ~/.ssh/intranet |
||||
User admin |
||||
|
||||
Host Router-i5 |
||||
HostName 192.168.1.3 |
||||
IdentityFile ~/.ssh/intranet |
||||
User root |
||||
|
||||
Host Server-A95X |
||||
HostName 192.168.1.9 |
||||
IdentityFile ~/.ssh/intranet |
||||
User root |
||||
|
||||
Host Server-Z83 |
||||
HostName 192.168.1.10 |
||||
IdentityFile ~/.ssh/intranet |
||||
User root |
||||
|
||||
Host github.com |
||||
IdentityFile ~/.ssh/github |
||||
|
||||
Host gitlab.com |
||||
IdentityFile ~/.ssh/gitlab |
@ -0,0 +1,5 @@
|
||||
dir_prefix = /home/emanuele/Scaricati/Web |
||||
dirstruct = on |
||||
header = DNT: 1 |
||||
robots = off |
||||
user_agent = Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0 |
@ -0,0 +1,6 @@
|
||||
--console-title |
||||
--continue |
||||
-f best |
||||
-o '/home/emanuele/Musica/%(title)s.%(ext)s' |
||||
--extract-audio |
||||
--audio-format mp3 |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 12 MiB |
Loading…
Reference in new issue